From e9821a3a0b33bbfe61bd356422ca99c8c6d061d4 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 29 Oct 2026 06:56:28 +0100 Subject: [PATCH] Auto update --- manual-daemon.html | 1076 ++++++++++++++++++++++++++++++++++++++++---- manual-de.html | 747 +++++++++++++++++++++++++----- manual-es.html | 768 +++++++++++++++++++++++++------ manual-fr.html | 802 +++++++++++++++++++++++++++------ manual-it.html | 807 ++++++++++++++++++++++++++------- manual-ja.html | 671 +++++++++++++++++++++++---- manual-ko.html | 674 ++++++++++++++++++++++----- manual-log.html | 64 ++- manual-pl.html | 725 ++++++++++++++++++++++++----- manual-pt.html | 709 ++++++++++++++++++++++++----- manual-ro.html | 745 ++++++++++++++++++++++++------ manual-ru.html | 682 ++++++++++++++++++++++++---- manual-sv.html | 748 ++++++++++++++++++++++++------ manual-uk.html | 749 ++++++++++++++++++++++++------ manual-zh.html | 588 ++++++++++++++++++++---- manual.html | 618 ++++++++++++++++++++++--- 16 files changed, 9425 insertions(+), 1748 deletions(-) diff --git a/manual-daemon.html b/manual-daemon.html index 21690236..a49bc89a 100644 --- a/manual-daemon.html +++ b/manual-daemon.html @@ -96,8 +96,17 @@ Synopsis
-snapraidd [-c, --conf CONFIG] [-f, --foreground] [-p, --pidfile FILE]
-    [-N, --no-cache] [-v, --verbose]
+snapraidd [-c, --conf CONFIG] [-C, --engine-conf FILE] [-i, --instance NAME]
+    [-f, --foreground] [-p, --pidfile FILE] [-N, --no-cache]
+    [-v, --verbose]
+
+
+snapraidd [-i, --instance NAME] [--service-install] [--service-remove]
+    [--service-start-all] [--service-stop-all] [--service-remove-all]
+    [--service-list]
+
+
+snapraidd [-g, --gen-auth USERNAME:PASSWORD]
 
 snapraidd [-V, --version] [-H, --help]
@@ -143,6 +152,16 @@ argument to the configure script).
 
+-C, --engine-conf FILE +
+Specifies the path to the SnapRAID array configuration file. +If not specified, the SnapRAID engine's default configuration resolution is used. +
+
+
+
+
+
-f, --foreground
Runs the process in the foreground. This prevents the @@ -153,6 +172,22 @@ daemon from detaching from the terminal (daemonizing).
+-i, --instance NAME +
+Specifies the daemon instance name. When running multiple +instances of the daemon, this option separates their namespaces +(e.g., config file suffix, PID file, logging identifiers, and +Windows service names). The name must only contain alphanumeric +characters, hyphens, and underscores, with a maximum length of 63 +characters. On Windows, instance names are converted to lowercase +because Windows service names are case-insensitive. On Unix, the +supplied letter case is preserved. +
+
+
+
+
+
-p, --pidfile FILE
Overrides the default location for the PID file. Default: @@ -193,6 +228,79 @@ Verbose logging including all HTTP requests.
+-g, --gen-auth USERNAME:PASSWORD +
+Generates a secure Argon2id credential string for the configured +username and password, and prints the configuration line ready to +be added to the snapraidd.conf file. +
+
+
+
+
+
+--service-install +
+[Windows Only] Installs and starts the current configuration as a Windows service. +If an instance name is specified using the -i option, a dedicated +service is created and started for that instance. This allows running +multiple instances of the daemon simultaneously. +
+
+
+
+
+
+--service-remove +
+[Windows Only] Stops and removes the Windows service associated with the +current configuration. If an instance name is specified using -i, +only that specific instance service is stopped and removed. +
+
+
+
+
+
+--service-start-all +
+[Windows Only] Starts all Windows services associated with SnapRAID Daemon +(i.e., all services starting with snapraidd). +
+
+
+
+
+
+--service-stop-all +
+[Windows Only] Stops all Windows services associated with SnapRAID Daemon. +
+
+
+
+
+
+--service-remove-all +
+[Windows Only] Stops and removes all Windows services associated with +SnapRAID Daemon. +
+
+
+
+
+
+--service-list +
+[Windows Only] Lists all registered Windows services associated with +SnapRAID Daemon and their current execution status. +
+
+
+
+
+
-H, --help
Prints a short help screen. @@ -267,9 +375,9 @@ Configuring the notify_result system to receive alerts regarding array health and task outcomes. -

To make manual changes to the /etc/snapraidd.conf file effective, -you must either restart the daemon or send a SIGHUP signal to the -running process. +

To make manual changes to runtime-reloadable options in the +/etc/snapraidd.conf file effective, send a SIGHUP signal to the +running process. Changes to sys_* options require a daemon restart.

Example:

 sudo killall -HUP snapraidd
@@ -289,11 +397,12 @@ Health
 
 

The array's aggregate health is determined by evaluating historical log data alongside real-time hardware telemetry. -

If the array transitions into a problematic state, the daemon issues -an alert through the configured notification system. Note that the -detection of such states is not instantaneous, it occurs during the -telemetry collection cycle, the frequency of which is determined by -the probe_interval_minutes option. +

If the array transitions into a problematic health state, the daemon +issues an alert through the configured notification system. +The PENDING state is informational and does not by itself trigger an alert. +Note that the detection of such states is not instantaneous, it occurs +during the telemetry collection cycle, the frequency of which is determined +by the probe_interval_minutes option.

In the REST API, the health state is reported by the health field. Whenever the health is not PASSED, a supplementary health_reason field is provided to give a discursive explanation of the specific condition or @@ -312,6 +421,9 @@ The health has not yet been assessed. The daemon requires a successful hardware probe where all disks are spinning at least once to read SMART attributes. Issuing an up command is sufficient to satisfy this. +PENDING is an informational state, not a problematic health +state, and does not by itself raise the severity of result +notifications.

@@ -333,13 +445,25 @@ In this state, scheduled maintenance remains active.
+DEGRADED +
+The filesystem UUID does not match the UUID recorded in the +content file, or an associated physical device is currently disconnected. +This typically indicates that the expected filesystem might not be +present at the mount point (for example, if the disk is not mounted), +or that the storage configuration is incomplete (such as a missing member +of a multi-device volume), representing a serious array condition without +implying physical hardware failure. +Automated maintenance is suspended in this state, and manual +intervention is required. +
+
+
+
PREFAIL
-The SMART telemetry reports a pre-failing condition (e.g., -reallocated sectors), or a task encountered input/output errors -while accessing files. -File input/output errors are temporary and they are cleared -automatically after a successful sync. +The SMART telemetry reports a pre-failing condition, or a +task encountered input/output errors while accessing files. Automated maintenance is suspended in this state, and manual intervention is required.
@@ -355,15 +479,48 @@ manual intervention is required.
-

Individual tasks also maintain a health state reflecting only the +

Physical Input/Output errors also affect disk health. Data and parity +I/O errors that SnapRAID can associate with a block, as well as I/O +errors associated with a concrete filesystem object, are tracked as +transient disk errors. Transient disk errors remain active until a later +scrub reports that no blocks are bad. +

By contrast, unlocalized data and parity I/O errors, such as close errors, +are still counted in the lifetime error_io counter but do not affect disk +health. +

Individual tasks also maintain a health state reflecting only the problems identified during that specific operation. For example, an array in a CORRUPT state may still produce a PASSED result for a probe task if that operation encountered no specific errors. -

In the PREFAIL or FAILING state, the Maintenance button in the Web +

In the DEGRADED, PREFAIL or FAILING state, the Maintenance button in the Web UI is replaced with a Refresh button. This allows you to force the daemon to re-scan the state of the array (by re-reading the content file) after any manual fixes have been performed via the command line. +

If the array entered the PREFAIL state due to input/output errors, +and the content file loaded after clicking Refresh contains no +marked bad sectors, the input/output error counters for each disk +are automatically cleared, allowing the array to re-enter the +PASSED state. +

Note that clicking the Refresh button does not cause the daemon +to verify that the underlying input/output errors are resolved. +Instead, the daemon assumes that you have: +

    +
  • +Checked the log files manually to understand the cause of the failure. +
  • +
  • +Resolved the root cause of the input/output errors. +
  • +
  • +Re-run the command that failed to ensure that the errors are gone. +
  • +
  • +Used the fix and scrub commands to restore any files that needed +to be recovered to clear any marked bad sectors. +
  • +
+

If the underlying cause of the input/output errors is not resolved, +the errors will eventually reappear.

@@ -395,14 +552,18 @@ flag is manually enabled in this file.

operational settings like maintenance schedules, scrub intensities, and disk monitoring intervals. These parameters are fully accessible and can be modified in real-time via the API. -Changes made through the REST interface are instantly applied -to the running process and persisted back to this file while -preserving all existing manual comments. -

To make changes to the /etc/snapraidd.conf file effective, you must -either restart the daemon or send a SIGHUP signal to the running process. -This is required for any manual edit to ensure the daemon's memory state -stays in sync with the file and to prevent the API from accidentally -overwriting your changes. +Changes made through the REST interface are applied to +the running process and written back to this file +while preserving all existing manual comments. +

Configuration changes are not applied atomically to all runtime components +and existing operations. A successful configuration update means that +the new configuration has been accepted, but does not guarantee that +every component or previously scheduled task has already switched to it. +

After manually editing /etc/snapraidd.conf, apply the change before +making configuration changes through the API to prevent the daemon from +overwriting the manual edit with its memory state. Runtime-reloadable +options can be applied with a SIGHUP signal. Changes to sys_* options +require a daemon restart because a SIGHUP that changes them is rejected.

Example:

 sudo killall -HUP snapraidd
@@ -416,9 +577,11 @@ System
 

These settings control the core execution environment and the underlying daemon. -These options are not visible or modifiable via the REST API. -They require a manual edit of the configuration file and a -configuration reload (SIGHUP) or daemon restart to apply. +

These options are not visible or modifiable via the REST API. +All sys_* options are read at daemon startup and changing any +of them requires a daemon restart. A SIGHUP reload which changes +a sys_* option is rejected and the previous configuration +remains active.

sys_engine @@ -450,14 +613,103 @@ sys_log_retention_days age at which old command logs are deleted. Logs are kept indefinitely if this is set to 0 or left unset.

+
+

+sys_log_compression +

+

Enables compression of individual SnapRAID task log files in gzip (.gz) +format. +

Setting this option to 1 enables gzip compression, saving files with the +.log.gz extension. If set to 0 or left empty (the default), log files are +saved as plain text with the .log extension. +

Gzip compression requires the daemon to be built with zlib support. If +compression is enabled on a build without zlib, the daemon logs an error +and falls back to uncompressed logs. +

Changing this option only affects newly created task logs. Existing logs +(whether uncompressed .log or compressed .log.gz) continue to be read +transparently by the daemon when reconstructing array history, and are +purged by sys_log_retention_days regardless of format. +

+
+

+sys_shutdown_on +

+

A comma-separated list of events that trigger an automatic system shutdown. +

Supported events are: +

+
+
+maintenance +
+Shuts down the host after scheduled maintenance finishes +its finalization. Post-hooks and Docker unpause operations +are executed, and the final report is sent, before initiating +the shutdown, even if intermediate dependent phases (such as +scrub) were canceled due to errors. If an emergency shutdown +is triggered by a prefail or failing health state, post-hooks +and Docker unpause operations are not executed. +
+
+
+
+prefail/failing +
+Shuts down the host immediately when array health +transitions to prefail/failing. +
+
+
+

For both prefail and failing emergency shutdowns, if the daemon is still +able to process runner tasks, it first sends the emergency report. +Queued tasks and post-hooks are canceled, and paused Docker containers are +not unpaused, to prevent further disk activity. If daemon termination or +a fatal daemon failure is already in progress, the emergency shutdown +may proceed without sending the report. +

Spaces around commas are ignored. +

Health-based shutdowns (prefail and failing) trigger strictly on a +state transition from an established health state. If the array is +already in a prefail or failing state when the daemon starts, +shutdown is not triggered. This allows you to start the machine and +perform manual maintenance or recovery without triggering an +immediate shutdown. +

+
+

+sys_smartignore +

+

Allows you to ignore specific SMART attributes for one or more disks. +Changes of ignored attributes are omitted from status reports and do not +generate warning notifications. The attributes continue to be collected +and are exported in the REST API as ignored. Typical attributes to ignore +are Spin_Up_Time and Raw_Read_Error_Rate. You can also use Error_Protocol +and Error_Medium to ignore device-level protocol or medium errors. +

Normalized-value degradations of critical PREFAIL SMART attributes generate +warning notifications. Normalized-value changes of non-critical PREFAIL +attributes are informational, even when not ignored. sys_smartignore can +still be used to hide noisy vendor-specific changes from reports and to +suppress warnings from actionable raw/error-counter changes. +

sys_smartignore does not affect SMART failure states reported by smartctl. +If an attribute is reported as currently failed, it will still trigger a +critical notification and degrade the array health. +

The option is a sequence of words separated by spaces. +The first word is a disk name or '*' for all disks. +The subsequent words are attribute numbers or names (case-insensitive). +

Examples: +

+sys_smartignore=parity 188 Command_Timeout
+sys_smartignore=d1 Error_Protocol
+sys_smartignore=* Spin_Up_Time Raw_Read_Error_Rate
+
+

Network & REST API

-

These settings control the network interface. These options are not -visible from the REST API. They require a manual edit of the -configuration file and a configuration reload (SIGHUP) to apply. +

These settings control the network interface. +

These options are not visible or modifiable via the REST API. +They require a manual edit of the configuration file and a +configuration reload (SIGHUP) or daemon restart to apply.

net_enabled @@ -605,6 +857,13 @@ The absolute path to the hook script.

+hook_docker_pause +
+The docker containers to pause. +
+
+
+
notify_run_as_user
The account used for notification commands. @@ -619,6 +878,14 @@ The command used for health monitoring pings.
+notify_start +
+The command used to notify the start of maintenance, heal, +undelete, and refresh tasks. +
+
+
+
notify_result
The command used for sending task reports. @@ -647,7 +914,7 @@ rules:
ZIP_Filename
-If a simple filename is provided (e.g., commander.zip), +If a simple filename is provided (e.g., commander.zip or brutale.zip), the daemon searches for it in $PREFIX/share/snapraidd/ or /usr/share/snapraidd/.
@@ -683,6 +950,32 @@ UI until the daemon is restarted. This behavior can be bypassed by using the -N, --no-cache option during daemon startup, which is recommended for development environments only.

+
+

+net_auth_credential +

+

Specifies the credentials required to access the REST API and dashboard +via HTTP Basic Authentication. If empty or omitted, authentication is +disabled. +

The credentials must be formatted as: +

+username:$argon2id$v=19$m=65536,t=3,p=1$salt_base64$hash_base64
+
+

This is calculated using Argon2id with 64MiB of memory cost (m=65536), +3 iterations (t=3), and 1 thread (p=1). +

A secure configuration line can be generated by running the daemon with +the -g, --gen-auth command line argument. +

Note that the /metrics endpoint is exempt from authentication to +support unauthenticated scraping by Prometheus or other monitoring tools. +

WARNING: Basic Authentication transmits credentials in plaintext (Base64) +over the network. Using this over unencrypted HTTP is NOT secure. +You should deploy an HTTPS encryption layer (such as a reverse proxy +like Caddy, Nginx, or Traefik) or restrict network access to a trusted, +secure network (e.g., using a VPN or Tailscale). +

This option is security-sensitive and cannot be modified via the REST +API. It requires a manual edit and a configuration reload (SIGHUP) +to apply. +

@@ -694,6 +987,17 @@ the SnapRAID Daemon. net_config_full_access option is enabled.

+check_updates +

+

Enables (1) or disables (0) periodic check for daemon and engine updates +on GitHub via the curl CLI tool. +If enabled, the daemon queries the GitHub API every 12 hours in the +background. The WebUI displays the update status and alerts you when +new versions are available, and status reports include an update notice. +If missing or set to 0, update checking is disabled. +

+
+

maintenance_schedule

Defines the timing for the automated maintenance sequence, which @@ -708,7 +1012,7 @@ represented by their short names (Mon, Tue, Wed, Thu, Fri, Sat, Sun). "Mon 03:00, Thu 04:00" - Run every Monday at 3 AM and Thursday at 4 AM.

-

+

sync_threshold_deletes

Sets the number of deleted or missing files that will trigger an automatic @@ -720,7 +1024,7 @@ enforced during automated maintenance schedules and tasks initiated through the Web UI.

-

+

sync_threshold_updates

Sets the number of modified or updated files that will trigger an @@ -733,7 +1037,7 @@ during automated maintenance schedules and tasks initiated through the Web UI.

-

+

sync_prehash

If set to 1, the sync command is executed with the --prehash option. @@ -745,7 +1049,7 @@ under critical system stress. If missing or set to 0, no pre-hashing is performed.

-

+

sync_prevent_truncations

If set to 1, the sync is halted to prevent overwriting @@ -756,7 +1060,7 @@ If this is missing or set to 0, the sync is allowed to proceed even if files have shrunk to zero size.

-

+

scrub_percentage

Determines the portion of the array verified after a successful sync. @@ -765,7 +1069,7 @@ You may use decimal points to specify fractions of a percent If missing or set to 0, the scrub phase is skipped entirely.

-

+

scrub_older_than

Specifies that only blocks older than the defined number of days @@ -774,7 +1078,7 @@ older data while skipping recently synced blocks. If missing or set to 0, no age-based filtering is applied.

-

+

touch_zero_subseconds

If set to 1, a specific timestamp alignment pass is performed @@ -795,7 +1099,7 @@ file blocks.

Disk Monitoring & Power

-

The following settings manage how the daemon interacts with physical +

These settings manage how the daemon interacts with physical hardware to monitor disk health and optimize energy consumption

@@ -815,6 +1119,12 @@ the specified duration of inactivity.

Note that this applies only to data and parity disks configured in snapraid.conf. Any other disks, including extra disks, are not subject to spindown. +

You can specify a single integer (e.g. 15) to apply the timeout to both +data and parity disks, or two comma-separated integers (e.g. 15, 30) +to set separate timeouts for data and parity disks respectively. +A value of 0 disables spindown for that specific disk type. For example, +0, 30 disables spindown for data disks but spins down parity disks +after 30 idle minutes.

This timer monitors the global activity of the disks across the entire operating system. A disk will only be spun down if it has remained completely idle for the specified period. If any other application, @@ -829,39 +1139,268 @@ hook_script

Defines an absolute path to an executable script to be triggered by daemon events.

The script is executed with a single positional argument that -represents the lifecycle stage of the task currently being processed -by the daemon: +represents the current stage of a hook lifecycle. A hook lifecycle +is an uninterrupted session covering one or more consecutive tasks +that access the array:

task-begin
-Triggered immediately before the daemon begins a -scheduled sequence of actions that access the array -(e.g., sync, scrub, or maintenance). +Triggered immediately before the daemon begins an +array-access session (e.g., sync, scrub, or maintenance). +This starts a hook lifecycle, which may span multiple +consecutive task groups.
task-end
-Triggered after the entire sequence of actions has -concluded successfully. +Triggered after the session has concluded successfully. +This closes the matching hook lifecycle and uses the same +hook configuration snapshot captured when task-begin was +executed. +
+
+
+
+task-error +
+Triggered if the session is aborted, interrupted, or +encounters an operational failure. This closes the active hook +lifecycle using the same hook configuration snapshot and +acquired-resource state captured when task-begin was executed.
-

task-error: Triggered if the task sequence is aborted, interrupted, -

or encounters an operational failure. -

Note that 'task-end' reflects only whether the task finished its -execution cycle. It does not necessarily reflect hardware or data -integrity. For example, a sync command may return 'task-end' even if -the array is technically in a corrupt state, provided the sync process -itself finished without crashing. +

If task-begin fails, task-error is not invoked. The task-begin +handler is responsible for reverting any partial changes before +returning an error. +

Hook lifecycle boundaries do not necessarily match task group boundaries. +When consecutive array-access tasks can safely share the same paused +state (such as paused Docker containers and pre-hook preparations), the +daemon may postpone hook cleanup and keep that state active across the +boundary between two task groups. As a result, a task-begin event may +occur while processing one group and the corresponding task-end or +task-error event may occur only after tasks belonging to a subsequent +group have completed. +

The hook configuration is snapshotted when the hook lifecycle begins +and remains associated with that lifecycle until its cleanup attempt +completes. +Configuration reloads do not alter an already active hook lifecycle. +In particular, the corresponding task-end or task-error hook, +the post-script, and Docker cleanup always use the same hook configuration +and acquired-resource state established by the matching task-begin, +even if the daemon configuration changes in the meantime. +

A new configuration becomes effective for hooks when a new hook lifecycle +is started after the cleanup attempt for the previous lifecycle has +completed. +

Note that 'task-end' reflects only whether the hook lifecycle finished +its execution cycle successfully. It does not necessarily reflect +hardware or data integrity. For example, a sync command may return +'task-end' even if the array is technically in a corrupt state, provided +the sync process itself finished without crashing.

Future versions of the daemon will introduce new event types that may not relate to array access or follow the task- naming convention. It is strongly recommended to implement a default handler to ignore -unrecognized events -

SECURITY REQUIREMENTS: +unrecognized events. +

The script is executed with several environment variables providing details +about the execution context: +

+
+
+SNAPRAID_EVENT +
+The event type (task-begin, task-end or task-error). +
+
+
+
+SNAPRAID_NUMBER +
+The unique sequential ID of the task. +
+
+
+
+SNAPRAID_COMMAND +
+The specific command name (e.g. sync, scrub, diff). +
+
+
+
+SNAPRAID_HIGH_COMMAND +
+The high-level command if part of a group (e.g. +maintenance, heal or undelete). +
+
+
+
+SNAPRAID_LOG_FILE +
+Path to the task execution log file. +
+
+
+
+SNAPRAID_RUN_AS_USER +
+The user account configured for running the hooks. +
+
+
+
+SNAPRAID_DAEMON_CONFIG +
+Path to the daemon configuration file. +
+
+
+
+SNAPRAID_ENGINE_CONFIG +
+Path to the SnapRAID engine configuration file. +
+
+
+
+SNAPRAID_INSTANCE +
+The name of the daemon instance (if specified via -i). +
+
+
+

During task-end and task-error events, the following additional +variables are also available: +

+
+
+SNAPRAID_ARRAY_HEALTH +
+The health classification of the array after the +task (passed, prefail, failing, degraded, corrupt or pending). +
+
+
+
+SNAPRAID_HEALTH +
+The health classification of the task. +
+
+
+
+SNAPRAID_STATUS +
+The exit status of the task (terminated, signaled, canceled). +
+
+
+
+SNAPRAID_EXIT_CODE +
+The exit code of the task if terminated. +
+
+
+
+SNAPRAID_EXIT_SIGNAL +
+The termination signal of task if signaled. +
+
+
+
+SNAPRAID_ELAPSED_SECONDS +
+The total task execution time in seconds. +
+
+
+
+SNAPRAID_ERROR_IO +
+Count of input/output errors during the task. +
+
+
+
+SNAPRAID_ERROR_DATA +
+Count of data errors during the task. +
+
+
+
+SNAPRAID_ERROR_SOFT +
+Count of soft errors during the task. +
+
+
+
+SNAPRAID_ERROR_RECOVERED +
+Count of recovered blocks/errors during the task. +
+
+
+
+SNAPRAID_ERROR_UNRECOVERABLE +
+Count of unrecoverable blocks/errors during the task. +
+
+
+

For diff and sync commands, modification metrics are also exposed: +

+
+
+SNAPRAID_DIFF_EQUAL +
+Count of equal/unchanged files. +
+
+
+
+SNAPRAID_DIFF_ADDED +
+Count of added files. +
+
+
+
+SNAPRAID_DIFF_REMOVED +
+Count of removed files. +
+
+
+
+SNAPRAID_DIFF_UPDATED +
+Count of updated/modified files. +
+
+
+
+SNAPRAID_DIFF_MOVED +
+Count of moved files. +
+
+
+
+SNAPRAID_DIFF_COPIED +
+Count of copied files. +
+
+
+

SECURITY REQUIREMENTS: * The script path MUST be absolute (must start with /). * The script AND the directory containing the script MUST be owned by

the daemon's real UID, effective UID, or root (UID 0). @@ -891,11 +1430,25 @@ the exact reason.

+hook_docker_pause +

+

Specifies a comma-separated list of Docker containers to pause during +tasks that access the array (e.g., plex, transmission). +

At the start of a hook lifecycle (immediately before executing the +task-begin hook), the daemon pauses only the listed containers that +are running and not already paused. When the hook lifecycle concludes, +it attempts to unpause only those containers. Containers that were +already paused remain paused, and stopped containers remain stopped. +

If the unpause operation fails, the hook cleanup is reported as failed. +The daemon does not retry the unpause operation in a later hook lifecycle. +

+
+

hook_run_as_user

Specifies the user account used to execute the hook_script. If this is missing or blank, the script is executed with the -same privileges as the daemon process. +daemon's original startup privileges.

On Linux, nobody is the standard choice for maximum isolation. Note that using nobody may prevent certain tools, such as Docker, from functioning correctly due to restricted permissions. Ensure you are aware of these @@ -941,6 +1494,14 @@ or the task is failing.

+notify_start +

+

Specifies a command triggered at the start of maintenance, heal, +undelete, and refresh tasks. The daemon pipes a simple plain-text start +message directly into the command's stdin. +

+
+

notify_result

Specifies a command triggered after every report task generated by @@ -1012,8 +1573,25 @@ ntfy priority (urgent, high, default, low, min). ntfy tag (rotating_light, warning, default, -1, +1, heavy_check_mark).

+
+
+%h +
+high-level task name (maintenance, heal, undelete, refresh).
-

If the command contains --mail-from or --mail-rcpt, the daemon +

+
+
+%c +
+resulting task/group exit code; negative values are daemon-defined +failures (-1 execution/infrastructure, -2 pre-hook, -3 post-hook). +
+
+

+

The report contents are not available as a placeholder. They are passed +to the command through standard input (stdin). +

If the command contains --mail-from or --mail-rcpt, the daemon automatically prepends standard email headers (From, To, Subject) followed by a blank line to the report text. This ensures compatibility with curl's SMTP engine. @@ -1051,21 +1629,25 @@ password your-16-char-app-password-without-spaces

-

+

notify_result_level

Controls the filter for notify_result. The notification is sent only if the task result is equal to or more severe than this level. Valid values are info (always send), warning, error, and critical. -The default is error. +The default is warning. +

Note that SMART attribute changes are rated as warning. +Problematic array health states (CORRUPT, DEGRADED, PREFAIL, and +FAILING) are rated as critical. The PENDING state is informational +and does not by itself increase the notification severity.

-

+

notify_run_as_user

-

The user account used for notify_heartbeat, notify_result and mail +

The user account used for notify_heartbeat, notify_start, notify_result and mail notifications. If missing or left blank, the task runs with the -daemon's current privileges. +daemon's original startup privileges.

On Linux, nobody is the standard choice for maximum isolation. However, while sufficient for simple curl commands, it may cause failures for mailers (like sendmail or postfix) that require specific group memberships @@ -1077,7 +1659,7 @@ Alternatively, NetworkService can be used if the script specifically requires the computer's network identity to access remote resources.

-

+

notify_differences

If set to 1, the daemon logs a detailed list of file changes discovered @@ -1154,6 +1736,11 @@ for monitoring and controlling the parity array. specific error codes, please refer to the snapraidd.yaml OpenAPI specification file typically located in the documentation directory of the installation. +

All state-changing API requests require the Content-Type header to be +set to application/json, even when the request body is empty. This +ensures that browser cross-origin requests require a CORS preflight, +providing protection against Cross-Site Request Forgery (CSRF). +Chunked request bodies are not supported.

Maintenance & Recovery @@ -1172,13 +1759,16 @@ notification containing the operation's results. a parity synchronization, followed by a data integrity scrub, and concludes by issuing a system-wide health report. This is the primary endpoint for routine array upkeep. +The operation is aborted if the array is in a DEGRADED, PREFAIL or +FAILING health state. This task is subject to the sync_threshold_deletes and sync_threshold_updates safety checks defined in the configuration. The percentage of the array checked and the age filter are determined by the scrub_percentage and scrub_older_than settings.

Example:

-curl -X POST http://localhost:7627/snapraid/v1/maintenance
+curl http://localhost:7627/snapraid/v1/maintenance \
+    --json '{}'
 

It is implemented with the sequence of commands: up, diff, sync, scrub, and report. @@ -1194,7 +1784,8 @@ blocks to ensure the recovery was successful, and concludes by issuing a report of the result.

Example:

-curl -X POST http://localhost:7627/snapraid/v1/heal
+curl http://localhost:7627/snapraid/v1/heal \
+    --json '{}'
 

It is implemented with the sequence of commands: up, fix -e, scrub -p bad, and report. @@ -1209,9 +1800,8 @@ This is used to roll back accidental deletions to the state of the last successful synchronization.

Example:

-curl -s -X POST http://localhost:7627/snapraid/v1/undelete \
-    -H "Content-Type: application/json" \
-    -d '{ "filters": [ "*.txt" ] }'
+curl http://localhost:7627/snapraid/v1/undelete \
+    --json '{ "filters": [ "*.txt" ] }'
 

It is implemented with the sequence of commands: up, fix -m -f ..., and report. @@ -1227,7 +1817,8 @@ down_idle command to disks that have exceeded the generated.

Example:

-curl -X POST http://localhost:7627/snapraid/v1/suspend_idle
+curl http://localhost:7627/snapraid/v1/suspend_idle \
+    --json '{}'
 

It is implemented with the sequence of commands: probe, down_idle.

@@ -1242,12 +1833,26 @@ a failed disk, fixing UUID mismatches, or manually updating configuration).

The operation executes a read task to load the current content file data, followed by a report task to evaluate and broadcast the resulting array health. -

This is specifically useful for clearing FAILING or PREFAIL modes +

This is specifically useful for clearing FAILING, PREFAIL or DEGRADED modes once the underlying hardware or configuration issues have been resolved manually.

Example:

-curl -X POST http://localhost:7627/snapraid/v1/refresh
+curl http://localhost:7627/snapraid/v1/refresh \
+    --json '{}'
+
+
+
+

+/snapraid/v1/report +

+

Generates a status report describing the current array state and health. +The report task is scheduled asynchronously and is executed according to +the normal task queue semantics. +

Example: +

+curl http://localhost:7627/snapraid/v1/report \
+    --json '{}'
 
@@ -1272,7 +1877,7 @@ curl -s http://localhost:7627/

-/snapraid/v1/disks +/snapraid/v2/disks

Returns a comprehensive inventory of every physical disk associated with the SnapRAID configuration. It reports real-time hardware @@ -1280,7 +1885,7 @@ metrics including SMART health status, temperature, and the current power state (Active/Spin-up vs. Standby/Spin-down).

Example:

-curl -s http://localhost:7627/snapraid/v1/disks | jq
+curl -s http://localhost:7627/snapraid/v2/disks | jq
 
@@ -1292,7 +1897,7 @@ Runtime Configuration operational parameters of the daemon in real-time.

-/snapraid/v1/config +/snapraid/v2/config

Retrieves and updates the current runtime configuration parameters of the snapraidd service. Changes are applied instantly to memory and @@ -1301,9 +1906,9 @@ Note that certain networking and security settings are read-only and require a manual edit and SIGHUP.

Example:

-curl -X GET http://localhost:7627/snapraid/v1/config | jq
-curl -X PATCH http://localhost:7627/snapraid/v1/config \
-    -d '{ "probe_interval_minutes": 10 }'
+curl -s http://localhost:7627/snapraid/v2/config | jq
+curl -X PATCH http://localhost:7627/snapraid/v2/config \
+    --json '{ "probe_interval_minutes": 10 }'
 
@@ -1349,7 +1954,21 @@ curl -s http://localhost:7627/ sending a SIGTERM signal to the background process.

Example:

-curl -X POST http://localhost:7627/snapraid/v1/stop
+curl http://localhost:7627/snapraid/v1/stop \
+    --json '{}'
+
+ +
+

+/snapraid/v1/clear +

+

Cancels all tasks currently waiting in the execution queue, moving +them to the task execution history with canceled status. Any task +currently running is unaffected. +

Example: +

+curl http://localhost:7627/snapraid/v1/clear \
+    --json '{}'
 
@@ -1378,7 +1997,7 @@ because they are reset if the daemon restarts. You should compare them only for equality.

Example:

-curl -X GET http://localhost:7627/snapraid/v1/state | jq
+curl -s http://localhost:7627/snapraid/v1/state | jq
 
@@ -1408,8 +2027,8 @@ the generation of a report that reflects the final state of the system.

Queues a sequence of standard SnapRAID operations.

Example:

-curl -X POST http://localhost:7627/snapraid/v1/schedule \
-    -d '{"tasks": [{"command": "diff"}, {"command": "report"}]}'
+curl http://localhost:7627/snapraid/v1/schedule \
+    --json '{"tasks": [{"command": "diff"}, {"command": "report"}]}'
 

Supported Commands:

@@ -1496,7 +2115,10 @@ the parity information. report
Generates a comprehensive summary of the last operations and -array statistics. +array statistics. When a fix command has been executed, the +report includes a recovery section listing all files recovered +or unrecoverable since the last sync, reflecting the current +repair status of the array.
@@ -1513,6 +2135,104 @@ have exceeded the spindown_idle_minutes threshold.

+Multiple arrays in Linux systemd +

+

To manage multiple independent SnapRAID arrays on a single systemd +host, you can run multiple daemon instances using the systemd +template unit snapraidd@.service. +

Each instance runs isolated under its own configuration, listening port, +and SnapRAID array config. +

To configure multiple instances: +

Create distinct daemon configuration files: +

+cp /etc/snapraidd.conf /etc/snapraidd-main.conf
+cp /etc/snapraidd.conf /etc/snapraidd-backup.conf
+
+

Edit /etc/snapraidd-main.conf to set a custom port and log folder: +

+net_port = 127.0.0.1:7627
+sys_log_directory = /var/log/snapraid/main
+
+

Edit /etc/snapraidd-backup.conf to use a different port and log folder: +

+net_port = 127.0.0.1:7628
+sys_log_directory = /var/log/snapraid/backup
+
+

Disable the default single-array service (if running): +

+systemctl disable --now snapraidd.service
+
+

Create distinct SnapRAID engine configuration files for each array, +e.g. /etc/snapraid-main.conf and /etc/snapraid-backup.conf, +each pointing to its own set of disks and parity drives. +

Enable and start the template instances. The instance name after the +@ corresponds to the suffix of the config file. For example, main +will load /etc/snapraidd-main.conf and use /etc/snapraid-main.conf +as the SnapRAID engine configuration: +

+systemctl enable --now snapraidd@main
+systemctl enable --now snapraidd@backup
+
+

Access the independent dashboards at: +

+http://localhost:7627
+http://localhost:7628
+
+
+
+

+Multiple arrays in Windows +

+

To manage multiple independent SnapRAID arrays on a Windows host, +you can install multiple distinct Windows service instances of the +daemon using the --service-install command with the -i option. +

Each instance runs under its own configuration and listening port. +

To configure multiple instances: +

Create distinct daemon configuration files in your installation directory: +

+copy C:\snapraid\snapraidd.conf C:\snapraid\snapraidd-main.conf
+copy C:\snapraid\snapraidd.conf C:\snapraid\snapraidd-backup.conf
+
+

Edit C:\snapraid\snapraidd-main.conf to set a custom port and log folder: +

+net_port = 127.0.0.1:7627
+sys_log_directory = C:\snapraid\log\main
+
+

Edit C:\snapraid\snapraidd-backup.conf to use a different port and log folder: +

+net_port = 127.0.0.1:7628
+sys_log_directory = C:\snapraid\log\backup
+
+

Remove the default service instance (if registered): +

+C:\snapraid\snapraidd.exe --service-remove
+
+

Create distinct SnapRAID engine configuration files for each array, +e.g. C:\snapraid\snapraid-main.conf and +C:\snapraid\snapraid-backup.conf, each pointing to its own set of +disks and parity drives. +

Install the service instances using the --service-install option. +Use -c to specify the daemon configuration file and -C to specify +the SnapRAID engine configuration file for each instance: +

+C:\snapraid\snapraidd.exe --service-install -i main -c C:\snapraid\snapraidd-main.conf -C C:\snapraid\snapraid-main.conf
+C:\snapraid\snapraidd.exe --service-install -i backup -c C:\snapraid\snapraidd-backup.conf -C C:\snapraid\snapraid-backup.conf
+
+

This registers and starts two Windows services named snapraidd-main and +snapraidd-backup configured to start automatically. +

Access the independent dashboards at: +

+http://localhost:7627
+http://localhost:7628
+
+

To remove a service instance, run the --service-remove option: +

+C:\snapraid\snapraidd.exe --service-remove -i main
+C:\snapraid\snapraidd.exe --service-remove -i backup
+
+
+
+

Signals

This section defines how the daemon responds to standard Unix signals, @@ -1532,8 +2252,9 @@ service. SIGTERM, SIGINT

Initiates a graceful shutdown. If a task is currently -running, the daemon attempts to terminate the child process -before exiting. +running, the active SnapRAID process is terminated, the +post-run hook is executed and any paused Docker containers are +unpaused.

@@ -1547,18 +2268,18 @@ performed.

-

+

Files

The following list specifies the default filesystem paths used by the daemon for configuration, data persistence, and inter-process communication.

-

+

Linux

On Linux and Unix-like systems:

-

+

$PREFIX/etc/snapraidd.conf

The primary configuration file location. The $PREFIX variable @@ -1568,35 +2289,35 @@ values include /usr/local or /usr. If this file does not exist, the daemon falls back to /etc/snapraidd.conf.

-

+

$PREFIX/share/snapraidd

The primary system data directory. This is the first location -searched for the web dashboard ZIP file (e.g., commander.zip). +searched for the web dashboard ZIP file (e.g., commander.zip or brutale.zip). If not found here, the daemon falls back to /usr/share/snapraidd.

-

+

/etc/snapraidd.conf

The secondary/system-wide configuration file location, used if the prefix-specific file is missing.

-

+

/usr/share/snapraidd

The secondary/system-wide data directory, used as a fallback for web assets.

-

+

/run/snapraidd.pid

Default PID file location.

-

+

/var/log/snapraid

Default directory for SnapRAID command execution logs. This @@ -1607,19 +2328,19 @@ upon the first execution of a SnapRAID command.

-

+

Windows

On Windows systems:

-

+

snapraidd.conf

The configuration file is expected to be in the same directory where the snapraidd.exe binary is located.

-

+

log\

A subdirectory named log within the installation directory is @@ -1628,13 +2349,170 @@ directory does not exist, the service will attempt to create it upon the first execution of a SnapRAID command.

-

-commander.zip +

+commander.zip or brutale.zip

The web dashboard assets are searched for in the same directory as the executable.

+
+
+

+Known Issues +

+
+

+Monotonic Time Assumption +

+

The daemon assumes that time progresses monotonically. +

Historical log files are named using the local wall-clock time and are +replayed in filename order at startup. If the local clock moves +backwards, for example during a daylight-saving-time transition or +after a manual clock adjustment, logs created later may be replayed +before older ones, or two tasks may generate the same log filename. +

The daemon also assumes that the modification time of the SnapRAID +content file increases whenever the file is updated. If the system +clock moves backwards and the content file is subsequently modified +by a SnapRAID command executed outside the daemon, the startup probe +may not detect the newer content state. +

For correct state reconstruction, the system clock and local civil +time are therefore expected not to move backwards while retained +daemon logs or +

+
+

+Lifetime Counters Depend on Log Retention +

+

Some cumulative statistics are reconstructed at startup from the +retained daemon logs rather than from separately persistent state. +

When old logs are removed according to the configured log retention +period, information contained only in those logs is no longer +available during a subsequent restart. As a result, cumulative +counters reconstructed from the available history may decrease or +restart from zero after older logs have been removed. +

Such counters should therefore be interpreted as covering the history +available in the retained daemon logs, rather than necessarily the +complete lifetime of the installation. +

+
+

+Incomplete Log Recovery +

+

Incomplete daemon logs are recovered only up to the last complete +record that can be parsed successfully. +

For plain logs, a final unterminated line is discarded. For compressed +logs, a truncated gzip stream may still be recovered up to the last +complete decompressed record available before the truncation. +

Any data contained only in an incomplete final record is therefore +lost during restart reconstruction. Tasks without the required final +termination information are treated as interrupted according to the +available log state. +

Log recovery should therefore be considered best effort and guarantees +only the preservation of complete records successfully written before +the interruption. +

+
+

+Configuration Changes +

+

Configuration updates and reloads are applied asynchronously and are not +guaranteed to take effect atomically or immediately across all runtime +components and operations. +

For a short transition period, components and in-flight operations may +observe settings from different configuration generations at different +points in their lifecycle, while tasks already scheduled or running may +continue using settings captured before the change. +

This also applies to security-sensitive settings. In-flight REST requests +and already accepted connections may continue under previously admitted +conditions or observe security settings from different configuration +generations. +

+
+

+Non-UTF-8 Paths in the REST API +

+

On Unix, filesystem paths containing invalid UTF-8 bytes are represented +in the REST API with Python's surrogateescape encoding (PEP 383). +Non-decodable bytes in the range 0x80-0xFF are mapped to lone Unicode +surrogate code points in the range U+DC80-U+DCFF (formatted in JSON as +\udc80-\udcff), allowing paths with arbitrary byte sequences to be +represented losslessly across the REST API. +

+
+

+Devices Without Stable or Unique IDs +

+

The daemon relies on stable and unique device identifiers, such as hardware +serial numbers, to preserve physical device health information across mapping +updates. +

If a device exposes no stable identifier, or if an identifier is not unique +across the currently detected devices, it cannot be trusted as a persistent +physical-device identity. This can happen with virtual disks, certain USB +enclosures, cloned identifiers, or hardware that reports incomplete or +ambiguous identification data. +

The daemon therefore discards historical device information when the device +cannot be identified reliably. +

As a result, previous SMART or health state may be lost until fresh telemetry +is collected. +

+
+

+Concurrent Docker Changes During Hooks +

+

Docker container state is inspected before the daemon performs its +pause and resume operations. +

Concurrent external Docker operations, such as pausing, unpausing, or +removing a selected container outside the daemon while a task is running, +may cause the daemon to unpause a container that was externally paused, +or cause unpause cleanup to fail if the container was removed. +

External changes to selected containers should not be performed while +a hook lifecycle is being established or is active. +

+
+

+Blocking Hooks, Docker Operations, and Notifications +

+

Hook scripts, Docker operations, and notification commands are expected +to terminate. +

If any of these operations block indefinitely, task execution, hook +cleanup, report generation, notification processing, and graceful +daemon shutdown may also remain blocked. Paused Docker containers +may remain paused until external recovery is performed. +

+
+

+Incomplete JSON syntax validation +

+

The REST API uses JSMN in strict mode, which does not fully validate +the JSON grammar. Some malformed JSON inputs, such as trailing commas +or repeated colons, may therefore be accepted and processed normally. +

+
+

+Global Authentication Rate Limiting Can Starve New Clients +

+

REST authentication globally rate-limits uncached attempts to bound Argon2 +CPU and memory usage. A continuous stream of uncached attempts can therefore +consume every authentication slot and cause other uncached clients to receive +HTTP 429 indefinitely. +

Cached credentials bypass the limit. This is an intentional tradeoff: per-client +limits do not protect against distributed sources, while removing the global +limit could allow concurrent Argon2 operations to exhaust system resources. +

+
+

+Configuration File ACLs Are Not Preserved +

+

Configuration updates made through the REST API rewrite the daemon +configuration using a temporary file followed by file replacement. +

On Unix, the replacement preserves the original file owner, group, and +standard permission bits, but it does not preserve extended POSIX ACLs +or other per-file access-control metadata. +

On Windows, a replacement file may likewise receive security settings +derived from its creation context rather than preserving a custom +security descriptor attached to the original configuration file. +

diff --git a/manual-de.html b/manual-de.html index 8d566a5d..51d1fa14 100644 --- a/manual-de.html +++ b/manual-de.html @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]

-Description +Beschreibung (Description)

SnapRAID ist ein Sicherungsprogramm, das für Festplatten-Arrays entwickelt wurde und Paritätsinformationen zur Datenwiederherstellung @@ -179,7 +179,7 @@ jederzeit beenden, ohne neu formatieren oder Daten verschieben zu müssen.

  • Um auf eine Datei zuzugreifen, muss nur eine einzige Festplatte -drehen (spinnen), was Strom spart und Geräusche reduziert. +anlaufen (drehen), was Strom spart und Geräusche reduziert.
  • Für weitere Informationen besuchen Sie bitte die offizielle SnapRAID-Website: @@ -189,33 +189,43 @@ drehen (spinnen), was Strom spart und Geräusche reduziert.

    -Limitations +Einschränkungen (Limitations)

    -

    SnapRAID ist ein Hybrid aus einem RAID- und einem Sicherungsprogramm, -das darauf abzielt, die besten Vorteile beider zu kombinieren. -Es hat jedoch einige Einschränkungen, die Sie vor der Verwendung -berücksichtigen sollten. -

    Die Haupteinschränkung besteht darin, dass wenn eine Festplatte -ausfällt und Sie in letzter Zeit keine Synchronisierung durchgeführt haben, -Sie möglicherweise nicht vollständig wiederherstellen können. -Genauer gesagt können Sie möglicherweise nicht bis zur Größe der -geänderten oder gelöschten Dateien seit der letzten sync-Operation -wiederherstellen. Dies tritt auch dann auf, wenn die geänderten oder -gelöschten Dateien sich nicht auf der ausgefallenen Festplatte befinden. -Aus diesem Grund ist SnapRAID besser für Daten geeignet, die sich -selten ändern. -

    Andererseits verhindern neu hinzugefügte Dateien die Wiederherstellung -von bereits vorhandenen Dateien nicht. Sie verlieren nur die -kürzlich hinzugefügten Dateien, wenn diese sich auf der ausgefallenen -Festplatte befinden. -

    Weitere Einschränkungen von SnapRAID sind: +

    SnapRAID ist ein Hybrid aus RAID und einem Backup-Programm mit dem Ziel, die +besten Vorteile von beiden zu kombinieren. Es hat jedoch einige Einschränkungen, die Sie +vor der Verwendung berücksichtigen sollten. +

    Die Haupteinschränkung besteht darin, dass Sie bei einem Festplattenausfall Daten nur bis zum +Zustand des letzten sync-Vorgangs wiederherstellen können. Alle Daten, die seit dem +letzten Sync hinzugefügt oder geändert wurden und sich auf der ausgefallenen Festplatte befinden, gehen verloren. +

    Daher eignet sich SnapRAID in erster Linie für Daten, die sich selten ändern. +

    Für Daten, die beim letzten Sync bereits existierten, hängt die Wiederherstellungszuverlässigkeit +davon ab, ob die Option snapshot verwendet wird: +

    + +

    Weitere Einschränkungen von SnapRAID sind:

    -Getting Started +Erste Schritte (Getting Started)

    Um SnapRAID zu verwenden, müssen Sie zuerst eine Festplatte in Ihrem Festplatten-Array auswählen, die für parity-Informationen -reserviert wird. Mit einer Festplatte für Parität können Sie von -einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5. -

    Wenn Sie von mehr Festplattenausfällen wiederherstellen möchten, +reserviert wird. Mit einer Festplatte für Parität können Sie Daten +nach einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5. +

    Wenn Sie mehr Festplattenausfälle ausgleichen möchten, ähnlich wie bei RAID6, müssen Sie zusätzliche Festplatten für Parität reservieren. Jede zusätzliche Paritätsfestplatte ermöglicht die Wiederherstellung von einem weiteren Festplattenausfall. @@ -316,7 +326,7 @@ nächsten Lauf wird er dort fortgesetzt, wo er unterbrochen wurde. regelmäßig durch Ausführen des sync-Befehls aktualisieren.

    -Scrubbing +Scrubben (Scrubbing)

    Um die Daten und die Parität regelmäßig auf Fehler zu überprüfen, können Sie den Befehl scrub ausführen. @@ -363,11 +373,11 @@ markiert.

    -Pooling +Zusammenführen (Pooling)

    Hinweis: Die unten beschriebene Pooling-Funktion wurde durch das Tool mergerfs ersetzt, das jetzt die empfohlene Option für Linux-Benutzer -in der SnapRAID-Community ist. Mergefs bietet eine flexiblere +in der SnapRAID-Community ist. Mergerfs bietet eine flexiblere und effizientere Möglichkeit, mehrere Laufwerke zu einem einzigen, vereinheitlichten Einhängepunkt (Mount Point) zusammenzufassen, was einen nahtlosen Zugriff auf Dateien über Ihr gesamtes Array @@ -445,7 +455,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +Wiederherstellen (Undeleting)

    SnapRAID funktioniert eher wie ein Sicherungsprogramm als ein RAID-System und kann verwendet werden, um Dateien in ihren vorherigen Zustand @@ -472,7 +482,7 @@ snapraid fix -m

    -Recovering +Wiederherstellung (Recovering)

    Das Schlimmste ist passiert, und Sie haben eine oder mehrere Festplatten verloren! @@ -574,9 +584,9 @@ snapraid sync

    -Commands +Befehle (Commands)

    -

    SnapRAID bietet einige einfache Befehle, mit denen Sie: +

    SnapRAID bietet ein paar einfache Befehle, mit denen Sie folgende Aktionen ausführen können:

    • Den Status des Arrays ausgeben -> status @@ -585,13 +595,13 @@ Den Status des Arrays ausgeben -> status Die Festplatten steuern -> smart, probe, up, down
    • -Eine Sicherung/einen Snapshot erstellen -> sync +Einen Backup-/Wiederherstellungspunkt erstellen -> sync
    • Daten regelmäßig überprüfen -> scrub
    • -Die letzte Sicherung/den letzten Snapshot wiederherstellen -> fix. +Den letzten Backup-/Wiederherstellungspunkt wiederherstellen -> fix.

    Befehle müssen in Kleinbuchstaben geschrieben werden. @@ -610,7 +620,7 @@ nicht berücksichtigt. aufgelistet. Um sie zu beheben, können Sie den Befehl fix -e verwenden.

    Es zeigt auch ein Diagramm an, das den letzten Zeitpunkt darstellt, -zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbed +zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbte Blöcke werden mit *, Blöcke, die synchronisiert, aber noch nicht gescrubbed wurden, mit o angezeigt.

    Es wird nichts geändert. @@ -621,7 +631,7 @@ smart

    Gibt einen SMART-Bericht aller Festplatten im System aus.

    Es enthält eine Schätzung der Ausfallwahrscheinlichkeit im nächsten -Jahr, sodass Sie die Wartungsersetzung von Festplatten planen können, +Jahr, sodass Sie den vorsorglichen Austausch von Festplatten planen können, die verdächtige Attribute aufweisen.

    Diese Wahrscheinlichkeitsschätzung wird durch Korrelation der SMART-Attribute der Festplatten mit den Backblaze-Daten erhalten, die unter @@ -752,10 +762,11 @@ Zeitstempel, was bedeutet, dass sie geändert wurden.

    moved
    -Auf derselben Festplatte in ein anderes Verzeichnis -verschobene Dateien. Sie werden durch denselben Namen, -dieselbe Größe, denselben Zeitstempel und dieselbe Inode, -aber ein anderes Verzeichnis identifiziert. +Dateien, die auf derselben Festplatte verschoben oder +umbenannt wurden, wobei dieselbe Inode beibehalten wird. +Sie werden durch dieselbe Inode, dieselbe Größe und denselben +Zeitstempel, aber einen anderen Pfad identifiziert. Der +Dateiname kann auch unterschiedlich sein.
    @@ -775,14 +786,13 @@ der Name.
    relocated
    -Dateien, die auf dieselbe oder eine andere Festplatte -verschoben wurden, wobei das Original verschwunden ist. -Sie werden dadurch identifiziert, dass sie denselben Namen, -dieselbe Größe und denselben Zeitstempel haben. -Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige -Pfad übereinstimmen, um identifiziert zu werden. -Im Gegensatz zu 'moved' Dateien auf derselben Festplatte haben -verschobene Dateien einen anderen Inode. +Dateien, die in ein anderes Verzeichnis oder auf eine andere +Festplatte verschoben wurden, wobei die Originaldatei verschwunden ist +und die Inode nicht beibehalten wird. Sie werden dadurch identifiziert, +dass sie denselben Namen, dieselbe Größe und denselben Zeitstempel haben. +Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige Pfad +übereinstimmen, um identifiziert zu werden. Im Gegensatz zu 'moved' +Dateien erfordern umgesiedelte Dateien, dass der Dateiname gleich bleibt.
    @@ -891,12 +901,12 @@ Die Dateien im Array werden NICHT geändert.

    fix

    -

    Behebt alle Dateien und die Paritätsdaten. -

    Alle Dateien und Paritätsdaten werden mit dem Snapshot-Zustand -verglichen, der beim letzten sync gespeichert wurde. -Wenn eine Abweichung gefunden wird, wird sie auf den gespeicherten -Snapshot zurückgesetzt. -

    WARNUNG! Der Befehl fix unterscheidet nicht zwischen Fehlern und +

    Repariert alle Dateien und die Paritätsdaten. +

    Alle Dateien und Paritätsdaten werden mit dem im letzten sync +gespeicherten Zustand verglichen. Wenn ein Unterschied gefunden +wird, wird er auf den gespeicherten Zustand zurückgesetzt. +

    WARNUNG! +Der Befehl fix unterscheidet nicht zwischen Fehlern und beabsichtigten Änderungen. Er setzt den Dateizustand bedingungslos auf den letzten sync zurück.

    Wenn keine andere Option angegeben ist, wird das gesamte Array verarbeitet. @@ -1038,7 +1048,7 @@ nicht durch die Parität geschützt sind.

    -Options +Optionen (Options)

    SnapRAID bietet die folgenden Optionen:

    @@ -1224,14 +1234,14 @@ Befehlsfehler sicher gestoppt werden.
    Wendet eine globale Bandbreitenbegrenzung für alle Festplatten an. RATE ist die Anzahl der Bytes pro Sekunde. Sie können -einen Multiplikator wie K, M oder G angeben (z.B. --bw-limit 1G). +einen Multiplikator wie K, M, G oder T angeben (z.B. --bw-limit 1G).
    --t, --tail GRÖSSE +-t, --tail SIZE
    Beschränkt die Dateiliste auf diejenigen, die nicht mehr als die angegebene Tail-Größe der Paritätsfestplatten belegen. @@ -1274,7 +1284,7 @@ Erzwingt den unsicheren Vorgang der Synchronisierung einer Datei mit Nullgröße, die zuvor nicht Null war. Wenn SnapRAID eine solche Bedingung erkennt, stoppt es den Vorgang, es sei denn, Sie geben diese Option an. Dies ermöglicht es Ihnen, leicht zu -erkennen, wann nach einem Systemabsturz einige zugegriffene Dateien +erkennen, wann nach einem Systemabsturz einige Dateien, auf die zugegriffen wurde, abgeschnitten (truncated) wurden. Dies ist eine mögliche Bedingung unter Linux mit den ext3/ext4-Dateisystemen. Diese Option kann nur mit sync verwendet werden. @@ -1327,7 +1337,7 @@ Festplatten oder mit Festplatten auf demselben physischen Gerät. Wenn Sie beispielsweise zwei Datenfestplatten verloren haben und eine Ersatzfestplatte haben, um nur die erste wiederherzustellen, können Sie die zweite unzugängliche Festplatte ignorieren. -Oder wenn Sie eine Festplatte in dem auf einer bereits +Oder wenn Sie eine Festplatte auf dem auf einer bereits verwendeten Festplatte verbleibenden freien Speicherplatz wiederherstellen möchten, wobei sie dasselbe physische Gerät gemeinsam nutzen. @@ -1394,10 +1404,10 @@ Sie haben während der sync-Operation KEINEN Datenschutz.
    --W, --force-realloc-tail GRÖSSE +-W, --force-realloc-tail SIZE
    Funktioniert wie -R, --force-realloc, ist jedoch auf den angegebenen -Endbereich (die letzten GRÖSSE Bytes) jeder Paritätsdatei beschränkt. +Endbereich (die letzten SIZE Bytes) jeder Paritätsdatei beschränkt. Erzwingt die Neuzuweisung (Verschiebung) aller Dateifragmente/-blöcke, die derzeit in diesem Endabschnitt gespeichert sind, sodass sie an beliebiger Stelle in den Paritätsdateien platziert werden können, wo freier Speicherplatz @@ -1468,7 +1478,8 @@ Startet die Verarbeitung ab der angegebenen Blocknummer. Dies kann nützlich sein, um die Überprüfung oder Behebung spezifischer Blöcke im Falle einer beschädigten Festplatte zu wiederholen. Diese Option ist hauptsächlich für die erweiterte -manuelle Wiederherstellung gedacht. +manuelle Wiederherstellung gedacht und wird nur von check +und fix unterstützt.
    @@ -1479,7 +1490,8 @@ manuelle Wiederherstellung gedacht.
    Verarbeitet nur die angegebene Anzahl von Blöcken. Diese Option ist hauptsächlich für die erweiterte manuelle -Wiederherstellung gedacht. +Wiederherstellung gedacht und wird nur von check und fix +unterstützt.
    @@ -1488,7 +1500,7 @@ Wiederherstellung gedacht.
    -C, --gen-conf CONTENT
    -Generiert eine Dummy-Konfigurationsdatei aus einer vorhandenen +Generiert eine Dummy-Konfigurationsdatei aus einer bestehenden Content-Datei. Die Konfigurationsdatei wird in die Standardausgabe geschrieben und überschreibt keine vorhandene. Diese Konfigurationsdatei enthält auch die Informationen, @@ -1544,7 +1556,7 @@ Gibt die Programmversion aus.

    -Configuration +Konfiguration (Configuration)

    SnapRAID benötigt eine Konfigurationsdatei, um zu wissen, wo sich Ihr Festplatten-Array befindet und wo die Paritätsinformationen @@ -1559,9 +1571,8 @@ enthalten:

    parity FILE [,FILE] ...

    -

    Definiert die Dateien, die zum Speichern der Paritätsinformationen -verwendet werden sollen. Die Parität ermöglicht den Schutz -vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5. +

    Definiert die Dateien, die zum Speichern der Paritätsinformationen verwendet werden. +Die Parität ermöglicht den Schutz vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5.

    Sie können mehrere Dateien angeben, die sich auf unterschiedlichen Festplatten befinden müssen. Wenn eine Datei nicht mehr wachsen kann, wird die nächste verwendet. Der gesamte verfügbare Platz @@ -1579,8 +1590,7 @@ um die Warnung vor vollen Festplatten zu vermeiden.

    (2,3,4,5,6)-parity FILE [,FILE] ...

    -

    Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen -verwendet werden sollen. +

    Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen verwendet werden.

    Für jede angegebene Paritätsstufe wird eine zusätzliche Schutzstufe aktiviert:

    +snapshot +

    +

    Aktiviert die Verwendung von Dateisystem-Snapshots für die Befehle sync, scrub, +check und fix. +

    Wenn aktiviert, erstellt SnapRAID zu Beginn eines 'sync' einen schreibgeschützten +Snapshot jedes unterstützten Daten-Dateisystems. Dies bietet eine stabile Ansicht +jedes Dateisystems und verhindert, dass spätere Änderungen die für die Paritätsberechnung +verwendeten Daten verändern. +

    Dies verbessert die Wiederherstellung erheblich: Wenn eine Datei aus dem +Live-Dateisystem gelöscht wird, bleibt sie im Snapshot erhalten. Dies verhindert, +dass die Parität für diesen Block "beschädigt" wird, sodass Sie Daten immer noch +erfolgreich wiederherstellen können, wenn eine andere Festplatte ausfällt. +

    Diese Option gilt ausschließlich für Datenträger, die mit den Dateisystemen +Btrfs, Bcachefs oder ZFS unter Linux und NTFS unter Windows formatiert sind. +Paritätsfestplatten oder Datenträger mit anderen Dateisystemen verwenden immer +die Live-Version des Dateisystems. +

    Das Erstellen und Löschen von Snapshots erfordert Administratorrechte. +Stellen Sie sicher, dass SnapRAID mit den erforderlichen Berechtigungen (z. B. sudo) +ausgeführt wird, wenn diese Option aktiviert ist. +

    Eine detaillierte Erklärung des Snapshot-Lebenszyklus finden Sie im Abschnitt SNAPSHOTS. +

    +
    +

    nohidden

    Schließt alle versteckten Dateien und Verzeichnisse aus. @@ -1675,7 +1712,7 @@ Unter Unix sind versteckte Dateien solche, die mit . beginnen. Unter Windows sind es solche mit dem versteckten Attribut.

    -

    +

    exclude/include PATTERN

    Definiert die Datei- oder Verzeichnismuster, die im sync-Vorgang @@ -1687,12 +1724,17 @@ wird die Datei eingeschlossen. Wenn kein Muster übereinstimmt, wird die Datei ausgeschlossen, wenn das zuletzt angegebene Muster ein include ist, oder eingeschlossen, wenn das zuletzt angegebene Muster ein exclude ist. +

    Beachten Sie, dass die Filterung hierarchisch beim Durchlaufen der +Verzeichnisse erfolgt. Wenn ein Verzeichnis mit einer exclude-Regel +übereinstimmt, wird das gesamte Verzeichnis übersprungen (verworfen), +und alle include-Regeln für darin enthaltene Dateien oder +Unterverzeichnisse werden nicht ausgewertet.

    Weitere Details zu Musterspezifikationen finden Sie im Abschnitt PATTERN.

    Diese Option kann mehrmals verwendet werden.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Definiert die grundlegende Blockgröße in Kibibytes für die Parität. @@ -1739,7 +1781,7 @@ für eine 4 TB Festplatte, was etwa 460.000 Dateien auf jeder Datenfestplatte ohne verschwendeten Platz ermöglicht.

    -

    +

    hashsize SIZE_IN_BYTES

    Definiert die Hash-Größe in Bytes für die gespeicherten Blöcke. @@ -1775,7 +1817,7 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    Speichert den Zustand beim Synchronisieren oder Scrubben automatisch @@ -1785,7 +1827,7 @@ von vorne gestartet werden müssen, wenn sie durch einen Maschinenabsturz oder ein anderes Ereignis unterbrochen werden.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Legt die maximal zulässige Festplattentemperatur in Celsius fest. @@ -1819,7 +1861,7 @@ Festplatte an. Um die Temperatur aller Festplatten anzuzeigen, verwenden Sie die Option -A oder --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Legt die Standby-Zeit in Minuten fest, wenn der Temperaturgrenzwert @@ -1827,7 +1869,7 @@ erreicht wird. Während dieser Zeit bleiben die Festplatten heruntergefahren. Der Standardwert ist 5 Minuten.

    -

    +

    pool DIR

    Definiert das Pooling-Verzeichnis, in dem die virtuelle Ansicht des @@ -1835,7 +1877,7 @@ Festplatten-Arrays mithilfe des Befehls pool erstellt wird.

    Das Verzeichnis muss bereits existieren.

    -

    +

    share UNC_DIR

    Definiert den Windows UNC-Pfad, der für den Remote-Zugriff auf die @@ -1851,7 +1893,7 @@ und schließlich das Dateiverzeichnis und der Name hinzugefügt werden.

    Diese Option ist nur für Windows erforderlich.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Definiert benutzerdefinierte smartctl-Optionen, um die SMART-Attribute @@ -1865,6 +1907,8 @@ ist. PARITY ist einer der Paritätsnamen: parity, 2-parity,

    In den angegebenen OPTIONS wird die Zeichenfolge %s durch den Gerätenamen ersetzt. Bei RAID-Controllern ist das Gerät wahrscheinlich fest, und Sie müssen %s möglicherweise nicht verwenden. +

    Sie können auch eine benutzerdefinierte Info-Optionszeichenfolge mit dem +Tag [info: ...] angeben, um die Standardoption -a zu ersetzen.

    Weitere mögliche Optionen finden Sie in der smartmontools-Dokumentation:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1872,11 +1916,12 @@ wahrscheinlich fest, und Sie müssen %s möglicherweise nicht verwenden.
     

    Zum Beispiel:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignoriert das angegebene SMART-Attribut bei der Berechnung der @@ -1888,19 +1933,25 @@ ist. PARITY ist einer der Paritätsnamen: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity oder z-parity. Der Sonderwert * kann verwendet werden, um das Attribut auf allen Festplatten zu ignorieren. -

    Um beispielsweise das Attribut Current Pending Sector Count auf allen -Festplatten zu ignorieren: +

    Es können mehrere Attribute durch Leerzeichen getrennt angegeben werden. +Jedes Attribut kann als Nummer von 1 bis 255 oder als Name ohne +Berücksichtigung der Groß-/Kleinschreibung (z. B. Current_Pending_Sector) +angegeben werden. +

    Um beispielsweise das Attribut Current Pending Sector Count und +Reallocated Sectors Count auf allen Festplatten über ihre Nummer +oder ihren Namen zu ignorieren:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Um es nur auf der ersten Paritätsfestplatte zu ignorieren: +

    Um sie nur auf der ersten Paritätsfestplatte zu ignorieren:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    -Examples +

    +Beispiele (Examples)

    Ein Beispiel für eine typische Konfiguration für Unix ist:

    @@ -1912,7 +1963,7 @@ data d2 /mnt/disk2/
     data d3 /mnt/disk3/
     exclude /lost+found/
     exclude /tmp/
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/sg0
     smartctl 2-parity -d areca,2/1 /dev/sg0
    @@ -1937,7 +1988,160 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0
     

    -Pattern +Snapshots +

    +

    Wenn die Snapshot-Option in der Konfiguration aktiviert ist, verwendet SnapRAID +Dateisystem-Snapshots, um die während einer Operation gelesenen Daten stabil zu halten, +selbst wenn Dateien auf den Live-Dateisystemen nachträglich geändert oder gelöscht werden. +

    Die Verwaltung von Snapshots erfolgt vollständig automatisch und transparent. +Sie können SnapRAID genau wie bisher verwenden, wobei der zusätzliche Schutz +durch Snapshots vollständig im Hintergrund abgewickelt wird. +

    Dies bietet zwei wesentliche Vorteile: +

    +
    +
    +Konsistenz +
    +Dateien, die während eines lang laufenden Syncs oder Scrubs auf dem Live-Dateisystem +geändert werden, verursachen keine Paritätskonflikte oder abgebrochenen Operationen, +weil jedes Dateisystem mit Snapshot für die Dauer der Operation unverändert bleibt. +
    +
    +
    +
    +Wiederherstellung +
    +Wenn eine Datei im Live-Dateisystem aktualisiert oder gelöscht wird, +bleibt sie im Snapshot erhalten. Wenn ein Festplattenausfall auftritt, +bevor der nächste Sync ausgeführt wird, verwendet SnapRAID die im Snapshot konservierten Daten, +um die ausgefallene Festplatte zu rekonstruieren. +Im Falle eines Festplattenausfalls während eines aktiven Sync-Vorgangs +ist SnapRAID auch in der Lage, automatisch sowohl aus dem Snapshot +der vorherigen Paritätsberechnung als auch aus der aktuellen zu lesen. +Dies maximiert die Wahrscheinlichkeit einer vollständigen Wiederherstellung, indem +Zugriff auf die genauen Datenblöcke gewährt wird, die zur Lösung der Paritätsgleichungen +erforderlich sind, selbst wenn diese Blöcke zwischen den Syncs geändert oder gelöscht wurden. +Ohne Snapshots führt eine aktualisierte oder gelöschte Datei auf einer gesunden +Festplatte zu fehlenden Datenblöcken, die möglicherweise zur Reparatur +anderer ausgefallener Festplatten benötigt werden. +
    +
    +
    +

    Snapshots werden nur für Datenträger erstellt und nur dann, wenn das zugrunde liegende +Dateisystem diese Funktionalität unterstützt. Paritätsfestplatten verwenden immer +das Live-Dateisystem. +

    Derzeit wird dies auf Btrfs, Bcachefs und ZFS unter Linux +und auf NTFS unter Windows unterstützt. +

    Sie können Datenträger mit unterschiedlichen Dateisystemen mischen. Nur diejenigen, die +Snapshots unterstützen, werden diese nutzen, während andere Festplatten weiterhin +direkt auf dem Live-Dateisystem arbeiten. +

    Das Erstellen und Löschen von Snapshots erfordert Administratorrechte. +Stellen Sie sicher, dass SnapRAID mit den erforderlichen Berechtigungen (z. B. sudo) +ausgeführt wird, wenn Snapshots aktiviert sind. +

    +

    +Befehlsverhalten mit Snapshots (Command Behavior with Snapshots) +

    +

    Die Befehle sync und scrub verwenden Snapshots für Datenträger, deren +Dateisysteme diese unterstützen. Auf einer Festplatte mit Snapshot sieht der Befehl +ein stabiles Dateisystemabbild, das von gleichzeitigen Änderungen am Live-Dateisystem +unbeeinflusst bleibt. +Während eines sync wird unabhängig für jedes unterstützte Daten-Dateisystem ein +neuer Snapshot erstellt. Diese Snapshots liefern gemeinsam die für die Paritätsberechnung +verwendeten Daten. +Im Gegensatz dazu verwendet der Befehl scrub den letzten Snapshot, also den, der +während des letzten erfolgreichen Syncs erstellt wurde, um einen zuverlässigen Referenzpunkt +beizubehalten, der mit der vorhandenen Parität übereinstimmt. +

    Bei den Befehlen check und fix hängt die Verwendung des letzten Snapshots +davon ab, ob bestimmte Festplatten mit der Option -d, --filter-disk ausgewählt wurden. +

    Eine explizit über -d ausgewählte Festplatte (das „Ziel“ der Operation) +verwendet immer das Live-Dateisystem. Für fix ermöglicht dies das Wiederherstellen +von Daten auf dem aktiven Festplattenersatz. Für check ermöglicht es die Simulation +des fix-Vorgangs unter denselben Bedingungen. +

    Auf alle anderen Datenträger (die „Referenz“-Festplatten) wird über ihre Snapshots zugegriffen. +Dies stellt sicher, dass SnapRAID selbst dann, wenn Sie während einer laufenden Wiederherstellung +Dateien auf Ihren gesunden Festplatten ändern, eine stabile, eingefrorene Referenz hat, +um die Paritätsgleichungen zu lösen. +

    Wenn keine Option -d angegeben ist, nimmt SnapRAID an, dass die Operation für das gesamte Array gilt. +In diesem Fall verwenden check und fix ausschließlich die Live-Dateisysteme. +

    Alle anderen Befehle arbeiten ausschließlich auf dem Live-Dateisystem. +

    +
    +
    +

    +Lebenszyklus von Snapshots (Snapshots Lifecycle) +

    +

    SnapRAID verwaltet drei spezifische Snapshots, stable, pending und scan, +in einem versteckten Verzeichnis im Stammverzeichnis jedes Daten-Subvolumes. +Unter Btrfs, Bcachefs und NTFS wird das Verzeichnis .snapraid/ verwendet, +unter ZFS das Standardverzeichnis .zfs/snapshot/. +

    Der stable-Snapshot repräsentiert den Zustand des letzten +erfolgreich abgeschlossenen sync und enthält die genauen Daten, die zur +Berechnung der aktuellen Parität verwendet wurden. Er dient als primäre Datenquelle +für die Befehle scrub, check und fix. +

    Der scan-Snapshot ist ein temporäres Abbild, das zu Beginn eines sync +erstellt wird, um einen eingefrorenen Zustand für das Scannen und die Paritätsberechnung bereitzustellen. +Nach dem Scannen und Speichern des neuen Inhaltszustands ersetzt er den vorherigen +pending-Snapshot. +

    Der pending-Snapshot ist das Abbild, das von einem unterbrochenen sync verwendet wird. +Nach erfolgreichem Abschluss des Vorgangs wird der vorherige stable-Snapshot gelöscht +und der pending-Snapshot wird heraufgestuft, um seinen Platz als neue stabile Referenz einzunehmen. +

    Wenn ein sync unterbrochen wird, bleibt der pending-Snapshot erhalten. +Nachfolgende scrub-, check- und fix-Befehle verwenden diesen ausstehenden Snapshot, +da er mit dem in der .content-Datei aufgezeichneten Dateisystemzustand übereinstimmt, +selbst wenn die Parität nur teilweise synchronisiert ist. +

    Im Falle einer sync-Unterbrechung lesen die Befehle check und fix +auch aus dem stable-Snapshot, um Datenblöcke von Dateien abzurufen, +die während des Syncs aktualisiert oder gelöscht wurden. +Dies ist möglich, da die .content-Datei Metadaten für alle geänderten oder +gelöschten Dateien während des gesamten Sync-Prozesses aufbewahrt. +Diese historischen Informationen werden erst gelöscht, wenn ein Sync erfolgreich abgeschlossen +und die endgültige Version der .content-Datei gespeichert wurde. +

    Wenn ein sync nach einer Unterbrechung neu gestartet wird, wird der vorhandene +ausstehende (pending) Snapshot gelöscht und ein neuer erstellt, um den +aktuellen Zustand des Live-Dateisystems zu erfassen. +Wenn ein sync jedoch unterbrochen wird, vermeiden Sie es, Dateien zu +ändern, zu löschen, zu ersetzen oder zu verschieben, bis ein nachfolgender +sync erfolgreich abgeschlossen ist. Die Parität kann noch Blöcke enthalten, +die aus dem vom unterbrochenen Sync verwendeten Snapshot berechnet wurden. +Ein späterer Sync könnte diesen Snapshot ersetzen, wodurch Zwischenversionen +von Dateien für die Wiederherstellung nicht mehr verfügbar sind. +

    +

    +Externe Sicherungen mit Dateisystem-Snapshots (External backups with filesystem snapshots) +

    +

    Wenn Dateisystem-Snapshots aktiviert sind, greift SnapRAID auf Snapshots +an der Wurzel jedes Daten-Subvolumes, Volumes oder Datasets zu oder erstellt +diese dort. +

    Ein einfacher Weg, um jegliche Beeinträchtigung durch externe Tools zu +vermeiden, besteht darin, die data-Konfiguration auf ein reguläres +Unterverzeichnis innerhalb des Subvolumes oder Volumes verweisen zu lassen +(beispielsweise /mnt/subvol/data statt /mnt/subvol). SnapRAID erstellt +das Snapshot-Verzeichnis immer an der Wurzel des Subvolumes (beispielsweise +/mnt/subvol/.snapraid/), wodurch das Datenunterverzeichnis sauber bleibt +und Snapshots außerhalb und unsichtbar für Sicherungswerkzeuge bleiben, die +darin arbeiten. +

    Wenn das konfigurierte data-Verzeichnis hingegen selbst die Wurzel des +Subvolumes oder Volumes ist, erstellt SnapRAID ein .snapraid/-Verzeichnis +direkt darin (auf Btrfs, Bcachefs und NTFS). Während SnapRAID dieses +Verzeichnis bei seinen eigenen Scans automatisch ausschließt, werden +externe Sicherungs- oder Synchronisationswerkzeuge darauf stoßen. Wenn es +nicht ausgeschlossen wird, könnten sie in die Snapshots oder Verknüpfungen +eindringen und den gesamten eingefrorenen Datenbaum kopieren, was Daten +dupliziert und den Sicherungsspeicherplatz erschöpfen kann. Konfigurieren +Sie externe Sicherungswerkzeuge immer so, dass sie das Verzeichnis +.snapraid/ ausschließen. +

    Bei ZFS werden Snapshots über das standardmäßige virtuelle Verzeichnis +.zfs/snapshot/ anstelle von .snapraid/ bereitgestellt. Standardmäßig +(snapdir=hidden) blendet ZFS dieses Verzeichnis in Verzeichnislisten aus, +sodass externe Sicherungswerkzeuge es nicht durchlaufen. Wenn Sie +snapdir=visible aktiviert haben, stellen Sie sicher, dass Ihre +Sicherungswerkzeuge das Verzeichnis .zfs/ ausschließen. +

    +
    +
    +

    +Muster (Pattern)

    Muster bieten eine flexible Möglichkeit, Dateien für die Einbeziehung oder den Ausschluss zu filtern. Durch die Verwendung von Globbing-Zeichen können Sie Regeln definieren, @@ -1951,25 +2155,26 @@ Fragezeichen überschreitet er niemals Verzeichnisgrenzen. Er stoppt beim Schrägstrich, was ihn für den Abgleich innerhalb einer einzelnen Pfadkomponente geeignet macht. Dies ist das Standardverhalten von Wildcards, das vom Shell- Globbing bekannt ist. -

    Der Doppelstern ** ist mächtiger; er entspricht jeder Folge von -Zeichen einschließlich Verzeichnistrennzeichen. Dies ermöglicht es Mustern, über -mehrere Verzeichnisebenen hinweg übereinzustimmen. Wenn ** direkt in -ein Muster eingebettet ist, kann es null oder mehr Zeichen einschließlich Schrägstrichen zwischen -dem umgebenden wörtlichen Text entsprechen. -

    Die wichtigste Verwendung von ** ist in der speziellen Form /**/. Dies entspricht -null oder mehr vollständigen Verzeichnisebenen, was es möglich macht, Dateien -in jeder Tiefe eines Verzeichnisbaums abzugleichen, ohne die genaue Pfadstruktur zu kennen. -Zum Beispiel entspricht das Muster src/**/main.js dem Pfad src/main.js (Überspringen -von null Verzeichnissen), src/ui/main.js (Überspringen eines Verzeichnisses) und -src/ui/components/main.js (Überspringen von zwei Verzeichnissen). +

    Der Doppelstern-Platzhalter ** entspricht nur dann über Verzeichnistrennzeichen +hinweg, wenn er an ein Verzeichnistrennzeichen angrenzt (einem Schrägstrich +vorangestellt oder nachgestellt). In dieser Form entspricht er null oder mehr +Zeichen über Verzeichnisebenen hinweg. Zum Beispiel entspricht foo/**/bar den +Pfaden foo/bar, foo/a/bar und foo/a/b/bar; **/build entspricht build +und foo/bar/build; und src/**.js entspricht src/main.js und +src/ui/components/main.js. +Die alleinstehende Form /**/ wird nicht als vollständiges Muster akzeptiert. +

    Wenn ** nicht an einen Schrägstrich angrenzt, verhält er sich wie * und +entspricht keinen Verzeichnistrennzeichen. Zum Beispiel entspricht **.jpg +der Datei photo.jpg im aktuellen Verzeichnis, nicht jedoch dir/photo.jpg. +Verwenden Sie für diesen Zweck **/*.jpg.

    Zeichenklassen mit eckigen Klammern [] entsprechen einem einzelnen Zeichen aus einer bestimmten Menge oder einem Bereich. Wie die anderen Einzelzeichenmuster entsprechen sie nicht den Verzeichnistrennzeichen. Klassen unterstützen Bereiche und Negierung durch ein Ausrufezeichen.

    Der grundlegende Unterschied, den man sich merken sollte, ist, dass *, ? und Zeichenklassen alle Verzeichnisgrenzen respektieren und nur innerhalb einer einzelnen Pfadkomponente -übereinstimmen, während ** das einzige Muster ist, das über Verzeichnistrennzeichen -hinweg übereinstimmen kann. +übereinstimmen, während ** nur dann über Verzeichnistrennzeichen hinweg übereinstimmen kann, +wenn es an einen Schrägstrich angrenzt.

    Es gibt vier verschiedene Arten von Mustern:

    @@ -2062,6 +2267,28 @@ include /movies/ include /musics/ include /pictures/ +

    Beachten Sie, dass das Ausschließen eines Verzeichnisses (mit DIR/ +oder /PFAD/DIR/) verhindert, dass SnapRAID dieses Verzeichnis betritt +und durchsucht. Daher ist es nicht möglich, eine Datei oder ein +Unterverzeichnis innerhalb eines ausgeschlossenen übergeordneten +Verzeichnisses wieder einzuschließen, da der Scanner dieses niemals +durchläuft. +

    Beispielsweise wird bei folgender Konfiguration file.dat NICHT +eingeschlossen, da /keep/ verworfen wird, bevor file.dat gesehen +werden kann: +

    +# Funktioniert NICHT: /keep/ wird vollständig übersprungen
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Um Dateien innerhalb eines Verzeichnisses auszuschließen und bestimmte +Dateien beizubehalten, schließen Sie die Dateien im Verzeichnis aus, +anstatt das Verzeichnis selbst auszuschließen: +

    +# Funktioniert: /keep/ wird durchlaufen, aber andere Dateien darin werden ausgeschlossen
    +include /keep/file.dat
    +exclude /keep/*
    +

    In der Befehlszeile können Sie mit der Option -f nur include-Muster verwenden. Zum Beispiel:

    @@ -2073,8 +2300,8 @@ snapraid -f "*.mp3" check
     Anführungszeichen setzen, um zu verhindern, dass die Shell sie erweitert.
     

    -

    -Dateien Ignorieren +

    +Dateien Ignorieren (Ignore File)

    Zusätzlich zu den globalen Regeln in der Konfigurationsdatei können Sie .snapraidignore-Dateien in jedem Verzeichnis innerhalb des Arrays platzieren, @@ -2139,20 +2366,23 @@ build/

    -

    -Content +

    +Inhalt (Content)

    SnapRAID speichert die Liste und Prüfsummen Ihrer Dateien in der Content-Datei.

    Es ist eine Binärdatei, die alle im Festplatten-Array vorhandenen Dateien auflistet, zusammen mit allen Prüfsummen zur Überprüfung ihrer Integrität. -

    Diese Datei wird von den Befehlen sync und scrub gelesen und -geschrieben und von den Befehlen fix, check und status gelesen. +

    Die Content-Datei wird von den Befehlen sync, scrub, touch und +rehash gelesen und geschrieben. Sie wird von den Befehlen status, +diff, check, fix, list, dup, locate und pool gelesen und +von den Befehlen smart, probe, up, down und devices vollständig +ignoriert.

    -

    -Parity +

    +Parität (Parity)

    SnapRAID speichert die Paritätsinformationen Ihres Arrays in den Paritätsdateien. @@ -2162,8 +2392,8 @@ Paritätsdateien. und geschrieben und nur von den Befehlen scrub und check gelesen.

    -

    -Encoding +

    +Kodierung (Encoding)

    SnapRAID ignoriert unter Unix jede Kodierung. Es liest und speichert die Dateinamen mit derselben Kodierung, die vom Dateisystem @@ -2176,6 +2406,283 @@ eine TrueType-Schriftart wie Lucida Console als Konsolenschriftart verwenden. Dies betrifft nur die gedruckten Dateinamen; wenn Sie die Konsolenausgabe in eine Datei umleiten, ist die resultierende Datei immer im UTF-8-Format. +

    +
    +

    +Exit-Code (Exit Code) +

    +

    SnapRAID endet mit den folgenden Fehlercodes: +

    +
    +
    +0 +
    +Alles OK. +
    +
    +
    +
    +1 +
    +Der Befehl ist auf Fehler gestoßen. +
    +
    +
    +
    +2 +
    +Der Befehl diff hat festgestellt, dass alles OK ist, aber ein sync erforderlich ist. +
    +
    +
    +
    +3 +
    +Ein Festplattenbefehl (probe, smart, devices, up, down) wurde +abgeschlossen, aber mindestens ein Dateisystem läuft im degradierten +Modus mit fehlenden Geräten. +
    +
    +
    +
    +
    +

    +Bekannte Probleme (Known Issues) +

    +
    +

    +Dateisystemgrenzen +

    +

    SnapRAID überschreitet beim Scannen einer Datenfestplatte keine Dateisystem-, +Mount- oder Subvolume-Grenzen. Wenn eine solche Grenze erkannt wird, gibt +SnapRAID eine WARNUNG aus und scannt nicht darüber hinaus. +

    Dateien, die sich jenseits solcher Grenzen befinden, sind nicht in der +Datenfestplatte enthalten und müssen separat konfiguriert werden, wenn sie +geschützt werden sollen. +

    +
    +

    +Mount-Punkte mit Dateisystem-Snapshots +

    +

    Wenn Dateisystem-Snapshots aktiviert sind, werden verschachtelte Mount-Punkte +und Bind-Mounts innerhalb einer Datenfestplatte nicht unterstützt. +

    Mount-Punkte sind Teil des Mount-Namespace des laufenden Systems und werden +in Dateisystem-Snapshots nicht beibehalten. Folglich kann beim Scannen eines +Snapshots ein Verzeichnis sichtbar werden, das im Live-Dateisystem durch +einen Mount-Punkt verdeckt war. +

    Platzieren Sie keine verschachtelten Mount-Punkte oder Bind-Mounts innerhalb +von Datenfestplatten, wenn Dateisystem-Snapshots aktiviert sind. +

    +
    +

    +Mehrere Konfigurationen mit Dateisystem-Snapshots +

    +

    Die Snapshot-Unterstützung kann nicht sicher von mehreren unabhängigen +SnapRAID-Konfigurationen gemeinsam genutzt werden, die denselben +Dateisystem-Snapshot-Namespace verwenden. +

    Unter Btrfs und Bcachefs darf nur eine SnapRAID-Konfiguration mit aktivierter +Snapshot-Unterstützung Datenverzeichnisse innerhalb desselben Subvolumes +verwenden. Unter ZFS gilt dieselbe Einschränkung für ein Dataset und unter +NTFS für ein Volume. +

    Mehrere Konfigurationen, die denselben Snapshot-Namespace teilen, verwenden +dieselben Snapshots stable, pending und scan. Das Ausführen einer +Konfiguration kann daher Wiederherstellungs-Snapshots ersetzen oder löschen, +die von einer anderen benötigt werden. +

    +
    +

    +In-Place-Dateimodifikationen ohne Zeitstempeländerungen +

    +

    SnapRAID erkennt Dateimodifikationen durch den Vergleich von Dateigrößen +und Änderungszeitstempeln (mtime). +

    Wenn eine Anwendung eine Datei in-place ändert, ohne deren Größe zu verändern +oder ihren Änderungszeitstempel zu aktualisieren, erkennen "diff" und "sync" +nicht, dass sich die Datei geändert hat, und ihre Parität wird nicht +aktualisiert. +

    Um sicherzustellen, dass SnapRAID solche Änderungen erkennt, aktualisieren +Sie den Änderungszeitstempel der Datei (z. B. mit dem Dienstprogramm "touch"). +Andernfalls wird der Unterschied erst bei einem nachfolgenden "scrub" oder +"check" als Hash-Fehlübereinstimmung erkannt. +

    +
    +

    +Nicht-ASCII-Groß-/Kleinschreibung unter Windows +

    +

    SnapRAID verwendet auf allen Plattformen eine standardmäßige, vorhersehbare +UTF-8-Kodierung und beschränkt den Vergleich ohne Berücksichtigung der +Groß-/Kleinschreibung auf ASCII-Zeichen. +

    Windows-Dateisysteme leiden unter dem veralteten Konzept, die Unempfindlichkeit +gegenüber der Groß-/Kleinschreibung bei Unicode-Dateinamen über willkürliche, +systemabhängige Folding-Tabellen zu erzwingen. Infolgedessen verschleiert Windows +die Realität des Dateisystems, indem es völlig unterschiedliche +Unicode-Bytesequenzen so behandelt, als wären sie dieselbe Datei. +

    Beispielsweise sind À.txt und à.txt unterschiedliche Unicode-Namen, dennoch +behandelt Windows sie unlogischerweise als identisch, während SnapRAID ihre +tatsächliche Unterscheidung beibehält. +

    Diese Einschränkung wird durch den inkonsistenten Umgang von Windows mit +Unicode-Dateinamen und das Beharren auf einer Groß-/Kleinschreibungs-Aliasing +verursacht. Um Abweichungen durch das Case-Folding von Windows zu vermeiden, +geben Sie für alle Nicht-ASCII-Zeichen in Konfigurationspfaden und Filtern +stets die exakte Groß-/Kleinschreibung an. +

    +
    +

    +Wiederherstellung mit partiellem Fix +

    +

    Wenn fix mit -S, --start oder -B, --count eingeschränkt wird, +arbeitet SnapRAID nur auf den ausgewählten Blöcken und führt weder eine +Finalisierung auf Dateiebene noch eine Quarantäne durch. +

    Wenn die Wiederherstellung Best-Effort-Daten erzeugt, bei denen nicht +nachgewiesen werden kann, dass sie den aktuellen Inhalt darstellen, können +solche Blöcke dennoch unter dem normalen Dateinamen geschrieben werden. Die mit +diesen wiederhergestellten Blöcken verbundene Ungewissheit bleibt nach Beendigung +des Befehls nicht erhalten. +

    Infolgedessen behandelt ein späterer fix diese lesbaren Blöcke als gültige +Dateidaten und versucht nicht, sie erneut wiederherzustellen. Dies kann dazu +führen, dass eine spätere Wiederherstellung Erfolg meldet, während die Datei +weiterhin unvollständige oder veraltete Daten enthält. +

    Die Optionen -S und -B sind nur für die fortgeschrittene manuelle +Wiederherstellung gedacht, typischerweise nachdem ein normaler fix +fehlgeschlagen ist. Wenn ein partieller fix nicht wiederherstellbare Daten +meldet, entfernen oder benennen Sie die betroffenen Dateien um, bevor Sie eine +weitere Wiederherstellung versuchen, oder überprüfen Sie deren Inhalt manuell. +

    +
    +

    +NTFS-Hardlinks und ausgeschlossene Pfade +

    +

    Unter NTFS speichern Verzeichniseinträge Dateigröße und Zeitstempel +unabhängig für jeden Hardlink zwischen. Wenn eine Datei über einen Link +geändert wird, können die Verzeichniseinträge anderer Links, die auf +dieselbe Datei verweisen, veraltete Metadaten behalten, bis auf sie +zugegriffen wird. +

    SnapRAID erkennt und normalisiert diesen Zustand automatisch, sobald +während eines Scans mindestens zwei Hardlinks zu derselben Datei gefunden +werden. Wenn jedoch nur ein Hardlink gescannt wird, während die anderen +durch Filter ausgeschlossen sind oder außerhalb des Datenfestplattenpfads +liegen, kann SnapRAID die Inode-Kollision nicht erkennen und verlässt sich +auf die zwischengespeicherten Metadaten des einzigen sichtbaren Links. +

    Infolgedessen können Änderungen, die über einen ausgeschlossenen oder +externen Hardlink vorgenommen wurden, von SnapRAID unbemerkt bleiben, +bis die Metadaten des einbezogenen Links durch das Betriebssystem +aktualisiert werden (z. B. wenn über diesen Pfad auf die Datei +zugegriffen oder sie geöffnet wird). +

    Um diese Einschränkung zu vermeiden, sollten geschützte Dateien nicht über +Hardlinks geändert werden, die von SnapRAID ausgeschlossen sind, oder es +sollte sichergestellt werden, dass alle Hardlinks zu einer Datei im Scan +enthalten sind, damit SnapRAID sie normalisieren kann. +

    +
    +

    +Wiederherstellung nach einem unterbrochenen Multi-Paritäts-Sync +

    +

    In einem Array mit mehreren Paritätsfestplatten kann ein unterbrochener +sync dazu führen, dass sich verschiedene Paritätsstufen vorübergehend +in unterschiedlichen Aktualisierungszuständen befinden. Beispielsweise +kann Parität 1 bereits neu aktualisierte Daten enthalten, während +Parität 2 noch die alten Daten enthält. +

    Während check oder fix testet SnapRAID verschiedene +Paritätskombinationen und validiert die rekonstruierten Daten anhand +der bekannten Block-Hashes (die den gesamten Block abdecken, typischerweise +256 KiB). +

    Wenn SnapRAID eine Rekonstruktion mit einer inkonsistenten Mischung aus +alter und neuer Parität versucht, erzeugen die linearen RAID-Gleichungen +fehlerhafte Daten. Damit eine solche ungültige Kombination fälschlicherweise +akzeptiert wird, müssten die Gleichungen rein zufällig mindestens einen +vollständigen 256-KiB-Block so perfekt rekonstruieren, dass sein Hash +übereinstimmt, während andere nicht synchronisierte Blöcke desselben +Stripes mit fehlerhaften Daten rekonstruiert werden. +

    Dieses Szenario beruht nicht auf einer Hash-Kollision; vielmehr müssten +die gemischten Paritätsgleichungen selbst zufällig genau den ursprünglichen +256-KiB-Blockinhalt erzeugen. Dies ist zwar bei speziell konstruierten oder +stark repetitiven Daten mathematisch denkbar, bei realen Daten jedoch +praktisch unmöglich. +

    Wenn alle Festplatten fehlerfrei sind, beseitigt der Abschluss des +unterbrochenen sync vor weiteren Änderungen diese Unklarheit. Wenn eine +Festplatte ausgefallen ist und eine Wiederherstellung erforderlich ist, +sollten vor dem Ausführen von check oder fix keine Änderungen an den +Datenfestplatten vorgenommen werden. +

    +
    +

    +Reservierte Datei- und Verzeichnisnamen +

    +

    SnapRAID reserviert einige Datei-, Verzeichnis- und Snapshot-Namen für seine +internen Operationen. Verwenden Sie diese Namen nicht für Benutzerdaten: +

    +
    +
    +.snapraidignore +
    +Lokale Ausschlussregeldatei. +
    +
    +
    +
    +.snapraid +
    +Snapshot-Container-Verzeichnis. +
    +
    +
    +
    +snapraid-* +
    +Von SnapRAID verwaltete ZFS-Snapshot-Namen. +
    +
    +
    +
    +*.unrecoverable +
    +Beschädigte Dateien, die während der Wiederherstellung +unter Quarantäne gestellt wurden. +
    +
    +
    +
    +CONTENT.tmp +
    +Temporäre Datei für Content-Aktualisierungen. +
    +
    +
    +
    +CONTENT.lock +
    +Content-Sperrdatei. +
    +
    +
    +
    +PARITY.spaceholder +
    +Temporäre Platzhalterdatei während der +Paritätszuweisung unter Windows. +
    +
    +
    +

    Die Verwendung dieser Namen für nicht zugehörige Daten kann dazu führen, +dass Dateien oder Snapshots ignoriert, als Metadaten fehlinterpretiert, +überschrieben, umbenannt oder gelöscht werden. +

    Unter Windows sind alle Varianten der Groß- und Kleinschreibung ebenfalls +reserviert, selbst in NTFS-Verzeichnissen, die für die Unterscheidung von +Groß- und Kleinschreibung konfiguriert sind (z. B. .SNAPRAIDIGNORE, +.SnapRaid, CONTENT.TMP und CONTENT.Lock). +

    +
    +
    +

    +Übersetzung (Translation) +

    +

    Dieses Dokument ist eine automatische Übersetzung des englischen Handbuchs. +Die maßgebliche Version finden Sie im englischen Handbuch. +

    +
    +

    +Siehe auch (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-es.html b/manual-es.html index cbfddd92..223f4812 100644 --- a/manual-es.html +++ b/manual-es.html @@ -114,7 +114,7 @@

    -Synopsis +Sinopsis (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Description +Descripción (Description)

    SnapRAID es un programa de copia de seguridad diseñado para arrays de discos, que almacena información de paridad para la recuperación @@ -156,7 +156,7 @@ Puede utilizar discos ya llenos de archivos sin la necesidad de reformatearlos, accediendo a ellos como de costumbre.

  • -Todos sus datos son hasheados para asegurar la integridad de los datos +Todos sus datos son procesados con hash para asegurar la integridad de los datos y prevenir la corrupción silenciosa.
  • @@ -190,23 +190,36 @@ ahorrando energía y reduciendo el ruido.
  • -Limitations +Limitaciones (Limitations)

    -

    SnapRAID es un híbrido entre un programa RAID y un programa de copia -de seguridad, con el objetivo de combinar los mejores beneficios de -ambos. Sin embargo, tiene algunas limitaciones que debe considerar -antes de usarlo. -

    La principal limitación es que si un disco falla y no ha sincronizado -recientemente, es posible que no pueda recuperarse por completo. -Más específicamente, es posible que no pueda recuperar hasta el tamaño -de los archivos cambiados o eliminados desde la última operación de -sincronización. Esto ocurre incluso si los archivos cambiados o -eliminados no están en el disco fallido. Esta es la razón por la que -SnapRAID es más adecuado para datos que rara vez cambian. -

    Por otro lado, los archivos recién agregados no impiden la recuperación -de los archivos ya existentes. Solo perderá los archivos recién -agregados si están en el disco fallido. -

    Otras limitaciones de SnapRAID son: +

    SnapRAID es un híbrido entre un RAID y un programa de copia de seguridad, con el objetivo de combinar +los mejores beneficios de ambos. Sin embargo, tiene algunas limitaciones que debería +considerar antes de usarlo. +

    La principal limitación es que si un disco falla, solo puede recuperar datos hasta el +estado de la última operación de sincronización (sync). Cualquier dato añadido o modificación realizada +desde la última sincronización que se encuentre en el disco dañado se perderá. +

    Por lo tanto, SnapRAID es adecuado principalmente para datos que cambian raramente. +

    Para los datos que ya existían en la última sincronización, la fiabilidad de la recuperación depende +de si se utiliza la opción de instantánea (snapshot): +

      +
    • +Con soporte para instantáneas (disponible en Btrfs, ZFS, Bcachefs y NTFS), +SnapRAID puede mantener automáticamente una referencia congelada +independiente de cada sistema de archivos de datos compatible. +Esto garantiza que incluso si modifica o elimina archivos en su sistema de archivos activo +durante o después de un sync, el proceso de recuperación se mantenga consistente y confiable. +
    • +
    +
      +
    • +Sin soporte para instantáneas, eliminar o cambiar archivos después de un sync +puede impedir la recuperación completa de otros discos fallidos. Esto ocurre +porque la paridad ya no coincide con los archivos modificados, incluso si +esos archivos no están en el disco fallido. Por otro lado, los archivos recién añadidos +no impiden la recuperación de los archivos ya existentes. +
    • +
    +

    Otras limitaciones de SnapRAID son:

    • Con SnapRAID, aún tiene sistemas de archivos separados para cada disco. @@ -227,14 +240,14 @@ de todo el array de discos.
    • Solo se guardan nombres de archivo, marcas de tiempo, enlaces simbólicos -y enlaces duros. Los permisos, la propiedad y los atributos +y enlaces físicos. Los permisos, la propiedad y los atributos extendidos no se guardan.

    -Getting Started +Primeros pasos (Getting Started)

    Para usar SnapRAID, primero debe seleccionar un disco en su array de discos para dedicarlo a la información de parity (paridad). Con un @@ -310,17 +323,17 @@ siguiente ejecución, se reanudará donde se interrumpió. actualizar la información de paridad ejecutando el comando sync.

    -Scrubbing +Limpieza (Scrubbing)

    Para verificar periódicamente los datos y la paridad en busca de -errores, puede ejecutar el comando scrub (fregar/limpiar). +errores, puede ejecutar el comando scrub (depurar/limpiar).

     snapraid scrub
     

    Este comando compara los datos de su array con el hash calculado durante el comando sync para verificar la integridad.

    Cada ejecución del comando verifica aproximadamente el 8% del array, -excluyendo los datos ya fregados en los 10 días anteriores. +excluyendo los datos ya depurados en los 10 días anteriores. Puede usar la opción -p, --plan para especificar una cantidad diferente y la opción -o, --older-than para especificar una edad diferente en días. Por ejemplo, para verificar el 5% del array en @@ -339,9 +352,9 @@ por bloques defectuosos con la opción -e, --filter-error:

     snapraid -e fix
     
    -

    En el siguiente scrub, los errores desaparecerán del informe de +

    En la siguiente depuración (scrub), los errores desaparecerán del informe de status si realmente se han corregido. Para hacerlo más rápido, -puede usar -p bad para fregar solo los bloques marcados como defectuosos. +puede usar -p bad para depurar solo los bloques marcados como defectuosos.

     snapraid -p bad scrub
     
    @@ -352,12 +365,12 @@ se marcan como defectuosos.

    -Pooling +Agrupación (Pooling)

    Nota: La función de pooling descrita a continuación ha sido sustituida por la herramienta mergerfs, que ahora es la opción recomendada para los usuarios de Linux en la comunidad SnapRAID. -Mergefs proporciona una forma más flexible y eficiente de agrupar +Mergerfs proporciona una forma más flexible y eficiente de agrupar múltiples unidades en un único punto de montaje unificado, permitiendo un acceso sin problemas a los archivos en todo su array sin depender de enlaces simbólicos. Se integra bien con SnapRAID @@ -431,7 +444,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +Restauración (Undeleting)

    SnapRAID funciona más como un programa de copia de seguridad que como un sistema RAID, y se puede usar para restaurar o recuperar archivos @@ -457,14 +470,14 @@ snapraid fix -m

    -Recovering +Recuperación (Recovering)

    Ha sucedido lo peor, ¡y ha perdido uno o más discos!

    ¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos!

    Lo primero que debe hacer es evitar más cambios en su array de discos. Deshabilite cualquier conexión remota a él y cualquier proceso -programado, incluida cualquier sincronización o fregado nocturno -programado de SnapRAID. +programado, incluida cualquier sincronización o depuración nocturna +programada de SnapRAID.

    Luego, proceda con los siguientes pasos.

    @@ -551,24 +564,24 @@ snapraid sync

    -Commands +Comandos (Commands)

    -

    SnapRAID proporciona algunos comandos simples que le permiten: +

    SnapRAID proporciona unos pocos comandos simples que le permiten:

    • -Imprimir el estado del array -> status +Mostrar el estado del array -> status
    • Controlar los discos -> smart, probe, up, down
    • -Hacer una copia de seguridad/instantánea -> sync +Crear un punto de copia de seguridad/recuperación -> sync
    • Comprobar periódicamente los datos -> scrub
    • -Restaurar la última copia de seguridad/instantánea -> fix. +Restaurar el último punto de copia de seguridad/recuperación -> fix.

    Los comandos deben escribirse en minúsculas. @@ -579,14 +592,14 @@ status

    Imprime un resumen del estado del array de discos.

    Incluye información sobre la fragmentación de la paridad, la antigüedad de los bloques sin verificar y todos los errores silenciosos -registrados encontrados durante el fregado. +registrados encontrados durante la depuración.

    La información presentada se refiere a la última vez que ejecutó sync. Las modificaciones posteriores no se tienen en cuenta.

    Si se detectaron bloques defectuosos, se enumeran sus números de bloque. Para corregirlos, puede usar el comando fix -e.

    También muestra un gráfico que representa la última vez que cada -bloque fue fregado o sincronizado. Los bloques fregados se muestran -con *, los bloques sincronizados pero aún no fregados con o. +bloque fue depurado o sincronizado. Los bloques depurados se muestran +con *, los bloques sincronizados pero aún no depurados con o.

    Nada se modifica.

    @@ -724,9 +737,10 @@ lo que significa que fueron modificados.
    moved
    -Archivos movidos a un directorio diferente en el mismo -disco. Se identifican por tener el mismo nombre, tamaño, -marca de tiempo e inodo, pero un directorio diferente. +Archivos movidos o renombrados en el mismo disco manteniendo +el mismo inodo. Se identifican por tener el mismo inodo, +tamaño y marca de tiempo, pero una ruta diferente. El nombre +del archivo también puede ser diferente.
    @@ -745,14 +759,13 @@ completa debe coincidir para ser identificado, no solo el nombre.
    relocated
    -Archivos movidos en el mismo disco o en uno -diferente donde el original ha desaparecido. -Se identifican por tener el mismo nombre, tamaño y -marca de tiempo. -Si la marca de tiempo de subsegundo es cero, la ruta -completa debe coincidir para ser identificado. -A diferencia de los archivos moved en el mismo disco, -los archivos reubicados tienen un inodo diferente. +Archivos movidos a un directorio o disco diferente donde +el archivo original ha desaparecido y el inodo no se conserva. +Se identifican por tener el mismo nombre, tamaño y marca de tiempo. +Si la marca de tiempo de subsegundo es cero, la ruta completa +debe coincidir para ser identificado. A diferencia de los archivos +'moved', los archivos reubicados requieren que el nombre del +archivo siga siendo el mismo.
    @@ -799,33 +812,33 @@ Los archivos en el array NO se modifican.

    scrub

    -

    Frota (scrubs) el array, buscando errores silenciosos o de +

    Depura (scrubs) el array, buscando errores silenciosos o de entrada/salida en los discos de datos y paridad.

    Cada invocación verifica aproximadamente el 8% del array, excluyendo -los datos ya fregados en los últimos 10 días. -Esto significa que fregar una vez a la semana asegura que cada bit de +los datos ya depurados en los últimos 10 días. +Esto significa que depurar una vez a la semana asegura que cada bit de datos se verifique al menos una vez cada tres meses. -

    Puede definir un plan de fregado o una cantidad diferente utilizando +

    Puede definir un plan de depuración o una cantidad diferente utilizando la opción -p, --plan, que acepta: -bad - Fregar bloques marcados como defectuosos. -new - Fregar bloques recién sincronizados que aún no han sido fregados. -full - Fregar todo. -0-100 - Fregar el porcentaje especificado de bloques. +bad - Depurar bloques marcados como defectuosos. +new - Depurar bloques recién sincronizados que aún no han sido depurados. +full - Depurar todo. +0-100 - Depurar el porcentaje especificado de bloques.

    Si especifica un valor de porcentaje, también puede usar la opción -o, --older-than para definir la antigüedad del bloque. -Los bloques más antiguos se friegan primero, asegurando una verificación +Los bloques más antiguos se depuran primero, asegurando una verificación óptima. -Si desea fregar solo los bloques recién sincronizados que aún no han -sido fregados, use la opción -p new. -

    Para obtener detalles del estado del fregado, use el comando status. +Si desea depurar solo los bloques recién sincronizados que aún no han +sido depurados, use la opción -p new. +

    Para obtener detalles del estado de la depuración, use el comando status.

    Para cualquier error silencioso o de entrada/salida encontrado, los bloques correspondientes se marcan como defectuosos en el archivo content. Estos bloques defectuosos se enumeran en status y se pueden corregir con fix -e. -Después de la corrección, en el siguiente fregado, se volverán a +Después de la corrección, en la siguiente depuración, se volverán a verificar y, si se encuentran corregidos, se eliminará la marca de defectuoso. -Para fregar solo los bloques defectuosos, puede usar el comando +Para depurar solo los bloques defectuosos, puede usar el comando scrub -p bad.

    Se recomienda ejecutar scrub solo en un array sincronizado para evitar errores reportados causados por datos no sincronizados. Estos errores @@ -841,13 +854,12 @@ Los archivos en el array NO se modifican.

    fix

    -

    Corrige todos los archivos y la información de paridad. -

    Todos los archivos y la información de paridad se comparan con el -estado de instantánea guardado en el último sync. -Si se encuentra una diferencia, se revierte a la instantánea almacenada. -

    ¡ADVERTENCIA! El comando fix no diferencia entre errores y -modificaciones intencionales. Revierte incondicionalmente el estado -del archivo al último sync. +

    Repara todos los archivos y los datos de paridad. +

    Todos los archivos y datos de paridad si comparan con el estado guardado en +el último sync. Si se encuentra una diferencia, se revierte al estado almacenado. +

    ¡ADVERTENCIA! +El comando fix no diferencia entre errores y modificaciones intencionadas. +Revierte incondicionalmente el estado del archivo al del último sync.

    Si no se especifica otra opción, se procesa todo el array. Utilice las opciones de filtro para seleccionar un subconjunto de archivos o discos para operar. @@ -983,7 +995,7 @@ el proceso de reasignación.

    -Options +Opciones (Options)

    SnapRAID proporciona las siguientes opciones:

    @@ -1074,12 +1086,12 @@ Esta opción solo se puede usar con check y fix.
    -p, --plan PERC|bad|new|full
    -Selecciona el plan de fregado (scrub). Si PERC es un valor +Selecciona el plan de depuración (scrub). Si PERC es un valor numérico de 0 a 100, se interpreta como el porcentaje de -bloques a fregar. +bloques a depurar. En lugar de un porcentaje, puede especificar un plan: -bad friega bloques defectuosos, new friega bloques aún -no fregados, y full friega todo. +bad depura bloques defectuosos, new depura bloques aún +no depurados, y full depura todo. Esta opción solo se puede usar con scrub.
    @@ -1090,9 +1102,9 @@ Esta opción solo se puede usar con scrub. -o, --older-than DAYS
    Selecciona la parte más antigua del array para procesar en scrub. -DAYS es la edad mínima en días para que un bloque sea fregado; +DAYS es la edad mínima en días para que un bloque sea depurado; el valor predeterminado es 10. -Los bloques marcados como defectuosos siempre se friegan +Los bloques marcados como defectuosos siempre se depuran independientemente de esta opción. Esta opción solo se puede usar con scrub.
    @@ -1183,7 +1195,7 @@ multiplicador como K, M o G (por ejemplo, --bw-limit 1G).
    --t, --tail TAMAÑO +-t, --tail SIZE
    Limita la lista de archivos a aquellos que no usan más del tamaño de cola especificado de los discos de paridad. @@ -1345,10 +1357,10 @@ NO tiene protección de datos durante la operación sync.
    --W, --force-realloc-tail TAMAÑO +-W, --force-realloc-tail SIZE
    Funciona como -R, --force-realloc, pero limitado a la porción final -especificada (últimos TAMAÑO bytes) de cada archivo de paridad. +especificada (últimos SIZE bytes) de cada archivo de paridad. Fuerza la reasignación (movimiento) de cualquier fragmento/bloque de archivo actualmente almacenado en esa sección final, permitiendo que se coloquen en cualquier lugar de los archivos de paridad donde haya espacio libre @@ -1418,7 +1430,8 @@ Sin embargo, check y fix siempre se detienen en el primer error. Comienza a procesar desde el número de bloque especificado. Esto puede ser útil para reintentar verificar o corregir bloques específicos en caso de un disco dañado. -Esta opción es principalmente para recuperación manual avanzada. +Esta opción es principalmente para recuperación manual avanzada +y solo es compatible con check y fix.
    @@ -1428,7 +1441,8 @@ Esta opción es principalmente para recuperación manual avanzada. -B, --count BLKCOUNT
    Procesa solo el número de bloques especificado. -Esta opción es principalmente para recuperación manual avanzada. +Esta opción es principalmente para recuperación manual avanzada +y solo es compatible con check y fix.
    @@ -1494,7 +1508,7 @@ Imprime la versión del programa.

    -Configuration +Configuración (Configuration)

    SnapRAID requiere un archivo de configuración para saber dónde se encuentra su array de discos y dónde almacenar la información de paridad. @@ -1594,6 +1608,10 @@ ser único. DIR es el punto de montaje del disco en el sistema de archivos.

    Puede cambiar el punto de montaje según sea necesario, siempre que mantenga el NAME fijo. +

    Sin embargo, la ruta configurada debe apuntar consistentemente a los +mismos datos subyacentes. Si la ruta contiene enlaces simbólicos, +sus destinos deben permanecer estables. No se admite cambiar el destino +de dichos symlinks para cambiar el directorio de datos sobre la marcha.

    Debe usar una opción para cada disco de datos en el array.

    Puede cambiar el nombre de un disco más tarde cambiando el NAME directamente en el archivo de configuración y luego ejecutando un @@ -1606,14 +1624,38 @@ extra NAME DIR

    Define el nombre y el punto de montaje de discos adicionales para monitorear con los comandos smart y probe. -

    Esto es útil para monitorear discos que no forman parte de la -matriz pero que son necesarios para que el sistema funcione, como +

    Esto es útil para monitorear discos que no forman parte del +array pero que son necesarios para que el sistema funcione, como el disco de arranque.

    Tenga en cuenta que dichos discos no se ven afectados por los comandos up y down porque se espera que estén siempre girando.

    +snapshot +

    +

    Habilita el uso de instantáneas del sistema de archivos para los comandos sync, scrub, +check y fix. +

    Cuando está habilitado, SnapRAID crea una instantánea de solo lectura de cada +sistema de archivos de datos compatible al comienzo de un 'sync'. Esto proporciona una +vista estable de cada sistema de archivos, evitando que modificaciones posteriores cambien +los datos utilizados para el cómputo de paridad. +

    Esto mejora significativamente la recuperación: si un archivo se elimina del sistema de archivos activo, +permanece preservado en la instantánea. Esto evita que la paridad se "rompa" +para ese bloque, asegurando que aún pueda recuperar los datos con éxito +si falla otro disco. +

    Esta opción se aplica exclusivamente a discos de datos formateados con los sistemas de +archivos Btrfs, Bcachefs o ZFS en Linux y NTFS en Windows. +Los discos de paridad, o los discos de datos que usen otros sistemas de archivos, siempre usarán +la versión activa del sistema de archivos. +

    La creación y eliminación de instantáneas requieren privilegios administrativos. +Asegúrese de que SnapRAID se ejecute con los permisos necesarios (por ejemplo, sudo) cuando +esta opción esté habilitada. +

    Consulte la sección SNAPSHOTS para obtener una explicación detallada del ciclo de vida +de las instantáneas. +

    +
    +

    nohidden

    Excluye todos los archivos y directorios ocultos. @@ -1621,7 +1663,7 @@ En Unix, los archivos ocultos son los que comienzan con .. En Windows, son los que tienen el atributo oculto.

    -

    +

    exclude/include PATTERN

    Define los patrones de archivo o directorio a excluir o incluir @@ -1632,12 +1674,16 @@ se excluye. Si es un include, el archivo se incluye. Si ningún patrón coincide, el archivo se excluye si el último patrón especificado es un include, o se incluye si el último patrón especificado es un exclude. +

    Tenga en cuenta que el filtrado se produce jerárquicamente durante +el recorrido de los directorios. Si un directorio coincide con una +regla exclude, se omite (poda) todo el directorio y no se evaluará +ninguna regla include para los archivos o subdirectorios que contenga.

    Consulte la sección PATTERN para obtener más detalles sobre las especificaciones de patrones.

    Esta opción se puede usar varias veces.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Define el tamaño de bloque básico en kibibytes para la paridad. @@ -1684,7 +1730,7 @@ alrededor de 460,000 archivos en cada disco de datos sin ningún espacio desperdiciado.

    -

    +

    hashsize SIZE_IN_BYTES

    Define el tamaño del hash en bytes para los bloques guardados. @@ -1720,17 +1766,17 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    -

    Guarda automáticamente el estado al sincronizar o fregar después de +

    Guarda automáticamente el estado al sincronizar o depurar después de la cantidad especificada de GB procesados. Esta opción es útil para evitar reiniciar comandos sync largos desde cero si son interrumpidos por un fallo de la máquina o cualquier otro evento.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Establece la temperatura máxima permitida del disco en Celsius. @@ -1765,7 +1811,7 @@ caliente. Para mostrar la temperatura de todos los discos, use la opción -A o --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Establece el tiempo de espera, en minutos, cuando se alcanza el @@ -1773,7 +1819,7 @@ límite de temperatura. Durante este período, los discos permanecen detenidos. El valor predeterminado es de 5 minutos.

    -

    +

    pool DIR

    Define el directorio de agrupación (pooling) donde se crea la vista @@ -1781,7 +1827,7 @@ virtual del array de discos utilizando el comando pool.

    El directorio ya debe existir.

    -

    +

    share UNC_DIR

    Define la ruta UNC de Windows requerida para acceder a los discos @@ -1797,7 +1843,7 @@ y finalmente agregando el directorio y el nombre del archivo.

    Esta opción solo es necesaria para Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Define opciones personalizadas de smartctl para obtener los atributos @@ -1811,6 +1857,9 @@ PARITY es uno de los nombres de paridad: parity, 2-parity,

    En las OPCIONES especificadas, la cadena %s se reemplaza por el nombre del dispositivo. Para los controladores RAID, el dispositivo es probable que sea fijo y es posible que no necesite usar %s. +

    También puede especificar una cadena de opciones de información +personalizada mediante la etiqueta [info: ...] para sustituir +la opción -a predeterminada.

    Consulte la documentación de smartmontools para conocer las posibles opciones:

    @@ -1819,11 +1868,12 @@ opciones:
     

    Por ejemplo:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignora el atributo SMART especificado al calcular la probabilidad @@ -1834,18 +1884,22 @@ PARITY es uno de los nombres de paridad: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity o z-parity. El valor especial * se puede usar para ignorar el atributo en todos los discos. -

    Por ejemplo, para ignorar el atributo Current Pending Sector Count -en todos los discos: +

    Se pueden especificar múltiples atributos separados por espacios. +Cada atributo se puede especificar como un número del 1 al 255, o como un +nombre que no distingue entre mayúsculas y minúsculas (p. ej., Current_Pending_Sector). +

    Por ejemplo, para ignorar los atributos Current Pending Sector Count y +Reallocated Sectors Count en todos los discos por su número o nombre:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Para ignorarlo solo en el primer disco de paridad: +

    Para ignorarlos solo en el primer disco de paridad:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Examples

    Un ejemplo de una configuración típica para Unix es: @@ -1858,7 +1912,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1874,7 +1928,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1883,7 +1937,166 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    -Pattern +Instantáneas (Snapshots) +

    +

    Si la opción de instantánea está habilitada en la configuración, SnapRAID +utiliza instantáneas del sistema de archivos para mantener estables los datos leídos +durante una operación, incluso cuando los archivos en los sistemas de archivos activos +se modifican o eliminan posteriormente. +

    La gestión de las instantáneas es completamente automática y transparente. +Puede continuar usando SnapRAID exactamente como antes, con la +protección adicional proporcionada por las instantáneas gestionadas completamente en +segundo plano. +

    Esto proporciona dos beneficios primordiales: +

    +
    +
    +Consistencia +
    +Los archivos modificados en el sistema de archivos activo durante un sync o scrub de +larga duración no causarán desajustes de paridad ni operaciones abortadas, +porque cada sistema de archivos con instantánea permanece sin cambios durante +toda la operación. +
    +
    +
    +
    +Recuperación +
    +Si un archivo se actualiza o elimina del sistema de archivos activo, +permanece preservado en la instantánea. Si ocurre un fallo de disco +antes de que se ejecute el siguiente sync, SnapRAID utiliza los datos preservados +en la instantánea para reconstruir el disco fallido. +En caso de fallo de un disco durante un proceso de sync activo, +SnapRAID también es capaz de leer automáticamente tanto de la instantánea +del cómputo de paridad anterior como del actual. +Esto maximiza la probabilidad de una recuperación completa al +proporcionar acceso a los bloques de datos exactos requeridos para resolver +las ecuaciones de paridad, incluso si esos bloques fueron modificados +o eliminados entre syncs. +Sin instantáneas, un archivo actualizado o eliminado en un disco sano +da como resultado la pérdida de bloques de datos que pueden ser necesarios para +reparar otros discos fallidos. +
    +
    +
    +

    Las instantáneas se crean solo para discos de datos y solo si el sistema de archivos +subyacente admite esta funcionalidad. Los discos de paridad siempre usan +el sistema de archivos activo. +

    Actualmente, esto es compatible con Btrfs, Bcachefs y ZFS en Linux +y con NTFS en Windows. +

    Puede mezclar discos de datos con diferentes sistemas de archivos. Solo aquellos que +admitan instantáneas las utilizarán, mientras que los demás discos continuarán +operando directamente en el sistema de archivos activo. +

    La creación y eliminación de instantáneas requieren privilegios administrativos. +Asegúrese de que SnapRAID se ejecute con los permisos necesarios (por ejemplo, sudo) +cuando las instantáneas estén habilitadas. +

    +

    +Comportamiento de comandos con instantáneas +

    +

    Los comandos sync y scrub utilizan instantáneas para los discos de datos cuyos +sistemas de archivos las admiten. En un disco con instantánea, el comando ve +una imagen estable del sistema de archivos no afectada por cambios concurrentes en +el sistema de archivos activo. +Durante un sync, se crea una nueva instantánea de forma independiente para cada +sistema de archivos de datos compatible. Estas instantáneas proporcionan colectivamente +los datos utilizados para el cómputo de paridad. +Por el contrario, el comando scrub utiliza la última instantánea, la +creada durante el sync más reciente, para mantener un punto de referencia confiable +que coincida con la paridad existente. +

    Para los comandos check y fix, el uso de la última instantánea +depende de si se seleccionan discos específicos mediante la opción +-d, --filter-disk. +

    Un disco seleccionado explícitamente mediante -d (el "objetivo" de la operación) +siempre utiliza el sistema de archivos activo. Para fix, esto permite restaurar +datos en el reemplazo de disco activo. Para check, permite simular +la operación fix bajo las mismas condiciones. +

    Todos los demás discos de datos (los discos de "referencia") se accederán a través de +sus instantáneas. Esto garantiza que incluso si está modificando archivos +en sus discos sanos mientras se realiza una recuperación, SnapRAID +tenga una referencia estable y congelada para resolver las ecuaciones de paridad. +

    Si no se proporciona la opción -d, SnapRAID asume que la operación se aplica +a todo el array, en cuyo caso, check y fix usarán los sistemas +de archivos activos exclusivamente. +

    Todos los demás comandos funcionan exclusivamente en el sistema de archivos activo. +

    +
    +
    +

    +Ciclo de vida de las instantáneas (Snapshots Lifecycle) +

    +

    SnapRAID gestiona tres instantáneas específicas, stable, pending y scan, +dentro de un directorio oculto en la raíz de cada subvolumen de datos. +En Btrfs, Bcachefs y NTFS se utiliza el directorio .snapraid/, +en ZFS el estándar .zfs/snapshot/. +

    La instantánea stable representa el estado del último +sync completado con éxito, que contiene los datos exactos utilizados para +calcular la paridad actual. Sirve como fuente de datos principal +para los comandos scrub, check y fix. +

    La instantánea scan es una imagen temporal creada al inicio +de un sync para proporcionar un estado congelado para el escaneo y el cómputo de paridad. +Después de escanear y guardar el nuevo estado de contenido, reemplaza la instantánea +pending anterior. +

    La instantánea pending es la imagen utilizada por un sync interrumpido. +Una vez completada con éxito la operación, la instantánea stable anterior +se elimina y la instantánea pending se promueve para +tomar su lugar como la nueva referencia estable. +

    Si un sync se interrumpe, la instantánea pending se conserva. +Los comandos posteriores scrub, check y fix utilizarán esta +instantánea pendiente, ya que coincide con el estado del sistema de archivos registrado en +el archivo .content, incluso si la paridad solo está parcialmente sincronizada. +

    En caso de interrupción de un sync, los comandos check y fix +también leen de la instantánea stable para recuperar bloques de datos +de archivos que se actualizaron o eliminaron durante el sync. +Esto es posible porque el archivo .content conserva los metadatos de +todos los archivos modificados o eliminados durante todo el proceso de sync. +Esta información histórica solo se borra una vez que el sync finaliza +con éxito y se guarda la versión final del archivo .content. +

    Si un sync se reinicia después de una interrupción, la instantánea pending existente +se elimina y se crea una nueva para +capturar el estado actual del sistema de archivos activo. +Sin embargo, si un sync se interrumpe, evite modificar, eliminar, +reemplazar o mover archivos hasta que un sync posterior se complete +con éxito. La paridad aún puede contener bloques calculados a partir de +la instantánea utilizada por el sync interrumpido. Un sync posterior puede +reemplazar esa instantánea, haciendo que las versiones intermedias de los +archivos no estén disponibles para la recuperación. +

    +

    +Copias de seguridad externas con instantáneas del sistema de archivos (External backups with filesystem snapshots) +

    +

    Cuando las instantáneas del sistema de archivos están habilitadas, SnapRAID +accede o crea instantáneas en la raíz de cada subvolumen, volumen o conjunto +de datos (dataset). +

    Una forma sencilla de evitar interferencias con herramientas externas es +apuntar la configuración data a un subdirectorio normal dentro del +subvolumen o volumen (por ejemplo, /mnt/subvol/data en lugar de +/mnt/subvol). SnapRAID siempre crea el directorio de instantáneas en la +raíz del subvolumen (por ejemplo, /mnt/subvol/.snapraid/), dejando limpio +el subdirectorio de datos para que las instantáneas permanezcan fuera e +invisibles para las herramientas de copia de seguridad que operan dentro +de él. +

    De lo contrario, si el directorio data configurado es en sí mismo la raíz +del subvolumen o volumen, SnapRAID crea un directorio .snapraid/ +directamente dentro de él (en Btrfs, Bcachefs y NTFS). Aunque SnapRAID +excluye automáticamente este directorio de su propio escaneo, las +herramientas externas de copia de seguridad o sincronización de archivos lo +encontrarán. Si no se excluye, pueden acceder a las instantáneas o enlaces +de directorio y copiar todo el árbol de datos congelado, duplicando datos y +agotando el almacenamiento de respaldo. Configure siempre las herramientas +de copia de seguridad externas para excluir el directorio .snapraid/. +

    En ZFS, las instantáneas se exponen a través del directorio virtual estándar +.zfs/snapshot/ en lugar de .snapraid/. De forma predeterminada +(snapdir=hidden), ZFS oculta este directorio de los listados, por lo que +las herramientas externas de copia de seguridad no lo recorrerán. Si ha +habilitado snapdir=visible, asegúrese de que sus herramientas de copia +de seguridad excluyan el directorio .zfs/. +

    +
    +
    +

    +Patrones (Pattern)

    Los patrones proporcionan una forma flexible de filtrar archivos para su inclusión o exclusión. Al usar caracteres de globbing, puede definir reglas que coincidan con @@ -1897,25 +2110,26 @@ signo de interrogación, nunca cruza los límites de los directorios. Se detiene barra diagonal, lo que lo hace adecuado para buscar coincidencias dentro de un solo componente de ruta. Este es el comportamiento estándar de los comodines familiar del globbing de la shell. -

    el doble asterisco ** es más potente, coincide con cualquier secuencia de -caracteres, incluidos los separadores de directorios. Esto permite que los patrones coincidan -a través de múltiples niveles de directorio. Cuando ** aparece incrustado directamente en -un patrón, puede coincidir con cero o más caracteres, incluidas las barras diagonales entre -el texto literal circundante. -

    El uso más importante de ** es en la forma especial /**/. Esta coincide con -cero o más niveles de directorio completos, lo que permite que los archivos coincidan -a cualquier profundidad en un árbol de directorios sin conocer la estructura exacta de la ruta. -Por ejemplo, el patrón src/**/main.js coincide con src/main.js (saltando -cero directorios), src/ui/main.js (saltando un directorio) y -src/ui/components/main.js (saltando dos directorios). +

    El comodín de doble asterisco ** coincide a través de los separadores de +directorios solo cuando es adyacente a un separador de directorios (precedido +o seguido por una barra diagonal). En esta forma, coincide con cero o más +caracteres a través de niveles de directorio. Por ejemplo, foo/**/bar +coincide con foo/bar, foo/a/bar y foo/a/b/bar; **/build coincide con +build y foo/bar/build; y src/**.js coincide con src/main.js y +src/ui/components/main.js. +La forma independiente /**/ no se acepta como un patrón completo. +

    Cuando ** no es adyacente a una barra diagonal, se comporta como * y no +coincide con los separadores de directorios. Por ejemplo, **.jpg coincide +con photo.jpg en el directorio actual, pero no coincide con dir/photo.jpg. +Use **/*.jpg para ese propósito.

    Las clases de caracteres que utilizan corchetes [] coinciden con un solo carácter de un conjunto o rango especificado. Al igual que los otros patrones de un solo carácter, no coinciden con los separadores de directorios. Las clases admiten rangos y negación mediante un signo de exclamación.

    La distinción fundamental que debe recordar es que *, ? y las clases de caracteres respetan los límites de los directorios y solo coinciden dentro de un único -componente de ruta, mientras que ** es el único patrón que puede coincidir a través de -los separadores de directorios. +componente de ruta, mientras que ** solo puede coincidir a través de los separadores +de directorios cuando es adyacente a una barra diagonal.

    Hay cuatro tipos diferentes de patrones:

    @@ -2007,6 +2221,26 @@ include /movies/ include /musics/ include /pictures/ +

    Tenga en cuenta que excluir un directorio (usando DIR/ o /RUTA/DIR/) +impide que SnapRAID entre y examine ese directorio. En consecuencia, +no es posible volver a incluir un archivo o subdirectorio ubicado +dentro de un directorio principal excluido, ya que el escáner nunca lo +recorre. +

    Por ejemplo, la siguiente configuración NO incluirá file.dat +porque /keep/ se poda antes de que file.dat pueda ser evaluado: +

    +# NO funciona: /keep/ se omite por completo
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Para excluir archivos dentro de un directorio conservando algunos +específicos, excluya el patrón de archivos dentro del directorio en +lugar de excluir el directorio en sí: +

    +# Funciona: /keep/ se recorre, pero los demás archivos dentro se excluyen
    +include /keep/file.dat
    +exclude /keep/*
    +

    En la línea de comandos, usando la opción -f, solo puede usar patrones include. Por ejemplo:

    @@ -2018,8 +2252,8 @@ snapraid -f "*.mp3" check
     ponerlos entre comillas para evitar que el shell los expanda.
     

    -

    -Ignorar Archivos +

    +Ignorar Archivos (Ignore File)

    Además de las reglas globales en el archivo de configuración, puedes colocar archivos .snapraidignore en cualquier directorio dentro del array @@ -2084,20 +2318,22 @@ build/

    -

    -Content +

    +Contenido (Content)

    SnapRAID almacena la lista y las sumas de comprobación de sus archivos en el archivo de contenido.

    Es un archivo binario que enumera todos los archivos presentes en su array de discos, junto con todas las sumas de comprobación para verificar su integridad. -

    Este archivo es leído y escrito por los comandos sync y scrub -y leído por los comandos fix, check y status. +

    El archivo de contenido es leído y escrito por los comandos sync, +scrub, touch y rehash. Es leído por los comandos status, diff, +check, fix, list, dup, locate y pool, y es completamente +ignorado por los comandos smart, probe, up, down y devices.

    -

    -Parity +

    +Paridad (Parity)

    SnapRAID almacena la información de paridad de su array en los archivos de paridad. @@ -2107,8 +2343,8 @@ de todos los bloques definidos en el archivo content. y solo leídos por los comandos scrub y check.

    -

    -Encoding +

    +Codificación (Encoding)

    SnapRAID en Unix ignora cualquier codificación. Lee y almacena los nombres de archivo con la misma codificación utilizada por el sistema @@ -2121,6 +2357,278 @@ configurar la consola de Windows en modo UTF-8 con el comando como fuente de la consola. Esto afecta solo a los nombres de archivo impresos; si redirige la salida de la consola a un archivo, el archivo resultante siempre está en formato UTF-8. +

    +
    +

    +Código de salida (Exit Code) +

    +

    SnapRAID termina con los siguientes códigos de error: +

    +
    +
    +0 +
    +Todo bien. +
    +
    +
    +
    +1 +
    +El comando encontró algunos errores. +
    +
    +
    +
    +2 +
    +El comando diff determinó que todo está bien, pero se necesita un sync. +
    +
    +
    +
    +3 +
    +Un comando de dispositivo de disco (probe, smart, devices, up, +down) se completó, pero al menos un sistema de archivos está funcionando +en modo degradado con dispositivos faltantes. +
    +
    +
    +
    +
    +

    +Problemas conocidos (Known Issues) +

    +
    +

    +Límites del sistema de archivos +

    +

    SnapRAID no cruza los límites del sistema de archivos, puntos de montaje o +subvolúmenes al escanear un disco de datos. Cuando se detecta dicho límite, +SnapRAID emite una ADVERTENCIA y no escanea más allá de él. +

    Los archivos ubicados más allá de dichos límites no se incluyen en el disco +de datos y deben configurarse por separado si se desea protegerlos. +

    +
    +

    +Puntos de montaje con instantáneas del sistema de archivos +

    +

    Cuando las instantáneas del sistema de archivos están habilitadas, no se +admiten puntos de montaje anidados ni montajes bind dentro de un disco de +datos. +

    Los puntos de montaje forman parte del espacio de nombres de montaje del +sistema en vivo y no se conservan en las instantáneas del sistema de +archivos. En consecuencia, al escanear una instantánea, un directorio +oculto por un punto de montaje en el sistema de archivos en vivo puede +hacerse visible. +

    No coloque puntos de montaje anidados ni montajes bind dentro de los discos +de datos cuando las instantáneas del sistema de archivos estén habilitadas. +

    +
    +

    +Múltiples configuraciones con instantáneas del sistema de archivos +

    +

    El soporte para instantáneas no se puede compartir de forma segura entre +múltiples configuraciones independientes de SnapRAID que utilicen el mismo +espacio de nombres de instantáneas del sistema de archivos. +

    En Btrfs y Bcachefs, solo una configuración de SnapRAID con soporte de +instantáneas habilitado puede usar directorios de datos dentro del mismo +subvolumen. En ZFS, la misma restricción se aplica a un dataset, y en NTFS +a un volumen. +

    Las múltiples configuraciones que comparten el mismo espacio de nombres de +instantáneas utilizan las mismas instantáneas stable, pending y scan. +Por lo tanto, ejecutar una configuración puede reemplazar o eliminar las +instantáneas de recuperación requeridas por otra. +

    +
    +

    +Modificaciones de archivos in situ sin cambios de marca de tiempo +

    +

    SnapRAID detecta modificaciones de archivos comparando tamaños de archivo y +marcas de tiempo de modificación (mtime). +

    Si una aplicación modifica un archivo in situ sin alterar su tamaño ni +actualizar su marca de tiempo de modificación, "diff" y "sync" no detectarán +que el archivo ha cambiado y su paridad no se actualizará. +

    Para asegurarse de que SnapRAID reconozca dichos cambios, actualice la marca +de tiempo de modificación del archivo (por ejemplo, con la utilidad "touch"). +De lo contrario, la diferencia solo se detectará como una falta de +coincidencia de hash durante un "scrub" o "check" posterior. +

    +
    +

    +Coincidencia de mayúsculas y minúsculas no ASCII en Windows +

    +

    SnapRAID utiliza una codificación UTF-8 estándar y predecible en todas las +plataformas, limitando la coincidencia insensible a mayúsculas y minúsculas +a los caracteres ASCII. +

    Los sistemas de archivos de Windows adolecen del diseño heredado de imponer +la insensibilidad a mayúsculas y minúsculas en nombres de archivo Unicode a +través de tablas de plegado arbitrarias y dependientes del sistema. En +consecuencia, Windows distorsiona la realidad del sistema de archivos al +tratar secuencias de bytes Unicode completamente diferentes como si fueran el +mismo archivo. +

    Por ejemplo, À.txt y à.txt son nombres Unicode distintos; sin embargo, +Windows los trata ilógicamente como idénticos, mientras que SnapRAID conserva +su verdadera distinción. +

    Esta limitación se debe al manejo inconsistente de los nombres de archivo +Unicode por parte de Windows y a su insistencia en aplicar alias que ignoran +mayúsculas y minúsculas. Para evitar discrepancias derivadas del plegado de +mayúsculas y minúsculas de Windows, especifique siempre la grafía exacta de +los caracteres no ASCII en las rutas de configuración y filtros. +

    +
    +

    +Recuperación con fix parcial +

    +

    Cuando fix se restringe mediante -S, --start o -B, --count, +SnapRAID opera únicamente sobre los bloques seleccionados y no realiza +la finalización a nivel de archivo ni la cuarentena. +

    Si la recuperación produce datos de mejor esfuerzo que no pueden demostrarse +como representativos del contenido actual, dichos bloques aún pueden escribirse +con el nombre de archivo normal. La incertidumbre asociada con estos bloques +recuperados no se conserva una vez finalizado el comando. +

    Como consecuencia, un fix posterior tratará estos bloques legibles como +datos de archivo válidos y no intentará recuperarlos nuevamente. Esto puede +hacer que una recuperación posterior informe éxito dejando datos incompletos +o desactualizados en el archivo. +

    Las opciones -S y -B están destinadas únicamente a la recuperación manual +avanzada, típicamente después de que un fix normal haya fallado. Si un fix +parcial informa de datos no recuperables, elimine o renombre los archivos +afectados antes de intentar otra recuperación, o verifique su contenido manualmente. +

    +
    +

    +Enlaces duros en NTFS y rutas excluidas +

    +

    En NTFS, las entradas de directorio almacenan en caché el tamaño del +archivo y las marcas de tiempo de forma independiente para cada enlace +duro. Cuando un archivo se modifica a través de un enlace, las entradas +de directorio de otros enlaces que apuntan al mismo archivo pueden +conservar metadatos obsoletos hasta que se accede a ellos. +

    SnapRAID detecta y normaliza automáticamente esta condición siempre que +se encuentran al menos dos enlaces duros al mismo archivo durante un +escaneo. Sin embargo, si solo se escanea un enlace duro mientras los +demás están excluidos por filtros o se encuentran fuera de la ruta del +disco de datos, SnapRAID no puede detectar la colisión de inodos y confía +en los metadatos almacenados en caché del único enlace visible. +

    En consecuencia, las modificaciones realizadas a través de un enlace duro +excluido o externo pueden pasar desapercibidas para SnapRAID hasta que el +sistema operativo actualice los metadatos del enlace incluido (como cuando +se accede al archivo o se abre a través de esa ruta). +

    Para evitar esta limitación, evite modificar archivos protegidos a través +de enlaces duros que estén excluidos de SnapRAID, o asegúrese de que +todos los enlaces duros a un archivo se incluyan en el escaneo para que +SnapRAID pueda normalizarlos. +

    +
    +

    +Recuperación tras una sincronización de multiparidad interrumpida +

    +

    En una matriz con múltiples discos de paridad, un sync interrumpido +puede dejar los niveles de paridad temporalmente desincronizados entre sí. +Por ejemplo, la paridad 1 podría contener datos recién actualizados, +mientras que la paridad 2 todavía contiene los datos antiguos. +

    Durante check o fix, SnapRAID prueba diferentes combinaciones de +paridad y valida los datos reconstruidos con respecto a los hashes de +bloque conocidos (que cubren el bloque completo, normalmente 256 KiB). +

    Si SnapRAID intenta una reconstrucción utilizando una combinación +inconsistente de paridad antigua y nueva, las ecuaciones lineales de RAID +producirán datos incorrectos. Para que esta combinación no válida se +acepte por error, las ecuaciones tendrían que reconstruir accidentalmente +al menos un bloque completo de 256 KiB de manera tan perfecta que su hash +coincida, mientras que otros bloques no sincronizados en la misma banda +se reconstruyen con datos incorrectos. +

    Este escenario no depende de una colisión de hashes; más bien, las propias +ecuaciones de paridad mixta tendrían que generar de forma casual el +contenido exacto del bloque de 256 KiB original. Si bien es matemáticamente +concebible con datos especialmente preparados o muy repetitivos, es +prácticamente imposible con datos reales. +

    Si todos los discos están sanos, completar el sync interrumpido antes +de realizar más cambios elimina esta ambigüedad. Si un disco ha fallado +y se requiere recuperación, evite modificar los discos de datos antes +de ejecutar check o fix. +

    +
    +

    +Nombres de archivos y directorios reservados +

    +

    SnapRAID reserva algunos nombres de archivos, directorios e instantáneas para +sus operaciones internas. No use estos nombres para datos de usuario: +

    +
    +
    +.snapraidignore +
    +Archivo local de reglas de exclusión. +
    +
    +
    +
    +.snapraid +
    +Directorio contenedor de instantáneas. +
    +
    +
    +
    +snapraid-* +
    +Nombres de instantáneas ZFS gestionadas por SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Archivos dañados puestos en cuarentena durante la +recuperación. +
    +
    +
    +
    +CONTENT.tmp +
    +Archivo temporal para actualizaciones de content. +
    +
    +
    +
    +CONTENT.lock +
    +Archivo de bloqueo de content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Archivo temporal de reserva de espacio durante la +asignación de paridad en Windows. +
    +
    +
    +

    El uso de estos nombres para datos no relacionados puede hacer que los archivos +o instantáneas sean ignorados, interpretados erróneamente como metadatos, +sobrescritos, renombrados o eliminados. +

    En Windows, todas las variantes de mayúsculas y minúsculas también están +reservadas, incluso en directorios NTFS configurados para distinguir entre +mayúsculas y minúsculas (por ejemplo, .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP +y CONTENT.Lock). +

    +
    +
    +

    +Traducción (Translation) +

    +

    Este documento es una traducción automática del manual en inglés. +Consulte el manual en inglés para obtener la versión oficial. +

    +
    +

    +Véase también (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-fr.html b/manual-fr.html index 0101199f..bdf0a27a 100644 --- a/manual-fr.html +++ b/manual-fr.html @@ -118,25 +118,26 @@ Synopsis
     snapraid [-c, --conf CONFIG]
    -    [-f, --filter MOTIF] [-d, --filter-disk NOM]
    +    [-f, --filter PATTERN] [-d, --filter-disk NAME]
         [-m, --filter-missing] [-e, --filter-error]
    -    [-a, --audit-only] [-h, --pre-hash] [-i, --import DOSSIER]
    -    [-p, --plan PERC|mauvais|nouveau|complet]
    -    [-o, --older-than JOURS] [-l, --log FICHIER]
    -    [-s, --spin-down-on-error] [-w, --bw-limit DÉBIT]
    +    [-a, --audit-only] [-h, --pre-hash] [-i, --import DIR]
    +    [-p, --plan PERC|bad|new|full]
    +    [-o, --older-than DAYS] [-l, --log FILE]
    +    [-s, --spin-down-on-error] [-w, --bw-limit RATE]
    +    [-t, --tail]
         [-Z, --force-zero] [-E, --force-empty]
         [-U, --force-uuid] [-D, --force-device]
         [-N, --force-nocopy] [-F, --force-full]
         [-R, --force-realloc] [-W, --force-realloc-tail]
         [-S, --start BLKSTART] [-B, --count BLKCOUNT]
    -    [-L, --error-limit NOMBRE]
    +    [-L, --error-limit NUMBER]
         [-A, --stats]
         [-v, --verbose] [-q, --quiet]
         status|smart|probe|up|down|diff|sync|scrub|fix|check
         |list|dup|pool|devices|touch|rehash|locate
     
    -snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENU]
    +snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     
    @@ -190,22 +191,34 @@ Pour accéder à un fichier, un seul disque doit tourner, ce qui

    Limitations

    -

    SnapRAID est un hybride entre un programme RAID et un programme de sauvegarde, -visant à combiner les meilleurs avantages des deux. Cependant, il a quelques -limitations que vous devriez considérer avant de l'utiliser. -

    La principale limitation est que si un disque tombe en panne et que vous -n'avez pas synchronisé récemment, vous pourriez ne pas être en mesure de -récupérer complètement. -Plus précisément, vous pourriez ne pas être en mesure de récupérer jusqu'à -la taille des fichiers modifiés ou supprimés depuis la dernière opération -de synchronisation. -Cela se produit même si les fichiers modifiés ou supprimés ne se trouvent -pas sur le disque défaillant. C'est pourquoi SnapRAID est mieux adapté -aux données qui changent rarement. -

    D'un autre côté, les fichiers nouvellement ajoutés n'empêchent pas -la récupération des fichiers déjà existants. Vous ne perdrez que les -fichiers récemment ajoutés s'ils se trouvent sur le disque défaillant. -

    Les autres limitations de SnapRAID sont : +

    SnapRAID est un hybride entre un RAID et un programme de sauvegarde, visant à combiner +les meilleurs avantages des deux. Cependant, il présente certaines limitations que vous devriez +prendre en compte avant de l'utiliser. +

    La principale limitation est que si un disque tombe en panne, vous ne pouvez récupérer les données que jusqu'à +l'état du dernier processus sync. Toutes les données ajoutées ou modifications effectuées +depuis la dernière synchronisation situées sur le disque défectueux seront perdues. +

    Par conséquent, SnapRAID est principalement adapté aux données qui changent rarement. +

    Pour les données qui existaient déjà lors de la dernière synchronisation, la fiabilité de la récupération dépend +de l'utilisation ou non de l'option snapshot : +

      +
    • +Avec la prise en charge des instantanés (disponible sur Btrfs, ZFS, Bcachefs et NTFS), +SnapRAID peut maintenir automatiquement une référence figée +indépendante de chaque système de fichiers de données pris en charge. +Cela garantit que même si vous modifiez ou supprimez des fichiers sur votre système de fichiers actif +pendant ou après une synchronisation, le processus de récupération reste cohérent et fiable. +
    • +
    +
      +
    • +Sans la prise en charge des instantanés, la suppression ou la modification de fichiers après un sync +peut empêcher la récupération complète d'autres disques en panne. Cela se produit +parce que la parité ne correspond plus aux fichiers modifiés, même si +ces fichiers ne se trouvent pas sur le disque défectueux. D'un autre côté, les fichiers nouvellement ajoutés +n'empêchent pas la récupération des fichiers déjà existants. +
    • +
    +

    Les autres limitations de SnapRAID sont :

    • Avec SnapRAID, vous avez toujours des systèmes de fichiers séparés @@ -228,14 +241,14 @@ récupérer d'une défaillance complète de toute la baie de disques.
    • Seuls les noms de fichiers, les horodatages, les liens symboliques -et les liens matériels sont sauvegardés. Les permissions, la +et les liens physiques sont sauvegardés. Les permissions, la propriété et les attributs étendus ne sont pas sauvegardés.

    -Démarrer +Démarrer (Getting Started)

    Pour utiliser SnapRAID, vous devez d'abord sélectionner un disque dans votre baie de disques pour le dédier aux informations de parité. @@ -345,7 +358,7 @@ snapraid -e fix

    Lors du prochain scrub, les erreurs disparaîtront du rapport status si elles sont réellement corrigées. Pour accélérer, -vous pouvez utiliser -p mauvais pour nettoyer uniquement les blocs +vous pouvez utiliser -p bad pour nettoyer uniquement les blocs marqués comme mauvais.

     snapraid -p bad scrub
    @@ -361,7 +374,7 @@ Mise en commun (Pooling)
     
     

    Note : La fonctionnalité de mise en commun décrite ci-dessous a été remplacée par l'outil mergerfs, qui est désormais l'option recommandée -pour les utilisateurs Linux de la communauté SnapRAID. Mergefs offre +pour les utilisateurs Linux de la communauté SnapRAID. Mergerfs offre un moyen plus flexible et efficace de regrouper plusieurs disques dans un seul point de montage unifié, permettant un accès transparent aux fichiers sur toute votre baie sans dépendre de liens symboliques. @@ -447,11 +460,11 @@ qu'un système RAID, et il peut être utilisé pour restaurer ou récupérer des fichiers dans leur état précédent à l'aide de l'option -f, --filter :

    -snapraid fix -f FICHIER
    +snapraid fix -f FILE
     

    ou pour un répertoire :

    -snapraid fix -f DOSSIER/
    +snapraid fix -f DIR/
     

    Vous pouvez également l'utiliser pour récupérer uniquement les fichiers accidentellement supprimés à l'intérieur d'un @@ -459,7 +472,7 @@ répertoire en utilisant l'option -m, --filter-missing, qui ne restaure que les fichiers manquants, laissant tous les autres intacts.

    -snapraid fix -m -f DOSSIER/
    +snapraid fix -m -f DIR/
     

    Ou pour récupérer tous les fichiers supprimés sur tous les lecteurs avec : @@ -469,7 +482,7 @@ snapraid fix -m

    -Récupération +Récupération (Recovering)

    Le pire est arrivé, et vous avez perdu un ou plusieurs disques !

    NE PANIQUEZ PAS ! Vous pourrez les récupérer ! @@ -508,9 +521,9 @@ leurs options de configuration.

    Exécutez la commande fix, en stockant le journal dans un fichier externe avec :

    -snapraid -d NOM -l fix.log fix
    +snapraid -d NAME -l fix.log fix
     
    -

    Où NOM est le nom du disque, tel que d1 dans notre exemple précédent. +

    Où NAME est le nom du disque, tel que d1 dans notre exemple précédent. Si le disque à récupérer est un disque de parité, utilisez les noms parity, 2-parity, etc. Si vous avez plusieurs disques défaillants, utilisez plusieurs @@ -542,9 +555,9 @@ la commande fix !

    Par précaution, vous pouvez maintenant exécuter une commande check pour vous assurer que tout est correct sur le disque récupéré.

    -snapraid -d NOM -a check
    +snapraid -d NAME -a check
     
    -

    Où NOM est le nom du disque, tel que d1 dans notre exemple précédent. +

    Où NAME est le nom du disque, tel que d1 dans notre exemple précédent.

    Les options -d et -a indiquent à SnapRAID de vérifier uniquement le disque spécifié et d'ignorer toutes les données de parité.

    Cette commande prendra beaucoup de temps, mais si vous n'êtes pas @@ -565,24 +578,24 @@ snapraid sync

    -Commandes +Commandes (Commands)

    SnapRAID fournit quelques commandes simples qui vous permettent de :

    • -Afficher l'état de la baie de disques -> status +Afficher l'état de la grappe -> status
    • Contrôler les disques -> smart, probe, up, down
    • -Faire une sauvegarde/instantané -> sync +Créer un point de sauvegarde/récupération -> sync
    • Vérifier périodiquement les données -> scrub
    • -Restaurer la dernière sauvegarde/instantané -> fix. +Restaurer le dernier point de sauvegarde/récupération -> fix.

    Les commandes doivent être écrites en minuscules. @@ -645,7 +658,7 @@ Le journal d'auto-test du périphérique contient des erreurs.

    -

    Si l'option -v, --verbose est spécifiée, une analyse statistique +

    Si l'option -v, --verbose est spécifiée, une analyse statistique plus approfondie est fournie. Cette analyse peut vous aider à décider si vous avez besoin de plus ou moins de parité.

    Cette commande utilise l'outil smartctl et équivaut à exécuter @@ -739,10 +752,10 @@ signifiant qu'ils ont été modifiés.

    moved
    -Fichiers déplacés vers un répertoire différent sur le -même disque. Ils sont identifiés par le même nom, la -même taille, le même horodatage et le même inode, mais -un répertoire différent. +Fichiers déplacés ou renommés sur le même disque tout en +conservant le même inode. Ils sont identifiés par le fait d'avoir +le même inode, la même taille et le même horodatage, mais un +chemin différent. Le nom du fichier peut également être différent.
    @@ -761,14 +774,13 @@ doit correspondre pour être identifié, pas seulement le nom.
    relocated
    -Fichiers déplacés sur le même disque ou sur un disque -différent où l'original a disparu. -Ils sont identifiés par le fait qu'ils ont le même nom, la même -taille et le même horodatage. -Si l'horodatage à la sous-seconde est nul, le chemin complet -doit correspondre pour être identifié. -Contrairement aux fichiers 'moved' sur le même disque, les -fichiers relocalisés ont un inode différent. +Fichiers déplacés vers un répertoire différent ou un autre +disque où le fichier original a disparu et l'inode n'est pas conservé. +Ils sont identifiés par le fait d'avoir le même nom, la même taille +et le même horodatage. Si l'horodatage à la sous-seconde est nul, le +chemin complet doit correspondre pour être identifié. Contrairement aux +fichiers 'moved', les fichiers relocalisés nécessitent que le nom du +fichier reste le même.
    @@ -859,13 +871,13 @@ Les fichiers dans la baie NE SONT PAS modifiés.

    fix

    -

    Corrige tous les fichiers et les données de parité. -

    Tous les fichiers et les données de parité sont comparés à l'état -de l'instantané enregistré lors du dernier sync. -Si une différence est trouvée, elle est rétablie à l'instantané stocké. -

    AVERTISSEMENT ! La commande fix ne fait pas de distinction entre -les erreurs et les modifications intentionnelles. Elle rétablit -inconditionnellement l'état du fichier au dernier sync. +

    Répare tous les fichiers et les données de parité. +

    Tous les fichiers et les données de parité sont comparés à l'état sauvegardé lors +du dernier sync. Si une différence est trouvée, elle est restaurée à l'état enregistré. +

    AVERTISSEMENT ! +La commande fix ne fait pas de différence entre les erreurs et +les modifications intentionnelles. Elle rétablit inconditionnellement l'état des fichiers +tel qu'il était lors du dernier sync.

    Si aucune autre option n'est spécifiée, l'intégralité de la baie est traitée. Utilisez les options de filtre pour sélectionner un sous-ensemble de fichiers ou de disques sur lesquels opérer. @@ -1025,12 +1037,12 @@ répertoire que snapraid.exe.

    --f, --filter MOTIF +-f, --filter PATTERN
    Filtre les fichiers à traiter dans check et fix. Seuls les fichiers correspondant au motif spécifié sont traités. Cette option peut être utilisée plusieurs fois. -Voir la section MOTIF pour plus de détails sur les +Voir la section PATTERN pour plus de détails sur les spécifications de motifs. Sous Unix, assurez-vous que les caractères de globbing sont entre guillemets s'ils sont utilisés. @@ -1043,7 +1055,7 @@ traitent toujours l'intégralité de la baie.
    --d, --filter-disk NOM +-d, --filter-disk NAME
    Filtre les disques à traiter dans check, fix, up et down. Vous devez spécifier un nom de disque tel que défini dans le fichier @@ -1111,10 +1123,10 @@ Cette option ne peut être utilisée qu'avec scrub.
    --o, --older-than JOURS +-o, --older-than DAYS
    Sélectionne la partie la plus ancienne de la baie à traiter dans scrub. -JOURS est l'âge minimum en jours pour qu'un bloc soit nettoyé ; +DAYS est l'âge minimum en jours pour qu'un bloc soit nettoyé ; la valeur par défaut est 10. Les blocs marqués comme mauvais sont toujours nettoyés, quelle que soit cette option. @@ -1168,7 +1180,7 @@ Cette option ne peut être utilisée qu'avec sync.
    --i, --import DOSSIER +-i, --import DIR
    Importe à partir du répertoire spécifié tous les fichiers supprimés de la baie après le dernier sync. @@ -1198,18 +1210,18 @@ même lorsqu'une commande échoue.
    --w, --bw-limit DÉBIT +-w, --bw-limit RATE
    Applique une limite de bande passante globale pour tous les disques. -Le DÉBIT est le nombre d'octets par seconde. Vous pouvez spécifier -un multiplicateur tel que K, M ou G (par exemple, --bw-limit 1G). +Le RATE est le nombre d'octets par seconde. Vous pouvez spécifier +un multiplicateur tel que K, M, G ou T (par exemple, --bw-limit 1G).
    --t, --tail TAILLE +-t, --tail SIZE
    Limite la liste des fichiers à ceux n'utilisant pas plus que la taille de queue spécifiée des disques de parité. @@ -1376,10 +1388,10 @@ Vous N'AVEZ AUCUNE protection des données pendant l'opération sync.
    --W, --force-realloc-tail TAILLE +-W, --force-realloc-tail SIZE
    -Fonctionne comme -R, --force-realloc, maar limité à la partie terminale -spécifiée (les derniers TAILLE octets) de chaque fichier de parité. +Fonctionne comme -R, --force-realloc, mais limité à la partie terminale +spécifiée (les derniers SIZE octets) de chaque fichier de parité. Force la réallocation (déplacement) de tout fragment/bloc de fichier actuellement stocké dans cette section terminale, leur permettant d'être placés n'importe où dans le(s) fichier(s) de parité où de l'espace libre @@ -1404,7 +1416,7 @@ pour les fichiers affectés.
    --l, --log FICHIER +-l, --log FILE
    Écrit un journal détaillé dans le fichier spécifié. Si cette option n'est pas spécifiée, les erreurs inattendues @@ -1430,7 +1442,7 @@ pour les descriptions des balises de journal.
    --L, --error-limit NOMBRE +-L, --error-limit NUMBER
    Définit une nouvelle limite d'erreurs avant d'arrêter l'exécution. Par défaut, SnapRAID s'arrête s'il rencontre plus de 100 @@ -1451,7 +1463,8 @@ Cependant, check et fix s'arrêtent toujours à la première erreu Commence le traitement à partir du numéro de bloc spécifié. Cela peut être utile pour réessayer de vérifier ou de corriger des blocs spécifiques en cas de disque endommagé. -Cette option est principalement destinée à la récupération manuelle avancée. +Cette option est principalement destinée à la récupération manuelle avancée +et n'est prise en charge que par check et fix.
    @@ -1461,14 +1474,15 @@ Cette option est principalement destinée à la récupération manuelle avancée -B, --count BLKCOUNT
    Ne traite que le nombre de blocs spécifié. -Cette option est principalement destinée à la récupération manuelle avancée. +Cette option est principalement destinée à la récupération manuelle avancée +et n'est prise en charge que par check et fix.
    --C, --gen-conf CONTENU +-C, --gen-conf CONTENT
    Génère un fichier de configuration factice à partir d'un fichier de contenu existant. @@ -1538,7 +1552,7 @@ répertoire que snapraid.exe.

    Il doit contenir les options suivantes (sensibles à la casse) :

    -parity FICHIER [,FICHIER] ... +parity FILE [,FILE] ...

    Définit les fichiers à utiliser pour stocker les informations de parité. La parité permet une protection contre une seule défaillance @@ -1558,7 +1572,7 @@ ne deviennent pas fragmentés, améliorant les performances.

    -(2,3,4,5,6)-parity FICHIER [,FICHIER] ... +(2,3,4,5,6)-parity FILE [,FILE] ...

    Définit les fichiers à utiliser pour stocker les informations de parité supplémentaires. @@ -1588,7 +1602,7 @@ de parité précédents.

    -z-parity FICHIER [,FICHIER] ... +z-parity FILE [,FILE] ...

    Définit un fichier et un format alternatifs pour stocker la triple parité.

    Cette option est une alternative à 3-parity, principalement destinée @@ -1606,7 +1620,7 @@ et en utilisant fix pour le recréer.

    -content FICHIER +content FILE

    Définit le fichier à utiliser pour stocker la liste et les sommes de contrôle de tous les fichiers présents dans votre baie de disques. @@ -1621,17 +1635,22 @@ utilisé plus un. L'utilisation de copies supplémentaires ne nuit pas.

    -data NOM DOSSIER +data NAME DIR

    Définit le nom et le point de montage des disques de données dans -la baie. NOM est utilisé pour identifier le disque et doit -être unique. DOSSIER est le point de montage du disque dans le +la baie. NAME est utilisé pour identifier le disque et doit +être unique. DIR est le point de montage du disque dans le système de fichiers.

    Vous pouvez modifier le point de montage au besoin, tant que -vous gardez le NOM fixe. +vous gardez le NAME fixe. +

    Cependant, le chemin configuré doit pointer de manière cohérente vers +les mêmes données sous-jacentes. Si le chemin contient des liens +symboliques, leurs cibles doivent rester stables. La modification de ces +liens symboliques pour changer le répertoire de données à la volée n'est +pas prise en charge.

    Vous devriez utiliser une option pour chaque disque de données de la baie. -

    Vous pouvez renommer un disque plus tard en changeant le NOM directement +

    Vous pouvez renommer un disque plus tard en changeant le NAME directement dans le fichier de configuration, puis en exécutant une commande sync. Dans le cas d'un renommage, l'association est faite en utilisant l'UUID stocké des disques. @@ -1650,6 +1669,30 @@ comme le disque de démarrage.

    +snapshot +

    +

    Active l'utilisation des instantanés du système de fichiers pour les commandes sync, scrub, +check et fix. +

    Lorsqu'elle est activée, SnapRAID crée un instantané en lecture seule de chaque +système de fichiers de données pris en charge au début d'un 'sync'. Cela fournit une +vue stable de chaque système de fichiers, empêchant les modifications ultérieures +de modifier les données utilisées pour le calcul de la parité. +

    Cela améliore considérablement la récupération : si un fichier est supprimé du système de fichiers actif, +il reste préservé dans l'instantané. Cela évite que la parité ne devienne "rompue" +pour ce bloc, garantissant que vous pouvez toujours récupérer les données avec succès +si un autre disque tombe en panne. +

    Cette option s'applique exclusivement aux disques de données formatés avec les +systèmes de fichiers Btrfs, Bcachefs ou ZFS sous Linux et NTFS sous Windows. +Les disques de parité, ou les disques de données utilisant d'autres systèmes de fichiers, utiliseront toujours +la version active du système de fichiers. +

    La création et la suppression d'instantanés nécessitent des privilèges d'administration. +Assurez-vous que SnapRAID est exécuté avec les autorisations nécessaires (par exemple, sudo) lorsque +cette option est activée. +

    Consultez la section SNAPSHOTS pour une explication détaillée du cycle de vie +des instantanés. +

    +
    +

    nohidden

    Exclut tous les fichiers et répertoires cachés. @@ -1657,8 +1700,8 @@ Sous Unix, les fichiers cachés sont ceux commençant par .. Sous Windows, ce sont ceux avec l'attribut caché.

    -

    -exclude/include MOTIF +

    +exclude/include PATTERN

    Définit les motifs de fichiers ou de répertoires à exclure ou à inclure dans le processus de synchronisation. @@ -1668,13 +1711,18 @@ est exclu. S'il s'agit d'un include (inclure), le fichier est inclus. Si aucun motif ne correspond, le fichier est exclu si le dernier motif spécifié est un include, ou inclus si le dernier motif spécifié est un exclude. -

    Voir la section MOTIF pour plus de détails sur les +

    Notez que le filtrage s'effectue de manière hiérarchique lors du +parcours des répertoires. Si un répertoire correspond à une règle +exclude, l'ensemble du répertoire est ignoré (élagué), et aucune règle +include pour les fichiers ou sous-répertoires qu'il contient ne sera +évaluée. +

    Voir la section PATTERN pour plus de détails sur les spécifications de motifs.

    Cette option peut être utilisée plusieurs fois.

    -

    -blocksize TAILLE_EN_KIBIOCTETS +

    +blocksize SIZE_IN_KIBIBYTES

    Définit la taille de bloc de base en kibioctets pour la parité. Un kibioctet est de 1024 octets. @@ -1721,8 +1769,8 @@ pour un disque de 4 To, ce qui permet environ 460 000 fichiers sur chaque disque de données sans aucun espace gaspillé.

    -

    -hashsize TAILLE_EN_OCTETS +

    +hashsize SIZE_IN_BYTES

    Définit la taille du hachage en octets pour les blocs enregistrés.

    La taille de hachage par défaut est de 16 octets (128 bits), @@ -1732,7 +1780,7 @@ fortement recommandé de ne pas modifier cette valeur. Pour modifier cette valeur à l'avenir, vous devrez recréer l'intégralité de la parité !

    Une raison d'utiliser une taille de hachage différente est si votre système a une mémoire limitée. En règle générale, SnapRAID nécessite -généralement 1 Gio de RAM pour chaque 16 To de données dans la baie. +1 Gio de RAM pour chaque 16 To de données dans la baie.

    Plus précisément, pour stocker les hachages des données, SnapRAID nécessite environ TS*(1+HS)/BS octets de RAM, où TS est la taille totale en octets de votre baie de disques, BS est la @@ -1757,8 +1805,8 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 Gio

    -

    -autosave TAILLE_EN_GIGAOCTETS +

    +autosave SIZE_IN_GIGABYTES

    Enregistre automatiquement l'état lors de la synchronisation ou du nettoyage après la quantité spécifiée de Go traités. @@ -1767,8 +1815,8 @@ Cette option est utile pour éviter de redémarrer de longues commandes de la machine ou tout autre événement.

    -

    -temp_limit TEMPÉRATURE_CELSIUS +

    +temp_limit TEMPERATURE_CELSIUS

    Définit la température maximale autorisée du disque en Celsius. Lorsqu'elle est spécifiée, SnapRAID vérifie périodiquement la @@ -1798,27 +1846,27 @@ accessible, il utilise la température de disque la plus basse mesurée au début de l'exécution comme référence de secours.

    Normalement, SnapRAID n'affiche que la température du disque le plus chaud. Pour afficher la température de tous les disques, utilisez l'option --A ou --stats. +-A, --stats.

    -

    -temp_sleep TEMPS_EN_MINUTES +

    +temp_sleep TIME_IN_MINUTES

    Définit le temps de veille, en minutes, lorsque la limite de température est atteinte. Pendant cette période, les disques restent arrêtés. La valeur par défaut est de 5 minutes.

    -

    -pool DOSSIER +

    +pool DIR

    Définit le répertoire de mise en commun où la vue virtuelle de la baie de disques est créée à l'aide de la commande pool.

    Le répertoire doit déjà exister.

    -

    -share CHEMIN_UNC +

    +share UNC_DIR

    Définit le chemin UNC Windows requis pour accéder aux disques à distance.

    Si cette option est spécifiée, les liens symboliques créés dans le @@ -1832,8 +1880,8 @@ et en ajoutant enfin le répertoire et le nom du fichier.

    Cette option est requise uniquement pour Windows.

    -

    -smartctl DISQUE/PARITÉ OPTIONS... +

    +smartctl DISK/PARITY OPTIONS...

    Définit les options smartctl personnalisées pour obtenir les attributs SMART de chaque disque. Cela peut être nécessaire pour les contrôleurs @@ -1841,12 +1889,15 @@ RAID et certains disques USB qui ne peuvent pas être détectés automatiquement. Le placeholder %s est remplacé par le nom du périphérique, mais il est facultatif pour les périphériques fixes comme les contrôleurs RAID. -

    DISQUE est le même nom de disque spécifié dans l'option data. -PARITÉ est l'un des noms de parité : parity, 2-parity, 3-parity, +

    DISK est le même nom de disque spécifié dans l'option data. +PARITY est l'un des noms de parité : parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity ou z-parity.

    Dans les OPTIONS spécifiées, la chaîne %s est remplacée par le nom du périphérique. Pour les contrôleurs RAID, le périphérique est probablement fixe, et vous n'aurez peut-être pas besoin d'utiliser %s. +

    Vous pouvez également spécifier une chaîne d'options d'information +personnalisée à l'aide de la balise [info: ...] pour remplacer +l'option -a par défaut.

    Consultez la documentation smartmontools pour les options possibles :

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1854,34 +1905,39 @@ probablement fixe, et vous n'aurez peut-être pas besoin d'utiliser %s.
     

    Par exemple :

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    -smartignore DISQUE/PARITÉ ATTR [ATTR...] +

    +smartignore DISK/PARITY ATTR [ATTR...]

    Ignore l'attribut SMART spécifié lors du calcul de la probabilité de défaillance du disque. Cette option est utile si un disque signale des valeurs inhabituelles ou trompeuses pour un attribut particulier. -

    DISQUE est le même nom de disque spécifié dans l'option data. -PARITÉ est l'un des noms de parité : parity, 2-parity, 3-parity, +

    DISK est le même nom de disque spécifié dans l'option data. +PARITY est l'un des noms de parité : parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity ou z-parity. La valeur spéciale * peut être utilisée pour ignorer l'attribut sur tous les disques. -

    Par exemple, pour ignorer l'attribut Current Pending Sector Count -sur tous les disques : +

    Plusieurs attributs peuvent être spécifiés séparés par des espaces. +Chaque attribut peut être spécifié sous forme de nombre de 1 à 255, ou sous +forme de nom insensible à la casse (par exemple Current_Pending_Sector). +

    Par exemple, pour ignorer les attributs Current Pending Sector Count et +Reallocated Sectors Count sur tous les disques par leur numéro ou leur nom :

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Pour l'ignorer uniquement sur le premier disque de parité : +

    Pour les ignorer uniquement sur le premier disque de parité :

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    -Exemples +

    +Exemples (Examples)

    Un exemple de configuration typique pour Unix est :

    @@ -1893,7 +1949,7 @@ data d2 /mnt/disk2/
     data d3 /mnt/disk3/
     exclude /lost+found/
     exclude /tmp/
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/sg0
     smartctl 2-parity -d areca,2/1 /dev/sg0
    @@ -1909,7 +1965,7 @@ data d3 I:\array\
     exclude Thumbs.db
     exclude \$RECYCLE.BIN
     exclude \System Volume Information
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/arcmsr0
     smartctl 2-parity -d areca,2/1 /dev/arcmsr0
    @@ -1918,6 +1974,165 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0
     

    +Snapshots +

    +

    Si l'option snapshot est activée dans la configuration, SnapRAID +utilise les instantanés du système de fichiers pour maintenir stables les données +lues pendant une opération, même si des fichiers sur les systèmes de fichiers actifs +sont ultérieurement modifiés ou supprimés. +

    La gestion des instantanés est entièrement automatique et transparente. +Vous pouvez continuer à utiliser SnapRAID exactement comme avant, avec la +protection supplémentaire fournie par les instantanés gérés entièrement en +arrière-plan. +

    Cela offre deux avantages principaux : +

    +
    +
    +Cohérence +
    +Les fichiers modifiés sur le système de fichiers actif pendant un sync ou un scrub +de longue durée ne provoqueront pas de déséquilibres de parité ni d'opérations abandonnées, +car chaque système de fichiers avec instantané reste inchangé pendant toute +la durée de l'opération. +
    +
    +
    +
    +Récupération +
    +Si un fichier est mis à jour ou supprimé du système de fichiers actif, +il reste préservé dans l'instantané. Si une panne de disque survient +avant l'exécution du prochain sync, SnapRAID utilise les données préservées +dans l'instantané pour reconstruire le disque défaillant. +En cas de panne de disque pendant un processus de sync actif, +SnapRAID est également capable de lire automatiquement à la fois l'instantané +du calcul de parité précédent et celui en cours. +Cela maximise la probabilité d'une récupération complète en +fournissant un accès aux blocs de données exacts requis pour résoudre +les équations de parité, même si ces blocs ont été modifiés +ou supprimés entre les syncs. +Sans instantanés, un fichier mis à jour ou supprimé sur un disque sain +entraîne des blocs de données manquants qui pourraient être nécessaires pour +réparer d'autres disques défaillants. +
    +
    +
    +

    Les instantanés sont créés uniquement pour les disques de données et uniquement si le système de fichiers +sous-jacent prend en charge cette fonctionnalité. Les disques de parité utilisent toujours +le système de fichiers actif. +

    Actuellement, cela est pris en charge sur Btrfs, Bcachefs et ZFS sous Linux +et sur NTFS sous Windows. +

    Vous pouvez mélanger des disques de données avec différents systèmes de fichiers. Seuls ceux qui +prennent en charge les instantanés les utiliseront, tandis que les autres disques continueront +à fonctionner directement sur le système de fichiers actif. +

    La création et la suppression d'instantanés nécessitent des privilèges d'administration. +Assurez-vous que SnapRAID est exécuté avec les autorisations nécessaires (par exemple, sudo) +lorsque les instantanés sont activés. +

    +

    +Comportement des commandes avec les instantanés (Command Behavior with Snapshots) +

    +

    Les commandes sync et scrub utilisent des instantanés pour les disques de données dont +les systèmes de fichiers les prennent en charge. Sur un disque avec instantané, la commande +voit une image stable du système de fichiers non affectée par les modifications simultanées +sur le système de fichiers actif. +Pendant un sync, un nouvel instantané est créé indépendamment pour chaque système +de fichiers de données pris en charge. Ces instantanés fournissent collectivement les +données utilisées pour le calcul de la parité. +En contrepartie, la commande scrub utilise le dernier instantané, celui +créé lors du sync le plus récent, pour maintenir un point de référence fiable +qui correspond à la parité existante. +

    Pour les commandes check et fix, l'utilisation du dernier instantané +dépend du ciblage ou non de disques spécifiques à l'aide de l'option +-d, --filter-disk. +

    Un disque explicitement sélectionné via -d (la "cible" de l'opération) +utilise toujours le système de fichiers actif. Pour fix, cela permet de restaurer +les données sur le disque de remplacement actif. Pour check, cela permet de simuler +l'opération fix dans les mêmes conditions. +

    Tous les autres disques de données (les disques de "référence") seront accessibles via +leurs instantanés. Cela garantit que même si vous modifiez des fichiers +sur vos disques sains pendant qu'une récupération est en cours, SnapRAID +dispose d'une référence stable et figée pour résoudre les équations de parité. +

    Si aucune option -d n'est fournie, SnapRAID suppose que l'opération s'applique +à l'ensemble de la grappe, dans ce cas, check et fix utiliseront exclusivement +les systèmes de fichiers actifs. +

    Toutes les autres commandes fonctionnent exclusivement sur le système de fichiers actif. +

    +
    +
    +

    +Cycle de vie des instantanés (Snapshots Lifecycle) +

    +

    SnapRAID gère trois instantanés spécifiques, stable, pending et scan, +dans un répertoire caché à la racine de chaque sous-volume de données. +Dans Btrfs, Bcachefs et NTFS, le répertoire .snapraid/ est utilisé, +dans ZFS, le répertoire standard .zfs/snapshot/. +

    L'instantané stable représente l'état du dernier +sync terminé avec succès, contenant les données exactes utilisées pour +calculer la parité actuelle. Il sert de source de données principale +pour les commandes scrub, check et fix. +

    L'instantané scan est une image temporaire créée au début +d'un sync pour fournir un état figé pour le balayage et le calcul de la parité. +Après le balayage et l'enregistrement du nouvel état du contenu, il remplace l'instantané +pending précédent. +

    L'instantané pending est l'image utilisée par un sync interrompu. +Une fois l'opération terminée avec succès, l'instantané stable précédent +est supprimé, et l'instantané pending est promu pour +prendre sa place en tant que nouvelle référence stable. +

    Si un sync est interrompu, l'instantané pending est préservé. +Les commandes ultérieures scrub, check et fix utiliseront cet +instantané en attente car il correspond à l'état du système de fichiers enregistré dans +le fichier .content, même si la parité n'est que partiellement synchronisée. +

    En cas d'interruption de sync, les commandes check et fix +lisent également à partir de l'instantané stable pour récupérer les blocs de données +des fichiers qui ont été mis à jour ou supprimés pendant le sync. +Cela est possible car le fichier .content conserve les métadonnées de +tous les fichiers modifiés ou supprimés tout au long du processus de sync. +Ces informations historiques ne sont effacées qu'une fois qu'un sync se termine +avec succès et que la version finale du fichier .content est enregistrée. +

    Si un sync est redémarré après une interruption, l'instantané pending existant +est supprimé et un nouveau est créé pour +capturer l'état actuel du système de fichiers actif. +Cependant, si un sync est interrompu, évitez de modifier, supprimer, +remplacer ou déplacer des fichiers jusqu'à ce qu'un sync ultérieur se termine +avec succès. La parité peut encore contenir des blocs calculés à partir de +l'instantané utilisé par le sync interrompu. Un sync ultérieur peut remplacer +cet instantané, rendant les versions intermédiaires des fichiers indisponibles +pour la récupération. +

    +

    +Sauvegardes externes avec les instantanés de système de fichiers (External backups with filesystem snapshots) +

    +

    Lorsque les instantanés de système de fichiers sont activés, SnapRAID accède +aux instantanés ou les crée à la racine de chaque sous-volume, volume ou +jeu de données (dataset). +

    Un moyen simple d'éviter toute interférence avec les outils externes +consiste à faire pointer la configuration data vers un sous-répertoire +ordinaire au sein du sous-volume ou du volume (par exemple +/mnt/subvol/data au lieu de /mnt/subvol). SnapRAID crée toujours le +répertoire d'instantanés à la racine du sous-volume (par exemple +/mnt/subvol/.snapraid/), laissant le sous-répertoire de données propre de +sorte que les instantanés restent à l'extérieur et invisibles pour les +outils de sauvegarde opérant à l'intérieur. +

    Sinon, si votre répertoire data configuré est lui-même la racine du +sous-volume ou du volume, SnapRAID crée un répertoire .snapraid/ +directement à l'intérieur (sur Btrfs, Bcachefs et NTFS). Bien que SnapRAID +exclue automatiquement ce répertoire de ses propres analyses, les outils +de sauvegarde externes ou les synchroniseurs de fichiers le rencontreront. +S'il n'est pas exclu, ils peuvent traverser les instantanés ou les liens de +répertoires et copier l'ensemble de l'arborescence figée, dupliquant les +données et risquant d'épuiser l'espace de sauvegarde. Configurez toujours +les outils de sauvegarde externes pour exclure le répertoire .snapraid/. +

    Sur ZFS, les instantanés sont exposés via le répertoire virtuel standard +.zfs/snapshot/ plutôt que .snapraid/. Par défaut (snapdir=hidden), ZFS +masque ce répertoire des listes de fichiers, de sorte que les outils de +sauvegarde externes ne le parcourront pas. Si vous avez activé +snapdir=visible, veillez à ce que vos outils de sauvegarde excluent le +répertoire .zfs/. +

    +
    +
    +

    Motif (Pattern)

    Les motifs offrent un moyen flexible de filtrer les fichiers à inclure ou @@ -1932,25 +2147,26 @@ point d'interrogation, elle ne traverse jamais les frontières des répertoires. barre oblique, ce qui la rend adaptée à la recherche de correspondances au sein d'un seul composant de chemin. Il s'agit du comportement standard des jokers familier du "globbing" shell. -

    La double étoile ** est plus puissante, elle correspond à n'importe quelle séquence de -caractères, y compris les séparateurs de répertoires. Cela permet aux motifs de correspondre -sur plusieurs niveaux de répertoires. Lorsque ** apparaît directement intégré dans -un motif, il peut correspondre à zéro ou plusieurs caractères, y compris les barres obliques entre -le texte littéral environnant. -

    L'utilisation la plus importante de ** est sous la forme spéciale /**/. Celle-ci correspond à -zéro ou plusieurs niveaux de répertoires complets, ce qui permet de faire correspondre des fichiers -à n'importe quelle profondeur dans une arborescence de répertoires sans connaître la structure exacte du chemin. -Par exemple, le motif src/**/main.js correspond à src/main.js (saut de -zéro répertoire), src/ui/main.js (saut d'un répertoire), et -src/ui/components/main.js (saut de deux répertoires). +

    Le caractère générique double étoile ** ne correspond à travers les +séparateurs de répertoires que lorsqu'il est adjacent à un séparateur de +répertoires (précédé ou suivi d'une barre oblique). Sous cette forme, il +correspond à zéro ou plusieurs caractères sur plusieurs niveaux de +répertoires. Par exemple, foo/**/bar correspond à foo/bar, foo/a/bar +et foo/a/b/bar ; **/build correspond à build et foo/bar/build ; et +src/**.js correspond à src/main.js et src/ui/components/main.js. +La forme autonome /**/ n'est pas acceptée comme un motif complet. +

    Lorsque ** n'est pas adjacent à une barre oblique, il se comporte comme * +et ne correspond pas aux séparateurs de répertoires. Par exemple, **.jpg +correspond à photo.jpg dans le répertoire actuel, mais ne correspond pas à +dir/photo.jpg. Utilisez **/*.jpg à cette fin.

    Les classes de caractères utilisant des crochets [] correspondent à un seul caractère d'un ensemble ou d'une plage spécifiés. Comme les autres motifs à caractère unique, elles ne correspondent pas aux séparateurs de répertoires. Les classes supportent les plages et la négation à l'aide d'un point d'exclamation.

    La distinction fondamentale à retenir est que *, ? et les classes de caractères respectent tous les limites des répertoires et ne correspondent qu'au sein d'un seul -composant de chemin, alors que ** est le seul motif qui peut correspondre à travers -les séparateurs de répertoires. +composant de chemin, alors que ** ne peut correspondre à travers les séparateurs +de répertoires que lorsqu'il est adjacent à une barre oblique.

    Il existe quatre types de motifs différents :

    @@ -2044,6 +2260,25 @@ include /movies/ include /musics/ include /pictures/ +

    Notez que l'exclusion d'un répertoire (en utilisant DIR/ ou /CHEMIN/DIR/) +empêche SnapRAID d'entrer et de parcourir ce répertoire. Par conséquent, +il n'est pas possible de réinclure un fichier ou un sous-répertoire situé +dans un répertoire parent exclu, car le scanner ne le parcourt jamais. +

    Par exemple, la configuration suivante n'inclura PAS file.dat car +/keep/ est élagué avant que file.dat ne puisse être examiné : +

    +# Ne fonctionne PAS : /keep/ est entièrement ignoré
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Pour exclure les fichiers d'un répertoire tout en conservant certains +fichiers spécifiques, appliquez le motif d'exclusion aux fichiers du +répertoire plutôt que d'exclure le répertoire lui-même : +

    +# Fonctionne : /keep/ est parcouru, mais les autres fichiers qu'il contient sont exclus
    +include /keep/file.dat
    +exclude /keep/*
    +

    Sur la ligne de commande, en utilisant l'option -f, vous ne pouvez utiliser que des motifs include. Par exemple :

    @@ -2057,8 +2292,8 @@ ligne de commande, vous devez les mettre entre guillemets pour empêcher
     le shell de les développer.
     

    -

    -Ignorer des Fichiers (Ignore Files) +

    +Ignorer des Fichiers (Ignore File)

    En plus des règles globales du fichier de configuration, vous pouvez placer des fichiers .snapraidignore dans n'importe quel répertoire de la grappe @@ -2123,7 +2358,7 @@ build/

    -

    +

    Contenu (Content)

    SnapRAID stocke la liste et les sommes de contrôle de vos fichiers @@ -2131,11 +2366,13 @@ dans le fichier de contenu.

    Il s'agit d'un fichier binaire qui répertorie tous les fichiers présents dans votre baie de disques, ainsi que toutes les sommes de contrôle pour vérifier leur intégrité. -

    Ce fichier est lu et écrit par les commandes sync et scrub et -lu par les commandes fix, check et status. +

    Le fichier de contenu est lu et écrit par les commandes sync, scrub, +touch et rehash. Il est lu par les commandes status, diff, +check, fix, list, dup, locate et pool, et il est complètement +ignoré par les commandes smart, probe, up, down et devices.

    -

    +

    Parité (Parity)

    SnapRAID stocke les informations de parité de votre baie dans @@ -2146,8 +2383,8 @@ blocs définis dans le fichier content. lus uniquement par les commandes scrub et check.

    -

    -Encodage +

    +Encodage (Encoding)

    SnapRAID sous Unix ignore tout encodage. Il lit et stocke les noms de fichiers avec le même encodage utilisé par le système @@ -2163,16 +2400,285 @@ redirigez la sortie de la console vers un fichier, le fichier résultant est toujours au format UTF-8.

    -

    -Droits d'auteur (Copyright) +

    +Code de sortie (Exit Code)

    -

    Ce fichier est Copyright (C) 2025 Andrea Mazzoleni +

    SnapRAID se termine avec les codes d'erreur suivants : +

    +
    +
    +0 +
    +Tout est OK. +
    +
    +
    +
    +1 +
    +La commande a rencontré des erreurs. +
    +
    +
    +
    +2 +
    +La commande diff a trouvé que tout est OK, mais un sync est requis. +
    +
    +
    +
    +3 +
    +Une commande de disque (probe, smart, devices, up, down) s'est +terminée, mais au moins un système de fichiers fonctionne en mode dégradé +avec des périphériques manquants. +
    +
    +
    +
    +
    +

    +Problèmes connus (Known Issues) +

    +
    +

    +Limites du système de fichiers +

    +

    SnapRAID ne franchit pas les limites de système de fichiers, de point de +montage ou de sous-volume lors de l'analyse d'un disque de données. +Lorsqu'une telle limite est détectée, SnapRAID signale un AVERTISSEMENT +et n'analyse pas au-delà. +

    Les fichiers situés au-delà de ces limites ne sont pas inclus dans le disque +de données et doivent être configurés séparément s'ils doivent être protégés. +

    +
    +

    +Points de montage avec instantanés du système de fichiers +

    +

    Lorsque les instantanés du système de fichiers sont activés, les points de +montage imbriqués et les montages bind à l'intérieur d'un disque de données +ne sont pas pris en charge. +

    Les points de montage font partie de l'espace de noms de montage du système +en direct et ne sont pas conservés dans les instantanés du système de +fichiers. Par conséquent, lors de l'analyse d'un instantané, un répertoire +masqué par un point de montage dans le système de fichiers en direct peut +devenir visible. +

    Ne placez pas de points de montage imbriqués ou de montages bind dans les +disques de données lorsque les instantanés du système de fichiers sont +activés. +

    +
    +

    +Plusieurs configurations avec instantanés du système de fichiers +

    +

    La prise en charge des instantanés ne peut pas être partagée en toute +sécurité par plusieurs configurations SnapRAID indépendantes utilisant le +même espace de noms d'instantanés du système de fichiers. +

    Sur Btrfs et Bcachefs, une seule configuration SnapRAID avec prise en charge +des instantanés activée peut utiliser des répertoires de données au sein du +même sous-volume. Sur ZFS, la même restriction s'applique à un dataset, et +sur NTFS à un volume. +

    Plusieurs configurations partageant le même espace de noms d'instantanés +utilisent les mêmes instantanés stable, pending et scan. L'exécution +d'une configuration peut donc remplacer ou supprimer les instantanés de +récupération requis par une autre. +

    +
    +

    +Modifications de fichiers sur place sans changement d'horodatage +

    +

    SnapRAID détecte les modifications de fichiers en comparant la taille des +fichiers et les horodatages de modification (mtime). +

    Si une application modifie un fichier sur place sans modifier sa taille ni +mettre à jour son horodatage de modification, "diff" et "sync" ne détecteront +pas que le fichier a changé et sa parité ne sera pas mise à jour. +

    Pour vous assurer que SnapRAID reconnaît ces modifications, mettez à jour +l'horodatage de modification du fichier (par exemple avec l'utilitaire +"touch"). Sinon, la différence ne sera détectée que sous la forme d'une +non-concordance de hachage lors d'un "scrub" ou "check" ultérieur. +

    +
    +

    +Correspondance de casse non-ASCII sous Windows +

    +

    SnapRAID utilise un encodage UTF-8 standard et prévisible sur toutes les +plates-formes, limitant la correspondance insensible à la casse aux caractères +ASCII. +

    Les systèmes de fichiers Windows souffrent d'une conception héritée du passé +qui impose l'insensibilité à la casse sur les noms de fichiers Unicode via des +tables de correspondance arbitraires et dépendantes du système. Par conséquent, +Windows masque la réalité du système de fichiers en traitant des séquences d'octets +Unicode complètement différentes comme s'il s'agissait du même fichier. +

    Par exemple, À.txt et à.txt sont des noms Unicode distincts, pourtant Windows +les traite illogiquement comme identiques, tandis que SnapRAID préserve leur +véritable distinction. +

    Cette limitation est causée par la gestion incohérente des noms de fichiers +Unicode par Windows et son insistance sur l'aliasement insensible à la casse. +Pour éviter les écarts causés par le repliement de casse de Windows, spécifiez +toujours la casse exacte de tous les caractères non-ASCII dans les chemins de +configuration et les filtres. +

    +
    +

    +Récupération avec fix partiel +

    +

    Lorsque fix est restreint avec -S, --start ou -B, --count, +SnapRAID opère uniquement sur les blocs sélectionnés et n'effectue +pas de finalisation au niveau du fichier ni de mise en quarantaine. +

    Si la récupération produit des données au mieux (best-effort) qui ne +peuvent pas être certifiées comme représentant le contenu actuel, ces +blocs peuvent tout de même être écrits sous le nom de fichier normal. +L'incertitude associée à ces blocs récupérés n'est pas conservée après +la fin de l'exécution de la commande. +

    Par conséquent, un fix ultérieur considérera ces blocs lisibles comme des +données de fichier valides et ne tentera pas de les récupérer à nouveau. +Cela peut conduire une récupération ultérieure à signaler un succès tout en +laissant des données incomplètes ou obsolètes dans le fichier. +

    Les options -S et -B ne sont destinées qu'à une récupération manuelle +avancée, généralement après l'échec d'un fix normal. Si un fix partiel +signale des données irrécupérables, supprimez ou renommez les fichiers +concernés avant de tenter une nouvelle récupération, ou vérifiez manuellement +leur contenu. +

    +
    +

    +Liens matériels NTFS et chemins exclus +

    +

    Sur NTFS, les entrées de répertoire mettent en cache la taille du fichier +et les horodatages indépendamment pour chaque lien matériel. Lorsqu'un +fichier est modifié via un lien, les entrées de répertoire des autres liens +pointant vers le même fichier peuvent conserver des métadonnées obsolètes +jusqu'à ce qu'on y accède. +

    SnapRAID détecte et normalise automatiquement cette condition chaque fois +qu'au moins deux liens matériels vers le même fichier sont rencontrés lors +d'une analyse. Cependant, si un seul lien matériel est analysé alors que +les autres sont exclus par des filtres ou résident en dehors du chemin du +disque de données, SnapRAID ne peut pas détecter la collision d'inodes et +s'appuie sur les métadonnées en cache du seul lien visible. +

    Par conséquent, les modifications apportées via un lien matériel exclu ou +externe peuvent passer inaperçues pour SnapRAID jusqu'à ce que les +métadonnées du lien inclus soient actualisées par le système d'exploitation +(par exemple lorsque le fichier est accédé ou ouvert via ce chemin). +

    Pour éviter cette limitation, évitez de modifier les fichiers protégés +via des liens matériels exclus de SnapRAID, ou assurez-vous que tous les +liens matériels vers un fichier sont inclus dans l'analyse afin que +SnapRAID puisse les normaliser. +

    +
    +

    +Récupération après un sync multi-parité interrompu +

    +

    Dans une grappe avec plusieurs disques de parité, un sync interrompu +peut laisser les niveaux de parité temporairement désynchronisés entre +eux. Par exemple, la parité 1 peut déjà contenir les données nouvellement +mises à jour, tandis que la parité 2 contient encore les anciennes données. +

    Lors d'un check ou d'un fix, SnapRAID teste différentes combinaisons +de parités et valide les données reconstruites par rapport aux hachages +de bloc connus (qui couvrent l'intégralité du bloc, généralement 256 Kio). +

    Si SnapRAID tente une reconstruction en utilisant un mélange incohérent +d'ancienne et de nouvelle parité, les équations linéaires du RAID +produiront des données incorrectes. Pour qu'une telle combinaison +invalide soit acceptée par erreur, il faudrait que les équations +reconstruisent accidentellement au moins un bloc complet de 256 Kio +de manière si parfaite que son hachage corresponde, tandis que d'autres +blocs non synchronisés de la même bande sont reconstruits avec des données +erronées. +

    Ce scénario ne dépend pas d'une collision de hachage ; il faudrait plutôt +que les équations de parité mixte produisent elles-mêmes par coïncidence +le contenu exact du bloc original de 256 Kio. Bien que mathématiquement +envisageable avec des données spécialement conçues ou très répétitives, +c'est pratiquement impossible avec des données réelles. +

    Si tous les disques sont sains, achever le sync interrompu avant +d'apporter d'autres modifications élimine cette ambiguïté. Si un disque +est tombé en panne et qu'une récupération est requise, évitez de modifier +les disques de données avant d'exécuter check ou fix. +

    +
    +

    +Noms de fichiers et de répertoires réservés +

    +

    SnapRAID réserve certains noms de fichiers, répertoires et instantanés pour son +fonctionnement interne. N'utilisez pas ces noms pour des données utilisateur : +

    +
    +
    +.snapraidignore +
    +Fichier local de règles d'exclusion. +
    +
    +
    +
    +.snapraid +
    +Répertoire conteneur d'instantanés. +
    +
    +
    +
    +snapraid-* +
    +Noms d'instantanés ZFS gérés par SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Fichiers endommagés mis en quarantaine lors de la +récupération. +
    +
    +
    +
    +CONTENT.tmp +
    +Fichier temporaire pour les mises à jour du fichier content. +
    +
    +
    +
    +CONTENT.lock +
    +Fichier de verrouillage du fichier content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Fichier temporaire réservant de l'espace lors de +l'allocation de parité sous Windows. +
    +
    +
    +

    L'utilisation de ces noms pour des données non liées peut entraîner l'ignorance, +une mauvaise interprétation en tant que métadonnées, l'écrasement, le renommage +ou la suppression de fichiers ou d'instantanés. +

    Sous Windows, toutes les variantes de casse sont également réservées, même +dans les répertoires NTFS configurés pour respecter la casse (par exemple, +.SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP et CONTENT.Lock). +

    +
    +
    +

    +Traduction (Translation) +

    +

    Ce document est une traduction automatique du manuel en anglais. +Veuillez vous référer au manuel en anglais pour la version officielle.

    -

    +

    +Droits d'auteur (Copyright) +

    +

    Ce fichier est Copyright (C) 2026 Andrea Mazzoleni +

    +
    +

    Voir aussi (See Also)

    -

    snapraid_log(1), snapraidd(1) +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-it.html b/manual-it.html index 41d0ab32..ff272733 100644 --- a/manual-it.html +++ b/manual-it.html @@ -114,7 +114,7 @@

    -Sinossi +Sinossi (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Descrizione +Descrizione (Description)

    SnapRAID è un programma di backup progettato per array di dischi, che memorizza informazioni di parità per il recupero dati in caso di guasto @@ -178,7 +178,7 @@ SnapRAID non blocca i dati; è possibile smettere di usarlo in qualsiasi momento senza riformattare o spostare i dati.

  • -Per accedere a un file, è necessario far girare solo un singolo disco, +Per accedere a un file, è necessario avviare la rotazione di solo un singolo disco, risparmiando energia e riducendo il rumore.
  • @@ -189,23 +189,36 @@ risparmiando energia e riducendo il rumore.

    -Limitazioni +Limitazioni (Limitations)

    -

    SnapRAID è un ibrido tra un programma RAID e un programma di backup, -che mira a combinare i migliori vantaggi di entrambi. Tuttavia, ha -alcune limitazioni che si dovrebbero considerare prima di usarlo. -

    La limitazione principale è che se un disco si guasta e non si è -effettuato un sync di recente, potrebbe non essere possibile recuperare -completamente. -Più specificamente, potrebbe non essere possibile recuperare fino alla -dimensione dei file modificati o eliminati dall'ultima operazione di sync. -Ciò accade anche se i file modificati o eliminati non si trovano sul -disco guasto. Questo è il motivo per cui SnapRAID è più adatto per dati -che cambiano raramente. -

    D'altra parte, i file appena aggiunti non impediscono il recupero dei -file già esistenti. Si perderanno solo i file aggiunti di recente se si -trovano sul disco guasto. -

    Altre limitazioni di SnapRAID sono: +

    SnapRAID è un ibrido tra un RAID e un programma di backup, con l'obiettivo di combinare +i migliori vantaggi di entrambi. Tuttavia, presenta alcune limitazioni che dovresti +considerare prima di usarlo. +

    La limitazione principale è che se un disco si guasta, puoi recuperare i dati solo fino allo +stato dell'ultima operazione di sync. Qualsiasi dato aggiunto o modifica apportata +dopo l'ultimo sync sul disco guasto andrà perso. +

    Di conseguenza, SnapRAID è adatto principalmente per dati che cambiano raramente. +

    Per i dati che esistevano già all'ultimo sync, l'affidabilità del recupero dipende +dall'uso o meno dell'opzione snapshot: +

      +
    • +Con il supporto snapshot (disponibile su Btrfs, ZFS, Bcachefs e NTFS), +SnapRAID può mantenere automaticamente un riferimento congelato +indipendente di ogni file system dati supportato. +Ciò garantisce che anche se si modificano o si eliminano file sul file system live +durante o dopo un sync, il processo di recupero rimane coerente e affidabile. +
    • +
    +
      +
    • +Senza il supporto snapshot, eliminare o modificare file dopo un sync +può impedire il recupero completo di altri dischi guasti. Ciò accade +perché la parità non corrisponde più ai file modificati, anche se +quei file non si trovano sul disco guasto. D'altra parte, i file aggiunti di recente +non impediscono il recupero dei file già esistenti. +
    • +
    +

    Altre limitazioni di SnapRAID sono:

    • Con SnapRAID, si hanno ancora file system separati per ogni disco. @@ -233,7 +246,7 @@ Permessi, proprietà e attributi estesi non vengono salvati.

    -Iniziare +Primi passi (Getting Started)

    Per usare SnapRAID, è necessario prima selezionare un disco nell'array di dischi da dedicare alle informazioni di parity (parità). Con un @@ -245,7 +258,7 @@ parità aggiuntivo consente il recupero da un guasto in più del disco.

    Come dischi di parità, è necessario scegliere i dischi più grandi dell'array, poiché le informazioni di parità possono crescere fino alle dimensioni del più grande disco dati nell'array. -

    Questi dischi saranno dedicati alla memorizzazione dei file di parity. +

    Questi dischi saranno dedicati alla memorizzazione dei file di parità. Non si dovrebbero memorizzare i propri dati su di essi.

    Quindi, è necessario definire i dischi data (dati) che si desidera proteggere con SnapRAID. La protezione è più efficace se questi dischi @@ -258,7 +271,7 @@ Questo file contiene i dettagli del backup, inclusi tutti i checksum per verificarne l'integrità. Il file content viene memorizzato in più copie e ogni copia deve essere su un disco diverso per garantire che, anche in caso di guasti -multipli del disco, sia disponibile almeno una copia. +multipli ai dischi, sia disponibile almeno una copia.

    Ad esempio, supponiamo di essere interessati a un solo livello di protezione con parità e che i dischi si trovino in:

    @@ -309,7 +322,7 @@ prossima esecuzione, riprenderà da dove è stato interrotto.
     periodicamente le informazioni di parità eseguendo il comando sync.
     

    -Scrubbing +Scrubbing (Scrubbing)

    Per controllare periodicamente i dati e la parità per gli errori, è possibile eseguire il comando scrub. @@ -320,8 +333,8 @@ snapraid scrub durante il comando sync per verificarne l'integrità.

    Ogni esecuzione del comando controlla circa l'8% dell'array, escludendo i dati già sottoposti a scrub nei 10 giorni precedenti. -È possibile utilizzare l'opzione -p, --plan per specificare un importo -diverso e l'opzione -o, --older-than per specificare un'età diversa +È possibile utilizzare l'opzione -p, --plan per specificare una quantità +diversa e l'opzione -o, --older-than per specificare un'età diversa in giorni. Ad esempio, per controllare il 5% dell'array per blocchi più vecchi di 20 giorni, usare: @@ -329,35 +342,35 @@ Ad esempio, per controllare il 5% dell'array per blocchi più vecchi di snapraid -p 5 -o 20 scrub

    Se vengono trovati errori silenti o di input/output durante il processo, -i blocchi corrispondenti vengono contrassegnati come bad (cattivi) nel +i blocchi corrispondenti vengono contrassegnati come bad (danneggiati) nel file content ed elencati nel comando status.

     snapraid status
     

    Per correggerli, è possibile utilizzare il comando fix, filtrando -i blocchi bad con l'opzione -e, --filter-error: +i blocchi danneggiati con l'opzione -e, --filter-error:

     snapraid -e fix
     

    Al prossimo scrub, gli errori scompariranno dal report status se sono stati veramente corretti. Per renderlo più veloce, è possibile utilizzare -p bad per eseguire lo scrub solo dei blocchi contrassegnati -come bad. +come bad.

     snapraid -p bad scrub
     

    L'esecuzione di scrub su un array non sincronizzato può riportare errori causati da file rimossi o modificati. Questi errori sono riportati nell'output di scrub, ma i blocchi correlati non sono contrassegnati -come bad. +come bad.

    -Pooling +Pooling (Pooling)

    Nota: La funzionalità di pooling descritta di seguito è stata sostituita dallo strumento mergerfs, che è ora l'opzione consigliata -per gli utenti Linux nella comunità SnapRAID. Mergefs fornisce un modo +per gli utenti Linux nella comunità SnapRAID. Mergerfs fornisce un modo più flessibile ed efficiente per raggruppare più unità in un singolo punto di montaggio unificato, consentendo un accesso trasparente ai file attraverso l'array senza fare affidamento sui collegamenti @@ -433,11 +446,11 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Annullamento Eliminazione +Annullamento eliminazione (Undeleting)

    SnapRAID funziona più come un programma di backup che come un sistema RAID -e può essere utilizzato per ripristinare o annullare l'eliminazione dei -file al loro stato precedente utilizzando l'opzione -f, --filter: +e può essere utilizzato per ripristinare i file al loro stato precedente +o annullarne l'eliminazione utilizzando l'opzione -f, --filter:

     snapraid fix -f FILE
     
    @@ -459,9 +472,9 @@ snapraid fix -m

    -Recupero +Recupero (Recovering)

    -

    È successo il peggio e si è perso uno o più dischi! +

    È successo il peggio e si sono persi uno o più dischi!

    NON FARSI PRENDERE DAL PANICO! Sarà possibile recuperarli!

    La prima cosa da fare è evitare ulteriori modifiche all'array di dischi. Disabilitare qualsiasi connessione remota ad esso e qualsiasi processo @@ -469,7 +482,7 @@ pianificato, incluso qualsiasi sync o scrub notturno pianificato di SnapRAID.

    Quindi procedere con i seguenti passaggi.

    -PASSO 1 -> Riconfigurazione +PASSO 1 -> Riconfigurazione (Reconfigure)

    È necessario un po' di spazio per recuperare, idealmente su dischi di riserva aggiuntivi, ma un disco USB esterno o un disco remoto saranno @@ -551,7 +564,7 @@ snapraid sync

    -Comandi +Comandi (Commands)

    SnapRAID fornisce alcuni semplici comandi che consentono di:

      @@ -562,16 +575,16 @@ Stampare lo stato dell'array -> status Controllare i dischi -> smart, probe, up, down
    • -Effettuare un backup/snapshot -> sync +Creare un punto di backup/recupero -> sync
    • Controllare periodicamente i dati -> scrub
    • -Ripristinare l'ultimo backup/snapshot -> fix. +Ripristinare l'ultimo punto di backup/recupero -> fix.
    -

    I comandi devono essere scritti in minuscolo. +

    I comandi devono essere scritti in lettere minuscole.

    status @@ -583,7 +596,7 @@ registrati incontrati durante lo scrubbing.

    Le informazioni presentate si riferiscono all'ultima volta che si è eseguito sync. Le modifiche successive non vengono prese in considerazione. -

    Se sono stati rilevati blocchi bad, vengono elencati i loro numeri +

    Se sono stati rilevati blocchi danneggiati, vengono elencati i loro numeri di blocco. Per correggerli, è possibile utilizzare il comando fix -e.

    Mostra anche un grafico che rappresenta l'ultima volta che ogni blocco è stato sottoposto a scrub o sincronizzato. I blocchi sottoposti a scrub @@ -648,8 +661,8 @@ possibile specificare un comando personalizzato utilizzando l'opzione probe

    Stampa lo stato POWER di tutti i dischi nel sistema. -

    Standby significa che il disco non sta girando. Active significa -che il disco sta girando. +

    Standby significa che il disco non è in rotazione. Active significa +che il disco è in rotazione.

    Questo comando utilizza lo strumento smartctl ed è equivalente all'esecuzione di smartctl -n standby -i su tutti i dispositivi.

    Se i dispositivi non vengono rilevati automaticamente correttamente, è @@ -661,10 +674,10 @@ possibile specificare un comando personalizzato utilizzando l'opzione

    up

    -

    Fa girare tutti i dischi dell'array. -

    È possibile far girare solo dischi specifici utilizzando l'opzione -d, +

    Avvia la rotazione di tutti i dischi dell'array. +

    È possibile avviare la rotazione di soli dischi specifici utilizzando l'opzione -d, --filter-disk. -

    Far girare tutti i dischi contemporaneamente richiede molta energia. +

    Avviare la rotazione di tutti i dischi contemporaneamente richiede molta energia. Assicurarsi che l'alimentatore possa sostenerlo.

    Nulla viene modificato.

    @@ -727,9 +740,10 @@ significa che sono stati modificati.
    moved
    -File spostati in una directory diversa sullo stesso -disco. Sono identificati dall'avere lo stesso nome, -dimensioni, timestamp e inode, ma una directory diversa. +File spostati o rinominati sullo stesso disco mantenendo +lo stesso inode. Sono identificati dall'avere lo stesso inode, +dimensione e timestamp, ma un percorso diverso. Anche il nome +del file può essere diverso.
    @@ -748,15 +762,13 @@ identificato, non solo il nome.
    relocated
    -File spostati sullo stesso disco o su un disco -diverso dove l'originale è scomparso. -Sono identificati dall' avere lo stesso nome, dimensione -e timestamp. -Se il timestamp al sottomultiplo del secondo è zero, -il percorso completo deve corrispondere per essere -identificato. -A differenza dei file moved sullo stesso disco, -i file ricollocati hanno un inode diverso. +File spostati in una directory diversa o su un altro disco +dove il file originale è scomparso e l'inode non è mantenuto. +Sono identificati dall'avere lo stesso nome, dimensione e timestamp. +Se il timestamp al sottomultiplo del secondo è zero, il percorso +completo deve corrispondere per essere identificato. A differenza +dei file 'moved', i file ricollocati richiedono che il nome del +file rimanga identico.
    @@ -787,7 +799,7 @@ premendo Ctrl+C, senza perdere il lavoro già svolto. Alla prossima esecuzione, il processo sync riprenderà da dove è stato interrotto.

    Se vengono trovati errori silenti o di input/output durante il processo, -i blocchi corrispondenti vengono contrassegnati come bad. +i blocchi corrispondenti vengono contrassegnati come bad (danneggiati).

    I file sono identificati dal percorso e/o dall'inode e controllati per dimensione e timestamp. Se la dimensione o il timestamp del file differiscono, i dati di parità @@ -812,7 +824,7 @@ garantisce che ogni bit di dati venga controllato almeno una volta ogni tre mesi.

    È possibile definire un piano o una quantità di scrub diversa utilizzando l'opzione -p, --plan, che accetta: -bad - Esegue lo scrub dei blocchi contrassegnati come bad. +bad - Esegue lo scrub dei blocchi contrassegnati come bad. new - Esegue lo scrub dei blocchi appena sincronizzati non ancora

    sottoposti a scrub.

    @@ -841,20 +853,20 @@ non ancora sottoposti a scrub, utilizzare l'opzione -p new.

    Per ottenere i dettagli dello stato dello scrub, utilizzare il comando status.

    Per qualsiasi errore silente o di input/output trovato, i blocchi -corrispondenti vengono contrassegnati come bad nel file content. -Questi blocchi bad sono elencati in status e possono essere corretti +corrispondenti vengono contrassegnati come bad nel file content. +Questi blocchi danneggiati sono elencati in status e possono essere corretti con fix -e. Dopo la correzione, al prossimo scrub, verranno ricontrollati e, se -trovati corretti, il contrassegno bad verrà rimosso. -Per eseguire lo scrub solo dei blocchi bad, è possibile utilizzare +trovati corretti, il contrassegno bad verrà rimosso. +Per eseguire lo scrub solo dei blocchi danneggiati, è possibile utilizzare il comando scrub -p bad.

    Si consiglia di eseguire scrub solo su un array sincronizzato per evitare errori segnalati causati da dati non sincronizzati. Questi errori sono riconosciuti come non essendo errori silenti e i blocchi non -vengono contrassegnati come bad, ma tali errori sono riportati +vengono contrassegnati come bad, ma tali errori sono riportati nell'output del comando.

    Il file content viene modificato per aggiornare l'ora dell'ultimo -controllo per ogni blocco e per contrassegnare i blocchi bad. +controllo per ogni blocco e per contrassegnare i blocchi danneggiati. I file parity NON vengono modificati. I file nell'array NON vengono modificati.

    @@ -862,18 +874,16 @@ I file nell'array NON vengono modificati.

    fix

    -

    Corregge tutti i file e i dati di parità. -

    Tutti i file e i dati di parità vengono confrontati con lo stato -snapshot salvato nell'ultimo sync. -Se viene trovata una differenza, viene ripristinata allo snapshot -memorizzato. -

    ATTENZIONE! Il comando fix non differenzia tra errori e modifiche -intenzionali. Ripristina incondizionatamente lo stato del file -all'ultimo sync. +

    Ripristina tutti i file e i dati di parità. +

    Tutti i file e i dati di parità vengono confrontati con lo stato salvato nell'ultimo +sync. Se viene trovata una differenza, questa viene ripristinata allo stato memorizzato. +

    ATTENZIONE! +Il comando fix non distingue tra errori e modifiche intenzionali. +Ripristina incondizionatamente lo stato del file all'ultimo sync.

    Se non viene specificata nessun'altra opzione, l'intero array viene elaborato. Utilizzare le opzioni di filtro per selezionare un sottoinsieme di file o dischi su cui operare. -

    Per correggere solo i blocchi contrassegnati come bad durante sync +

    Per correggere solo i blocchi contrassegnati come bad (danneggiati) durante sync e scrub, utilizzare l'opzione -e, --filter-error. A differenza di altre opzioni di filtro, questa applica correzioni solo ai file che sono invariati dall'ultimo sync. @@ -902,8 +912,8 @@ viene scritta nell'array.

    Questo comando è destinato principalmente alla verifica manuale, ad esempio dopo un processo di recupero o in altre condizioni speciali. Per i controlli periodici e pianificati, utilizzare scrub. -

    Se si utilizza l'opzione -a, --audit-only, viene controllato solo -l'hash dei file e i dati di parità vengono ignorati per un'esecuzione +

    Se si utilizza l'opzione -a, --audit-only, vengono controllati solo +i dati dei file e i dati di parità vengono ignorati per un'esecuzione più veloce.

    I file sono identificati solo dal percorso, non dall'inode.

    Nulla viene modificato. @@ -998,15 +1008,14 @@ stampa la sua posizione all'interno del file di parità e il numero di frammenti che occupa.

    È possibile utilizzare l'opzione -t, --tail per limitare l'operazione ai file che occupano la porzione di coda specificata della parità. -Se si desidera riallocare questi file, è possibile utilizzare l'opzione --W, --force-realloc-tail. -

    Si tenga presente che tali file non saranno protetti dalla parità durante -il processo di riallocazione. +

    Se si desidera riallocare questi file, è possibile utilizzare l'opzione +-W, --force-realloc-tail. Si tenga presente che tali file non saranno +protetti dalla parità durante il processo di riallocazione.

    -Opzioni +Opzioni (Options)

    SnapRAID fornisce le seguenti opzioni:

    @@ -1028,11 +1037,11 @@ directory di snapraid.exe. -f, --filter PATTERN
    Filtra i file da elaborare in check e fix. -Vengono elaborati solo i file che corrispondono al modello +Vengono elaborati solo i file che corrispondono al pattern specificato. Questa opzione può essere utilizzata più volte. Vedere la sezione PATTERN per maggiori dettagli sulle -specifiche del modello. +specifiche del pattern. In Unix, assicurarsi che i caratteri di globbing siano citati se usati. Questa opzione può essere utilizzata solo con check e fix. @@ -1103,7 +1112,7 @@ Seleziona il piano di scrub. Se PERC è un valore numerico da 0 a 100, viene interpretato come la percentuale di blocchi da sottoporre a scrub. Invece di una percentuale, è possibile specificare un piano: -bad esegue lo scrub dei blocchi bad, new esegue lo scrub +bad esegue lo scrub dei blocchi danneggiati, new esegue lo scrub dei blocchi non ancora sottoposti a scrub, e full esegue lo scrub di tutto. Questa opzione può essere utilizzata solo con scrub. @@ -1118,7 +1127,7 @@ Questa opzione può essere utilizzata solo con scrub. Seleziona la parte più vecchia dell'array da elaborare in scrub. DAYS è l'età minima in giorni per un blocco da sottoporre a scrub; il valore predefinito è 10. -I blocchi contrassegnati come bad vengono sempre sottoposti a scrub +I blocchi contrassegnati come bad vengono sempre sottoposti a scrub indipendentemente da questa opzione. Questa opzione può essere utilizzata solo con scrub.
    @@ -1206,10 +1215,10 @@ moltiplicatore come K, M, G o T (ad esempio, --bw-limit 1G).
    --t, --tail DIMENSIONE +-t, --tail SIZE
    Limita l'elenco dei file a quelli che non utilizzano più della -dimensione di coda specificata dei dischi di parità. +porzione finale specificata dei dischi di parità. È possibile utilizzare moltiplicatori come K, M, G o T (ad es. --tail 1G). Questa opzione è valida solo se utilizzata insieme al comando locate. @@ -1371,10 +1380,10 @@ NON si ha protezione dei dati durante l'operazione sync.
    --W, --force-realloc-tail DIMENSIONE +-W, --force-realloc-tail SIZE
    Funziona come -R, --force-realloc, ma limitatamente alla porzione -di coda specificata (ultimi DIMENSIONE byte) di ogni file di parità. +di coda specificata (ultimi SIZE byte) di ogni file di parità. Forza la riallocazione (spostamento) di qualsiasi frammento/blocco di file attualmente memorizzato in quella sezione di coda, consentendo loro di essere posizionati ovunque nei file di parità dove sia disponibile spazio libero @@ -1403,7 +1412,7 @@ per i file interessati.
    Scrive un log dettagliato nel file specificato. Se questa opzione non è specificata, gli errori imprevisti vengono -stampati sullo schermo, potenzialmente resulting in un output +stampati sullo schermo, potenzialmente producendo un output eccessivo in caso di molti errori. Quando -l, --log è specificato, vengono stampati sullo schermo solo gli errori fatali che causano l'arresto di SnapRAID. @@ -1445,7 +1454,8 @@ Tuttavia, check e fix si interrompono sempre al primo errore. Avvia l'elaborazione dal numero di blocco specificato. Ciò può essere utile per riprovare a controllare o correggere blocchi specifici in caso di disco danneggiato. -Questa opzione è principalmente per il recupero manuale avanzato. +Questa opzione è principalmente per il recupero manuale avanzato +ed è supportata solo da check e fix.
    @@ -1455,7 +1465,8 @@ Questa opzione è principalmente per il recupero manuale avanzato. -B, --count BLKCOUNT
    Elabora solo il numero specificato di blocchi. -Questa opzione è principalmente per il recupero manuale avanzato. +Questa opzione è principalmente per il recupero manuale avanzato +ed è supportata solo da check e fix.
    @@ -1521,7 +1532,7 @@ Stampa la versione del programma.

    -Configurazione +Configurazione (Configuration)

    SnapRAID richiede un file di configurazione per sapere dove si trova l'array di dischi e dove memorizzare le informazioni di parità. @@ -1621,7 +1632,11 @@ nell'array. NAME viene utilizzato per identificare il disco e deve essere unico. DIR è il punto di montaggio del disco nel file system.

    È possibile cambiare il punto di montaggio secondo necessità, purché si mantenga fisso NAME. -

    È necessario utilizzare un'opzione per ogni disco dati nell'array. +

    Tuttavia, il percorso configurato deve puntare costantemente agli +stessi dati sottostanti. Se il percorso contiene collegamenti simbolici, +le loro destinazioni devono rimanere stabili. La modifica di tali symlink +per cambiare la directory dei dati al volo non è supportata. +

    Si dovrebbe utilizzare un'opzione per ogni disco dati nell'array.

    È possibile rinominare un disco in seguito modificando NAME direttamente nel file di configurazione e quindi eseguendo un comando sync. @@ -1642,6 +1657,30 @@ perché si prevede che siano sempre in rotazione.

    +snapshot +

    +

    Abilita l'uso degli snapshot del file system per i comandi sync, scrub, +check e fix. +

    Quando abilitato, SnapRAID crea uno snapshot in sola lettura di ogni +file system dati supportato all'inizio di un 'sync'. Ciò fornisce una +vista stabile di ciascun file system, impedendo che modifiche successive +cambino i dati utilizzati per il calcolo della parità. +

    Questo migliora significativamente il recupero: se un file viene eliminato dal file system live, +rimane preservato nello snapshot. Ciò impedisce alla parità di diventare "corrotta" +per quel blocco, assicurando che sia ancora possibile recuperare correttamente i dati +se un altro disco si guasta. +

    Questa opzione si applica esclusivamente ai dischi dati formattati con i file system +Btrfs, Bcachefs o ZFS in Linux e NTFS in Windows. +I dischi di parità, o i dischi dati che utilizzano altri file system, utilizzeranno sempre +la versione live del file system. +

    La creazione e l'eliminazione degli snapshot richiedono privilegi amministrativi. +Assicurati che SnapRAID sia eseguito con i permessi necessari (es. sudo) quando +questa opzione è abilitata. +

    Vedere la sezione SNAPSHOTS per una spiegazione dettagliata del ciclo di vita +degli snapshot. +

    +
    +

    nohidden

    Esclude tutti i file e le directory nascosti. @@ -1649,23 +1688,27 @@ In Unix, i file nascosti sono quelli che iniziano con .. In Windows, sono quelli con l'attributo nascosto.

    -

    +

    exclude/include PATTERN

    -

    Definisce i modelli di file o directory da escludere o includere +

    Definisce i pattern di file o directory da escludere o includere nel processo di sync. -Tutti i modelli vengono elaborati nell'ordine specificato. -

    Se il primo modello che corrisponde è un exclude, il file +Tutti i pattern vengono elaborati nell'ordine specificato. +

    Se il primo pattern che corrisponde è un exclude, il file viene escluso. Se è un include, il file viene incluso. -Se nessun modello corrisponde, il file viene escluso se l'ultimo -modello specificato è un include, o incluso se l'ultimo modello +Se nessun pattern corrisponde, il file viene escluso se l'ultimo +pattern specificato è un include, o incluso se l'ultimo pattern specificato è un exclude. +

    Si noti che il filtraggio avviene gerarchicamente durante l'attraversamento +delle directory. Se una directory corrisponde a una regola exclude, +l'intero sottoalbero viene saltato (potato), e le regole include per file +o sottocartelle al suo interno non verranno valutate.

    Vedere la sezione PATTERN per maggiori dettagli sulle specifiche -del modello. +del pattern.

    Questa opzione può essere utilizzata più volte.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Definisce la dimensione di blocco di base in kibibyte per la parità. @@ -1712,7 +1755,7 @@ un disco da 4 TB, che consente circa 460.000 file su ogni disco dati senza alcuno spreco di spazio.

    -

    +

    hashsize SIZE_IN_BYTES

    Definisce la dimensione dell'hash in byte per i blocchi salvati. @@ -1725,30 +1768,30 @@ futuro, sarà necessario ricreare l'intera parità! sistema ha memoria limitata. Come regola generale, SnapRAID tipicamente richiede 1 GiB di RAM per ogni 16 TB di dati nell'array.

    Nello specifico, per memorizzare gli hash dei dati, SnapRAID richiede -circa $TS*(1+HS)/BS$ byte di RAM, -dove $TS$ è la dimensione totale in byte dell'array di dischi, $BS$ è la -dimensione del blocco in byte e $HS$ è la dimensione dell'hash in byte. +circa TS*(1+HS)/BS byte di RAM, +dove TS è la dimensione totale in byte dell'array di dischi, BS è la +dimensione del blocco in byte e HS è la dimensione dell'hash in byte.

    Ad esempio, con 8 dischi da 4 TB, una dimensione di blocco di 256 KiB -($1 \text{ KiB} = 1024 \text{ byte}$) e una dimensione di hash di 16, si ottiene: +(1 KiB = 1024 byte) e una dimensione di hash di 16, si ottiene:

    -RAM = $(8 * 4 * 10^{12}) * (1+16) / (256 * 2^{10}) = 1.93 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
     

    Passando a una dimensione di hash di 8, si ottiene:

    -RAM = $(8 * 4 * 10^{12}) * (1+8) / (256 * 2^{10}) = 1.02 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
     

    Passando a una dimensione di blocco di 512, si ottiene:

    -RAM = $(8 * 4 * 10^{12}) * (1+16) / (512 * 2^{10}) = 0.96 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
     
    -

    Passando sia a una dimensione di hash di 8 che a una dimensione di +

    Passando sia a una dimensione di hash di 8 sia a una dimensione di blocco di 512, si ottiene:

    -RAM = $(8 * 4 * 10^{12}) * (1+8) / (512 * 2^{10}) = 0.51 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
     
    -

    +

    autosave SIZE_IN_GIGABYTES

    Salva automaticamente lo stato durante la sincronizzazione o lo scrubbing @@ -1758,7 +1801,7 @@ da zero se interrotti da un arresto anomalo della macchina o qualsiasi altro evento.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Imposta la temperatura massima del disco consentita in Celsius. Se @@ -1792,7 +1835,7 @@ Per visualizzare la temperatura di tutti i dischi, utilizzare l'opzione -A o --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Imposta il tempo di stand-by, in minuti, quando il limite di temperatura @@ -1800,7 +1843,7 @@ viene raggiunto. Durante questo periodo, i dischi rimangono fermi (spin down). Il valore predefinito è 5 minuti.

    -

    +

    pool DIR

    Definisce la directory di pooling in cui viene creata la vista virtuale @@ -1808,7 +1851,7 @@ dell'array di dischi utilizzando il comando pool.

    La directory deve già esistere.

    -

    +

    share UNC_DIR

    Definisce il percorso UNC di Windows necessario per accedere ai dischi @@ -1824,7 +1867,7 @@ specificato, aggiungendo il nome del disco come specificato nell'opzione

    Questa opzione è richiesta solo per Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Definisce opzioni smartctl personalizzate per ottenere gli attributi @@ -1838,6 +1881,9 @@ PARITY è uno dei nomi di parità: parity, 2-parity, 3-parity

    Nelle OPTIONS specificate, la stringa %s viene sostituita dal nome del dispositivo. Per i controller RAID, il dispositivo è probabilmente fisso e potrebbe non essere necessario utilizzare %s. +

    È inoltre possibile specificare una stringa di opzioni di informazioni +personalizzate tramite il tag [info: ...] per sostituire l'opzione +-a predefinita.

    Fare riferimento alla documentazione di smartmontools per le possibili opzioni:

    @@ -1846,11 +1892,12 @@ opzioni:
     

    Ad esempio:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignora l'attributo SMART specificato durante il calcolo della @@ -1861,19 +1908,23 @@ PARITY è uno dei nomi di parità: parity, 2-parity, 3-parity4-parity, 5-parity, 6-parity o z-parity. Il valore speciale * può essere utilizzato per ignorare l'attributo su tutti i dischi. -

    Ad esempio, per ignorare l'attributo Current Pending Sector Count -su tutti i dischi: +

    È possibile specificare più attributi separati da spazi. +Ciascun attributo può essere specificato come un numero da 1 a 255, o come +un nome insensibile al maiuscolo/minuscolo (ad es. Current_Pending_Sector). +

    Ad esempio, per ignorare gli attributi Current Pending Sector Count e +Reallocated Sectors Count su tutti i dischi per numero o nome:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Per ignorarlo solo sul primo disco di parità: +

    Per ignorarli solo sul primo disco di parità:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    -Esempi +

    +Esempi (Examples)

    Un esempio di configurazione tipica per Unix è:

    @@ -1885,7 +1936,7 @@ data d2 /mnt/disk2/
     data d3 /mnt/disk3/
     exclude /lost+found/
     exclude /tmp/
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/sg0
     smartctl 2-parity -d areca,2/1 /dev/sg0
    @@ -1901,7 +1952,7 @@ data d3 I:\array\
     exclude Thumbs.db
     exclude \$RECYCLE.BIN
     exclude \System Volume Information
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/arcmsr0
     smartctl 2-parity -d areca,2/1 /dev/arcmsr0
    @@ -1910,6 +1961,163 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0
     

    +Snapshot (Snapshots) +

    +

    Se l'opzione snapshot è abilitata nella configurazione, SnapRAID +utilizza gli snapshot del file system per mantenere stabili i dati letti +durante un'operazione, anche quando i file sui file system live vengono +successivamente modificati o eliminati. +

    La gestione degli snapshot è completamente automatica e trasparente. +È possibile continuare a utilizzare SnapRAID esattamente come prima, con la +protezione aggiuntiva fornita dagli snapshot gestiti interamente in +background. +

    Ciò fornisce due vantaggi primari: +

    +
    +
    +Coerenza +
    +I file modificati sul file system live durante un sync o uno scrub di +lunga durata non causeranno discrepanze di parità o operazioni interrotte, +perché ogni file system con snapshot rimane invariato per l'intera durata +dell'operazione. +
    +
    +
    +
    +Recupero +
    +Se un file viene aggiornato o eliminato dal file system live, +rimane preservato nello snapshot. Se si verifica un guasto al disco +prima dell'esecuzione del sync successivo, SnapRAID utilizza i dati preservati +nello snapshot per ricostruire il disco guasto. +In caso di guasto al disco durante un processo di sync attivo, +SnapRAID è anche in grado di leggere automaticamente sia dallo snapshot +del calcolo della parità precedente che da quello corrente. +Ciò massimizza la probabilità di un recupero completo fornendo +l'accesso agli esatti blocchi di dati richiesti per risolvere +le equazioni di parità, anche se quei blocchi sono stati modificati +o eliminati tra i sync. +Senza snapshot, un file aggiornato o eliminato su un disco integro +comporta la mancanza di blocchi di dati che potrebbero essere richiesti per +ripristinare altri dischi guasti. +
    +
    +
    +

    Gli snapshot vengono creati solo per i dischi dati e solo se il file system +sottostante supporta questa funzionalità. I dischi di parità usano sempre +il file system live. +

    Attualmente, questo è supportato su Btrfs, Bcachefs e ZFS in Linux +e su NTFS in Windows. +

    È possibile combinare dischi dati con file system diversi. Solo quelli che +supportano gli snapshot li utilizzeranno, mentre gli altri dischi continueranno +a operare direttamente sul file system live. +

    La creazione e l'eliminazione degli snapshot richiedono privilegi amministrativi. +Assicurati che SnapRAID sia eseguito con i permessi necessari (es. sudo) +quando gli snapshot sono abilitati. +

    +

    +Comportamento dei comandi con gli snapshot (Command Behavior with Snapshots) +

    +

    I comandi sync e scrub utilizzano snapshot per i dischi dati i cui +file system li supportano. Su un disco con snapshot, il comando vede +un'immagine del file system stabile e non influenzata da modifiche +simultanee sul file system live. +Durante un sync, viene creato un nuovo snapshot in modo indipendente +per ciascun file system dati supportato. Questi snapshot forniscono +collettivamente i dati utilizzati per il calcolo della parità. +Al contrario, il comando scrub utilizza l'ultimo snapshot, quello +creato durante il sync più recente, per mantenere un punto di riferimento affidabile +che corrisponda alla parità esistente. +

    Per i comandi check e fix, l'uso dell'ultimo snapshot +dipende dal fatto che vengano presi di mira dischi specifici utilizzando l'opzione +-d, --filter-disk. +

    Un disco esplicitamente selezionato tramite -d (il "target" dell'operazione) +utilizza sempre il file system live. Per fix, questo consente di ripristinare +i dati sul disco sostitutivo attivo. Per check, consente di simulare +l'operazione fix nelle stesse condizioni. +

    Tutti gli altri dischi dati (i dischi di "riferimento") verranno acceduti tramite +i loro snapshot. Ciò garantisce che anche se si stanno modificando file +sui dischi integri mentre è in corso un recupero, SnapRAID +ha un riferimento stabile e congelato per risolvere le equazioni di parità. +

    Se non viene fornita alcuna opzione -d, SnapRAID assume che l'operazione si applichi +all'intero array; in questo caso, check e fix utilizzeranno esclusivamente +i file system live. +

    Tutti gli altri comandi operano esclusivamente sul file system live. +

    +
    +
    +

    +Ciclo di vita degli snapshot (Snapshots Lifecycle) +

    +

    SnapRAID gestisce tre snapshot specifici, stable, pending e scan, +all'interno di una directory nascosta alla radice di ogni sottovolume dati. +In Btrfs, Bcachefs e NTFS viene utilizzata la directory .snapraid/, +in ZFS quella standard .zfs/snapshot/. +

    Lo snapshot stable rappresenta lo stato dell'ultimo +sync completato con successo, contenente gli esatti dati utilizzati per +computare la parità corrente. Funge da fonte di dati primaria +per i comandi scrub, check e fix. +

    Lo snapshot scan è un'immagine temporanea creata all'inizio +di un sync per fornire uno stato congelato per la scansione e il calcolo della parità. +Dopo la scansione e il salvataggio del nuovo stato del contenuto, sostituisce il precedente +snapshot pending. +

    Lo snapshot pending è l'immagine utilizzata da un sync interrotto. +Al completamento con successo dell'operazione, il precedente snapshot stable +viene eliminato e lo snapshot pending viene promosso per +prendere il suo posto come nuovo riferimento stabile. +

    Se un sync viene interrotto, lo snapshot pending viene preservato. +I successivi comandi scrub, check e fix utilizzeranno questo +snapshot in sospeso poiché corrisponde allo stato del file system registrato nel +file .content, anche se la parità è sincronizzata solo parzialmente. +

    In caso di interruzione del sync, anche i comandi check e fix +leggono dallo snapshot stable per recuperare i blocchi di dati +da file che sono stati aggiornati o eliminati durante il sync. +Ciò è possibile perché il file .content conserva i metadati per +tutti i file modificati o eliminati durante l'intero processo di sync. +Queste informazioni storiche vengono cancellate solo al termine di un sync +avvenuto con successo e quando viene salvata la versione finale del file .content. +

    Se un sync viene riavviato dopo un'interruzione, lo snapshot pending esistente +viene eliminato e ne viene creato uno nuovo per +acquisire lo stato corrente del file system live. +Tuttavia, se un sync viene interrotto, evitare di modificare, eliminare, +sostituire o spostare i file finché un sync successivo non viene completato +con successo. La parità potrebbe ancora contenere blocchi calcolati dallo +snapshot utilizzato dal sync interrotto. Un sync successivo potrebbe sostituire +tale snapshot, rendendo le versioni intermedie dei file non disponibili per il +recupero. +

    +

    +Backup esterni con snapshot del filesystem (External backups with filesystem snapshots) +

    +

    Quando gli snapshot del filesystem sono abilitati, SnapRAID accede o crea +gli snapshot alla radice di ciascun sottovolume, volume o dataset di dati. +

    Un modo semplice per evitare interferenze con gli strumenti esterni consiste +nel far puntare la configurazione data a una sottodirectory ordinaria +all'interno del subvolume o del volume (ad esempio /mnt/subvol/data invece +di /mnt/subvol). SnapRAID crea sempre la directory degli snapshot alla +radice del subvolume (ad esempio /mnt/subvol/.snapraid/), lasciando pulita +la sottodirectory dei dati in modo che gli snapshot rimangano all'esterno +e invisibili agli strumenti di backup che operano al suo interno. +

    Altrimenti, se la directory data configurata è essa stessa la radice del +subvolume o del volume, SnapRAID crea una directory .snapraid/ direttamente +al suo interno (su Btrfs, Bcachefs e NTFS). Sebbene SnapRAID escluda +automaticamente questa directory dalla propria scansione, gli strumenti di +backup esterni o i programmi di sincronizzazione dei file la incontreranno. +Se non viene esclusa, potrebbero entrare negli snapshot o nei collegamenti +di directory e copiare l'intero albero dei dati congelato, duplicando i dati +ed esaurendo lo spazio di archiviazione dei backup. Configurare sempre gli +strumenti di backup esterni in modo da escludere la directory .snapraid/. +

    Su ZFS, gli snapshot sono esposti tramite la directory virtuale standard +.zfs/snapshot/ anziché .snapraid/. Di default (snapdir=hidden), ZFS +nasconde questa directory dall'elenco delle directory, quindi gli strumenti +di backup esterni non la attraverseranno. Se è stato abilitato +snapdir=visible, assicurarsi che gli strumenti di backup escludano la +directory .zfs/. +

    +
    +
    +

    Pattern

    I pattern offrono un modo flessibile per filtrare i file da includere o @@ -1924,25 +2132,26 @@ punto interrogativo, non attraversa mai i confini delle directory. Si ferma allo slash in avanti, rendendolo adatto per la corrispondenza all'interno di un singolo componente del percorso. Questo è il comportamento standard dei wildcard familiare dal globbing della shell. -

    Il doppio asterisco ** è più potente, corrisponde a qualsiasi sequenza di -caratteri inclusi i separatori di directory. Ciò consente ai pattern di corrispondere -attraverso più livelli di directory. Quando ** appare inserito direttamente in -un pattern, può corrispondere a zero o più caratteri inclusi gli slash tra -il testo letterale circostante. -

    L'uso più importante di ** è nella forma speciale /**/. Questa corrisponde a -zero o più livelli di directory completi, rendendo possibile la corrispondenza di file -a qualsiasi profondità in un albero di directory senza conoscere l'esatta struttura del percorso. -Per esempio, il pattern src/**/main.js corrisponde a src/main.js (saltando -zero directory), src/ui/main.js (saltando una directory), e -src/ui/components/main.js (saltando due directory). +

    Il carattere jolly doppio asterisco ** corrisponde attraverso i separatori +di directory solo quando è adiacente a un separatore di directory (preceduto +o seguito da uno slash). In questa forma, corrisponde a zero o più caratteri +attraverso i livelli di directory. Per esempio, foo/**/bar corrisponde a +foo/bar, foo/a/bar e foo/a/b/bar; **/build corrisponde a build e +foo/bar/build; e src/**.js corrisponde a src/main.js e +src/ui/components/main.js. +La forma autonoma /**/ non è accettata come pattern completo. +

    Quando ** non è adiacente a uno slash, si comporta come * e non +corrisponde ai separatori di directory. Per esempio, **.jpg corrisponde a +photo.jpg nella directory corrente, ma non corrisponde a dir/photo.jpg. +Usa **/*.jpg per questo scopo.

    Le classi di caratteri che usano le parentesi quadre [] corrispondono a un singolo carattere da un set o intervallo specificato. Come gli altri pattern a carattere singolo, esse non corrispondono ai separatori di directory. Le classi supportano intervalli e la negazione usando un punto esclamativo.

    La distinzione fondamentale da ricordare è che *, ? e le classi di caratteri rispettano tutti i confini delle directory e corrispondono solo all'interno di un singolo -componente del percorso, mentre ** è l'unico pattern che può corrispondere attraverso -i separatori di directory. +componente del percorso, mentre ** può corrispondere attraverso i separatori di directory +solo quando è adiacente a uno slash.

    Esistono quattro diversi tipi di pattern:

    @@ -2035,6 +2244,26 @@ include /movies/ include /musics/ include /pictures/ +

    Si noti che l'esclusione di una directory (utilizzando DIR/ o /PATH/DIR/) +impedisce a SnapRAID di entrare e scansionare quella directory. +Pertanto, non è possibile re-includere un file o una sottodirectory +all'interno di una cartella genitore esclusa, poiché il suo contenuto +non viene mai scansionato. +

    Ad esempio, la seguente configurazione NON includerà file.dat perché +/keep/ viene saltata prima che file.dat possa essere esaminato: +

    +# NON funziona: /keep/ viene saltata completamente
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Per escludere i file all'interno di una cartella mantenendone alcuni +specifici, specificare il pattern dei file anziché escludere la directory +stessa: +

    +# Funziona: /keep/ viene attraversata, ma gli altri file sono esclusi
    +include /keep/file.dat
    +exclude /keep/*
    +

    Sulla riga di comando, utilizzando l'opzione -f, è possibile utilizzare solo pattern include. Ad esempio:

    @@ -2047,8 +2276,8 @@ snapraid -f "*.mp3" check
     comando, è necessario citarli per impedire alla shell di espanderli.
     

    -

    -Ignore File +

    +File da ignorare (Ignore File)

    In aggiunta alle regole globali nel file di configurazione, è possibile inserire file .snapraidignore in qualsiasi directory all'interno dell'array @@ -2059,7 +2288,7 @@ essere utilizzate per escludere file che erano stati precedentemente inclusi dal configurazione globale. In pratica, se una regola locale corrisponde, il file viene escluso indipendentemente dalle impostazioni di inclusione globali.

    La logica dei pattern in .snapraidignore rispecchia la configurazione globale -ma ancora i pattern alla directory in cui si trova il file: +ma vincola i pattern alla directory in cui si trova il file:

    @@ -2113,18 +2342,20 @@ build/
    -

    -Content +

    +Contenuto (Content)

    SnapRAID memorizza l'elenco e i checksum dei file nel file di contenuto.

    È un file binario che elenca tutti i file presenti nell'array di dischi, insieme a tutti i checksum per verificarne l'integrità. -

    Questo file viene letto e scritto dai comandi sync e scrub e -letto dai comandi fix, check e status. +

    Il file di contenuto viene letto e scritto dai comandi sync, scrub, +touch e rehash. Viene letto dai comandi status, diff, check, +fix, list, dup, locate e pool, e viene completamente ignorato +dai comandi smart, probe, up, down e devices.

    -

    -Parity +

    +Parità (Parity)

    SnapRAID memorizza le informazioni di parità dell'array nei file di parità. @@ -2134,8 +2365,8 @@ blocchi definiti nel file content. solo letti dai comandi scrub e check.

    -

    -Codifica +

    +Codifica (Encoding)

    SnapRAID in Unix ignora qualsiasi codifica. Legge e memorizza i nomi dei file con la stessa codifica utilizzata dal file system. @@ -2150,10 +2381,272 @@ reindirizza l'output della console a un file, il file risultante è sempre in formato UTF-8.

    -

    -Vedi Anche +

    +Codice di uscita (Exit Code)

    -

    snapraid_log(1), snapraidd(1) +

    SnapRAID termina con i seguenti codici di errore: +

    +
    +
    +0 +
    +Tutto OK. +
    +
    +
    +
    +1 +
    +Il comando ha riscontrato alcuni errori. +
    +
    +
    +
    +2 +
    +Il comando diff ha rilevato che tutto è OK, ma è necessario un sync. +
    +
    +
    +
    +3 +
    +Un comando di gestione dischi (probe, smart, devices, up, +down) è stato completato, ma almeno un filesystem è in modalità +degradata con dispositivi mancanti. +
    +
    +
    +
    +
    +

    +Problemi noti (Known Issues) +

    +
    +

    +Limiti del filesystem +

    +

    SnapRAID non attraversa i confini di filesystem, punti di mount o subvolume +durante la scansione di un disco dati. Quando viene rilevato un tale confine, +SnapRAID segnala un WARNING e non prosegue la scansione al suo interno. +

    I file che si trovano oltre tali confini non sono inclusi nel disco dati e +devono essere configurati separatamente se devono essere protetti. +

    +
    +

    +Punti di mount con snapshot del filesystem +

    +

    Quando le snapshot del filesystem sono abilitate, i punti di mount annidati +e i bind mount all'interno di un disco dati non sono supportati. +

    I punti di mount fanno parte del namespace di mount del sistema in esecuzione +e non vengono preservati nelle snapshot del filesystem. Di conseguenza, +durante la scansione di una snapshot, una directory nascosta da un punto di +mount nel filesystem live potrebbe diventare visibile. +

    Non inserire punti di mount annidati o bind mount all'interno dei dischi dati +quando le snapshot del filesystem sono abilitate. +

    +
    +

    +Configurazioni multiple con snapshot del filesystem +

    +

    Il supporto per gli snapshot non può essere condiviso in sicurezza da +più configurazioni SnapRAID indipendenti che utilizzano lo stesso +namespace di snapshot del filesystem. +

    Su Btrfs e Bcachefs, una sola configurazione SnapRAID con supporto snapshot +abilitato può utilizzare directory dati all'interno dello stesso subvolume. +Su ZFS, la stessa restrizione si applica a un dataset, e su NTFS a un volume. +

    Le configurazioni multiple che condividono lo stesso namespace di snapshot +utilizzano gli stessi snapshot stable, pending e scan. L'esecuzione di +una configurazione può quindi sostituire o eliminare gli snapshot di +ripristino richiesti da un'altra. +

    +
    +

    +Modifiche ai file sul posto senza variazione di data/ora +

    +

    SnapRAID rileva le modifiche ai file confrontando le dimensioni dei file e +i timestamp di modifica (mtime). +

    Se un'applicazione modifica un file in-place senza alterarne la dimensione +o aggiornarne il timestamp di modifica, "diff" e "sync" non rileveranno che +il file è cambiato e la sua parità non verrà aggiornata. +

    Per garantire che SnapRAID riconosca tali modifiche, aggiornare il timestamp +di modifica del file (ad esempio con l'utilità "touch"). Altrimenti, la +differenza verrà rilevata solo come mancata corrispondenza dell'hash durante +un successivo "scrub" o "check". +

    +
    +

    +Corrispondenza maiuscole/minuscole non ASCII in Windows +

    +

    SnapRAID utilizza la codifica UTF-8 standard e prevedibile su tutte le +piattaforme, limitando la corrispondenza senza distinzione tra maiuscole e +minuscole ai caratteri ASCII. +

    I filesystem di Windows soffrono della scelta progettuale obsoleta di imporre +l'insensibilità al maiuscolo/minuscolo sui nomi di file Unicode tramite tabelle +di conversione arbitrarie e dipendenti dal sistema. Di conseguenza, Windows +maschera la realtà del filesystem trattando sequenze di byte Unicode +completamente diverse come se fossero lo stesso file. +

    Ad esempio, À.txt e à.txt sono nomi Unicode distinti, eppure Windows +illogicamente li tratta come identici, mentre SnapRAID ne preserva la reale +distinzione. +

    Questa limitazione è causata dalla gestione incoerente dei nomi di file Unicode +da parte di Windows e dalla sua insistenza nell'applicare alias insensibili al +maiuscolo/minuscolo. Per prevenire discrepanze dovute alla conversione del +maiuscolo/minuscolo di Windows, specificare sempre l'esatta combinazione di +maiuscole/minuscole per qualsiasi carattere non ASCII nei percorsi di +configurazione e nei filtri. +

    +
    +

    +Recupero con fix parziale +

    +

    Quando fix viene limitato usando -S, --start o -B, --count, +SnapRAID opera solo sui blocchi selezionati e non esegue la +finalizzazione a livello di file né la quarantena. +

    Se il recupero produce dati "best-effort" che non possono essere provati +come rappresentativi del contenuto corrente, tali blocchi potrebbero +comunque essere scritti con il normale nome di file. L'incertezza associata +a questi blocchi recuperati non persiste dopo il termine del comando. +

    Di conseguenza, un successivo fix tratterà questi blocchi leggibili come +dati di file validi e non tenterà di recuperarli nuovamente. Ciò può far sì +che un recupero successivo segnali il successo pur lasciando nel file dati +incompleti o obsoleti. +

    Le opzioni -S e -B sono destinate esclusivamente al recupero manuale +avanzato, tipicamente dopo che un normale fix è fallito. Se un fix +parziale segnala dati irrecuperabili, rimuovere o rinominare i file interessati +prima di tentare un altro recupero, oppure verificarne manualmente il contenuto. +

    +
    +

    +Hard link NTFS e percorsi esclusi +

    +

    Su NTFS, le voci di directory memorizzano nella cache la dimensione del +file e i timestamp in modo indipendente per ciascun hard link. Quando un +file viene modificato tramite un link, le voci di directory degli altri link +che puntano allo stesso file possono mantenere metadati obsoleti finché non +vengono consultate. +

    SnapRAID rileva e normalizza automaticamente questa condizione ogni volta +che incontra almeno due hard link allo stesso file durante una scansione. +Tuttavia, se viene scansionato un solo hard link mentre gli altri sono +esclusi dai filtri o risiedono all'esterno del percorso del disco dati, +SnapRAID non può rilevare la collisione di inode e si affida ai metadati +nella cache dell'unico link visibile. +

    Di conseguenza, le modifiche apportate tramite un hard link escluso o +esterno potrebbero non essere notate da SnapRAID finché i metadati del +link incluso non vengono aggiornati dal sistema operativo (ad esempio +quando il file viene consultato o aperto tramite tale percorso). +

    Per evitare questa limitazione, evitare di modificare i file protetti +tramite hard link esclusi da SnapRAID, oppure assicurarsi che tutti gli +hard link a un file siano inclusi nella scansione in modo che SnapRAID +possa normalizzarli. +

    +
    +

    +Recupero dopo un sync a parità multipla interrotto +

    +

    In un array con più dischi di parità, un sync interrotto può lasciare +i livelli di parità temporaneamente disallineati tra loro. Ad esempio, +la parità 1 potrebbe già contenere i dati appena aggiornati, mentre la +parità 2 contiene ancora i vecchi dati. +

    Durante check o fix, SnapRAID prova diverse combinazioni di parità +e convalida i dati ricostruiti rispetto agli hash dei blocchi noti +(che coprono l'intero blocco, tipicamente 256 KiB). +

    Se SnapRAID tenta una ricostruzione utilizzando una combinazione +incoerente di parità vecchia e nuova, le equazioni lineari del RAID +produrranno dati errati. Affinché questa combinazione non valida venga +accettata erroneamente, le equazioni dovrebbero accidentalmente +ricostruire almeno un blocco completo da 256 KiB in modo così perfetto +da far corrispondere il suo hash, mentre altri blocchi non sincronizzati +nella stessa stripe vengono ricostruiti con dati errati. +

    Questo scenario non dipende da una collisione di hash; piuttosto, le +equazioni di parità mista dovrebbero produrre casualmente l'esatto +contenuto originale del blocco da 256 KiB. Sebbene matematicamente +possibile con dati appositamente creati o fortemente ripetitivi, è +praticamente impossibile con dati reali. +

    Se tutti i dischi sono integri, completare il sync interrotto prima +di apportare ulteriori modifiche rimuove questa ambiguità. Se un disco +si è guastato ed è necessario il recupero, evitare di modificare i dischi +dati prima di eseguire check o fix. +

    +
    +

    +Nomi di file e directory riservati +

    +

    SnapRAID riserva alcuni nomi di file, directory e snapshot per le proprie +operazioni interne. Non usare questi nomi per i dati utente: +

    +
    +
    +.snapraidignore +
    +File locale delle regole di esclusione. +
    +
    +
    +
    +.snapraid +
    +Directory contenitore degli snapshot. +
    +
    +
    +
    +snapraid-* +
    +Nomi degli snapshot ZFS gestiti da SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +File danneggiati messi in quarantena durante il ripristino. +
    +
    +
    +
    +CONTENT.tmp +
    +File temporaneo per gli aggiornamenti del content. +
    +
    +
    +
    +CONTENT.lock +
    +File di blocco per il content. +
    +
    +
    +
    +PARITY.spaceholder +
    +File segnaposto temporaneo durante l'allocazione +della parità su Windows. +
    +
    +
    +

    L'uso di questi nomi per dati non correlati può causare l'ignoramento, +l'errata interpretazione come metadati, la sovrascrittura, la ridenominazione +o l'eliminazione di file o snapshot. +

    Su Windows, tutte le varianti di maiuscole e minuscole sono anch'esse +riservate, anche nelle directory NTFS configurate per il funzionamento con +distinzione tra maiuscole e minuscole (ad esempio, .SNAPRAIDIGNORE, +.SnapRaid, CONTENT.TMP e CONTENT.Lock). +

    +
    +
    +

    +Traduzione (Translation) +

    +

    Questo documento è una traduzione automatica del manuale in inglese. +Fare riferimento al manuale in inglese per la versione ufficiale. +

    +
    +

    +Vedi anche (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-ja.html b/manual-ja.html index cf0b5f8f..d241a5ad 100644 --- a/manual-ja.html +++ b/manual-ja.html @@ -114,7 +114,7 @@

    -Synopsis +概要 (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Description +説明 (Description)

    SnapRAIDは、ディスクアレイ用のバックアッププログラムで、最大6台のディスク障害が発生した場合の データ復旧のためにパリティ情報を保存します。 @@ -185,19 +185,35 @@ SnapRAIDはデータをロックしません。いつでも再フォーマット

    -Limitations +制限事項 (Limitations)

    SnapRAIDはRAIDとバックアッププログラムのハイブリッドであり、両方の利点を組み合わせることを -目指しています。ただし、使用する前に考慮すべきいくつかの制限があります。 -

    主な制限は、ディスクが故障し、最近 sync を実行していない場合、完全に復旧できない -可能性があることです。 -より具体的には、最後の sync 操作以降に変更または削除されたファイルのサイズまでのデータが -復旧できない可能性があります。 -これは、変更または削除されたファイルが故障したディスク上にない場合でも発生します。 -このため、SnapRAIDは**めったに変更されない**データに適しています。 -

    一方で、新しく追加されたファイルは、既に存在するファイルの復旧を妨げません。 -新しく追加されたファイルが故障したディスク上にある場合にのみ、それらのファイルが失われます。 -

    その他のSnapRAIDの制限は次のとおりです。 +目指しています。ただし、使用する前に考慮すべきいくつかの制限事項があります。 +

    主な制限事項は、ディスクが故障した場合、最後の sync(同期)処理の状態までしか +データを復元できないことです。最後の同期以降に追加されたデータや、故障したディスク上で行われた +変更はすべて失われます。 +

    そのため、SnapRAIDは主にデータの変更がほとんどない環境に適しています。 +

    最後の同期時にすでに存在していたデータについて、復元の信頼性は snapshot(スナップショット) +オプションが使用されているかどうかによって異なります。 +

      +
    • +スナップショットサポートがある場合(Btrfs、ZFS、Bcachefs、およびNTFSで利用可能): +SnapRAIDはサポートされている各データファイルシステムの独立した凍結されたリファレンスを +自動的に維持できます。 +これにより、同期中または同期後にライブファイルシステム上のファイルを変更または削除した場合でも、 +復元プロセスの整合性と信頼性が保たれます。 +
    • +
    +
      +
    • +スナップショットサポートがない場合: +sync 後にファイルを削除または変更すると、他の故障したディスクの完全な復元が妨げられる +可能性があります。これは、変更されたファイルが故障したディスク上にない場合でも、 +パリティが変更後のファイルと一致しなくなるために発生します。一方で、新しく追加されたファイルが +すでに存在するファイルの復元を妨げることはありません。 +
    • +
    +

    その他のSnapRAIDの制限は次のとおりです。

    • SnapRAIDでは、各ディスクに対して**個別のファイルシステム**が保持されます。 @@ -223,7 +239,7 @@ SnapRAIDは**限られた数のディスク障害**からのみデータを復

    -Getting Started +はじめに (Getting Started)

    SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを parity 情報専用に 選択する必要があります。パリティ用に1つのディスクを使用すると、RAID5と同様に、単一のディスク障害から @@ -290,7 +306,7 @@ snapraid sync 更新できます。

    -Scrubbing +スクラブ (Scrubbing)

    データとパリティのエラーを定期的にチェックするには、scrub コマンドを 実行できます。 @@ -331,11 +347,11 @@ snapraid -p bad scrub

    -Pooling +プーリング (Pooling)

    注: ここで説明するプーリング機能は、**mergerfs** ツールに取って代わられました。 mergerfs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。 -Mergefs は、複数のドライブを単一の統合されたマウントポイントにプールするための、 +Mergerfs は、複数のドライブを単一の統合されたマウントポイントにプールするための、 より柔軟で効率的な方法を提供し、シンボリックリンクに頼ることなくアレイ全体の ファイルにシームレスにアクセスできます。これは、パリティ保護のためにSnapRAIDと うまく統合されており、OpenMediaVault (OMV) やカスタムNAS構成などのセットアップで @@ -404,7 +420,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +削除取り消し (Undeleting)

    SnapRAIDはRAIDシステムよりもバックアッププログラムのように機能し、 -f, --filter オプションを使用してファイルを以前の状態に復元または削除解除するために @@ -429,7 +445,7 @@ snapraid fix -m

    -Recovering +回復 (Recovering)

    最悪の事態が発生し、1台以上のディスクを失いました!

    **パニックにならないでください!** 復旧できます! @@ -514,27 +530,27 @@ snapraid sync

    -Commands +コマンド (Commands)

    -

    SnapRAIDは、次のことを可能にするいくつかの簡単なコマンドを提供します。 +

    SnapRAIDは、以下の操作を行ういくつかのシンプルなコマンドを提供します。

    • -アレイの状態の概要を出力 -> status +アレイの状態を表示する -> status
    • -ディスクの制御 -> smart、probe、up、down +ディスクを制御する -> smart、probe、up、down
    • -バックアップ/スナップショットの作成 -> sync +バックアップ/復元ポイントを作成する -> sync
    • -データの定期的なチェック -> scrub +データを定期的にチェックする -> scrub
    • -最後のバックアップ/スナップショットの復元 -> fix。 +最後のバックアップ/復元ポイントを復元する -> fix
    -

    コマンドは**小文字**で記述する必要があります。 +

    コマンドは小文字で入力する必要があります。

    status @@ -699,9 +715,10 @@ updated
    moved
    -同じディスク上の異なるディレクトリに移動されたファイル。 -同じ名前、サイズ、タイムスタンプ、およびinodeを持ちますが、ディレクトリが -異なることで識別されます。 +同じinodeを保持したまま、同じディスク上で移動または +名前変更されたファイル。同じinode、サイズ、およびタイムスタンプを +持ちますが、パスが異なることで識別されます。ファイル名が異なって +いても構いません。

    @@ -720,14 +737,12 @@ copied
    relocated
    -オリジナルが消失した、同じディスクまたは別のディ -スクに移動されたファイル。 -これらは、同じ名前、サイズ、およびタイムスタンプを持つこと -によって識別されます。 -サブ秒のタイムスタンプがゼロの場合、識別するにはフルパスが -一致する必要があります。 -同じディスク上の 'moved' ファイルとは異なり、再配置された -ファイルは異なる inode を持ちます。 +元のファイルが消失し、inodeが保持されていない、 +別のディレクトリまたはディスクに移動されたファイル。 +これらは、同じ名前、サイズ、およびタイムスタンプを持つことに +よって識別されます。サブ秒のタイムスタンプがゼロの場合、 +識別するにはフルパスが一致する必要があります。'moved' ファイルとは +異なり、再配置されたファイルはファイル名が同一である必要があります。
    @@ -815,12 +830,12 @@ full - すべてをスクラブします。

    fix

    -

    すべてのファイルとパリティデータを修正します。 -

    すべてのファイルとパリティデータは、最後の sync で保存されたスナップショット状態と -比較されます。 -違いが見つかった場合、保存されたスナップショットに**元に戻されます**。 -

    **警告!** fix コマンドは、エラーと意図的な変更を区別しません。 -ファイルの_状態を_最後の sync に**無条件に元に戻します**。 +

    すべてのファイルとパリティデータを修復(復元)します。 +

    すべてのファイルとパリティデータが、最後の sync で保存された状態と比較されます。 +差異が見つかった場合、保存されていた状態に巻き戻されます。 +

    警告! +fix コマンドは、エラーと意図的な変更を区別しません。 +ファイルの変更状態を無条件で最後の sync の状態に戻します。

    他のオプションが指定されていない場合、アレイ全体が処理されます。 フィルタオプションを使用して、操作するファイルまたはディスクのサブセットを 選択します。 @@ -965,7 +980,7 @@ locate

    -Options +オプション (Options)

    SnapRAIDには、次のオプションがあります。

    @@ -1143,7 +1158,7 @@ DAYS は、ブロックがスクラブされるための最小経過日数であ
    --t, --tail サイズ +-t, --tail SIZE
    ファイルリストを、パリティディスクの指定された末尾サイズ以下を 使用しているものに制限します。 @@ -1282,7 +1297,7 @@ SnapRAIDが一部のディスクがUUIDを変更したことを検出した場
    --W, --force-realloc-tail サイズ +-W, --force-realloc-tail SIZE
    -R, --force-realloc と同様に動作しますが、各パリティファイルの 指定された末尾部分(最後の「サイズ」バイト)に制限されます。 @@ -1349,7 +1364,8 @@ locate -t, --tail を使用して、影響を受けるファイルを事前に 指定されたブロック番号から処理を開始します。 これは、破損したディスクの場合に特定のブロックを再試行してチェックまたは修正するのに 役立ちます。 -このオプションは、主に高度な手動復旧を目的としています。 +このオプションは、主に高度な手動復旧を目的としており、check と fix でのみ +サポートされています。
    @@ -1359,7 +1375,8 @@ locate -t, --tail を使用して、影響を受けるファイルを事前に -B, --count BLKCOUNT
    指定された数のブロックのみを処理します。 -このオプションは、主に高度な手動復旧を目的としています。 +このオプションは、主に高度な手動復旧を目的としており、check と fix でのみ +サポートされています。
    @@ -1420,7 +1437,7 @@ locate -t, --tail を使用して、影響を受けるファイルを事前に

    -Configuration +設定 (Configuration)

    SnapRAIDは、ディスクアレイの場所とパリティ情報の保存場所を知るために、構成ファイルを 必要とします。 @@ -1510,6 +1527,10 @@ data NAME DIR NAME はディスクを識別するために使用され、**一意である**必要があります。 DIR はファイルシステム内のディスクの**マウントポイント**です。

    NAME を固定したままにしておけば、必要に応じてマウントポイントを変更できます。 +

    ただし、設定されたパスは常に同じ基礎データに解決される必要があります。 +パスにシンボリックリンクが含まれている場合、そのリンク先は固定されている +必要があります。シンボリックリンクの参照先を変更して実行時にデータ +ディレクトリを切り替えることはサポートされていません。

    アレイ内のデータディスクごとに1つのオプションを使用する必要があります。

    構成ファイルで直接 NAME を変更してから sync コマンドを実行することで、 後でディスクの名前を変更できます。 @@ -1528,6 +1549,26 @@ extra NAME DIR

    +snapshot +

    +

    sync、scrub、check、および fix コマンドでファイルシステムスナップショットの +使用を有効にします。 +

    有効にすると、SnapRAIDは sync の開始時にサポートされている各データファイルシステムの +読み取り専用スナップショットを作成します。これにより各ファイルシステムの安定したビューが +提供され、後からの変更によってパリティ計算に使用されるデータが変わるのを防ぎます。 +

    これにより復元が大幅に向上します。ライブファイルシステムからファイルが削除されても、 +スナップショット内に保存され続けます。これにより、そのブロックのパリティが「破損」するのを防ぎ、 +別のディスクが故障した場合でもデータを正常に復元できるようになります。 +

    このオプションは、LinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでフォーマットされた +データディスクにのみ適用されます。 +パリティディスク、または他のファイルシステムを使用しているデータディスクは、常にファイルシステムの +ライブバージョンを使用します。 +

    スナップショットの作成と削除には管理者権限が必要です。 +このオプションが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。 +

    スナップショットのライフサイクルの詳細な説明については、SNAPSHOTSのセクションを参照してください。 +

    +
    +

    nohidden

    すべての隠しファイルとディレクトリを除外します。 @@ -1535,7 +1576,7 @@ Unixでは、隠しファイルは . で始まるファイルです。 Windowsでは、隠し属性を持つファイルです。

    -

    +

    exclude/include PATTERN

    syncプロセスで除外または含めるファイルまたはディレクトリのパターンを定義します。 @@ -1544,11 +1585,14 @@ exclude/include PATTERN include の場合、ファイルは含まれます。 パターンが一致しない場合、最後に指定されたパターンが include の場合はファイルは除外され、 exclude の場合は含まれます。 +

    フィルタリングはディレクトリの走査時に階層的に実行されることに注意してください。 +ディレクトリが exclude ルールに一致した場合、そのディレクトリ全体がスキップ(プルーニング)され、 +その内部にあるファイルやサブディレクトリに対する include ルールは評価されません。

    パターン仕様の詳細については、PATTERNセクションを参照してください。

    このオプションは複数回使用できます。

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    パリティの基本ブロックサイズをキビバイト単位で定義します。 @@ -1585,7 +1629,7 @@ mkfs.ext4 -m 0 -T largefile4 DEVICE 浪費スペースなしで各データディスクで約460,000ファイルが可能になります。

    -

    +

    hashsize SIZE_IN_BYTES

    保存されたブロックのハッシュサイズをバイト単位で定義します。 @@ -1595,28 +1639,28 @@ hashsize SIZE_IN_BYTES

    異なるハッシュサイズを使用する理由の1つは、システムのメモリが制限されている場合です。 経験則として、SnapRAIDは通常、アレイ内のデータ16 TBごとに1 GiBのRAMを必要とします。

    具体的には、データのハッシュを保存するために、SnapRAIDは -約 $TS \cdot (1 + HS) / BS$ バイトのRAMを必要とします。 +約 TS*(1+HS)/BS バイトのRAMを必要とします。 ここで、TSはディスクアレイの合計サイズ(バイト)、BSはブロックサイズ(バイト)、HSはハッシュサイズ(バイト)です。

    たとえば、4 TBのディスク8台、ブロックサイズ256 KiB(1 KiB = 1024バイト)、 ハッシュサイズ16の場合:

    -RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (256 \cdot 2^{10}) = 1.93 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
     

    ハッシュサイズを8に切り替えると:

    -RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (256 \cdot 2^{10}) = 1.02 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
     

    ブロックサイズを512に切り替えると:

    -RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (512 \cdot 2^{10}) = 0.96 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
     

    ハッシュサイズを8、ブロックサイズを512の両方に切り替えると:

    -RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (512 \cdot 2^{10}) = 0.51 \text{ GiB}$
    +RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
     
    -

    +

    autosave SIZE_IN_GIGABYTES

    処理された指定されたGB量後に、同期またはスクラビング時に状態を自動的に保存します。 @@ -1624,7 +1668,7 @@ autosave SIZE_IN_GIGABYTES 長い sync コマンドを最初から再起動するのを避けるのに役立ちます。

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    許容される最大ディスク温度を摂氏で設定します。指定されている場合、 @@ -1650,14 +1694,14 @@ SnapRAIDの動作には影響しません。プログラムの動作は、実際 すべてのディスクの温度を表示するには、-A または --stats オプションを使用します。

    -

    +

    temp_sleep TIME_IN_MINUTES

    温度制限に達したときのスタンバイ時間(分単位)を設定します。この期間中、ディスクは スピンダウンしたままです。デフォルトは5分です。

    -

    +

    pool DIR

    pool コマンドを使用してディスクアレイの仮想ビューが作成されるプーリングディレクトリを @@ -1665,7 +1709,7 @@ pool DIR

    ディレクトリは既に存在している必要があります。

    -

    +

    share UNC_DIR

    ディスクにリモートでアクセスするために必要なWindows UNCパスを定義します。 @@ -1678,7 +1722,7 @@ share UNC_DIR

    このオプションはWindowsでのみ必要です。

    -

    +

    smartctl DISK/PARITY OPTIONS...

    各ディスクのSMART属性を取得するためのカスタムsmartctlオプションを定義します。 @@ -1691,6 +1735,8 @@ PARITY はパリティ名のいずれかです:parity、2-parity

    指定された OPTIONS で、%s 文字列はデバイス名に置き換えられます。 RAIDコントローラーの場合、デバイスは固定されている可能性が高いため、 %s を使用する必要はないかもしれません。 +

    デフォルトの -a オプションを置き換えるために、[info: ...] タグを使用して +カスタム情報オプション文字列を指定することもできます。

    使用可能なオプションについては、smartmontoolsのドキュメントを参照してください。

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1698,11 +1744,12 @@ RAIDコントローラーの場合、デバイスは固定されている可能
     

    例:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    ディスク障害の確率を計算するときに、指定されたSMART属性を無視します。 @@ -1712,18 +1759,23 @@ smartignore DISK/PARITY ATTR [ATTR...] PARITY はパリティ名のいずれかです:parity、2-parity、3-parity、 4-parity、5-parity、6-parity、または z-parity。 特殊な値 * は、すべてのディスクで属性を無視するために使用できます。 -

    例として、すべてのディスクで Current Pending Sector Count 属性を無視するには: +

    複数の属性をスペースで区切って指定できます。 +各属性は1から255までの数値、または大文字と小文字を区别しない名前 +(例: Current_Pending_Sector)として指定できます。 +

    例として、すべてのディスクで Current Pending Sector Count と +Reallocated Sectors Count 属性を番号または名前で無視するには:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     

    最初のパリティディスクでのみ無視するには:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    -Examples +

    +例 (Examples)

    Unixの一般的な構成の例は次のとおりです。

    @@ -1735,7 +1787,7 @@ data d2 /mnt/disk2/
     data d3 /mnt/disk3/
     exclude /lost+found/
     exclude /tmp/
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/sg0
     smartctl 2-parity -d areca,2/1 /dev/sg0
    @@ -1751,7 +1803,7 @@ data d3 I:\array\
     exclude Thumbs.db
     exclude \$RECYCLE.BIN
     exclude \System Volume Information
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/arcmsr0
     smartctl 2-parity -d areca,2/1 /dev/arcmsr0
    @@ -1760,7 +1812,148 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0
     

    -Pattern +スナップショット (Snapshots) +

    +

    設定でスナップショットオプションが有効になっている場合、SnapRAIDは +ファイルシステムのスナップショットを使用して、操作中に読み取られるデータを安定に保ちます。 +これは、ライブファイルシステム上のファイルが後から変更または削除された場合でも同様です。 +

    スナップショットの管理は完全に自動かつ透過的です。 +バックグラウンドで完全に処理されるスナップショットによる追加の保護を受けながら、 +これまでとまったく同じようにSnapRAIDを使用し続けることができます。 +

    これには主に2つのメリットがあります。 +

    +
    +
    +整合性 +
    +長時間かかるsyncやscrubの実行中にライブファイルシステム上でファイルが変更されても、 +スナップショットされた各ファイルシステムは操作中変更されないため、 +パリティの不一致や処理の中断は発生しません。 +
    +
    +
    +
    +復元 +
    +ライブファイルシステムからファイルが更新または削除されても、スナップショット内に保存され続けます。 +次のsyncが実行される前にディスク故障が発生した場合、SnapRAIDはスナップショットに保存されている +データを使用して、故障したディスクを再構築します。 +アクティブなsync処理中にディスクが故障した場合、SnapRAIDは前のパリティ計算の +スナップショットと現在のスナップショットの両方から自動的に読み取ることも可能です。 +これにより、同期の間にブロックが変更または削除されていた場合でも、パリティ方程式を解くために +必要な正確なデータブロックへのアクセスが提供され、完全な復元の可能性が最大化されます。 +スナップショットがない場合、正常なディスク上の更新または削除されたファイルはデータブロックの欠損を +招き、他の故障したディスクを修復するために必要となるブロックが失われる可能性があります。 +
    +
    +
    +

    スナップショットはデータディスクに対してのみ、かつ基礎となるファイルシステムがその機能をサポートして +いる場合にのみ作成されます。パリティディスクは常にライブファイルシステムを使用します。 +

    現在、これはLinuxのBtrfs、Bcachefs、ZFS、およびWindowsのNTFSでサポートされています。 +

    異なるファイルシステムを持つデータディスクを混在させることができます。スナップショットをサポートして +いるディスクのみがそれを利用し、他のディスクはライブファイルシステム上で直接動作し続けます。 +

    スナップショットの作成と削除には管理者権限が必要です。 +スナップショットが有効な場合は、SnapRAIDが必要な権限(例:sudo)で実行されていることを確認してください。 +

    +

    +スナップショット使用時のコマンドの挙動 (Command Behavior with Snapshots) +

    +

    sync および scrub コマンドは、ファイルシステムがサポートしているデータディスクに対して +スナップショットを使用します。スナップショットされたディスクでは、コマンドはライブファイルシステムへの +同時変更の影響を受けない安定したファイルシステムイメージを参照します。 +sync の実行中、サポートされている各データファイルシステムに対して独立して新しいスナップショットが +作成されます。これらのスナップショットは全体としてパリティ計算に使用されるデータを提供します。 +対照的に、scrub コマンドは、既存のパリティと一致する信頼できる参照ポイントを維持するために、 +最も直近の同期中に作成された最後のスナップショットを利用します。 +

    check および fix コマンドの場合、最後のスナップショットの使用は、 +-d, --filter-disk オプションを使用して特定のディスクがターゲットに指定されているかどうかによって異なります。 +

    +
    +
    +-d を介して明示的に選択されたディスク(操作の「ターゲット」)は、常にライブファイルシステムを使用します。 +
    +
    +
    +
    +

    fix の場合、これによりアクティブな交換ディスクにデータを復元できます。 +check の場合、同じ条件下で fix 操作をシミュレートできます。 +

    他のすべてのデータディスク(「参照」ディスク)は、それぞれのスナップショットを介してアクセスされます。 +これにより、復旧の進行中に正常なディスク上のファイルを変更している場合でも、SnapRAIDは +パリティ方程式を解くための安定した凍結された参照を持つことができます。 +

    +
    +
    +-d オプションが指定されていない場合、SnapRAIDは操作がアレイ全体に適用されると想定します。 +
    +
    +
    +
    +

    この場合、check と fix はライブファイルシステムのみを排他的に使用します。 +

    他のすべてのコマンドは、ライブファイルシステム上でのみ動作します。 +

    +
    +
    +

    +スナップショットのライフサイクル (Snapshots Lifecycle) +

    +

    SnapRAIDは、各データサブボリュームのルートにある隠しディレクトリ内で、 +stable(安定)、pending(保留)、および scan(スキャン)という3つの特定のスナップショットを管理します。 +Btrfs、Bcachefs、およびNTFSでは .snapraid/ ディレクトリが使用され、 +ZFSでは標準の .zfs/snapshot/ が使用されます。 +

    stable スナップショットは、最後に正常に完了した sync の状態を表し、 +現在のパリティの計算に使用された正確なデータを含んでいます。これは、 +scrub、check、および fix コマンドの主要なデータソースとして機能します。 +

    scan スナップショットは、スキャンとパリティ計算のための凍結された状態を提供するために、 +sync の開始時に作成される一時的なイメージです。 +スキャンを実行し、新しいコンテンツ状態を保存した後、以前の pending スナップショットを置き換えます。 +

    pending スナップショットは、中断された sync によって使用されるイメージです。 +操作が正常に完了すると、以前の stable スナップショットが削除され、 +pending スナップショットが新しい安定した参照として昇格します。 +

    sync が中断された場合、pending スナップショットは保持されます。 +パリティが部分的にしか同期されていない場合でも、.content ファイルに記録されたファイルシステム状態と +一致するため、その後の scrub、check、および fix コマンドはこの保留中のスナップショットを使用します。 +

    sync が中断された場合、check および fix コマンドは stable スナップショットからも +読み取りを行い、同期中に更新または削除されたファイルからデータブロックを取得します。 +これは、.content ファイルが同期プロセス全体を通じて、変更または削除されたすべてのファイルの +メタデータを保持しているために可能です。 +この履歴情報は、syncが正常に終了し、.content ファイルの最終バージョンが保存されたときにのみクリアされます。 +

    中断後に sync が再開されると、既存の保留中(pending)のスナップショットは削除され、 +ライブファイルシステムの現在の状態をキャプチャするために新しいスナップショットが作成されます。 +ただし、sync が中断された場合は、その後の sync が正常に完了するまで、 +ファイルの変更、削除、置換、または移動を行わないでください。 +パリティには、中断された sync で使用されたスナップショットから計算されたブロックが +まだ含まれている可能性があります。その後の sync によりそのスナップショットが +置き換えられ、中間バージョンのファイルが復元できなくなる可能性があります。 +

    +

    +ファイルシステムスナップショットと外部バックアップ (External backups with filesystem snapshots) +

    +

    ファイルシステムスナップショットが有効な場合、SnapRAIDは各データサブボリューム、 +ボリューム、またはデータセットのルートにあるスナップショットにアクセスまたは作成します。 +

    外部ツールとの干渉を避ける簡単な方法は、data 設定をサブボリュームまたは +ボリューム内の通常のサブディレクトリ(例えば /mnt/subvol の代わりに +/mnt/subvol/data)に指定することです。SnapRAIDは常にサブボリュームのルートに +スナップショットディレクトリを作成するため(例えば /mnt/subvol/.snapraid/)、 +データサブディレクトリがクリーンに保たれ、スナップショットはそのディレクトリ内で +動作するバックアップツールから見えない状態のままになります。 +

    一方、設定された data ディレクトリ自体がサブボリュームまたはボリュームの +ルートである場合、SnapRAIDはその直下に .snapraid/ ディレクトリを作成します(Btrfs、 +Bcachefs、およびNTFS)。SnapRAID自身のスキャンからは自動的に除外されますが、 +外部のバックアップツールやファイル同期ツールはそのディレクトリを検出します。 +除外設定を行わない場合、スナップショットやディレクトリリンク内を走査して凍結された +データツリー全体をコピーしてしまい、データが重複してバックアップストレージを使い果たす +可能性があります。外部バックアップツールでは、必ず .snapraid/ ディレクトリを +除外するように設定してください。 +

    ZFSでは、スナップショットは .snapraid/ ではなく標準の仮想ディレクトリ +.zfs/snapshot/ 経由で公開されます。デフォルト(snapdir=hidden)では、ZFSはこの +ディレクトリを一覧表示から隠すため、外部バックアップツールが走査することはありません。 +snapdir=visible を有効にしている場合は、バックアップツールが .zfs/ ディレクトリを +除外するように設定してください。 +

    +
    +
    +

    +パターン (Pattern)

    パターンは、含めるファイルまたは除外するファイルをフィルタリングするための柔軟な方法を 提供します。グロブ文字を使用することで、すべてのパスを手動でリストすることなく、 @@ -1772,23 +1965,25 @@ Pattern ディレクトリの境界を越えることはありません。スラッシュで停止するため、 単一のパスコンポーネント内での一致に適しています。これは、シェルの グロブでおなじみの標準的なワイルドカードの動作です。 -

    ダブルアスタリスク ** はより強力で、ディレクトリ区切り文字を含む -任意の文字列に一致します。これにより、パターンが複数のディレクトリレベルを -またいで一致できるようになります。** がパターン内に直接埋め込まれている場合、 -周囲のリテラルテキストの間にあるスラッシュを含む0文字以上の文字に一致します。 -

    ** の最も重要な使い方は、特別な形式である /**/ です。これは -0個以上の完全なディレクトリレベルに一致し、正確なパス構造を知らなくても、 -ディレクトリツリー内の任意の深さにあるファイルと一致させることができます。 -例えば、パターン src/**/main.js は src/main.js(ディレクトリを0個スキップ)、 -src/ui/main.js(1個スキップ)、src/ui/components/main.js(2個スキップ) -に一致します。 +

    ダブルアスタリスクのワイルドカード ** は、ディレクトリ区切り文字に隣接 +している場合(スラッシュの前または後にある場合)にのみ、ディレクトリ区切り +文字をまたいで一致します。この形式では、複数のディレクトリレベルにわたって +0個以上の文字に一致します。例えば、foo/**/bar は foo/bar、foo/a/bar、 +および foo/a/b/bar に一致し、**/build は build および foo/bar/build に +一致し、src/**.js は src/main.js および src/ui/components/main.js に一致します。 +単独の形式 /**/ は完全なパターンとして受け入れられません。 +

    ** がスラッシュに隣接していない場合、* と同様に動作し、ディレクトリ区切り +文字には一致しません。例えば、**.jpg はカレントディレクトリ内の photo.jpg に +一致しますが、dir/photo.jpg には一致しません。その目的には **/*.jpg を +使用してください。

    角括弧 [] を使用した文字クラスは、指定されたセットまたは範囲の 任意の1文字に一致します。他の単一文字パターンと同様に、 ディレクトリ区切り文字には一致しません。クラスは範囲と、感嘆符を 使用した否定をサポートしています。

    覚えておくべき根本的な違いは、*、?、および文字クラスはすべて ディレクトリの境界を尊重し、単一のパスコンポーネント内でのみ一致するのに対し、 -** はディレクトリ区切り文字をまたいで一致できる唯一のパターンであるということです。 +** はスラッシュに隣接している場合にのみディレクトリ区切り文字を +またいで一致できるということです。

    4つの異なる種類のパターンがあります。

    @@ -1881,6 +2076,23 @@ include /movies/ include /musics/ include /pictures/ +

    ディレクトリを除外すると(DIR/ または /PATH/DIR/ を使用)、SnapRAID がそのディレクトリに入って +スキャンすることが防止されることに注意してください。したがって、除外された親ディレクトリ内に +存在するファイルやサブディレクトリを include ルールで再度含めることはできません(スキャナが +そのディレクトリ内を走査しないため)。 +

    例えば、以下の設定では /keep/ がプルーニングされるため、file.dat は含まれません: +

    +# 意図通りに動作しません: /keep/ は完全にスキップされます
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    特定のファイルを残しつつディレクトリ内のファイルを一括除外するには、ディレクトリ自体を除外するのではなく、 +ディレクトリ内のファイルパターンを除外してください: +

    +# 意図通りに動作します: /keep/ は走査され、内部の他のファイルのみが除外されます
    +include /keep/file.dat
    +exclude /keep/*
    +

    コマンドラインで -f オプションを使用する場合、include パターンのみを 使用できます。例:

    @@ -1892,11 +2104,11 @@ snapraid -f "*.mp3" check
     防ぐために引用符で囲む必要があります。
     

    -

    -Ignore File +

    +除外ファイル (Ignore File)

    設定ファイルのグローバルルールに加えて、アレイ内の任意のディレクトリに -.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。 +.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。

    .snapraidignore で定義されたルールは、設定ファイルのルールの後に 適用されます。これは、それらがより高い優先度を持ち、グローバル設定で 以前に含まれていたファイルを除外するために使用できることを意味します。 @@ -1957,18 +2169,21 @@ build/

    -

    -Content +

    +コンテンツ (Content)

    SnapRAIDは、ファイルの一覧とチェックサムをコンテンツファイルに保存します。

    これはバイナリファイルであり、ディスクアレイに存在するすべてのファイルと、 それらの整合性を検証するためのすべてのチェックサムを一覧表示します。 -

    このファイルは sync および scrub コマンドによって読み書きされ、 -fix、check、および status コマンドによって読み取られます。 +

    コンテンツファイルは sync、scrub、touch、および rehash +コマンドによって読み書きされます。status、diff、check、 +fix、list、dup、locate、および pool コマンドによって読み取られ、 +smart、probe、up、down、および devices コマンドによって +完全に無視されます。

    -

    -Parity +

    +パリティ (Parity)

    SnapRAIDは、アレイのパリティ情報をパリティファイルに保存します。

    これらはバイナリファイルであり、content ファイルで定義されたすべてのブロックの @@ -1977,17 +2192,281 @@ Parity scrub および check コマンドによって**読み取られるだけ**です。

    -

    -Encoding +

    +エンコーディング (Encoding)

    UnixのSnapRAIDは、エンコーディングを無視します。ファイルシステムで使用されている のと同じエンコーディングでファイル名を読み取り、保存します。

    Windowsでは、ファイルシステムから読み取られたすべての名前はUTF-8形式に変換され、 処理されます。

    ファイル名を正しく出力するには、chcp 65001 コマンドでWindowsコンソールをUTF-8モードに設定し、 -コンソールフォントとして Lucida Console などのTrueTypeフォントを**使用する**必要があります。 +コンソールフォントとして Lucida Console などのTrueTypeフォントを使用する必要があります。 これは出力されるファイル名にのみ影響します。コンソール出力をファイルにリダイレクトする場合、 結果のファイルは常にUTF-8形式になります。 +

    +
    +

    +終了コード (Exit Code) +

    +

    SnapRAIDは以下のエラーコードで終了します: +

    +
    +
    +0 +
    +すべて正常。 +
    +
    +
    +
    +1 +
    +コマンドでエラーが発生しました。 +
    +
    +
    +
    +2 +
    +diff コマンドはすべて正常であると判定しましたが、 sync が必要です。 +
    +
    +
    +
    +3 +
    +ディスクデバイスコマンド(probe、smart、devices、up、down)は完了しましたが、 +少なくとも1つのファイルシステムがデバイス不足のためデグレード(縮退)モードで動作しています。 +
    +
    +
    +
    +
    +

    +既知の問題 (Known Issues) +

    +
    +

    +ファイルシステムの境界 +

    +

    SnapRAIDは、データディスクのスキャン中にファイルシステム、マウントポイント、 +またはサブボリュームの境界を越えません。そのような境界が検出された場合、 +SnapRAIDは警告(WARNING)を報告し、その先をスキャンしません。 +

    そのような境界の先にあるファイルはデータディスクに含まれないため、保護する +必要がある場合は個別に設定する必要があります。 +

    +
    +

    +ファイルシステムスナップショット使用時のマウントポイント +

    +

    ファイルシステムスナップショットが有効になっている場合、データディスク内の +ネストされたマウントポイントおよびバインドマウントはサポートされません。 +

    マウントポイントは稼働中システムのマウント名前空間の一部であり、ファイルシステムの +スナップショットには保持されません。その結果、スナップショットをスキャンする際、 +稼働中ファイルシステムでマウントポイントによって隠されていたディレクトリが +見えるようになる場合があります。 +

    ファイルシステムスナップショットが有効な場合は、データディスク内にネストされた +マウントポイントやバインドマウントを配置しないでください。 +

    +
    +

    +ファイルシステムスナップショット使用時の複数設定 +

    +

    同じファイルシステムのスナップショット名前空間を使用する複数の独立した +SnapRAID設定で、スナップショットサポートを安全に共有することはできません。 +

    BtrfsおよびBcachefsでは、スナップショットサポートが有効なSnapRAID設定は、 +同一サブボリューム内のデータディレクトリを1つしか使用できません。ZFSでは +同じ制限がデータセットに、NTFSではボリュームに適用されます。 +

    同じスナップショット名前空間を共有する複数の設定は、同一の stable、 +pending、および scan スナップショットを使用します。そのため、一方の設定を +実行すると、もう一方の設定で必要なリカバリスナップショットが置換または +削除される可能性があります。 +

    +
    +

    +タイムスタンプの変更を伴わないインプレースファイル変更 +

    +

    SnapRAIDは、ファイルサイズと変更タイムスタンプ(mtime)を比較することによって +ファイルの変更を検出します。 +

    アプリケーションがファイルサイズを変更せず、変更タイムスタンプも更新せずに +インプレースでファイルを変更した場合、"diff" および "sync" はファイルが +変更されたことを検出できず、そのパリティは更新されません。 +

    SnapRAIDにそのような変更を確実に認識させるには、ファイルの変更タイムスタンプ +を更新してください(たとえば、"touch" ユーティリティなどを使用)。そうしない +場合、その差分は後続の "scrub" または "check" 中のハッシュ不一致としてのみ +検出されます。 +

    +
    +

    +Windowsにおける非ASCII文字の大文字・小文字の一致 +

    +

    SnapRAIDはすべてのプラットフォームで標準的で予測可能なUTF-8エンコーディング +を使用し、大文字・小文字を区別しないマッチングをASCII文字に限定しています。 +

    Windowsファイルシステムは、任意のシステム依存のフォールディングテーブルを介して +Unicodeファイル名全体で大文字・小文字の不区別を強制するというレガシーな設計の +影響を受けています。その結果、Windowsは全く異なるUnicodeバイトシーケンスをあたかも +同じファイルであるかのように扱い、ファイルシステムの実態を覆い隠してしまいます。 +

    たとえば、À.txt と à.txt は明確に異なるUnicode名ですが、Windowsは非論理的にも +これらを同一として扱い、SnapRAIDはそれらの本来の区別を維持します。 +

    この制限は、WindowsによるUnicodeファイル名の非一貫な処理と、大文字・小文字を区別 +しないエイリアスへの固執によって引き起こされます。Windowsの大文字・小文字フォール +ディングに起因する不一致を防ぐため、設定パスおよびフィルター内の非ASCII文字には +常に正確な大文字・小文字を指定してください。 +

    +
    +

    +部分的な fix による回復 +

    +

    fix を -S, --start または -B, --count で制限した場合、 +SnapRAID は選択されたブロックのみを処理し、ファイルレベルの完了処理や +隔離を行いません。 +

    回復によって現在の内容を表していると証明できないベストエフォートのデータが +生成された場合でも、それらのブロックは通常のファイル名で書き込まれる +可能性があります。これらの回復されたブロックに関連する不確実性は、コマンドの +終了後には保持されません。 +

    その結果、後続の fix はこれらの読み取り可能なブロックを有効なファイルデータ +として扱い、再度の回復を試みません。これにより、ファイル内に不完全または +古いデータが残っているにもかかわらず、後続の回復が成功と報告される場合が +あります。 +

    -S および -B オプションは、通常の fix が失敗した後の高度な手動回復 +のみを目的としています。部分的な fix で回復不能なデータが報告された場合は、 +別の回復を試みる前に対象のファイルを削除または名前変更するか、その内容を手動で +確認してください。 +

    +
    +

    +NTFS ハードリンクと除外されたパス +

    +

    NTFS では、ディレクトリエントリが各ハードリンクのファイルサイズとタイム +スタンプを個別にキャッシュします。ファイルがいずれか1つのリンクを通じて +変更された場合、同じファイルを参照している他のリンクのディレクトリエントリ +は、それらにアクセスされるまで古いメタデータを保持し続けることがあります。 +

    SnapRAID は、スキャン中に同じファイルへのハードリンクが2つ以上見つかった +場合、この状態を自動的に検出して正規化します。しかし、他のリンクがフィルタ +によって除外されているか、またはデータディスクのパスの外部にあるために +1つのハードリンクのみがスキャンされた場合、SnapRAID は inode の衝突を検出 +できず、単一の見えているリンクのキャッシュされたメタデータに依存します。 +

    その結果、除外されたリンクや外部のハードリンクを通じて加えられた変更は、 +対象のファイルがアクセスされたりそのパスを通じて開かれたりして OS により +含まれるリンクのメタデータが更新されるまで、SnapRAID に気付かれない可能性 +があります。 +

    この制限を回避するには、SnapRAID から除外されているハードリンクを通じて +保護対象のファイルを変更しないようにするか、SnapRAID が正常に正規化 +できるように、ファイルへのすべてのハードリンクがスキャンに含まれるように +してください。 +

    +
    +

    +中断されたマルチパリティ sync 後の回復 +

    +

    複数のパリティディスクを持つアレイにおいて、sync が中断されると、 +異なるパリティレベル間で更新状態が一時的に不一致になることがあります。 +たとえば、パリティ 1 にはすでに新しく更新されたデータが含まれている一方、 +パリティ 2 にはまだ古いデータが残っているといった状況です。 +

    check または fix の実行中、SnapRAID はさまざまなパリティの組み合わせを +試し、既知のブロックハッシュ(ブロック全体、通常 256 KiB をカバー)に +対して再構築されたデータを検証します。 +

    SnapRAID が新旧のパリティが混在する不整合な組み合わせを使用して再構築を +試みた場合、線形 RAID 方程式は誤ったデータを生成します。このような無効な +組み合わせが誤って受け入れられるには、同じストライプ内の他の非同期ブロックが +不正なデータで再構築されているにもかかわらず、方程式が偶然にも少なくとも +1つの完全な 256 KiB ブロックを完璧に再構築してハッシュを一致させる必要が +あります。 +

    この事態はハッシュの衝突によるものではありません。むしろ、混在した +パリティ方程式自体が偶然にも元の正確な 256 KiB ブロック内容を生成する +必要があります。これは特別に作成されたデータや極めて反復的なデータでは +数学的に考えられますが、実際のデータでは事実上不可能です。 +

    すべてのディスクが正常な場合は、それ以上の変更を加える前に中断された sync +を完了させることで、この不確実性を排除できます。ディスクに障害が発生して +回復が必要な場合は、check または fix を実行する前にデータディスクを +変更しないようにしてください。 +

    +
    +

    +予約済みのファイル名およびディレクトリ名 +

    +

    SnapRAID は内部処理のために一部のファイル名、ディレクトリ名、 +スナップショット名を予約しています。これらの名前をユーザーデータに +使用しないでください: +

    +
    +
    +.snapraidignore +
    +ローカル除外ルールファイル。 +
    +
    +
    +
    +.snapraid +
    +スナップショットコンテナディレクトリ。 +
    +
    +
    +
    +snapraid-* +
    +SnapRAID が管理する ZFS スナップショット名。 +
    +
    +
    +
    +*.unrecoverable +
    +回復中に隔離された破損ファイル。 +
    +
    +
    +
    +CONTENT.tmp +
    +content 更新用の一時ファイル。 +
    +
    +
    +
    +CONTENT.lock +
    +content ロックファイル。 +
    +
    +
    +
    +PARITY.spaceholder +
    +Windows でのパリティ割り当て時の一時的な +プレースホルダーファイル。 +
    +
    +
    +

    これらの名前を無関係なデータに使用すると、ファイルやスナップショットが +無視されたり、メタデータとして誤認されたり、上書き、名前変更、または +削除されたりする可能性があります。 +

    Windows では、大文字と小文字を区別するように構成された NTFS +ディレクトリであっても、すべての大文字・小文字のバリエーションが +同様に予約されます(例: .SNAPRAIDIGNORE、.SnapRaid、CONTENT.TMP、 +CONTENT.Lock)。 +

    +
    +
    +

    +翻訳 (Translation) +

    +

    この文書は英語版マニュアルの自動翻訳です。 +正確な記述については英語版マニュアルを参照してください。 +

    +
    +

    +著作権 (Copyright) +

    +

    This file is Copyright (C) 2026 Andrea Mazzoleni +

    +
    +

    +関連項目 (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-ko.html b/manual-ko.html index ea9044f5..e42f3374 100644 --- a/manual-ko.html +++ b/manual-ko.html @@ -114,7 +114,7 @@

    -Synopsis +개요 (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Description +설명 (Description)

    SnapRAID는 디스크 어레이를 위해 설계된 백업 프로그램으로, 최대 6개의 디스크 오류가 발생해도 데이터를 복구하기 위한 @@ -155,7 +155,7 @@ Description 활용할 수 있으며, 평소처럼 액세스할 수 있습니다.

  • -데이터 무결성을 보장하고 무단 손상을 방지하기 위해 모든 데이터가 +데이터 무결성을 보장하고 조용한 데이터 손상을 방지하기 위해 모든 데이터가 해시됩니다.
  • @@ -188,20 +188,35 @@ SnapRAID는 데이터를 가두지 않습니다. 언제든지 포맷하거나
  • -Limitations +제한 사항 (Limitations)

    -

    SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을 -결합하는 것을 목표로 합니다. 하지만, 사용 전에 고려해야 할 몇 가지 -제한 사항이 있습니다. -

    주요 제한 사항은 디스크가 실패하고 최근에 동기화(sync)하지 않은 경우, -완전히 복구하지 못할 수 있다는 것입니다. -더 구체적으로, 마지막 동기화 작업 이후 변경되거나 삭제된 파일의 -크기만큼 복구가 불가능할 수 있습니다. -이는 변경되거나 삭제된 파일이 실패한 디스크에 있지 않더라도 발생합니다. -이것이 SnapRAID가 **거의 변경되지 않는 데이터**에 더 적합한 이유입니다. -

    반면에, 새로 추가된 파일은 이미 존재하는 파일의 복구를 방해하지 않습니다. -새로 추가된 파일이 실패한 디스크에 있는 경우에만 해당 파일을 잃게 됩니다. -

    기타 SnapRAID 제한 사항은 다음과 같습니다: +

    SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을 결합하는 것을 +목표로 합니다. 그러나 사용하기 전에 고려해야 할 몇 가지 제한 사항이 있습니다. +

    가장 큰 제한 사항은 디스크가 고장 날 경우, 마지막 sync(동기화) 작업의 상태까지만 +데이터를 복구할 수 있다는 점입니다. 마지막 동기화 이후에 추가되거나 수정된 데이터 중 +고장 난 디스크에 위치한 데이터는 모두 손실됩니다. +

    따라서 SnapRAID는 주로 데이터 변경이 거의 없는 환경에 적합합니다. +

    마지막 동기화 시점에 이미 존재했던 데이터의 경우, 복구 신뢰성은 snapshot(스냅샷) +옵션의 사용 여부에 따라 달라집니다. +

      +
    • +스냅샷 지원이 있는 경우 (Btrfs, ZFS, Bcachefs 및 NTFS에서 사용 가능): +SnapRAID는 지원되는 각 데이터 파일시스템의 독립적인 동결된 참조를 +자동으로 유지할 수 있습니다. +이를 통해 동기화 중이나 동기화 후에 라이브 파일시스템의 파일을 수정하거나 삭제하더라도 +복구 프로세스가 일관되고 신뢰할 수 있게 유지됩니다. +
    • +
    +
      +
    • +스냅샷 지원이 없는 경우: +sync 후에 파일을 삭제하거나 변경하면 다른 고장 난 디스크의 완전한 복구가 방해받을 수 +있습니다. 이는 수정된 파일이 고장 난 디스크에 없더라도 패리티가 수정된 파일과 +더 이상 일치하지 않기 때문에 발생합니다. 반면에 새로 추가된 파일은 이미 존재하는 +파일의 복구를 방해하지 않습니다. +
    • +
    +

    기타 SnapRAID 제한 사항은 다음과 같습니다:

    • SnapRAID를 사용하면 여전히 각 디스크에 대해 별도의 파일 시스템이 @@ -228,7 +243,7 @@ SnapRAID는 제한된 수의 디스크 오류에서만 데이터를 복구할

    -Getting Started +시작하기 (Getting Started)

    SnapRAID를 사용하려면, 먼저 디스크 어레이에서 하나의 디스크를 parity(패리티) 정보 전용으로 선택해야 합니다. 하나의 패리티 디스크로 @@ -296,12 +311,12 @@ snapraid sync 완료됩니다.

    Ctrl+C를 눌러 언제든지 중지할 수 있으며, 다음 실행 시 중단된 곳에서 재개됩니다. -

    이 명령이 완료되면 데이터는 **SAFE**합니다. +

    이 명령이 완료되면 데이터는 안전합니다.

    이제 어레이를 원하는 대로 사용하고 주기적으로 sync 명령을 실행하여 패리티 정보를 업데이트할 수 있습니다.

    -Scrubbing +스크러빙 (Scrubbing)

    주기적으로 데이터 및 패리티의 오류를 확인하려면 scrub 명령을 실행할 수 있습니다. @@ -319,7 +334,7 @@ snapraid scrub

     snapraid -p 5 -o 20 scrub
     
    -

    이 프로세스 중에 무단 또는 입출력 오류가 발견되면, 해당 블록은 +

    이 프로세스 중에 조용한 오류 또는 입출력 오류가 발견되면, 해당 블록은 content 파일에 bad로 표시되며 status 명령에 나열됩니다.

     snapraid status
    @@ -341,7 +356,7 @@ snapraid -p bad scrub
     

    -Pooling +풀링 (Pooling)

    참고: 아래에 설명된 풀링(pooling) 기능은 **mergerfs** 도구로 대체되었으며, 이는 SnapRAID 커뮤니티에서 Linux 사용자를 위한 권장 옵션입니다. @@ -414,7 +429,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +삭제 취소 (Undeleting)

    SnapRAID는 RAID 시스템보다는 백업 프로그램처럼 작동하며, -f, --filter 옵션을 사용하여 파일이나 디렉토리를 이전 상태로 복원하거나 @@ -439,10 +454,10 @@ snapraid fix -m

    -Recovering +복구 (Recovering)

    최악의 상황이 발생하여 하나 이상의 디스크를 잃었습니다! -

    **패닉하지 마십시오!** 복구할 수 있습니다! +

    **당황하지 마십시오!** 복구할 수 있습니다!

    가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다. 모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된 프로세스를 비활성화하십시오. @@ -534,9 +549,9 @@ snapraid sync

    -Commands +명령어 (Commands)

    -

    SnapRAID는 다음을 허용하는 몇 가지 간단한 명령을 제공합니다: +

    SnapRAID는 다음과 같은 작업을 수행할 수 있는 몇 가지 간단한 명령어를 제공합니다.

    • 어레이의 상태 출력 -> status @@ -545,23 +560,23 @@ Commands 디스크 제어 -> smart, probe, up, down
    • -백업/스냅샷 생성 -> sync +백업/복구 지점 생성 -> sync
    • -주기적으로 데이터 확인 -> scrub +주기적인 데이터 검사 -> scrub
    • -마지막 백업/스냅샷 복원 -> fix. +마지막 백업/복구 지점 복원 -> fix
    -

    명령은 소문자로 작성해야 합니다. +

    명령어는 반드시 소문자로 작성해야 합니다.

    status

    디스크 어레이의 상태 요약을 출력합니다.

    패리티 단편화, 확인 없이 블록이 얼마나 오래되었는지, 그리고 -스크럽 중에 발생한 모든 기록된 무단 오류에 대한 정보를 포함합니다. +스크럽 중에 발생한 모든 기록된 조용한 오류에 대한 정보를 포함합니다.

    제시된 정보는 마지막으로 sync를 실행했을 때를 나타냅니다. 나중에 수정된 내용은 고려되지 않습니다.

    bad 블록이 감지되면 해당 블록 번호가 나열됩니다. @@ -718,9 +733,9 @@ updated

    moved
    -동일한 디스크의 다른 디렉토리로 이동된 파일. -이들은 이름, 크기, 타임스탬프 및 아이노드가 동일하지만 -디렉토리가 다른 것으로 식별됩니다. +동일한 inode를 유지하면서 동일한 디스크에서 이동되거나 +이름이 변경된 파일. 동일한 inode, 크기 및 타임스탬프를 가지지만 +경로가 다른 것으로 식별됩니다. 파일 이름도 다를 수 있습니다.
    @@ -739,14 +754,12 @@ copied
    relocated
    -원본이 사라진 동일한 디스크 또는 다른 디스크로 이 -동된 파일. -이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니 -다. -하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치 -해야 합니다. -동일한 디스크의 'moved' 파일과 달리, 재배치된 파일은 다른 -inode를 가집니다. +원본 파일이 사라지고 inode가 유지되지 않는, 다른 +디렉토리 또는 디스크로 이동된 파일. +이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니다. +하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치해야 +합니다. 'moved' 파일과 달리, 재배치된 파일은 파일 이름이 동일해야 +합니다.
    @@ -772,7 +785,7 @@ sync

    이미 수행된 작업을 잃지 않고 Ctrl+C를 눌러 언제든지 이 프로세스를 중지할 수 있습니다. 다음 실행 시 sync 프로세스는 중단된 곳에서 재개됩니다. -

    이 프로세스 중에 무단 또는 입출력 오류가 발견되면, +

    이 프로세스 중에 조용한 오류 또는 입출력 오류가 발견되면, 해당 블록은 bad로 표시됩니다.

    파일은 경로 및/또는 아이노드로 식별되며 크기와 타임스탬프로 확인됩니다. @@ -789,7 +802,7 @@ sync

    scrub

    -

    어레이를 스크럽하여 데이터 및 패리티 디스크의 무단 또는 입출력 오류를 +

    어레이를 스크럽하여 데이터 및 패리티 디스크의 조용한 오류 또는 입출력 오류를 확인합니다.

    각 호출은 이전에 10일 이내에 스크럽된 데이터를 제외하고 어레이의 약 8%를 확인합니다. @@ -814,14 +827,14 @@ full - 모든 것 스크럽. 동기화되었지만 아직 스크럽되지 않은 블록만 스크럽하려면, -p new 옵션을 사용하십시오.

    스크럽 상태의 세부 정보를 얻으려면 status 명령을 사용하십시오. -

    발견된 모든 무단 또는 입출력 오류에 대해, 해당 블록은 content 파일에 +

    발견된 모든 조용한 오류 또는 입출력 오류에 대해, 해당 블록은 content 파일에 bad로 표시됩니다. 이러한 bad 블록은 status에 나열되며 fix -e로 수정할 수 있습니다. 수정 후, 다음 스크럽 시에 다시 확인되며, 수정된 것으로 발견되면 bad 표시는 제거됩니다. bad 블록만 스크럽하려면 scrub -p bad 명령을 사용할 수 있습니다.

    동기화되지 않은 데이터로 인한 보고된 오류를 피하기 위해 동기화된 -어레이에서만 scrub을 실행하는 것이 좋습니다. 이러한 오류는 무단 +어레이에서만 scrub을 실행하는 것이 좋습니다. 이러한 오류는 조용한 오류가 아닌 것으로 인식되며, 블록은 bad로 표시되지 않지만, 이러한 오류는 명령의 출력에 보고됩니다.

    content 파일은 각 블록의 마지막 확인 시간을 업데이트하고 bad 블록을 @@ -833,12 +846,12 @@ bad 블록만 스크럽하려면 scrub -p bad 명령을 사용할 수 있

    fix

    -

    모든 파일과 패리티 데이터를 수정합니다. -

    모든 파일과 패리티 데이터는 마지막 sync에 저장된 스냅샷 -상태와 비교됩니다. -차이가 발견되면 저장된 스냅샷으로 되돌려집니다. -

    **경고!** fix 명령은 오류와 의도적인 수정 사이를 구별하지 -않습니다. 파일 상태를 무조건 마지막 sync로 되돌립니다. +

    모든 파일과 패리티 데이터를 복구(수정)합니다. +

    모든 파일과 패리티 데이터는 마지막 sync에 저장된 상태와 비교됩니다. +차이점이 발견되면 저장된 상태로 되돌립니다. +

    경고! +fix 명령어는 오류와 의도적인 수정을 구별하지 않습니다. +파일 상태를 조건 없이 마지막 sync 상태로 되돌립니다.

    다른 옵션이 지정되지 않으면 전체 어레이가 처리됩니다. 필터 옵션을 사용하여 처리할 파일 또는 디스크의 하위 집합을 선택하십시오.

    sync 및 scrub 중에 bad로 표시된 블록만 수정하려면, @@ -985,7 +998,7 @@ locate

    -Options +옵션 (Options)

    SnapRAID는 다음 옵션을 제공합니다:

    @@ -1054,7 +1067,7 @@ Unix에서는 글로빙 문자가 사용되는 경우 따옴표로 묶어야 합 -e, --filter-error
    check 및 fix에서 오류가 있는 파일을 처리합니다. -status에 나열된 대로 sync 및 scrub 중에 무단 또는 입출력 오류가 +status에 나열된 대로 sync 및 scrub 중에 조용한 오류 또는 입출력 오류가 표시된 블록을 가진 파일만 처리합니다. 이 옵션은 check 및 fix에서만 사용할 수 있습니다.
    @@ -1080,7 +1093,7 @@ Unix에서는 글로빙 문자가 사용되는 경우 따옴표로 묶어야 합 -o, --older-than DAYS
    scrub에서 처리할 어레이의 가장 오래된 부분을 선택합니다. -DAYS는 블록이 스크럽되어야 하는 최소 일령(days)이며, +DAYS는 블록이 스크럽되어야 하는 최소 경과 일수(days)이며, 기본값은 10입니다. bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다. 이 옵션은 scrub에서만 사용할 수 있습니다. @@ -1112,7 +1125,7 @@ bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다. 이 프로세스는 모든 디스크가 회전하고 CPU가 바쁜, 시스템이 과부하 상태일 때 발생합니다. 이는 기계의 극한 조건이며, 잠재된 하드웨어 문제가 있는 경우 -데이터가 아직 해시되지 않았기 때문에 무단 오류가 감지되지 않고 +데이터가 아직 해시되지 않았기 때문에 조용한 오류가 감지되지 않고 지나갈 수 있습니다. 이러한 위험을 피하려면, pre-hash 모드를 활성화하여 모든 데이터를 두 번 읽어 무결성을 보장할 수 있습니다. @@ -1165,7 +1178,7 @@ bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다.
    --t, --tail 크기 +-t, --tail SIZE
    패리티 디스크의 지정된 꼬리 크기 이하를 사용하는 파일로 목록을 제한합니다. @@ -1274,7 +1287,7 @@ SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면, 동일한 속성을 가진 파일이 동일한 데이터를 가진 복사본이라고 가정합니다. 이는 한 디스크에서 다른 디스크로 복사되거나 이동된 파일을 -식별하고, 이미 계산된 해시 정보를 재사용하여 무단 오류를 +식별하고, 이미 계산된 해시 정보를 재사용하여 조용한 오류를 감지하거나 누락된 파일을 복구할 수 있도록 합니다. 일부 드문 경우에 이 동작은 오탐(false positives) 또는 많은 해시 확인으로 인한 느린 프로세스를 초래할 수 있으며, 이 옵션을 @@ -1318,7 +1331,7 @@ content 파일에 있는 해시를 재사용하여 데이터를 검증하고
    --W, --force-realloc-tail 크기 +-W, --force-realloc-tail SIZE
    -R, --force-realloc과 같이 작동하지만, 각 패리티 파일의 지정된 꼬리 부분(마지막 '크기' 바이트)으로 제한됩니다. @@ -1384,7 +1397,8 @@ locate -t, --tail을 사용하여 영향을 받는 파일을 사전에 지정된 블록 번호부터 처리를 시작합니다. 이는 손상된 디스크의 경우 특정 블록을 다시 확인하거나 수정하는 데 유용할 수 있습니다. -이 옵션은 주로 고급 수동 복구를 위한 것입니다. +이 옵션은 주로 고급 수동 복구를 위한 것이며 check 및 fix에서만 +지원됩니다.
    @@ -1394,7 +1408,8 @@ locate -t, --tail을 사용하여 영향을 받는 파일을 사전에 -B, --count BLKCOUNT
    지정된 수의 블록만 처리합니다. -이 옵션은 주로 고급 수동 복구를 위한 것입니다. +이 옵션은 주로 고급 수동 복구를 위한 것이며 check 및 fix에서만 +지원됩니다.
    @@ -1456,7 +1471,7 @@ locate -t, --tail을 사용하여 영향을 받는 파일을 사전에

    -Configuration +설정 (Configuration)

    SnapRAID는 디스크 어레이의 위치와 패리티 정보를 저장할 위치를 알기 위해 설정 파일이 필요합니다. @@ -1475,8 +1490,8 @@ parity FILE [,FILE] ...

    여러 파일을 지정할 수 있으며, 이들은 서로 다른 디스크에 있어야 합니다. 하나의 파일이 더 이상 커질 수 없을 때 다음 파일이 사용됩니다. -총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크보다 -적어도 커야 합니다. +총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크의 크기 +이상이어야 합니다.

    나중에 추가 패리티 파일을 추가할 수 있지만, 순서를 바꾸거나 제거할 수는 없습니다.

    패리티 디스크를 패리티용으로 예약하면 단편화되지 않아 성능이 @@ -1554,6 +1569,10 @@ NAME은 디스크를 식별하는 데 사용되며 고유해야 합니다. DIR 파일 시스템에서 디스크의 마운트 지점입니다.

    NAME을 고정된 상태로 유지하는 한, 필요에 따라 마운트 지점을 변경할 수 있습니다. +

    그러나 구성된 경로는 항상 동일한 기본 데이터로 확인되어야 합니다. +경로에 심볼릭 링크가 포함된 경우 해당 대상이 안정적으로 유지되어야 합니다. +데이터 디렉터리를 즉석에서 전환하기 위해 이러한 심볼릭 링크의 대상을 +변경하는 것은 지원되지 않습니다.

    어레이의 각 데이터 디스크에 대해 하나의 옵션을 사용해야 합니다.

    나중에 설정 파일에서 직접 NAME을 변경하고 sync 명령을 실행하여 디스크의 이름을 바꿀 수 있습니다. @@ -1572,6 +1591,26 @@ extra NAME DIR

    +snapshot +

    +

    sync, scrub, check 및 fix 명령어에 파일시스템 스냅샷 사용을 +활성화합니다. +

    활성화되면 SnapRAID는 sync 시작 시 지원되는 각 데이터 파일시스템의 +읽기 전용 스냅샷을 생성합니다. 이는 각 파일시스템의 안정적인 뷰를 제공하여, +이후의 수정으로 인해 패리티 계산에 사용되는 데이터가 변경되는 것을 방지합니다. +

    이는 복구 가능성을 크게 향상시킵니다. 라이브 파일시스템에서 파일이 삭제되더라도 +스냅샷에 그대로 보존됩니다. 이를 통해 해당 블록의 패리티가 "깨지는" 것을 방지하여, +다른 디스크가 고장 나더라도 데이터를 성공적으로 복구할 수 있도록 보장합니다. +

    이 옵션은 Linux의 Btrfs, Bcachefs 또는 ZFS 파일시스템과 Windows의 NTFS로 포맷된 +데이터 디스크에만 독점적으로 적용됩니다. +패리티 디스크나 다른 파일시스템을 사용하는 데이터 디스크는 항상 파일시스템의 +라이브 버전을 사용합니다. +

    스냅샷 생성 및 삭제에는 관리자 권한이 필요합니다. +이 옵션이 활성화된 경우 SnapRAID가 필요한 권한(예: sudo)으로 실행되는지 확인하십시오. +

    스냅샷 수명 주기에 대한 자세한 설명은 SNAPSHOTS 섹션을 참조하십시오. +

    +
    +

    nohidden

    모든 숨겨진 파일 및 디렉토리를 제외합니다. @@ -1579,7 +1618,7 @@ Unix에서는 숨겨진 파일은 '.'으로 시작하는 파일입니다. Windows에서는 숨김 속성을 가진 파일입니다.

    -

    +

    exclude/include PATTERN

    sync 프로세스에서 제외하거나 포함할 파일 또는 디렉토리 패턴을 @@ -1589,11 +1628,14 @@ exclude/include PATTERN include 패턴이면 파일은 포함됩니다. 일치하는 패턴이 없으면, 지정된 마지막 패턴이 include이면 파일은 제외되고, exclude이면 포함됩니다. +

    필터링은 디렉토리 순회 중에 계층적으로 수행됩니다. 디렉토리가 exclude +규칙과 일치하면 해당 디렉토리 전체가 건너뛰어지며(가지치기됨), 그 안에 +있는 파일이나 하위 디렉토리에 대한 include 규칙은 평가되지 않습니다.

    패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오.

    이 옵션은 여러 번 사용될 수 있습니다.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    패리티의 기본 블록 크기를 키비바이트(kibibyte) 단위로 정의합니다. @@ -1634,7 +1676,7 @@ mkfs.ext4 -m 0 -T largefile4 DEVICE 허용합니다.

    -

    +

    hashsize SIZE_IN_BYTES

    저장된 블록의 해시 크기를 바이트 단위로 정의합니다. @@ -1668,7 +1710,7 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    지정된 GB 양이 처리된 후 동기화 또는 스크럽 시 상태를 자동으로 저장합니다. @@ -1676,7 +1718,7 @@ autosave SIZE_IN_GIGABYTES 명령을 처음부터 다시 시작하는 것을 방지하는 데 유용합니다.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    허용되는 최대 디스크 온도를 섭씨로 설정합니다. 지정되면 SnapRAID는 @@ -1687,11 +1729,11 @@ SnapRAID가 작동하는 동안 현재 디스크 온도가 표시됩니다. 전환됨). 절전 기간 후 작업이 재개되며, 온도 제한에 다시 도달하면 다시 일시 중지될 수 있습니다.

    작동 중에 SnapRAID는 각 디스크의 가열 곡선을 분석하고 활동이 계속되면 -도달할 것으로 예상되는 장기 정상 온도를 추정합니다. +도달할 것으로 예상되는 장기 평형 온도를 추정합니다. 추정은 디스크 온도가 네 번 증가한 후에만 수행되어, 신뢰할 수 있는 추세를 설정하기에 충분한 데이터 포인트가 확보되도록 합니다. -이 예측된 정상 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의 -냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 온도는 정보 제공 +이 예측된 평형 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의 +냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 평형 온도는 정보 제공 목적일 뿐이며 SnapRAID의 동작에는 영향을 미치지 않습니다. 프로그램의 동작은 오로지 실제 측정된 디스크 온도에 기반합니다.

    이 분석을 수행하려면 SnapRAID는 시스템 온도에 대한 참조가 필요합니다. @@ -1702,14 +1744,14 @@ SnapRAID가 작동하는 동안 현재 디스크 온도가 표시됩니다. 모든 디스크의 온도를 표시하려면 -A 또는 --stats 옵션을 사용하십시오.

    -

    +

    temp_sleep TIME_IN_MINUTES

    온도 제한에 도달했을 때의 대기 시간(분)을 설정합니다. 이 기간 동안 디스크는 회전 중지 상태를 유지합니다. 기본값은 5분입니다.

    -

    +

    pool DIR

    pool 명령을 사용하여 디스크 어레이의 가상 뷰가 생성되는 풀링 @@ -1717,7 +1759,7 @@ pool DIR

    디렉토리는 이미 존재해야 합니다.

    -

    +

    share UNC_DIR

    디스크에 원격으로 액세스하는 데 필요한 Windows UNC 경로를 정의합니다. @@ -1731,7 +1773,7 @@ share UNC_DIR

    이 옵션은 Windows에만 필요합니다.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    각 디스크에 대한 SMART 속성을 얻기 위한 사용자 정의 smartctl 옵션을 @@ -1744,6 +1786,8 @@ PARITY는 parity, 2-parity, 3-parity, 4-parity, 5

    지정된 OPTIONS에서 %s 문자열은 장치 이름으로 대체됩니다. RAID 컨트롤러의 경우 장치가 고정되어 있을 가능성이 높으므로 %s를 사용할 필요가 없을 수 있습니다. +

    기본 -a 옵션을 대체하기 위해 [info: ...] 태그를 사용하여 +사용자 정의 정보 옵션 문자열을 지정할 수도 있습니다.

    가능한 옵션은 smartmontools 설명서를 참조하십시오:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1751,11 +1795,12 @@ RAID 컨트롤러의 경우 장치가 고정되어 있을 가능성이 높으므
     

    예:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    디스크 실패 확률을 계산할 때 지정된 SMART 속성을 무시합니다. @@ -1765,18 +1810,22 @@ smartignore DISK/PARITY ATTR [ATTR...] PARITY는 parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity, 또는 z-parity 중 하나의 패리티 이름입니다. 특수 값 *는 모든 디스크에서 속성을 무시하는 데 사용될 수 있습니다. -

    예를 들어, 모든 디스크에서 Current Pending Sector Count 속성을 -무시하려면: +

    여러 속성을 공백으로 구분하여 지정할 수 있습니다. +각 속성은 1에서 255 사이의 숫자나 대소문자를 구분하지 않는 이름 +(예: Current_Pending_Sector)으로 지정할 수 있습니다. +

    예를 들어, 모든 디스크에서 Current Pending Sector Count 와 +Reallocated Sectors Count 속성을 번호나 이름으로 무시하려면:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     

    첫 번째 패리티 디스크에서만 무시하려면:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Examples

    Unix의 일반적인 설정 예는 다음과 같습니다: @@ -1789,7 +1838,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1805,7 +1854,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1814,7 +1863,145 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    -Pattern +스냅샷 (Snapshots) +

    +

    구성에서 스냅샷 옵션이 활성화된 경우, SnapRAID는 작업 중에 읽은 데이터를 +안정적으로 유지하기 위해 파일시스템 스냅샷을 사용하며, 이는 라이브 파일시스템의 +파일이 이후에 수정되거나 삭제되는 경우에도 마찬가지입니다. +

    스냅샷 관리는 완전히 자동적이고 투명하게 이루어집니다. +백그라운드에서 완전히 처리되는 스냅샷의 추가적인 보호와 함께, +기존과 완전히 동일하게 SnapRAID를 계속 사용할 수 있습니다. +

    이것은 두 가지 주요 이점을 제공합니다. +

    +
    +
    +일관성 +
    +장시간 실행되는 sync 또는 scrub 중에 라이브 파일시스템에서 수정된 파일은 +스냅샷이 생성된 각 파일시스템이 작업 기간 동안 변경되지 않고 유지되므로 +패리티 불일치나 작업 중단을 유발하지 않습니다. +
    +
    +
    +
    +복구 +
    +라이브 파일시스템에서 파일이 업데이트되거나 삭제되더라도 스냅샷에 보존됩니다. +다음 sync가 실행되기 전에 디스크 고장이 발생하면, SnapRAID는 스냅샷에 보존된 +데이터를 사용하여 고장 난 디스크를 재구성합니다. +활성 sync 프로세스 중에 디스크 고장이 발생하는 경우, +SnapRAID는 이전 패리티 계산의 스냅샷과 현재 스냅샷 모두에서 자동으로 읽을 수도 있습니다. +이는 동기화 사이에 블록이 수정되거나 삭제되었더라도 패리티 방정식을 푸는 데 +필요한 정확한 데이터 블록에 대한 접근을 제공함으로써 완전한 복구 확률을 최대화합니다. +스냅샷이 없으면 정상 디스크에서 업데이트되거나 삭제된 파일로 인해 데이터 블록이 누락되며, +이는 다른 고장 난 디스크를 복구하는 데 필요할 수 있습니다. +
    +
    +
    +

    스냅샷은 데이터 디스크에 대해서만 생성되며, 기본 파일시스템이 이 기능을 지원하는 경우에만 +생성됩니다. 패리티 디스크는 항상 라이브 파일시스템을 사용합니다. +

    현재 이는 Linux의 Btrfs, Bcachefs, ZFS 및 Windows의 NTFS에서 지원됩니다. +

    서로 다른 파일시스템을 가진 데이터 디스크를 혼합할 수 있습니다. 스냅샷을 지원하는 디스크만 +이를 활용하고, 다른 디스크는 라이브 파일시스템에서 직접 계속 작동합니다. +

    스냅샷 생성 및 삭제에는 관리자 권한이 필요합니다. +스냅샷이 활성화된 경우 SnapRAID가 필요한 권한(예: sudo)으로 실행되는지 확인하십시오. +

    +

    +스냅샷 사용 시 명령어 동작 (Command Behavior with Snapshots) +

    +

    sync 및 scrub 명령어는 파일시스템이 스냅샷을 지원하는 데이터 디스크에 대해 +스냅샷을 사용합니다. 스냅샷이 생성된 디스크에서 명령어는 라이브 파일시스템의 +동시 변경에 영향을 받지 않는 안정적인 파일시스템 이미지를 봅니다. +sync 중에 지원되는 각 데이터 파일시스템에 대해 독립적으로 새 스냅샷이 생성됩니다. +이러한 스냅샷은 집합적으로 패리티 계산에 사용되는 데이터를 제공합니다. +반면에 scrub 명령어는 기존 패리티와 일치하는 신뢰할 수 있는 참조 지점을 유지하기 위해 +가장 최근 동기화 중에 생성된 마지막 스냅샷을 이용합니다. +

    check 및 fix 명령어의 경우, 마지막 스냅샷의 사용 여부는 +-d, --filter-disk 옵션을 사용하여 특정 디스크를 대상으로 지정하는지 여부에 따라 달라집니다. +

    +
    +
    +-d를 통해 명시적으로 선택된 디스크(작업의 "대상")는 항상 라이브 파일시스템을 사용합니다. +
    +
    +
    +
    +

    fix 의 경우 이를 통해 활성 교체 디스크에 데이터를 복원할 수 있습니다. +check 의 경우 동일한 조건에서 fix 작업을 시뮬레이션할 수 있습니다. +

    다른 모든 데이터 디스크("참조" 디스크)는 해당 스냅샷을 통해 액세스됩니다. +이를 통해 복구가 진행되는 동안 정상 디스크의 파일을 수정하고 있더라도 SnapRAID가 +패리티 방정식을 풀기 위한 안정적이고 동결된 참조를 가질 수 있습니다. +

    +
    +
    +-d 옵션이 제공되지 않으면 SnapRAID는 작업이 전체 어레이에 적용된다고 가정하며, 이 경우 +
    +
    +
    +
    +

    check 와 fix 는 라이브 파일시스템만을 독점적으로 사용합니다. +

    다른 모든 명령어는 라이브 파일시스템에서만 독점적으로 작동합니다. +

    +
    +
    +

    +스냅샷 수명 주기 (Snapshots Lifecycle) +

    +

    SnapRAID는 각 데이터 하위 볼륨의 루트에 있는 숨겨진 디렉터리 내에서 +stable(안정), pending(보류) 및 scan(스캔)이라는 세 가지 특정 스냅샷을 관리합니다. +Btrfs, Bcachefs 및 NTFS에서는 .snapraid/ 디렉터리가 사용되며, +ZFS에서는 표준 .zfs/snapshot/ 이 사용됩니다. +

    stable 스냅샷은 성공적으로 완료된 마지막 sync 상태를 나타내며, +현재 패리티를 계산하는 데 사용된 정확한 데이터를 포함합니다. 이는 +scrub, check 및 fix 명령어의 기본 데이터 소스 역할을 합니다. +

    scan 스냅샷은 검사 및 패리티 계산을 위한 동결된 상태를 제공하기 위해 sync 시작 시 +생성되는 임시 이미지입니다. +검사를 수행하고 새 콘텐츠 상태를 저장한 후 이전 pending 스냅샷을 대체합니다. +

    pending 스냅샷은 중단된 sync 에서 사용하는 이미지입니다. +작업이 성공적으로 완료되면 이전의 stable 스냅샷은 삭제되고, pending 스냅샷이 +새로운 안정적인 참조로 자리를 잡도록 승격됩니다. +

    sync 가 중단되면 pending 스냅샷은 보존됩니다. +패리티가 부분적으로만 동기화되었더라도 .content 파일에 기록된 파일시스템 상태와 일치하므로 +이후의 scrub, check 및 fix 명령어는 이 보류 중인 스냅샷을 사용합니다. +

    sync 가 중단된 경우, check 및 fix 명령어는 stable 스냅샷에서도 읽어와 +동기화 중에 업데이트되거나 삭제된 파일에서 데이터 블록을 검색합니다. +이는 동기화 프로세스 전반에 걸쳐 .content 파일이 수정되거나 삭제된 모든 파일의 +메타데이터를 유지하기 때문에 가능합니다. +이 기록 정보는 동기화가 성공적으로 완료되고 .content 파일의 최종 버전이 저장되어야만 삭제됩니다. +

    중단 후 sync 가 재시작되면 기존의 보류 중인(pending) 스냅샷은 삭제되고, +라이브 파일시스템의 현재 상태를 캡처하기 위해 새 스냅샷이 생성됩니다. +그러나 sync 가 중단된 경우 후속 sync 가 성공적으로 완료될 때까지 +파일을 수정, 삭제, 교체 또는 이동하지 마십시오. +패리티에는 중단된 sync에서 사용된 스냅샷에서 계산된 블록이 +여전히 포함되어 있을 수 있습니다. 이후의 sync로 인해 해당 스냅샷이 +교체되어 복구에 필요한 중간 버전의 파일을 사용할 수 없게 될 수 있습니다. +

    +

    +파일 시스템 스냅샷을 사용한 외부 백업 (External backups with filesystem snapshots) +

    +

    파일 시스템 스냅샷이 활성화되면 SnapRAID는 각 데이터 서브볼륨, 볼륨 또는 +데이터셋의 루트에서 스냅샷에 접근하거나 생성합니다. +

    외부 도구와의 간섭을 피하는 간단한 방법은 서브볼륨이나 볼륨 내의 일반 +하위 디렉터리(예: /mnt/subvol 대신 /mnt/subvol/data)를 가리키도록 +data 를 설정하는 것입니다. SnapRAID는 항상 서브볼륨 루트에 스냅샷 디렉터리를 +생성하므로(예: /mnt/subvol/.snapraid/), 데이터 하위 디렉터리를 깨끗하게 +유지하여 해당 디렉터리 내에서 작동하는 백업 도구에 스냅샷이 노출되지 않도록 합니다. +

    그렇지 않고 설정된 data 디렉터리 자체가 서브볼륨이나 볼륨 루트인 경우, +SnapRAID는 해당 디렉터리 바로 안에 .snapraid/ 디렉터리를 생성합니다(Btrfs, +Bcachefs 및 NTFS). SnapRAID 자체 스캔에서는 이 디렉터리가 자동으로 제외되지만, +외부 백업 도구나 파일 동기화 도구는 이를 발견하게 됩니다. 제외하지 않으면 +스냅샷이나 디렉터리 링크를 탐색하여 동결된 전체 데이터 트리를 복사함으로써 +데이터를 중복 생성하고 백업 저장 공간을 고갈시킬 수 있습니다. 항상 외부 백업 +도구에서 .snapraid/ 디렉터리를 제외하도록 구성하십시오. +

    ZFS에서는 스냅샷이 .snapraid/ 대신 표준 가상 디렉터리인 .zfs/snapshot/ 을 +통해 노출됩니다. 기본값(snapdir=hidden)에서는 ZFS가 디렉터리 목록에서 이 +디렉터리를 숨기므로 외부 백업 도구가 이를 탐색하지 않습니다. snapdir=visible 로 +설정한 경우 백업 도구에서 .zfs/ 디렉터리를 제외하도록 하십시오. +

    +
    +
    +

    +패턴 (Pattern)

    패턴은 포함하거나 제외할 파일을 필터링하는 유연한 방법을 제공합니다. 글로빙(globbing) 문자를 사용하면 모든 경로를 일일이 나열하지 않고도 @@ -1826,23 +2013,25 @@ Pattern 디렉토리 경계를 넘지 않습니다. 슬래시에서 멈추므로 단일 경로 구성 요소 내에서의 일치에 적합합니다. 이는 쉘 글로빙에서 익숙한 표준 와일드카드 동작입니다. -

    이중 별표 **는 더 강력하며 디렉토리 구분 기호를 포함한 모든 문자 -시퀀스와 일치합니다. 이를 통해 패턴이 여러 디렉토리 수준에서 일치할 수 -있습니다. **가 패턴 내에 직접 포함된 경우, 주변 리터럴 텍스트 사이의 -슬래시를 포함하여 0개 이상의 문자와 일치할 수 있습니다. -

    **의 가장 중요한 용도는 특수 형식인 /**/입니다. 이는 0개 이상의 -전체 디렉토리 수준과 일치하므로 정확한 경로 구조를 모르더라도 -디렉토리 트리의 모든 깊이에서 파일과 일치시킬 수 있습니다. -예를 들어, src/**/main.js 패턴은 src/main.js(0개의 디렉토리 건너뜀), -src/ui/main.js(1개의 디렉토리 건너뜀), src/ui/components/main.js -(2개의 디렉토리 건너뜀)와 일치합니다. +

    이중 별표 와일드카드 **는 디렉토리 구분 기호에 인접해 있는 경우(슬래시 +앞이나 뒤에 오는 경우)에만 디렉토리 구분 기호를 가로질러 일치합니다. +이 형식에서는 여러 디렉토리 수준에 걸쳐 0개 이상의 문자와 일치합니다. +예를 들어, foo/**/bar는 foo/bar, foo/a/bar 및 foo/a/b/bar와 일치하고, +**/build는 build 및 foo/bar/build와 일치하며, src/**.js는 src/main.js 및 +src/ui/components/main.js와 일치합니다. +독립형 형식인 /**/는 완전한 패턴으로 허용되지 않습니다. +

    **가 슬래시에 인접하지 않은 경우 *처럼 작동하며 디렉토리 구분 기호와 +일치하지 않습니다. 예를 들어, **.jpg는 현재 디렉토리의 photo.jpg와는 +일치하지만 dir/photo.jpg와는 일치하지 않습니다. 해당 용도로는 **/*.jpg를 +사용하십시오.

    대괄호 []를 사용하는 문자 클래스는 지정된 세트 또는 범위에서 단일 문자와 일치합니다. 다른 단일 문자 패턴과 마찬가지로 디렉토리 구분 기호와는 일치하지 않습니다. 클래스는 범위 및 느낌표를 사용한 부정을 지원합니다.

    기억해야 할 근본적인 차이점은 *, ? 및 문자 클래스는 모두 디렉토리 경계를 준수하고 단일 경로 구성 요소 내에서만 일치하는 반면, -**는 디렉토리 구분 기호를 가로질러 일치할 수 있는 유일한 패턴이라는 것입니다. +**는 슬래시에 인접해 있는 경우에만 디렉토리 구분 기호를 가로질러 +일치할 수 있다는 것입니다.

    네 가지 유형의 패턴이 있습니다:

    @@ -1938,6 +2127,24 @@ include /movies/ include /musics/ include /pictures/ +

    디렉토리를 제외하면(DIR/ 또는 /PATH/DIR/ 사용) SnapRAID가 해당 디렉토리에 +진입하여 스캔하는 것이 차단됩니다. 따라서 제외된 상위 디렉토리 내에 있는 +파일이나 하위 디렉토리는 스캐너가 탐색하지 않으므로 include 규칙으로 다시 +포함할 수 없습니다. +

    예를 들어, 다음 설정에서는 /keep/이 가지치기되므로 file.dat가 포함되지 +않습니다: +

    +# 의도대로 작동하지 않음: /keep/ 전체를 건너뜀
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    디렉토리 자체를 제외하지 않고 특정 파일만 유지하면서 내부 파일들을 제외하려면, +디렉토리 자체가 아니라 내부의 파일 패턴을 제외하십시오: +

    +# 의도대로 작동함: /keep/을 순회하지만 내부의 다른 파일들은 제외됨
    +include /keep/file.dat
    +exclude /keep/*
    +

    명령줄에서 -f 옵션을 사용할 때 include 패턴만 사용할 수 있습니다. 예를 들어:

    @@ -1949,8 +2156,8 @@ snapraid -f "*.mp3" check
     방지하기 위해 따옴표로 묶어야 합니다.
     

    -

    -Ignore File +

    +제외 파일 (Ignore File)

    설정 파일의 전역 규칙 외에도, 배열 내의 모든 디렉토리에 .snapraidignore 파일을 배치하여 분산된 제외 규칙을 정의할 수 있습니다. @@ -2013,18 +2220,20 @@ build/

    -

    -Content +

    +콘텐츠 (Content)

    SnapRAID는 content 파일에 파일 목록과 체크섬을 저장합니다.

    이것은 디스크 어레이에 있는 모든 파일의 목록과 무결성을 확인하기 위한 모든 체크섬을 나열하는 이진 파일입니다. -

    이 파일은 sync 및 scrub 명령에 의해 읽고 쓰여지며, -fix, check, 및 status 명령에 의해 읽혀집니다. +

    content 파일은 sync, scrub, touch 및 rehash 명령에 의해 +읽고 쓰여집니다. 이것은 status, diff, check, fix, list, +dup, locate 및 pool 명령에 의해 읽혀지며, smart, probe, +up, down 및 devices 명령에 의해 완전히 무시됩니다.

    -

    -Parity +

    +패리티 (Parity)

    SnapRAID는 패리티 파일에 어레이의 패리티 정보를 저장합니다.

    이들은 content 파일에 정의된 모든 블록의 계산된 패리티를 포함하는 @@ -2033,8 +2242,8 @@ Parity scrub 및 check 명령에 의해서만 읽혀집니다.

    -

    -Encoding +

    +인코딩 (Encoding)

    Unix의 SnapRAID는 인코딩을 무시합니다. 파일 시스템에서 사용되는 것과 동일한 인코딩으로 파일 이름을 읽고 저장합니다. @@ -2045,6 +2254,259 @@ Windows 콘솔을 UTF-8 모드로 설정하고 콘솔 글꼴로 Lucida Consol 같은 TrueType 글꼴을 사용해야 합니다. 이는 출력되는 파일 이름에만 영향을 미치며, 콘솔 출력을 파일로 리디렉션하는 경우 결과 파일은 항상 UTF-8 형식입니다. +

    +
    +

    +종료 코드 (Exit Code) +

    +

    SnapRAID는 다음과 같은 오류 코드로 종료됩니다: +

    +
    +
    +0 +
    +모두 정상. +
    +
    +
    +
    +1 +
    +명령 실행 중 오류가 발생했습니다. +
    +
    +
    +
    +2 +
    +diff 명령으로 모두 정상임을 확인했으나 sync가 필요합니다. +
    +
    +
    +
    +3 +
    +디스크 장치 명령(probe, smart, devices, up, down)이 완료되었으나, +누락된 장치로 인해 하나 이상의 파일 시스템이 저하(degraded) 모드로 실행 중입니다. +
    +
    +
    +
    +
    +

    +알려진 문제 (Known Issues) +

    +
    +

    +파일 시스템 경계 +

    +

    SnapRAID는 데이터 디스크를 스캔하는 동안 파일 시스템, 마운트 또는 서브볼륨 경계를 +넘지 않습니다. 이러한 경계가 감지되면 SnapRAID는 경고(WARNING)를 보고하고 +그 너머를 스캔하지 않습니다. +

    이러한 경계 너머에 있는 파일은 데이터 디스크에 포함되지 않으며, 보호해야 하는 경우 +별도로 구성해야 합니다. +

    +
    +

    +파일 시스템 스냅샷 사용 시 마운트 지점 +

    +

    파일 시스템 스냅샷이 활성화된 경우, 데이터 디스크 내부의 중첩된 마운트 지점 및 +바인드 마운트는 지원되지 않습니다. +

    마운트 지점은 라이브 시스템 마운트 네임스페이스의 일부이며 파일 시스템 스냅샷에 +보존되지 않습니다. 따라서 스냅샷을 스캔할 때 라이브 파일 시스템에서 마운트 지점에 +의해 숨겨졌던 디렉터리가 보일 수 있습니다. +

    파일 시스템 스냅샷이 활성화된 경우 데이터 디스크 내에 중첩된 마운트 지점이나 +바인드 마운트를 배치하지 마십시오. +

    +
    +

    +파일 시스템 스냅샷 사용 시 여러 설정 +

    +

    동일한 파일 시스템 스냅샷 네임스페이스를 사용하는 여러 독립된 SnapRAID +설정 간에는 스냅샷 지원을 안전하게 공유할 수 없습니다. +

    Btrfs 및 Bcachefs에서는 스냅샷 지원이 활성화된 단 하나의 SnapRAID 설정만이 +동일한 서브볼륨 내의 데이터 디렉터리를 사용할 수 있습니다. ZFS에서는 동일한 +제한이 데이터셋에 적용되며, NTFS에서는 볼륨에 적용됩니다. +

    동일한 스냅샷 네임스페이스를 공유하는 여러 설정은 동일한 stable, pending +및 scan 스냅샷을 사용합니다. 따라서 하나의 설정을 실행하면 다른 설정에 필요한 +복구 스냅샷을 대체하거나 삭제할 수 있습니다. +

    +
    +

    +타임스탬프 변경 없는 인플레이스 파일 수정 +

    +

    SnapRAID는 파일 크기와 수정 타임스탬프(mtime)를 비교하여 파일 수정을 감지합니다. +

    애플리케이션이 파일 크기를 변경하지 않고 수정 타임스탬프도 업데이트하지 않은 채 +인플레이스로 파일을 수정하는 경우, "diff" 및 "sync"는 파일이 변경되었음을 감지하지 +못하며 패리티가 업데이트되지 않습니다. +

    SnapRAID가 이러한 변경 사항을 인식하도록 하려면 파일의 수정 타임스탬프를 +업데이트하십시오(예: "touch" 유틸리티 사용). 그렇지 않으면 이 차이점은 이후의 +"scrub" 또는 "check" 중에 해시 불일치로만 감지됩니다. +

    +
    +

    +Windows 비ASCII 대소문자 일치 +

    +

    SnapRAID는 모든 플랫폼에서 표준적이고 예측 가능한 UTF-8 인코딩을 사용하며, +대소문자를 구분하지 않는 일치를 ASCII 문자로 제한합니다. +

    Windows 파일 시스템은 임의의 시스템 종속 폴딩 테이블을 통해 유니코드 파일 이름 +전체에서 대소문자 구분을 없애도록 강제하는 레거시 디자인의 한계를 안고 있습니다. +결과적으로 Windows는 완전히 다른 유니코드 바이트 시퀀스를 마치 동일한 파일인 것처럼 +취급하여 파일 시스템의 실제 상태를 왜곡합니다. +

    예를 들어 À.txt와 à.txt는 고유한 유니코드 이름이지만, Windows는 비논리적으로 +이를 동일하게 취급하는 반면 SnapRAID는 이들의 진정한 차이를 보존합니다. +

    이 제한은 Windows의 일관성 없는 유니코드 파일 이름 처리와 대소문자를 구분하지 않는 +별칭 지정 고집으로 인해 발생합니다. Windows의 대소문자 폴딩으로 인한 불일치를 +방지하려면 구성 경로 및 필터의 비ASCII 문자에 대해 항상 정확한 대소문자를 +지정하십시오. +

    +
    +

    +부분 fix 복구 +

    +

    fix가 -S, --start 또는 -B, --count를 사용하여 제한되면, +SnapRAID는 선택된 블록에서만 작동하며 파일 수준의 완료 처리나 격리를 +수행하지 않습니다. +

    복구 결과 현재 내용을 나타낸다고 입증할 수 없는 최선의(best-effort) 데이터가 +생성되더라도, 이러한 블록은 일반 파일 이름으로 기록될 수 있습니다. 이러한 +복구된 블록과 관련된 불확실성은 명령이 종료된 후 유지되지 않습니다. +

    결과적으로 이후의 fix는 이러한 읽기 가능한 블록을 유효한 파일 데이터로 +취급하고 다시 복구하려고 시도하지 않습니다. 이로 인해 파일에 불완전하거나 +오래된 데이터가 남아 있음에도 후속 복구가 성공으로 보고될 수 있습니다. +

    -S 및 -B 옵션은 일반적으로 일반 fix가 실패한 후 고급 수동 복구만을 +위한 것입니다. 부분 fix에서 복구할 수 없는 데이터가 보고되면 다른 복구를 +시도하기 전에 영향을 받는 파일을 제거하거나 이름을 바꾸거나 해당 내용을 +수동으로 확인하십시오. +

    +
    +

    +NTFS 하드 링크 및 제외된 경로 +

    +

    NTFS에서는 디렉터리 항목이 각 하드 링크의 파일 크기와 타임스탬프를 +독립적으로 캐시합니다. 한 링크를 통해 파일이 수정되면 동일한 파일을 +가리키는 다른 링크의 디렉터리 항목은 액세스될 때까지 오래된 메타데이터를 +유지할 수 있습니다. +

    SnapRAID는 스캔 중에 동일한 파일에 대한 하드 링크를 2개 이상 발견하면 +이러한 상태를 자동으로 감지하고 정규화합니다. 그러나 다른 링크가 필터에 +의해 제외되었거나 데이터 디스크 경로 외부에 있어 하나의 하드 링크만 +스캔되는 경우, SnapRAID는 inode 충돌을 감지할 수 없으며 표시되는 유일한 +링크의 캐시된 메타데이터에 의존합니다. +

    결과적으로 제외되었거나 외부 하드 링크를 통해 변경된 사항은 해당 경로를 +통해 파일에 액세스하거나 열어 운영 체제에서 포함된 링크의 메타데이터를 +새로 고칠 때까지 SnapRAID에서 감지되지 않을 수 있습니다. +

    이러한 제한을 방지하려면 SnapRAID에서 제외된 하드 링크를 통해 보호된 +파일을 수정하지 않거나, SnapRAID가 이를 정규화할 수 있도록 파일의 모든 +하드 링크가 스캔에 포함되도록 하십시오. +

    +
    +

    +중단된 다중 패리티 sync 후 복구 +

    +

    다중 패리티 디스크가 있는 어레이에서 sync가 중단되면 서로 다른 +패리티 레벨이 일시적으로 동기화되지 않은 상태로 남을 수 있습니다. +예를 들어 패리티 1에는 새로 업데이트된 데이터가 이미 포함되어 있는 반면, +패리티 2에는 여전히 이전 데이터가 남아 있을 수 있습니다. +

    check 또는 fix를 수행하는 동안 SnapRAID는 다양한 패리티 조합을 +시도하고 알려진 블록 해시(전체 블록을 포함하며 일반적으로 256 KiB)에 대해 +재구성된 데이터를 검증합니다. +

    SnapRAID가 이전 패리티와 새 패리티의 일치하지 않는 혼합을 사용하여 +재구성을 시도하면 선형 RAID 방정식은 잘못된 데이터를 생성합니다. 이러한 +유효하지 않은 조합이 잘못 수락되려면, 동일한 스트라이프의 다른 비동기화된 +블록이 잘못된 데이터로 재구성되는 와중에도 방정식이 우연히 하나 이상의 +완전한 256 KiB 블록을 완벽하게 재구성하여 해시가 일치해야 합니다. +

    이 시나리오는 해시 충돌에 의존하지 않습니다. 오히려 혼합된 패리티 +방정식 자체가 우연히 원래의 정확한 256 KiB 블록 내용을 생성해야 합니다. +이는 특별히 조작되었거나 매우 반복적인 데이터에서는 수학적으로 가능하지만, +실제 데이터에서는 사실상 불가능합니다. +

    모든 디스크가 정상인 경우 추가 변경을 수행하기 전에 중단된 sync를 +완료하면 이러한 불확실성이 제거됩니다. 디스크에 오류가 발생하여 복구가 +필요한 경우 check 또는 fix를 실행하기 전에 데이터 디스크를 수정하지 +마십시오. +

    +
    +

    +예약된 파일 및 디렉터리 이름 +

    +

    SnapRAID는 내부 작업을 위해 일부 파일, 디렉터리 및 스냅샷 이름을 +예약합니다. 사용자 데이터에 이러한 이름을 사용하지 마십시오: +

    +
    +
    +.snapraidignore +
    +로컬 제외 규칙 파일. +
    +
    +
    +
    +.snapraid +
    +스냅샷 컨테이너 디렉터리. +
    +
    +
    +
    +snapraid-* +
    +SnapRAID에서 관리하는 ZFS 스냅샷 이름. +
    +
    +
    +
    +*.unrecoverable +
    +복구 중 격리된 손상된 파일. +
    +
    +
    +
    +CONTENT.tmp +
    +content 업데이트용 임시 파일. +
    +
    +
    +
    +CONTENT.lock +
    +content 잠금 파일. +
    +
    +
    +
    +PARITY.spaceholder +
    +Windows 패리티 할당 중 사용되는 임시 +공간 확보 파일. +
    +
    +
    +

    관련 없는 데이터에 이러한 이름을 사용하면 파일이나 스냅샷이 무시되거나, +메타데이터로 잘못 해석되거나, 덮어쓰기되거나, 이름이 바뀌거나, 삭제될 수 +있습니다. +

    Windows에서는 대소문자를 구분하도록 구성된 NTFS 디렉터리에서도 모든 +대소문자 변형이 마찬가지로 예약됩니다(예: .SNAPRAIDIGNORE, .SnapRaid, +CONTENT.TMP, CONTENT.Lock). +

    +
    +
    +

    +번역 (Translation) +

    +

    이 문서는 영어 매뉴얼의 자동 번역본입니다. +공식 버전은 영어 매뉴얼을 참조하십시오. +

    +
    +

    +저작권 (Copyright) +

    +

    This file is Copyright (C) 2026 Andrea Mazzoleni +

    +
    +

    +참고 (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-log.html b/manual-log.html index 677fb67d..c88b98d5 100644 --- a/manual-log.html +++ b/manual-log.html @@ -179,6 +179,11 @@ is escaped to \\.

    Some tags are output only when the --gui or --gui-verbose option is used. They provide extra verbose state and runtime progress only useful for a GUI interface. +In GUI mode, the structured log is intended to be consumed by the GUI. +Fatal errors are therefore not duplicated to standard error when they +are successfully written to the log. If the log is unavailable or +writing it fails, the fatal error is printed to standard error as a +fallback.

    Integer values are marked as uint when they are unsigned and as int when they are signed. However, for practical purposes you can treat all of them as signed integers. @@ -3695,6 +3700,16 @@ smartctl command.

    +attr:<device_file>:<disk_name>[/<split_index>]:power:unknown +
    +Logs that the device power state could not be determined +after a status probe. +
    +
    +
    +
    +
    +
    stat:<disk_name>:<access_number>
    Logs the total number of read and write accesses done on the @@ -3849,27 +3864,27 @@ commands that access files and parities.
    error[_io|_data]:<block>:<disk_name>:<file>:<msg>
    -Logs file access errors (open, read, file changed) during the -data disk read operation for parity calculation or verification. +Logs errors affecting data files.
    -
    +

    With no suffix, error indicates a soft or logical error not +classified as a hardware I/O or silent data error. +

    _io
    -Indicates a physical Input/Output error. -The disk was unable to read or write a specific block, -typically signaling a failing sector or cable issue. +Indicates a physical Input/Output error, typically +signaling a failing sector, device, or cable issue.
    _data
    -Indicates the data was read successfully but failed -the checksum/hash verification. This signals silent +Indicates data that was read successfully but failed +the checksum/hash verification, signaling silent corruption or an unsuccessful parity match.
    @@ -3877,7 +3892,13 @@ corruption or an unsuccessful parity match.
    <block>
    -The zero-based index of the block where the error occurred (uint). +The zero-based SnapRAID parity position associated with +the error (uint). It identifies the logical position affected +by the failed operation, not necessarily the physical sector +that caused the failure. Data file open/create errors occurring +while processing a position report the current block. The field +is empty when the error cannot be associated with a specific +position, such as for close errors.
    @@ -3910,34 +3931,39 @@ error (e.g., Open/Read/Write error,
    parity_error[_io|_data]:<block>:<level>:<msg>
    -Logs errors during parity disk read or write operations. +Logs errors affecting parity.
    -
    +

    With no suffix, parity_error indicates a soft or logical error +not classified as a hardware I/O or silent data error. +

    _io
    -Indicates a physical Input/Output error. -The disk was unable to read or write a specific block, -typically signaling a failing sector or cable issue. +Indicates a physical Input/Output error, typically +signaling a failing sector, device, or cable issue.
    _data
    -Indicates the data was read successfully but failed -the checksum/hash verification. This signals silent -corruption or an unsuccessful parity match. +Indicates data that was read successfully but failed +the parity verification, signaling silent corruption.
    <block>
    -The zero-based index of the block where the error occurred (uint). +The zero-based SnapRAID parity position associated with +the error (uint). Parity open/create errors report block 0 as +a retry marker; this does not mean that parity block 0 is bad. +Parity access is attempted again by subsequent commands. The +field is empty when the error cannot be associated with a +specific position, such as for close errors.
    @@ -3953,7 +3979,7 @@ The configuration name of the parity level (e.g., <msg>
    A descriptive message indicating the nature of the -error (e.g., Read/Write error, +error (e.g., Open/Read/Write error, Data error, diff bits <diff>/<bits>).
    diff --git a/manual-pl.html b/manual-pl.html index 1115b1b1..cca5013f 100644 --- a/manual-pl.html +++ b/manual-pl.html @@ -114,7 +114,7 @@

    -Synopsis +Składnia (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Description +Opis (Description)

    SnapRAID to program do tworzenia kopii zapasowych przeznaczony dla macierzy dyskowych, przechowujący informacje parzystości @@ -188,22 +188,36 @@ co oszczędza energię i zmniejsza hałas.

    -Limitations +Ograniczenia (Limitations)

    -

    SnapRAID to hybryda programu RAID i programu do tworzenia kopii zapasowych, -której celem jest połączenie najlepszych zalet obu. Ma jednak pewne -ograniczenia, które należy wziąć pod uwagę przed jego użyciem. -

    Głównym ograniczeniem jest to, że jeśli dysk ulegnie awarii, a Ty nie wykonałeś -niedawno synchronizacji, możesz nie być w stanie w pełni odzyskać danych. -Dokładniej, możesz nie być w stanie odzyskać danych o wielkości -zmienionych lub usuniętych plików od czasu ostatniej operacji synchronizacji. -Dzieje się tak, nawet jeśli zmienione lub usunięte pliki nie znajdują się na -uszkodzonym dysku. Dlatego SnapRAID jest lepiej dostosowany do -danych, które rzadko się zmieniają. -

    Z drugiej strony, nowo dodane pliki nie uniemożliwiają odzyskania już -istniejących plików. Stracisz tylko ostatnio dodane pliki, jeśli -znajdują się one na uszkodzonym dysku. -

    Inne ograniczenia SnapRAID to: +

    SnapRAID jest hybrydą pomiędzy RAID a programem do tworzenia kopii zapasowych, mającą na celu połączenie +najlepszych zalet obu tych rozwiązań. Posiada jednak pewne ograniczenia, które należy +wziąć pod uwagę przed jego użyciem. +

    Głównym ograniczeniem jest to, że w przypadku awarii dysku można odzyskać dane tylko do +stanu z momentu ostatniej operacji sync (synchronizacji). Wszelkie dane dodane lub modyfikacje dokonane +od ostatniej synchronizacji, które znajdują się na uszkodzonym dysku, zostaną utracone. +

    W związku z tym SnapRAID nadaje się głównie do danych, które rzadko się zmieniają. +

    W przypadku danych, które już istniały podczas ostatniej synchronizacji, niezawodność odzyskiwania zależy +od tego, czy użyto opcji snapshot (migawki): +

      +
    • +Z obsługą migawek (dostępną w systemach plików Btrfs, ZFS, Bcachefs i NTFS), +SnapRAID może automatycznie utrzymywać niezależny, zamrożony punkt +odniesienia dla każdego obsługiwanego systemu plików z danymi. +Zapewnia to, że nawet jeśli zmodyfikujesz lub usuniesz pliki w aktywnym systemie plików +w trakcie lub po synchronizacji, proces odzyskiwania pozostanie spójny i niezawodny. +
    • +
    +
      +
    • +Bez obsługi migawek, usunięcie lub zmiana plików po operacji sync +może uniemożliwić pełne odzyskanie danych z innych uszkodzonych dysków. Dzieje się tak, +ponieważ parzystość nie odpowiada już zmodyfikowanym plikom, nawet jeśli +pliki te nie znajdują się na uszkodzonym dysku. Z drugiej strony, nowo dodane +pliki nie uniemożliwiają odzyskania już istniejących plików. +
    • +
    +

    Inne ograniczenia SnapRAID to:

    • W SnapRAID nadal masz oddzielne systemy plików dla każdego dysku. @@ -225,13 +239,13 @@ awarii całej macierzy dysków.
    • Zapisywane są tylko nazwy plików, znaczniki czasu, dowiązania symboliczne i dowiązania twarde. -Uprawnienia, właścicielstwo i rozszerzone atrybuty nie są zapisywane. +Uprawnienia, właściciel (własność) i rozszerzone atrybuty nie są zapisywane.

    -Getting Started +Pierwsze kroki (Getting Started)

    Aby użyć SnapRAID, musisz najpierw wybrać jeden dysk w swojej macierzy dysków, który zostanie przeznaczony na informacje o parzystości. Z jednym dyskiem @@ -307,7 +321,7 @@ uruchomieniu wznowi się w miejscu, w którym został przerwany. aktualizować informacje o parzystości, uruchamiając polecenie sync.

    -Scrubbing +Scrubbing (Scrubbing)

    Aby okresowo sprawdzać dane i parzystość pod kątem błędów, możesz uruchomić polecenie scrub. @@ -347,11 +361,11 @@ w wyniku scrub, ale powiązane bloki nie są oznaczane jako złe.

    -Pooling +Łączenie w pulę (Pooling)

    Uwaga: Funkcja łączenia w pulę opisana poniżej została zastąpiona przez narzędzie mergerfs, które jest obecnie zalecaną opcją dla użytkowników Linuksa -w społeczności SnapRAID. Mergefs zapewnia bardziej elastyczny i wydajny +w społeczności SnapRAID. Mergerfs zapewnia bardziej elastyczny i wydajny sposób łączenia wielu dysków w jeden ujednolicony punkt montowania, umożliwiając bezproblemowy dostęp do plików w całej macierzy bez polegania na dowiązaniach symbolicznych. Dobrze integruje się z SnapRAID w celu ochrony @@ -420,7 +434,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +Cofanie usuwania (Undeleting)

    SnapRAID działa bardziej jak program do tworzenia kopii zapasowych niż system RAID i może być użyty do przywrócenia lub odzyskania usuniętych plików do ich poprzedniego @@ -445,7 +459,7 @@ snapraid fix -m

    -Recovering +Odzyskiwanie (Recovering)

    Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków!

    NIE PANIKUJ! Będziesz w stanie je odzyskać! @@ -493,7 +507,7 @@ Uruchom je z dysku z wystarczającą ilością wolnego miejsca.

    Teraz odzyskałeś wszystko, co jest możliwe do odzyskania. Jeśli niektóre pliki są częściowo lub całkowicie nie do odzyskania, zostaną one przemianowane poprzez dodanie rozszerzenia .unrecoverable. -

    Szczegółową listę wszystkich nie do odzyskania bloków znajdziesz w pliku fix.log, +

    Szczegółową listę wszystkich bloków nie do odzyskania znajdziesz w pliku fix.log, sprawdzając wszystkie linie zaczynające się od unrecoverable:.

    Jeśli nie jesteś zadowolony z odzyskiwania, możesz spróbować ponownie tyle razy, ile chcesz. @@ -534,27 +548,27 @@ snapraid sync

    -Commands +Polecenia (Commands)

    SnapRAID udostępnia kilka prostych poleceń, które pozwalają na:

    • -Wyświetlenie statusu macierzy -> status +Wyświetlenie stanu macierzy -> status
    • -Kontrolę dysków -> smart, probe, up, down +Kontrola dysków -> smart, probe, up, down
    • -Wykonanie kopii zapasowej/migawki -> sync +Utworzenie punktu kopii zapasowej/przywracania -> sync
    • Okresowe sprawdzanie danych -> scrub
    • -Przywrócenie ostatniej kopii zapasowej/migawki -> fix. +Przywrócenie ostatniego punktu kopii zapasowej/przywracania -> fix.
    -

    Polecenia muszą być zapisane małymi literami. +

    Polecenia muszą być wpisywane małymi literami.

    status @@ -702,9 +716,10 @@ zostały zmodyfikowane.
    moved
    -Pliki przeniesione do innego katalogu na tym samym dysku. -Są one identyfikowane przez tę samą nazwę, rozmiar, znacznik czasu -i inode, ale inny katalog. +Pliki przeniesione lub o zmienionej nazwie na tym samym dysku +z zachowaniem tego samego i-węzła (inode). Są identyfikowane przez +ten sam inode, rozmiar i znacznik czasu, ale inną ścieżkę. Nazwa +pliku może być również inna.

    @@ -724,21 +739,20 @@ tylko nazwa.
    relocated
    -Pliki przeniesione na ten sam lub inny dysk, gdzie -oryginał zniknął. -Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru -i znacznika czasu. -Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka -musi być zgodna, aby plik został zidentyfikowany. -W przeciwieństwie do plików 'moved' na tym samym dysku, pliki -relokowane mają inny i-węzeł. +Pliki przeniesione do innego katalogu lub na inny dysk, +gdzie oryginalny plik zniknął, a inode nie został zachowany. +Są identyfikowane przez posiadanie tej samej nazwy, rozmiaru i +znacznika czasu. Jeśli podsekundowy znacznik czasu wynosi zero, +pełna ścieżka musi być zgodna, aby plik został zidentyfikowany. +W przeciwieństwie do plików 'moved', pliki relokowane wymagają, +aby nazwa pliku pozostała taka sama.
    restored
    -Pliki o innym i-węźle, ale pasującym katalogu, +Pliki o innym inode, ale pasującym katalogu, nazwie, rozmiarze i znaczniku czasu. Są to zazwyczaj pliki przywrócone po ich usunięciu.
    @@ -802,7 +816,7 @@ Po naprawie, przy następnym sprawdzeniu, zostaną one ponownie sprawdzone, a je Aby sprawdzić tylko złe bloki, możesz użyć polecenia scrub -p bad.

    Zaleca się uruchamianie scrub tylko na zsynchronizowanej macierzy, aby uniknąć zgłaszania błędów spowodowanych przez niezsynchronizowane dane. Błędy te są rozpoznawane -jako nie będące cichymi błędami, a bloki nie są oznaczane jako złe, +jako niebędące cichymi błędami, a bloki nie są oznaczane jako złe, ale takie błędy są zgłaszane w wyniku polecenia.

    Plik content jest modyfikowany w celu zaktualizowania czasu ostatniego sprawdzenia dla każdego bloku i oznaczenia złych bloków. @@ -813,13 +827,12 @@ Pliki w macierzy NIE są modyfikowane.

    fix

    -

    Naprawia wszystkie pliki i dane parzystości. -

    Wszystkie pliki i dane parzystości są porównywane ze stanem migawki -zapisanym w ostatniej sync. -Jeśli zostanie znaleziona różnica, jest ona przywracana do zapisanego stanu migawki. -

    OSTRZEŻENIE! Polecenie fix nie rozróżnia błędów od -celowych modyfikacji. Bezwarunkowo przywraca stan pliku -do ostatniej sync. +

    Naprawia wszystkie pliki oraz dane parzystości. +

    Wszystkie pliki i dane parzystości są porównywane ze stanem zapisanym podczas +ostatniej operacji sync. W przypadku znalezienia różnicy, następuje przywrócenie stanu zapisanego. +

    UWAGA! +Polecenie fix nie odróżnia błędów od celowych modyfikacji. +Bezwzględnie przywraca stan plików do momentu ostatniej operacji sync.

    Jeśli nie określono żadnej innej opcji, przetwarzana jest cała macierz. Użyj opcji filtra, aby wybrać podzbiór plików lub dysków do operacji.

    Aby naprawić tylko bloki oznaczone jako złe podczas sync i scrub, @@ -952,7 +965,7 @@ realokacji.

    -Options +Opcje (Options)

    SnapRAID udostępnia następujące opcje:

    @@ -1138,10 +1151,10 @@ taki jak K, M lub G (np. --bw-limit 1G).
    --t, --tail ROZMIAR +-t, --tail SIZE
    -Ogranicza listę plików do tych, które nie używają więcej niż określony -końcowy rozmiar dysków parzystości. +Ogranicza listę plików do tych, które nie wykraczają poza określoną +sekcję końcową (ogon) plików parzystości. Możesz użyć mnożników takich jak K, M, G lub T (np. --tail 1G). Opcja ta jest ważna tylko wtedy, gdy jest używana wraz z poleceniem locate. @@ -1292,10 +1305,10 @@ NIE MASZ ochrony danych podczas operacji sync.
    --W, --force-realloc-tail ROZMIAR +-W, --force-realloc-tail SIZE
    Działa jak -R, --force-realloc, ale ogranicza się do określonej części -końcowej (ostatnie ROZMIAR bajtów) każdego pliku parzystości. +końcowej (ostatnie SIZE bajtów) każdego pliku parzystości. Wymusza realokację (przeniesienie) wszelkich fragmentów/bloków plików obecnie przechowywanych w tej sekcji końcowej, pozwalając na ich umieszczenie w dowolnym miejscu w pliku (plikach) parzystości, gdzie @@ -1333,7 +1346,7 @@ w trybie dołączania. Wystąpienia %D i %T w nazwie są zastępowane datą i czasem w formacie RRRRMMDD i GGMMSS. W plikach wsadowych Windows musisz podwoić znak %, np. result-%%D.log. Aby użyć >>, musisz -ujęć nazwę w cudzysłów, np. ">>result.log". +ująć nazwę w cudzysłów, np. ">>result.log". Aby wyprowadzić log do standardowego wyjścia lub standardowego błędu, możesz użyć odpowiednio ">&1" i ">&2". Opisy tagów logu znajdziesz w pliku snapraid_log.txt lub na stronie podręcznika. @@ -1363,7 +1376,8 @@ Jednak check i fix zawsze zatrzymują się przy pierwszym błędzi Zaczyna przetwarzanie od określonego numeru bloku. Może to być przydatne do ponownej próby sprawdzenia lub naprawy określonych bloków w przypadku uszkodzonego dysku. -Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. +Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania +i jest obsługiwana tylko przez check i fix.
    @@ -1373,7 +1387,8 @@ Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. -B, --count BLKCOUNT
    Przetwarza tylko określoną liczbę bloków. -Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. +Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania +i jest obsługiwana tylko przez check i fix.
    @@ -1439,7 +1454,7 @@ Wyświetla wersję programu.

    -Configuration +Konfiguracja (Configuration)

    SnapRAID wymaga pliku konfiguracyjnego, aby wiedzieć, gdzie znajduje się Twoja macierz dysków i gdzie przechowywać informacje o parzystości. @@ -1537,6 +1552,10 @@ być unikalna. DIR to punkt montowania dysku w systemie plików.

    Możesz zmieniać punkt montowania w razie potrzeby, o ile zachowasz stałą nazwę NAME. +

    Jednak skonfigurowana ścieżka musi spójnie wskazywać na te same +dane bazowe. Jeśli ścieżka zawiera dowiązania symboliczne, +ich cele muszą pozostać stabilne. Zmiana takich dowiązań w celu +przełączenia katalogu danych w locie jest nieobsługiwana.

    Powinieneś użyć jednej opcji dla każdego dysku danych w macierzy.

    Możesz później zmienić nazwę dysku, zmieniając bezpośrednio nazwę NAME w pliku konfiguracyjnym, a następnie uruchamiając polecenie sync. @@ -1557,6 +1576,29 @@ dyski, ponieważ oczekuje się, że będą one zawsze w ruchu.

    +snapshot +

    +

    Włącza używanie migawek systemu plików dla poleceń sync, scrub, +check oraz fix. +

    Po włączeniu, SnapRAID tworzy migawkę w trybie tylko do odczytu dla każdego +obsługiwanego systemu plików z danymi na początku operacji 'sync'. Zapewnia to +stabilny obraz każdego systemu plików, zapobiegając sytuacji, w której późniejsze +modyfikacje zmieniłyby dane użyte do obliczenia parzystości. +

    To znacznie usprawnia odzyskiwanie danych: jeśli plik zostanie usunięty z aktywnego systemu +plików, pozostaje zachowany w migawce. Zapobiega to sytuacji, w której parzystość staje się "uszkodzona" +dla tego bloku, zapewniając możliwość pomyślnego odzyskania danych, +jeśli ulegnie awarii inny dysk. +

    Opcja ta dotyczy wyłącznie dysków z danymi sformatowanych w systemach plików +Btrfs, Bcachefs lub ZFS w systemie Linux oraz NTFS w systemie Windows. +Dyski parzystości lub dyski z danymi korzystające z innych systemów plików będą zawsze używać +aktywnej wersji systemu plików. +

    Tworzenie i usuwanie migawek wymaga uprawnień administratora. +Upewnij się, że SnapRAID jest uruchamiany z wymaganymi uprawnieniami (np. sudo), gdy +opcja ta jest włączona. +

    Szczegółowe wyjaśnienie cyklu życia migawek znajduje się w sekcji SNAPSHOTS. +

    +
    +

    nohidden

    Wyklucza wszystkie ukryte pliki i katalogi. @@ -1564,7 +1606,7 @@ W systemie Unix ukryte pliki to te zaczynające się od .. W systemie Windows są to te z atrybutem ukrycia.

    -

    +

    exclude/include PATTERN

    Definiuje wzorce plików lub katalogów do wykluczenia lub włączenia @@ -1574,12 +1616,16 @@ Wszystkie wzorce są przetwarzane w określonej kolejności. jest wykluczony. Jeśli jest to include, plik jest włączony. Jeśli żaden wzorzec nie pasuje, plik jest wykluczony, jeśli ostatni określony wzorzec to include, lub włączony, jeśli ostatni określony wzorzec to exclude. +

    Należy pamiętać, że filtrowanie odbywa się hierarchicznie podczas +przechodzenia katalogów. Jeśli katalog pasuje do reguły exclude, cały +katalog jest pomijany (odrzucany), a wszelkie reguły include dla plików +lub podkatalogów w nim zawartych nie będą oceniane.

    Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat specyfikacji wzorców.

    Ta opcja może być używana wielokrotnie.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Definiuje podstawowy rozmiar bloku w kibibajtach dla parzystości. @@ -1603,7 +1649,7 @@ zmarnujesz 12,8 GB parzystości, co może skutkować 12,8 GB mniejszą dostępną przestrzenią na dysku danych.

    Możesz sprawdzić ilość zmarnowanego miejsca na każdym dysku za pomocą status. Jest to ilość miejsca, którą musisz pozostawić wolną na dyskach danych -lub użyć dla plików nie włączonych do macierzy. +lub użyć dla plików niewłączonych do macierzy. Jeśli ta wartość jest ujemna, oznacza to, że jesteś blisko wypełnienia parzystości i reprezentuje to przestrzeń, którą nadal możesz zmarnować.

    Aby uniknąć tego problemu, możesz użyć większej partycji dla parzystości. @@ -1620,7 +1666,7 @@ dysku 4 TB, co pozwala na około 460 000 plików na każdym dysku danych bez marnowania miejsca.

    -

    +

    hashsize SIZE_IN_BYTES

    Definiuje rozmiar hasza w bajtach dla zapisanych bloków. @@ -1655,7 +1701,7 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    Automatycznie zapisuje stan podczas synchronizacji lub sprawdzania po przetworzeniu @@ -1664,21 +1710,21 @@ Ta opcja jest przydatna, aby uniknąć ponownego uruchamiania długich poleceń od zera, jeśli zostaną przerwane przez awarię maszyny lub inne zdarzenie.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Ustawia maksymalną dozwoloną temperaturę dysku w stopniach Celsjusza. Po określeniu, SnapRAID okresowo sprawdza temperaturę wszystkich dysków za pomocą narzędzia smartctl. Aktualne temperatury dysków są wyświetlane podczas działania SnapRAID. Jeśli którykolwiek dysk przekroczy ten limit, wszystkie operacje -zostają zatrzymane, a dyski są zatrzymywane (przechodzą w stan gotowości) na czas +zostają zatrzymane, a dyski są wyłączane (przechodzą w stan czuwania / uśpienia) na czas zdefiniowany przez opcję temp_sleep. Po okresie uśpienia, operacje są wznawiane, potencjalnie ponownie zatrzymując się, jeśli limit temperatury zostanie ponownie osiągnięty.

    Podczas działania SnapRAID analizuje również krzywą nagrzewania każdego dysku i szacuje długoterminową stałą temperaturę, którą mają osiągnąć, jeśli aktywność będzie kontynuowana. Oszacowanie jest wykonywane tylko po -czterokrotnym wzroście temperatury dysku, co zapewnia, że +czterokrotnym zarejestrowaniu wzrostu temperatury dysku, co zapewnia, że dostępnych jest wystarczająco dużo punktów danych do ustalenia wiarygodnego trendu. Ta przewidywana stała temperatura jest pokazywana w nawiasach obok aktualnej wartości i pomaga ocenić, czy chłodzenie systemu jest @@ -1693,14 +1739,14 @@ wykorzystuje najniższą temperaturę dysku zmierzoną na początku uruchomienia Aby wyświetlić temperaturę wszystkich dysków, użyj opcji -A lub --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    -

    Ustawia czas gotowości, w minutach, po osiągnięciu limitu temperatury. +

    Ustawia czas wstrzymania (czuwania), w minutach, po osiągnięciu limitu temperatury. W tym okresie dyski pozostają zatrzymane. Domyślnie jest to 5 minut.

    -

    +

    pool DIR

    Definiuje katalog puli, w którym tworzony jest wirtualny widok macierzy @@ -1708,7 +1754,7 @@ dysków za pomocą polecenia pool.

    Katalog musi już istnieć.

    -

    +

    share UNC_DIR

    Definiuje ścieżkę UNC Windows wymaganą do zdalnego dostępu do dysków. @@ -1722,7 +1768,7 @@ katalog i nazwę pliku.

    Ta opcja jest wymagana tylko dla systemu Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Definiuje niestandardowe opcje smartctl do uzyskania atrybutów SMART dla @@ -1735,6 +1781,8 @@ PARITY to jedna z nazw parzystości: parity, 2-parity, 3-parity

    W określonych OPCJACH ciąg %s jest zastępowany nazwą urządzenia. W przypadku kontrolerów RAID, urządzenie jest prawdopodobnie stałe i może nie być konieczne użycie %s. +

    Możesz również określić niestandardowy ciąg opcji informacyjnych za pomocą +znacznika [info: ...], aby zastąpić domyślną opcję -a.

    Zapoznaj się z dokumentacją smartmontools, aby uzyskać możliwe opcje:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1742,11 +1790,12 @@ prawdopodobnie stałe i może nie być konieczne użycie %s.
     

    Na przykład:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignoruje określony atrybut SMART podczas obliczania prawdopodobieństwa @@ -1756,18 +1805,22 @@ wprowadzające w błąd wartości dla określonego atrybutu. PARITY to jedna z nazw parzystości: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity lub z-parity. Specjalna wartość * może być użyta do zignorowania atrybutu na wszystkich dyskach. -

    Na przykład, aby zignorować atrybut Current Pending Sector Count na -wszystkich dyskach: +

    Można określić wiele atrybutów oddzielonych spacjami. +Każdy atrybut można określić jako liczbę od 1 do 255 lub jako nazwę +niewrażliwą na wielkość liter (np. Current_Pending_Sector). +

    Na przykład, aby zignorować atrybuty Current Pending Sector Count i +Reallocated Sectors Count na wszystkich dyskach za pomocą ich numeru lub nazwy:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Aby zignorować go tylko na pierwszym dysku parzystości: +

    Aby zignorować je tylko na pierwszym dysku parzystości:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Examples

    Przykład typowej konfiguracji dla systemu Unix: @@ -1780,7 +1833,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1796,7 +1849,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1805,7 +1858,165 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    -Pattern +Migawki (Snapshots) +

    +

    Jeśli opcja snapshot jest włączona w konfiguracji, SnapRAID +używa migawek systemu plików, aby utrzymać stabilność danych odczytywanych +podczas operacji, nawet jeśli pliki w aktywnych systemach plików zostaną +później zmodyfikowane lub usunięte. +

    Zarządzanie migawkami jest całkowicie automatyczne i przejrzyste. +Możesz nadal używać SnapRAID dokładnie tak jak dotychczas, z dodatkową +ochroną zapewnianą przez migawki, która jest realizowana w całości w +tle. +

    Zapewnia to dwie główne korzyści: +

    +
    +
    +Spójność +
    +Pliki zmodyfikowane w aktywnym systemie plików podczas długotrwałej +operacji sync lub scrub nie spowodują niezgodności parzystości ani przerwania +operacji, ponieważ każdy objęty migawką system plików pozostaje niezmieniony +przez cały czas trwania operacji. +
    +
    +
    +
    +Odzyskiwanie +
    +Jeśli plik zostanie zaktualizowany lub usunięty z aktywnego systemu plików, +pozostaje zachowany w migawce. Jeśli awaria dysku nastąpi +przed uruchomieniem kolejnej operacji sync, SnapRAID użyje danych zachowanych +w migawce do odbudowania uszkodzonego dysku. +W przypadku awarii dysku podczas aktywnego procesu sync, +SnapRAID jest również w stanie automatycznie czytać zarówno z migawki +poprzedniego obliczenia parzystości, jak i z bieżącej. +Maksymalizuje to prawdopodobieństwo pełnego odzyskania danych poprzez +zapewnienie dostępu do dokładnych bloków danych wymaganych do rozwiązania +równań parzystości, nawet jeśli bloki te zostały zmodyfikowane +lub usunięte pomiędzy operacjami sync. +Bez migawek, zaktualizowany lub usunięty plik na sprawnym dysku +skutkuje brakiem bloków danych, które mogą być wymagane do +naprawy innych uszkodzonych dysków. +
    +
    +
    +

    Migawki są tworzone tylko dla dysków z danymi i tylko wtedy, gdy bazowy +system plików obsługuje tę funkcjonalność. Dyski parzystości zawsze używają +aktywnego systemu plików. +

    Obecnie jest to obsługiwane w systemach Btrfs, Bcachefs i ZFS w systemie Linux +oraz NTFS w systemie Windows. +

    Można mieszać dyski z danymi o różnych systemach plików. Tylko te, które +obsługują migawki, będą z nich korzystać, podczas gdy inne dyski będą nadal +działać bezpośrednio na aktywnym systemie plików. +

    Tworzenie i usuwanie migawek wymaga uprawnień administratora. +Upewnij się, że SnapRAID jest uruchamiany z wymaganymi uprawnieniami (np. sudo), +gdy migawki są włączone. +

    +

    +Zachowanie poleceń przy użyciu migawek +

    +

    Polecenia sync oraz scrub używają migawek dla dysków z danymi, których +systemy plików je obsługują. Na dysku objętym migawką polecenie widzi stabilny +obraz systemu plików, na który nie mają wpływu równoczesne zmiany w aktywnym +systemie plików. +Podczas operacji sync nowa migawka jest tworzona niezależnie dla każdego +obsługiwanego systemu plików z danymi. Migawki te łącznie dostarczają dane +używane do obliczenia parzystości. +W przeciwieństwie do tego, polecenie scrub wykorzystuje ostatnią migawkę, tę +utworzoną podczas najnowszej synchronizacji, aby utrzymać wiarygodny punkt odniesienia +odpowiadający istniejącej parzystości. +

    W przypadku poleceń check oraz fix, użycie ostatniej migawki +zależy od tego, czy konkretne dyski są wskazywane za pomocą opcji +-d, --filter-disk. +

    Dysk jawnie wybrany za pomocą opcji -d ("cel" operacji) +zawsze używa aktywnego systemu plików. Dla fix pozwala to na przywrócenie +danych na aktywny dysk zamienny. Dla check pozwala to na symulację +operacji fix w tych samych warunkach. +

    Wszystkie inne dyski z danymi (dyski "referencyjne") będą dostępne za pośrednictwem +swoich migawek. Zapewnia to, że nawet jeśli modyfikujesz pliki +na sprawnych dyskach podczas trwania odzyskiwania danych, SnapRAID +posiada stabilny, zamrożony punkt odniesienia do rozwiązania równań parzystości. +

    Jeśli nie podano opcji -d, SnapRAID zakłada, że operacja dotyczy +całej macierzy. W takim przypadku check oraz fix będą używać wyłącznie +aktywnych systemów plików. +

    Wszystkie inne polecenia działają wyłącznie na aktywnym systemie plików. +

    +
    +
    +

    +Cykl życia migawek (Snapshots Lifecycle) +

    +

    SnapRAID zarządza trzema określonymi migawkami, stable (stabilną), pending (oczekującą) oraz scan (skanowania), +w ukrytym katalogu w katalogu głównym każdego podwolumenu danych. +W systemach Btrfs, Bcachefs i NTFS używany jest katalog .snapraid/, +w systemie ZFS standardowy .zfs/snapshot/. +

    Migawka stable reprezentuje stan ostatniej +pomyślnie zakończonej operacji sync, zawierając dokładne dane użyte do +obliczenia bieżącej parzystości. Służy ona jako główne źródło danych +dla poleceń scrub, check i fix. +

    Migawka scan to tymczasowy obraz tworzony na początku +operacji sync w celu zapewnienia zamrożonego stanu do skanowania i obliczenia parzystości. +Po zeskanowaniu i zapisaniu nowego stanu zawartości zastępuje ona poprzednią +migawkę pending. +

    Migawka pending to obraz używany przez przerwaną operację sync. +Po pomyślnym zakończeniu operacji poprzednia migawka stable +jest usuwana, a migawka pending zostaje podniesiona do rangi +nowej stabilnej referencji. +

    Jeśli operacja sync zostanie przerwana, migawka pending zostaje zachowana. +Kolejne polecenia scrub, check i fix będą używać tej oczekującej migawki, +ponieważ odpowiada ona stanowi systemu plików zapisanemu w pliku .content, +nawet jeśli parzystość jest zsynchronizowana tylko częściowo. +

    W przypadku przerwania operacji sync, polecenia check i fix +odczytują dane również z migawki stable, aby pobrać bloki danych +z plików, które zostały zaktualizowane lub usunięte podczas synchronizacji. +Jest to możliwe, ponieważ plik .content zachowuje metadane dla +wszystkich zmodyfikowanych lub usuniętych plików przez cały proces sync. +Te informacje historyczne są czyszczone dopiero po pomyślnym zakończeniu operacji sync +i zapisaniu ostatecznej wersji pliku .content. +

    Jeśli operacja sync zostanie zrestartowana po przerwaniu, istniejąca +oczekująca (pending) migawka jest usuwana, a tworzona jest nowa, aby +uchwycić bieżący stan aktywnego systemu plików. +Jeśli jednak operacja sync zostanie przerwana, należy unikać modyfikowania, +usuwania, zastępowania lub przenoszenia plików do momentu pomyślnego ukończenia +kolejnej operacji sync. Parzystość może nadal zawierać bloki obliczone na podstawie +migawki użytej przez przerwaną synchronizację. Późniejsza synchronizacja może zastąpić +tę migawkę, uniemożliwiając odzyskanie pośrednich wersji plików. +

    +

    +Kopie zapasowe z migawkami systemu plików (External backups with filesystem snapshots) +

    +

    Gdy migawki systemu plików są włączone, SnapRAID uzyskuje dostęp do migawek +lub tworzy je w katalogu głównym każdego podwoluminu danych, woluminu lub +zestawu danych (dataset). +

    Prostym sposobem na uniknięcie jakichkolwiek konfliktów z zewnętrznymi +narzędziami jest wskazanie w konfiguracji data zwykłego podkatalogu +wewnątrz podwoluminu lub woluminu (na przykład /mnt/subvol/data zamiast +/mnt/subvol). SnapRAID zawsze tworzy katalog migawek w katalogu głównym +podwoluminu (na przykład /mnt/subvol/.snapraid/), pozostawiając podkatalog +danych czysty, dzięki czemu migawki pozostają na zewnątrz i są niewidoczne +dla narzędzi do tworzenia kopii zapasowych działających w tym katalogu. +

    W przeciwnym razie, jeśli skonfigurowany katalog data jest sam w sobie +katalogiem głównym podwoluminu lub woluminu, SnapRAID utworzy katalog +.snapraid/ bezpośrednio w nim (w systemach Btrfs, Bcachefs i NTFS). +Chociaż SnapRAID automatycznie wyklucza ten katalog z własnego skanowania, +zewnętrzne narzędzia do tworzenia kopii zapasowych lub synchronizacji +plików napotkają go. Jeśli nie zostanie wykluczony, mogą wejść do migawek +lub dowiązań katalogów i skopiować całe zamrożone drzewo danych, duplikując +dane i wyczerpując przestrzeń dyskową kopii zapasowej. Zawsze konfiguruj +zewnętrzne narzędzia do tworzenia kopii zapasowych tak, aby wykluczały +katalog .snapraid/. +

    W systemie ZFS migawki są udostępniane za pośrednictwem standardowego +katalogu wirtualnego .zfs/snapshot/ zamiast .snapraid/. Domyślnie +(snapdir=hidden) system ZFS ukrywa ten katalog na listach katalogów, więc +zewnętrzne narzędzia do tworzenia kopii zapasowych go nie przeskanują. Jeśli +włączono opcję snapdir=visible, upewnij się, że narzędzia do tworzenia kopii +zapasowych wykluczają katalog .zfs/. +

    +
    +
    +

    +Wzorce (Pattern)

    Wzorce zapewniają elastyczny sposób filtrowania plików do uwzględnienia lub wykluczenia. Używając znaków globbingowych, można zdefiniować reguły, które @@ -1819,25 +2030,25 @@ znak zapytania, nigdy nie przekracza granic katalogów. Zatrzymuje się na ukośniku, co czyni ją odpowiednią do dopasowywania w obrębie jednego składnika ścieżki. Jest to standardowe zachowanie symboli wieloznacznych znane z globbingu powłoki (shell). -

    Podwójna gwiazdka ** jest potężniejsza, dopasowuje dowolną sekwencję -znaków, w tym separatory katalogów. Pozwala to wzorcom dopasowywać się -na wielu poziomach katalogów. Gdy ** pojawia się bezpośrednio wewnątrz -wzorca, może dopasować zero lub więcej znaków, w tym ukośniki między -otaczającym tekstem dosłownym. -

    Najważniejszym zastosowaniem ** jest specjalna forma /**/. Dopasowuje ona -zero lub więcej pełnych poziomów katalogów, umożliwiając dopasowanie plików -na dowolnej głębokości w drzewie katalogów bez znajomości dokładnej struktury ścieżki. -Na przykład wzorzec src/**/main.js pasuje do src/main.js (pomijając -zero katalogów), src/ui/main.js (pomijając jeden katalog) oraz -src/ui/components/main.js (pomijając dwa katalogi). +

    Symbol wieloznaczny podwójnej gwiazdki ** dopasowuje się poprzez separatory +katalogów tylko wtedy, gdy sąsiaduje z separatorem katalogów (jest poprzedzony +lub zakończony ukośnikiem). W tej formie dopasowuje zero lub więcej znaków +na wielu poziomach katalogów. Na przykład foo/**/bar dopasowuje foo/bar, +foo/a/bar oraz foo/a/b/bar; **/build dopasowuje build oraz +foo/bar/build; a src/**.js dopasowuje src/main.js oraz +src/ui/components/main.js. +Samodzielna forma /**/ nie jest akceptowana jako kompletny wzorzec. +

    Gdy ** nie sąsiaduje z ukośnikiem, zachowuje się jak * i nie dopasowuje +separatorów katalogów. Na przykład **.jpg dopasowuje photo.jpg w bieżącym +katalogu, ale nie pasuje do dir/photo.jpg. W tym celu należy użyć **/*.jpg.

    Klasy znaków używające nawiasów kwadratowych [] dopasowują pojedynczy znak z określonego zestawu lub zakresu. Podobnie jak inne wzorce pojedynczych znaków, nie pasują one do separatorów katalogów. Klasy obsługują zakresy i negację za pomocą wykrzyknika.

    Podstawową różnicą, o której należy pamiętać, jest to, że *, ? i klasy znaków wszystkie respektują granice katalogów i dopasowują się tylko w obrębie jednego -składnika ścieżki, podczas gdy ** jest jedynym wzorcem, który może dopasowywać się poprzez -separatory katalogów. +składnika ścieżki, podczas gdy ** może dopasowywać się poprzez separatory +katalogów tylko wtedy, gdy sąsiaduje z ukośnikiem.

    Istnieją cztery różne typy wzorców:

    @@ -1886,7 +2097,7 @@ Katalogi systemowe Windows, połączenia, punkty montowania i inne specjalne katalogi Windows są traktowane jako pliki, co oznacza, że aby je wykluczyć, musisz użyć reguły pliku, a nie katalogu.

    Jeśli nazwa pliku zawiera znak *, ?, [, -lub ], musisz go uciec, aby uniknąć interpretacji jako +lub ], musisz go zamaskować (poprzedzić znakiem ucieczki), aby uniknąć interpretacji jako znaku globbing. W systemie Unix znakiem ucieczki jest \; w systemie Windows jest to ^. Gdy wzorzec znajduje się w wierszu poleceń, musisz podwoić znak ucieczki, aby uniknąć interpretacji przez powłokę poleceń. @@ -1925,6 +2136,26 @@ include /movies/ include /musics/ include /pictures/ +

    Należy pamiętać, że wykluczenie katalogu (za pomocą DIR/ lub /PATH/DIR/) +uniemożliwia programowi SnapRAID wejście i skanowanie tego katalogu. +W konsekwencji nie jest możliwe ponowne włączenie pliku lub podkatalogu +znajdującego się w wykluczonym katalogu nadrzędnym, ponieważ skaner nigdy +do niego nie przechodzi. +

    Na przykład poniższa konfiguracja NIE uwzględni pliku file.dat, +ponieważ katalog /keep/ zostanie odrzucony, zanim file.dat będzie +mógł zostać sprawdzony: +

    +# NIE działa zgodnie z oczekiwaniami: /keep/ jest całkowicie pomijany
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Aby wykluczyć pliki wewnątrz katalogu, zachowując wybrane, należy dopasować +wzorzec plików wewnątrz katalogu, zamiast wykluczać sam katalog: +

    +# Działa: /keep/ jest przeszukiwany, ale pozostałe pliki są wykluczane
    +include /keep/file.dat
    +exclude /keep/*
    +

    W wierszu poleceń, używając opcji -f, możesz użyć tylko wzorców include. Na przykład:

    @@ -1936,8 +2167,8 @@ snapraid -f "*.mp3" check
     je cytować, aby zapobiec ich rozszerzeniu przez powłokę.
     

    -

    -Ignore File +

    +Plik ignorowania (Ignore File)

    Oprócz reguł globalnych w pliku konfiguracyjnym, możesz umieścić pliki .snapraidignore w dowolnym katalogu w macierzy, aby zdefiniować @@ -2002,18 +2233,21 @@ build/

    -

    -Content +

    +Zawartość (Content)

    SnapRAID przechowuje listę i sumy kontrolne Twoich plików w pliku zawartości.

    Jest to plik binarny, który zawiera listę wszystkich plików obecnych w Twojej macierzy dysków, wraz ze wszystkimi sumami kontrolnymi w celu weryfikacji ich integralności. -

    Ten plik jest odczytywany i zapisywany przez polecenia sync i scrub -oraz odczytywany przez polecenia fix, check i status. +

    Plik zawartości jest odczytywany i zapisywany przez polecenia sync, +scrub, touch i rehash. Jest odczytywany przez polecenia status, +diff, check, fix, list, dup, locate i pool, oraz jest +całkowicie ignorowany przez polecenia smart, probe, up, down +i devices.

    -

    -Parity +

    +Parzystość (Parity)

    SnapRAID przechowuje informacje o parzystości Twojej macierzy w plikach parzystości. @@ -2023,8 +2257,8 @@ bloków zdefiniowanych w pliku content. oraz tylko odczytywane przez polecenia scrub i check.

    -

    -Encoding +

    +Kodowanie (Encoding)

    SnapRAID w systemie Unix ignoruje wszelkie kodowanie. Odczytuje i przechowuje nazwy plików z tym samym kodowaniem używanym przez system plików. @@ -2036,6 +2270,281 @@ czcionki TrueType, takiej jak Lucida Console, jako czcionki konsoli. Dotyczy to tylko drukowanych nazw plików; jeśli przekierujesz wyjście konsoli do pliku, wynikowy plik jest zawsze w formacie UTF-8. +

    +
    +

    +Kod wyjścia (Exit Code) +

    +

    SnapRAID kończy działanie z następującymi kodami błędów: +

    +
    +
    +0 +
    +Wszystko w porządku. +
    +
    +
    +
    +1 +
    +Polecenie napotkało błędy. +
    +
    +
    +
    +2 +
    +Polecenie diff wykazało, że wszystko jest w porządku, ale wymagane jest sync. +
    +
    +
    +
    +3 +
    +Polecenie urządzenia dyskowego (probe, smart, devices, up, +down) zostało zakończone, ale co najmniej jeden system plików działa +w trybie zdegradowanym z brakującymi urządzeniami. +
    +
    +
    +
    +
    +

    +Znane problemy (Known Issues) +

    +
    +

    +Granice systemu plików +

    +

    SnapRAID nie przekracza granic systemów plików, punktów montowania ani +podwolumenów podczas skanowania dysku z danymi. Po wykryciu takiej granicy +SnapRAID zgłasza OSTRZEŻENIE i nie skanuje dalej. +

    Pliki znajdujące się poza takimi granicami nie są uwzględniane na dysku +z danymi i muszą zostać skonfigurowane oddzielnie, jeśli mają być chronione. +

    +
    +

    +Punkty montowania z migawkami systemu plików +

    +

    Gdy migawki systemu plików są włączone, zagnieżdżone punkty montowania oraz +montowania bind wewnątrz dysku z danymi nie są obsługiwane. +

    Punkty montowania są częścią przestrzeni nazw montowania działającego +systemu i nie są zachowywane w migawkach systemu plików. W związku z tym +podczas skanowania migawki katalog ukryty przez punkt montowania w aktywnym +systemie plików może stać się widoczny. +

    Nie umieszczaj zagnieżdżonych punktów montowania ani montowań bind wewnątrz +dysków z danymi, gdy migawki systemu plików są włączone. +

    +
    +

    +Wiele konfiguracji z migawkami systemu plików +

    +

    Obsługa migawek nie może być bezpiecznie współdzielona przez wiele +niezależnych konfiguracji SnapRAID korzystających z tej samej przestrzeni +nazw migawek systemu plików. +

    W systemach Btrfs i Bcachefs tylko jedna konfiguracja SnapRAID z włączoną +obsługą migawek może używać katalogów danych w obrębie tego samego +podwolumenu. W systemie ZFS to samo ograniczenie dotyczy datasetu, a w NTFS +woluminu. +

    Wiele konfiguracji współdzielących tę samą przestrzeń nazw migawek używa tych +samych migawek stable, pending oraz scan. Uruchomienie jednej +konfiguracji może zatem zastąpić lub usunąć migawki odzyskiwania wymagane +przez inną. +

    +
    +

    +Modyfikacje plików w miejscu bez zmiany znacznika czasu +

    +

    SnapRAID wykrywa modyfikacje plików, porównując rozmiary plików oraz +znaczniki czasu modyfikacji (mtime). +

    Jeśli aplikacja modyfikuje plik w miejscu bez zmiany jego rozmiaru ani +aktualizacji znacznika czasu modyfikacji, polecenia "diff" i "sync" nie +wykryją zmiany pliku, a jego parzystość nie zostanie zaktualizowana. +

    Aby SnapRAID rozpoznał takie zmiany, zaktualizuj znacznik czasu modyfikacji +pliku (na przykład za pomocą narzędzia "touch"). W przeciwnym razie różnica +zostanie wykryta dopiero jako niezgodność skrótu podczas kolejnego "scrub" +lub "check". +

    +
    +

    +Dopasowywanie wielkości liter znaków spoza ASCII w systemie Windows +

    +

    SnapRAID używa standardowego, przewidywalnego kodowania UTF-8 na wszystkich +platformach, ograniczając dopasowywanie bez uwzględniania wielkości liter do +znaków ASCII. +

    Systemy plików Windows cierpią z powodu przestarzałego projektu narzucania +braku rozróżniania wielkości liter w nazwach plików Unicode za pomocą +arbitralnych, zależnych od systemu tabel składania znaków (folding tables). +W rezultacie Windows zaciera rzeczywistość systemu plików, traktując zupełnie +różne sekwencje bajtów Unicode tak, jakby były tym samym plikiem. +

    Na przykład À.txt i à.txt to odrębne nazwy Unicode, a jednak Windows +nielogicznie traktuje je jako identyczne, podczas gdy SnapRAID zachowuje ich +rzeczywiste rozróżnienie. +

    Ograniczenie to wynika z niespójnej obsługi nazw plików Unicode przez system +Windows oraz jego uporczywego stosowania aliasów bez uwzględniania wielkości +liter. Aby zapobiec rozbieżnościom wynikającym ze składania znaków przez +Windows, zawsze podawaj dokładną wielkość liter w przypadku znaków spoza ASCII +w ścieżkach konfiguracyjnych i filtrach. +

    +
    +

    +Odzyskiwanie za pomocą częściowego fix +

    +

    Gdy polecenie fix jest ograniczone za pomocą -S, --start lub -B, --count, +SnapRAID działa tylko na wybranych blokach i nie przeprowadza finalizacji +na poziomie plików ani kwarantanny. +

    Jeśli odzyskiwanie da dane typu best-effort, co do których nie można udowodnić, +że reprezentują bieżącą zawartość, takie bloki mogą nadal zostać zapisane pod +zwykłą nazwą pliku. Niepewność związana z tymi odzyskanymi blokami nie jest +zachowywana po zakończeniu polecenia. +

    W rezultacie późniejsze wykonanie fix potraktuje te czytelne bloki jako +prawidłowe dane pliku i nie podejmie ponownej próby ich odzyskania. Może to +spowodować, że późniejsze odzyskiwanie zgłosi sukces, pozostawiając w pliku +niekompletne lub nieaktualne dane. +

    Opcje -S i -B są przeznaczone wyłącznie do zaawansowanego odzyskiwania +ręcznego, zazwyczaj po niepowodzeniu normalnego fix. Jeśli częściowy fix +zgłosi dane niemożliwe do odzyskania, przed podjęciem kolejnej próby odzyskiwania +należy usunąć lub zmienić nazwę plików, których to dotyczy, albo ręcznie zweryfikować +ich zawartość. +

    +
    +

    +Twarde dowiązania NTFS i wykluczone ścieżki +

    +

    W systemie plików NTFS wpisy katalogowe niezależnie buforują rozmiar pliku +i znaczniki czasu dla każdego twardego dowiązania. Gdy plik zostanie +zmodyfikowany za pośrednictwem jednego dowiązania, wpisy katalogowe innych +dowiązań wskazujących ten sam plik mogą zachowywać nieaktualne metadane +do momentu uzyskania do nich dostępu. +

    SnapRAID automatycznie wykrywa i normalizuje ten stan, gdy podczas skanowania +napotka co najmniej dwa twarde dowiązania do tego samego pliku. Jeśli jednak +zeskanowane zostanie tylko jedno twarde dowiązanie, podczas gdy pozostałe są +wykluczone przez filtry lub znajdują się poza ścieżką dysku danych, SnapRAID +nie może wykryć kolizji i-węzłów (inode) i polega na buforowanych metadanych +jedynego widocznego dowiązania. +

    W konsekwencji modyfikacje dokonane za pośrednictwem wykluczonego lub +zewnętrznego twardego dowiązania mogą pozostać niezauważone przez SnapRAID, +dopóki metadane uwzględnionego dowiązania nie zostaną odświeżone przez system +operacyjny (na przykład po uzyskaniu dostępu do pliku lub otwarciu go +przez tę ścieżkę). +

    Aby uniknąć tego ograniczenia, należy unikać modyfikowania chronionych plików +za pośrednictwem twardych dowiązań wykluczonych ze SnapRAID lub upewnić się, +że wszystkie twarde dowiązania do danego pliku są uwzględnione w skanowaniu, +aby SnapRAID mógł je znormalizować. +

    +
    +

    +Odzyskiwanie po przerwanym sync z wieloma parzystościami +

    +

    W macierzy z wieloma dyskami parzystości przerwane polecenie sync może +pozostawić różne poziomy parzystości chwilowo niezsynchronizowane ze sobą. +Na przykład parzystość 1 może już zawierać nowo zaktualizowane dane, +podczas gdy parzystość 2 nadal zawiera stare dane. +

    Podczas wykonywania check lub fix SnapRAID sprawdza różne kombinacje +parzystości i weryfikuje zrekonstruowane dane z wykorzystaniem znanych +skrótów bloków (obejmujących cały blok, zazwyczaj 256 KiB). +

    Jeśli SnapRAID podejmie próbę rekonstrukcji z użyciem niespójnej +mieszanki starej i nowej parzystości, liniowe równania RAID dadzą +nieprawidłowe dane. Aby taka niepoprawna kombinacja została omyłkowo +zaakceptowana, równania musiałyby przypadkowo zrekonstruować co najmniej +jeden pełny blok 256 KiB tak idealnie, aby jego skrót się zgadzał, +podczas gdy inne niezsynchronizowane bloki w tym samym pasku zostaną +zrekonstruowane z błędnymi danymi. +

    Scenariusz ten nie zależy od kolizji skrótów; wymagałby raczej, aby same +równania mieszanej parzystości przypadkowo odtworzyły dokładną, +oryginalną zawartość 256-KiB bloku. Choć jest to matematycznie możliwe +w przypadku specjalnie spreparowanych lub silnie powtarzalnych danych, +jest to praktycznie niemożliwe w przypadku rzeczywistych danych. +

    Jeśli wszystkie dyski są sprawne, dokończenie przerwanego sync przed +wprowadzeniem dalszych zmian usuwa tę niejednoznaczność. Jeśli nastąpiła +awaria dysku i konieczne jest odzyskanie danych, należy unikać modyfikacji +dysków danych przed uruchomieniem check lub fix. +

    +
    +

    +Zastrzeżone nazwy plików i katalogów +

    +

    SnapRAID rezerwuje niektóre nazwy plików, katalogów i migawek do swoich +wewnętrznych operacji. Nie używaj tych nazw dla danych użytkownika: +

    +
    +
    +.snapraidignore +
    +Lokalny plik reguł wykluczeń. +
    +
    +
    +
    +.snapraid +
    +Katalog kontenera migawek. +
    +
    +
    +
    +snapraid-* +
    +Nazwy migawek ZFS zarządzanych przez SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Uszkodzone pliki objęte kwarantanną podczas odzyskiwania. +
    +
    +
    +
    +CONTENT.tmp +
    +Plik tymczasowy do aktualizacji pliku content. +
    +
    +
    +
    +CONTENT.lock +
    +Plik blokady pliku content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Tymczasowy plik rezerwacji miejsca podczas alokacji +parzystości w systemie Windows. +
    +
    +
    +

    Użycie tych nazw dla niepowiązanych danych może spowodować, że pliki lub +migawki zostaną zignorowane, błędnie zinterpretowane jako metadane, +nadpisane, przemianowane lub usunięte. +

    W systemie Windows wszystkie warianty wielkości liter są również zastrzeżone, +nawet w katalogach NTFS skonfigurowanych do rozróżniania wielkości liter +(na przykład .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP i CONTENT.Lock). +

    +
    +
    +

    +Tłumaczenie (Translation) +

    +

    Ten dokument jest automatycznym tłumaczeniem angielskiej instrukcji. +Wersję oficjalną stanowi oryginalny podręcznik w języku angielskim. +

    +
    +

    +Prawa autorskie (Copyright) +

    +

    Ten plik jest chroniony prawem autorskim (C) 2026 Andrea Mazzoleni +

    +
    +

    +Zobacz również (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-pt.html b/manual-pt.html index 00525bcf..648558e0 100644 --- a/manual-pt.html +++ b/manual-pt.html @@ -114,7 +114,7 @@

    -Sinopse +Sinopse (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Descrição +Descrição (Description)

    SnapRAID é um programa de backup projetado para arrays de disco, armazenando informações de paridade para recuperação de dados no @@ -189,22 +189,36 @@ economizando energia e reduzindo o ruído.

    -Limitações +Limitações (Limitations)

    -

    SnapRAID é um híbrido entre um programa RAID e um programa de backup, -visando combinar os melhores benefícios de ambos. No entanto, ele tem -algumas limitações que você deve considerar antes de usá-lo. -

    A principal limitação é que, se um disco falhar e você não tiver -sincronizado recentemente, talvez não consiga recuperar totalmente. -Mais especificamente, você pode não conseguir recuperar até o tamanho dos -arquivos alterados ou excluídos desde a última operação de sincronização. -Isso ocorre mesmo que os arquivos alterados ou excluídos não estejam no -disco com falha. É por isso que o SnapRAID é mais adequado para -dados que raramente mudam. -

    Por outro lado, arquivos recém-adicionados não impedem a recuperação de -arquivos já existentes. Você perderá apenas os arquivos adicionados -recentemente se estiverem no disco com falha. -

    Outras limitações do SnapRAID são: +

    O SnapRAID é um híbrido entre um RAID e um programa de backup, com o objetivo de combinar +os melhores benefícios de ambos. No entanto, possui algumas limitações que deve +considerar antes de o utilizar. +

    A principal limitação é que, se um disco falhar, apenas poderá recuperar dados até ao +estado da última operação de sincronização (sync). Quaisquer dados adicionados ou modificações feitas +desde a última sincronização que estejam localizados no disco com falha serão perdidos. +

    Consequentemente, o SnapRAID é adequado principalmente para dados que raramente mudam. +

    Para dados que já existiam na última sincronização, a fiabilidade da recuperação depende +de a opção snapshot ser ou não utilizada: +

      +
    • +Com suporte a instantâneos (disponível em Btrfs, ZFS, Bcachefs e NTFS), +o SnapRAID pode manter automaticamente uma referência congelada +independente de cada sistema de arquivos de dados suportado. +Isso garante que, mesmo que modifique ou exclua arquivos no seu sistema de arquivos ativo +durante ou após uma sincronização, o processo de recuperação permanece consistente e confiável. +
    • +
    +
      +
    • +Sem suporte a instantâneos, excluir ou alterar arquivos após um sync +pode impedir a recuperação total de outros discos com falha. Isso ocorre +porque a paridade já não corresponde aos arquivos modificados, mesmo que +esses arquivos não estejam no disco com falha. Por outro lado, arquivos adicionados recentemente +não impedem a recuperação de arquivos já existentes. +
    • +
    +

    Outras limitações do SnapRAID são:

    • Com o SnapRAID, você ainda tem sistemas de arquivos separados para cada disco. @@ -231,7 +245,7 @@ são salvos. Permissões, propriedade e atributos estendidos não são salvos.

    -Primeiros Passos +Primeiros Passos (Getting Started)

    Para usar o SnapRAID, você precisa primeiro selecionar um disco em seu array de discos para dedicar às informações de parity (paridade). Com um @@ -307,7 +321,7 @@ execução, ele será retomado de onde foi interrompido. atualizar as informações de paridade executando o comando sync.

    -Scrubbing +Scrubbing (Scrubbing)

    Para verificar periodicamente os dados e a paridade em busca de erros, você pode executar o comando scrub. @@ -348,11 +362,11 @@ mas os blocos relacionados não são marcados como ruins.

    -Pooling +Pooling (Pooling)

    Nota: O recurso de pooling descrito abaixo foi substituído pela ferramenta mergerfs, que agora é a opção recomendada para usuários Linux na comunidade -SnapRAID. Mergefs oferece uma maneira mais flexível e eficiente de agrupar +SnapRAID. Mergerfs oferece uma maneira mais flexível e eficiente de agrupar várias unidades em um único ponto de montagem unificado, permitindo acesso perfeito a arquivos em todo o seu array sem depender de links simbólicos. Ele se integra bem ao SnapRAID para proteção de paridade e é comumente usado @@ -449,7 +463,7 @@ snapraid fix -m

    -Recuperando +Recuperação (Recovering)

    O pior aconteceu e você perdeu um ou mais discos!

    NÃO ENTRE EM PÂNICO! Você será capaz de recuperá-los! @@ -503,7 +517,7 @@ adicionando a extensão .unrecoverable. no arquivo fix.log, verificando todas as linhas que começam com unrecoverable:.

    Se você não estiver satisfeito com a recuperação, pode tentar novamente quantas vezes quiser. -

    Por exemplo, se você removeu arquivos do array após a última +

    Por exemplo, se você removeu arquivos do array após o último sync, isso pode resultar em alguns arquivos não sendo recuperados. Neste caso, você pode tentar novamente o fix usando a opção -i, --import, especificando onde esses arquivos estão agora para incluí-los novamente @@ -541,24 +555,24 @@ snapraid sync

    -Comandos +Comandos (Commands)

    -

    SnapRAID fornece alguns comandos simples que permitem a você: +

    O SnapRAID fornece alguns comandos simples que lhe permitem:

    • -Imprimir o status do array -> status +Imprimir o estado do array -> status
    • Controlar os discos -> smart, probe, up, down
    • -Fazer um backup/snapshot -> sync +Criar um ponto de backup/recuperação -> sync
    • Verificar periodicamente os dados -> scrub
    • -Restaurar o último backup/snapshot -> fix. +Restaurar o último ponto de backup/recuperação -> fix.

    Os comandos devem ser escritos em letras minúsculas. @@ -712,9 +726,10 @@ o que significa que foram modificados.

    moved
    -Arquivos movidos para um diretório diferente no mesmo disco. -Eles são identificados por terem o mesmo nome, tamanho, -carimbo de data/hora e inode, mas um diretório diferente. +Arquivos movidos ou renomeados no mesmo disco, mantendo +o mesmo inode. Eles são identificados por terem o mesmo inode, +tamanho e carimbo de data/hora, mas um caminho diferente. O nome +do arquivo também pode ser diferente.
    @@ -734,14 +749,13 @@ o nome.
    relocated
    -Arquivos movidos no mesmo disco ou em um disco -diferente onde o original desapareceu. -Eles são identificados por terem o mesmo nome, tamanho e -carimbo de data/hora. -Se o carimbo de data/hora de subsegundos for zero, o caminho -completo deve corresponder para ser identificado. -Ao contrário dos arquivos 'moved' no mesmo disco, os arquivos -realocados têm um inode diferente. +Arquivos movidos para um diretório ou disco diferente onde +o arquivo original desapareceu e o inode não é mantido. +Eles são identificados por terem o mesmo nome, tamanho e carimbo +de data/hora. Se o carimbo de data/hora de subsegundos for zero, o +caminho completo deve corresponder para ser identificado. Ao +contrário dos arquivos 'moved', os arquivos relocados exigem que +o nome do arquivo permaneça o mesmo.
    @@ -754,7 +768,7 @@ Geralmente são arquivos restaurados após serem excluídos.
    -

    Se uma sync for necessária, o código de retorno do processo é 2, +

    Se um sync for necessário, o código de retorno do processo é 2, em vez do padrão 0. O código de retorno 1 é usado para uma condição de erro genérica.

    Nada é modificado. @@ -829,23 +843,22 @@ Os arquivos no array NÃO são modificados. fix

    Corrige todos os arquivos e os dados de paridade. -

    Todos os arquivos e dados de paridade são comparados com o estado de -snapshot salvo na última sync. -Se uma diferença for encontrada, ela é revertida para o snapshot armazenado. -

    ATENÇÃO! O comando fix não diferencia entre erros e modificações -intencionais. Ele reverte incondicionalmente o estado do arquivo -para a última sync. +

    Todos os arquivos e dados de paridade são comparados com o estado salvo no +último sync. Se for encontrada uma diferença, esta é revertida para o estado armazenado. +

    AVISO! +O comando fix não diferencia erros de modificações intencionais. +Reverte incondicionalmente o estado do arquivo para o do último sync.

    Se nenhuma outra opção for especificada, todo o array é processado. Use as opções de filtro para selecionar um subconjunto de arquivos ou discos para operar.

    Para corrigir apenas os blocos marcados como ruins durante sync e scrub, use a opção -e, --filter-error. Ao contrário de outras opções de filtro, esta aplica correções apenas a -arquivos que não foram alterados desde a última sync. +arquivos que não foram alterados desde o último sync.

    O SnapRAID renomeia todos os arquivos que não podem ser corrigidos adicionando a extensão .unrecoverable.

    Antes de corrigir, todo o array é escaneado para encontrar quaisquer -arquivos movidos desde a última operação sync. +arquivos movidos desde a última operação de sync. Esses arquivos são identificados por seu carimbo de data/hora, ignorando seu nome e diretório, e são usados no processo de recuperação, se necessário. @@ -970,7 +983,7 @@ o processo de realocação.

    -Opções +Opções (Options)

    SnapRAID fornece as seguintes opções:

    @@ -1097,9 +1110,9 @@ Esta opção pode ser usada apenas com check.
    -h, --pre-hash
    -Em sync, executa uma fase de hash preliminar de todos os novos dados +Em sync, executa uma fase de hash prexcluir de todos os novos dados para verificação adicional antes do cálculo da paridade. -Normalmente, em sync, nenhum hash preliminar é feito, e os novos +Normalmente, em sync, nenhum hash prexcluir é feito, e os novos dados são hashados logo antes do cálculo da paridade, quando são lidos pela primeira vez. Este processo ocorre quando o sistema está sob @@ -1159,7 +1172,7 @@ multiplicador como K, M ou G (por exemplo, --bw-limit 1G).
    --t, --tail TAMANHO +-t, --tail SIZE
    Limita a listagem de arquivos àqueles que não usam mais do que o tamanho final especificado dos discos de paridade. @@ -1319,10 +1332,10 @@ Você NÃO tem proteção de dados durante a operação sync.
    --W, --force-realloc-tail TAMANHO +-W, --force-realloc-tail SIZE
    Funciona como -R, --force-realloc, mas limitado à parte final -especificada (últimos TAMANHO bytes) de cada arquivo de paridade. +especificada (últimos SIZE bytes) de cada arquivo de paridade. Força a realocação (movimentação) de quaisquer fragmentos/blocos de arquivos atualmente armazenados nessa seção final, permitindo que sejam colocados em qualquer lugar no(s) arquivo(s) de paridade onde houver espaço livre @@ -1336,10 +1349,9 @@ Você pode usar multiplicadores como K, M, G ou T (ex: --force-realloc-tail 1G). Você pode usar locate -t, --tail para saber antecipadamente os arquivos afetados. -AVISO! -Esta opção é apenas para especialistas e é altamente recomendado -não utilizá-la. -Você NÃO terá proteção de datos durante a operação sync para os +ATENÇÃO! Esta opção é apenas para especialistas e é altamente +recomendado não usá-la. +Você NÃO tem proteção de dados durante a operação sync para os arquivos afetados.
    @@ -1392,7 +1404,8 @@ No entanto, check e fix sempre param no primeiro erro. Começa o processamento a partir do número de bloco especificado. Isso pode ser útil para tentar verificar ou corrigir blocos específicos em caso de um disco danificado. -Esta opção é principalmente para recuperação manual avançada. +Esta opção é principalmente para recuperação manual avançada +e é suportada apenas por check e fix.
    @@ -1402,7 +1415,8 @@ Esta opção é principalmente para recuperação manual avançada. -B, --count BLKCOUNT
    Processa apenas o número especificado de blocos. -Esta opção é principalmente para recuperação manual avançada. +Esta opção é principalmente para recuperação manual avançada +e é suportada apenas por check e fix.
    @@ -1468,7 +1482,7 @@ Imprime a versão do programa.

    -Configuração +Configuração (Configuration)

    SnapRAID requer um arquivo de configuração para saber onde seu array de discos está localizado e onde armazenar as informações de paridade. @@ -1567,6 +1581,10 @@ ser único. DIR é o ponto de montagem do disco no sistema de arquivos.

    Você pode alterar o ponto de montagem conforme necessário, desde que mantenha o NAME fixo. +

    No entanto, o caminho configurado deve apontar consistentemente para os +mesmos dados subjacentes. Se o caminho contiver links simbólicos, +seus destinos devem permanecer estáveis. A alteração desses links simbólicos +para alternar o diretório de dados em tempo real não é suportada.

    Você deve usar uma opção para cada disco de dados no array.

    Você pode renomear um disco mais tarde alterando o NAME diretamente no arquivo de configuração e, em seguida, executando um comando sync. @@ -1579,7 +1597,7 @@ extra NAME DIR

    Define o nome e o ponto de montagem de discos adicionais para monitorar com os comandos smart e probe. -

    Isso é útil para monitorar discos que não fazem parte da matriz, +

    Isso é útil para monitorar discos que não fazem parte do array, mas que são necessários para o funcionamento do sistema, como o disco de inicialização.

    Observe que tais discos não são afetados pelos comandos up e down @@ -1587,6 +1605,30 @@ porque se espera que estejam sempre girando.

    +snapshot +

    +

    Ativa o uso de instantâneos (snapshots) do sistema de arquivos para os comandos sync, scrub, +check e fix. +

    Quando ativado, o SnapRAID cria um instantâneo de somente leitura de cada +sistema de arquivos de dados suportado no início de um 'sync'. Isso fornece uma visão +estável de cada sistema de arquivos, evitando que modificações posteriores alterem os +dados utilizados para o cálculo da paridade. +

    Isso melhora significativamente a recuperação: se um arquivo for excluído do sistema de arquivos ativo, +ele permanece preservado no instantâneo. Isso evita que a paridade fique "corrompida" +para esse bloco, garantindo que ainda pode recuperar os dados com sucesso +se outro disco falhar. +

    Esta opção aplica-se exclusivamente a discos de dados formatados com os sistemas de +arquivos Btrfs, Bcachefs ou ZFS em Linux e NTFS em Windows. +Discos de paridade, ou discos de dados que utilizem outros sistemas de arquivos, usarão sempre +a versão ativa do sistema de arquivos. +

    A criação e exclusão de instantâneos requerem privilégios administrativos. +Garanta que o SnapRAID é executado com as permissões necessárias (ex: sudo) quando +esta opção estiver ativada. +

    Consulte a seção SNAPSHOTS para uma explicação detalhada do ciclo de vida +dos instantâneos. +

    +
    +

    nohidden

    Exclui todos os arquivos e diretórios ocultos. @@ -1594,7 +1636,7 @@ No Unix, arquivos ocultos são aqueles que começam com .. No Windows, são aqueles com o atributo oculto.

    -

    +

    exclude/include PATTERN

    Define os padrões de arquivo ou diretório a serem excluídos ou incluídos @@ -1605,12 +1647,16 @@ Todos os padrões são processados na ordem especificada. Se nenhum padrão corresponder, o arquivo é excluído se o último padrão especificado for um include, ou incluído se o último padrão especificado for um exclude. +

    Observe que a filtragem ocorre hierarquicamente durante o percurso +dos diretórios. Se um diretório corresponder a uma regra exclude, +todo o diretório será ignorado (podado) e nenhuma regra include para +arquivos ou subdiretórios dentro dele será avaliada.

    Consulte a seção PATTERN para obter mais detalhes sobre especificações de padrão.

    Esta opção pode ser usada várias vezes.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Define o tamanho básico do bloco em kibibytes para a paridade. @@ -1653,7 +1699,7 @@ um disco de 4 TB, o que permite cerca de 460.000 arquivos em cada disco de dados sem qualquer espaço desperdiçado.

    -

    +

    hashsize SIZE_IN_BYTES

    Define o tamanho do hash em bytes para os blocos salvos. @@ -1688,7 +1734,7 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    Salva automaticamente o estado ao sincronizar ou examinar após a @@ -1697,7 +1743,7 @@ Esta opção é útil para evitar reiniciar longos comandos sync do zero se interrompidos por uma falha de máquina ou qualquer outro evento.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Define a temperatura máxima permitida do disco em Celsius. Quando especificado, @@ -1711,7 +1757,7 @@ temperatura for atingido mais uma vez.

    Durante a operação, o SnapRAID também analisa a curva de aquecimento de cada disco e estima a temperatura estável de longo prazo que eles devem atingir se a atividade continuar. A estimativa é realizada apenas -depois que a temperatura do disco aumentou quatro vezes, garantindo +depois que a temperatura do disco tiver subido quatro vezes, garantindo que pontos de dados suficientes estejam disponíveis para estabelecer uma tendência confiável. Esta temperatura estável prevista é mostrada entre parênteses ao lado @@ -1728,7 +1774,7 @@ referência de fallback. Para exibir a temperatura de todos os discos, use a opção -A ou --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Define o tempo de espera (standby time), em minutos, quando o limite de @@ -1736,7 +1782,7 @@ temperatura é atingido. Durante este período, os discos permanecem desligados. O padrão é 5 minutos.

    -

    +

    pool DIR

    Define o diretório de pooling onde a visualização virtual do array @@ -1744,7 +1790,7 @@ de discos é criada usando o comando pool.

    O diretório já deve existir.

    -

    +

    share UNC_DIR

    Define o caminho UNC do Windows necessário para acessar os discos remotamente. @@ -1758,7 +1804,7 @@ e finalmente adicionando o diretório e nome do arquivo.

    Esta opção é necessária apenas para Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Define opções smartctl personalizadas para obter os atributos SMART para @@ -1772,6 +1818,8 @@ PARITY é um dos nomes de paridade: parity, 2-parity, 3-parity<

    Nas OPTIONS especificadas, a string %s é substituída pelo nome do dispositivo. Para controladores RAID, o dispositivo é provavelmente fixo, e você pode não precisar usar %s. +

    Você também pode especificar uma string personalizada de opções de informação +usando a tag [info: ...] para substituir a opção padrão -a.

    Consulte a documentação do smartmontools para possíveis opções:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1779,11 +1827,12 @@ provavelmente fixo, e você pode não precisar usar %s.
     

    Por exemplo:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignora o atributo SMART especificado ao calcular a probabilidade @@ -1793,18 +1842,22 @@ incomuns ou enganosos para um atributo específico. PARITY é um dos nomes de paridade: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity ou z-parity. O valor especial * pode ser usado para ignorar o atributo em todos os discos. -

    Por exemplo, para ignorar o atributo Current Pending Sector Count em -todos os discos: +

    Múltiplos atributos podem ser especificados separados por espaços. +Cada atributo pode ser especificado como um número de 1 a 255, ou como um +nome insensível a maiúsculas/minúsculas (por exemplo, Current_Pending_Sector). +

    Por exemplo, para ignorar os atributos Current Pending Sector Count e +Reallocated Sectors Count em todos os discos pelo seu número ou nome:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Para ignorá-lo apenas no primeiro disco de paridade: +

    Para ignorá-los apenas no primeiro disco de paridade:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Exemplos

    Um exemplo de uma configuração típica para Unix é: @@ -1817,7 +1870,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1833,7 +1886,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1842,6 +1895,165 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    +Instantâneos (Snapshots) +

    +

    Se a opção de instantâneo estiver ativada na configuração, o SnapRAID +utiliza instantâneos do sistema de arquivos para manter estáveis os dados lidos +durante uma operação, mesmo quando arquivos nos sistemas de arquivos ativos +são posteriormente modificados ou excluídos. +

    A gestão de instantâneos é completamente automática e transparente. +Pode continuar a utilizar o SnapRAID exatamente como antes, com a +proteção adicional fornecida por instantâneos geridos inteiramente em +segundo plano. +

    Isso proporciona dois benefícios principais: +

    +
    +
    +Consistência +
    +Arquivos modificados no sistema de arquivos ativo durante um sync ou scrub de +longa duração não causarão divergências de paridade ou operações abortadas, +porque cada sistema de arquivos com instantâneo permanece inalterado durante +toda a operação. +
    +
    +
    +
    +Recuperação +
    +Se um arquivo for atualizado ou excluído do sistema de arquivos ativo, +ele permanece preservado no instantâneo. Se ocorrer uma falha de disco +antes de o próximo sync ser executado, o SnapRAID utiliza os dados preservados +no instantâneo para reconstruir o disco com falha. +Em caso de falha de um disco durante um processo de sync ativo, +o SnapRAID também é capaz de ler automaticamente tanto do instantâneo +da computação de paridade anterior quanto da atual. +Isso maximiza a probabilidade de uma recuperação completa ao +fornecer acesso aos blocos de dados exatos necessários para resolver +as equações de paridade, mesmo que esses blocos tenham sido modificados +ou excluídos entre os syncs. +Sem instantâneos, um arquivo atualizado ou excluído num disco saudável +resulta na falta de blocos de dados que podem ser necessários para +reparar outros discos com falha. +
    +
    +
    +

    Os instantâneos são criados apenas para discos de dados e apenas se o sistema de arquivos +subjacente suportar esta funcionalidade. Os discos de paridade usam sempre +o sistema de arquivos ativo. +

    Atualmente, isso é suportado em Btrfs, Bcachefs e ZFS em Linux +e em NTFS em Windows. +

    Pode misturar discos de dados com sistemas de arquivos diferentes. Apenas aqueles que +suportam instantâneos os utilizarão, enquanto os outros discos continuarão +a operar diretamente no sistema de arquivos ativo. +

    A criação e exclusão de instantâneos requerem privilégios administrativos. +Garanta que o SnapRAID é executado com as permissões necessárias (ex: sudo) +quando os instantâneos estão ativados. +

    +

    +Comportamento dos Comandos com Instantâneos +

    +

    Os comandos sync e scrub utilizam instantâneos para discos de dados cujos +sistemas de arquivos os suportam. Num disco com instantâneo, o comando vê +uma imagem estável do sistema de arquivos não afetada por alterações simultâneas no +sistema de arquivos ativo. +Durante um sync, um novo instantâneo é criado independentemente para cada +sistema de arquivos de dados suportado. Esses instantâneos fornecem coletivamente os +dados utilizados para o cálculo da paridade. +Em contraste, o comando scrub utiliza o último instantâneo, aquele +criado durante o sync mais recente, para manter um ponto de referência confiável +que corresponda à paridade existente. +

    Para os comandos check e fix, o uso do último instantâneo +depende de discos específicos serem ou não alvo da operação utilizando a opção +-d, --filter-disk. +

    Um disco explicitamente selecionado via -d (o "alvo" da operação) +usa sempre o sistema de arquivos ativo. Para fix, isso permite restaurar +dados para a substituição do disco ativo. Para check, permite simular +a operação fix sob as mesmas condições. +

    Todos os outros discos de dados (os discos de "referência") serão acessados através dos +seus instantâneos. Isso garante que, mesmo que esteja modificando arquivos +nos seus discos saudáveis enquanto uma recuperação está em curso, o SnapRAID +tem uma referência estável e congelada para resolver as equações de paridade. +

    Se nenhuma opção -d for fornecida, o SnapRAID assume que a operação se aplica +a todo o array, neste caso, check e fix usarão os sistemas +de arquivos ativos exclusivamente. +

    Todos os outros comandos operam exclusivamente no sistema de arquivos ativo. +

    +
    +
    +

    +Ciclo de Vida dos Instantâneos (Snapshots Lifecycle) +

    +

    O SnapRAID gerencia três instantâneos específicos, stable (estável), pending (pendente) e scan (verificação), +dentro de um diretório oculto na raiz de cada subvolume de dados. +Em Btrfs, Bcachefs e NTFS é utilizado o diretório .snapraid/, +em ZFS o padrão .zfs/snapshot/. +

    O instantâneo stable representa o estado do último +sync concluído com sucesso, contendo os dados exatos utilizados para +computar a paridade atual. Serve como a principal fonte de dados +para os comandos scrub, check e fix. +

    O instantâneo scan é uma imagem temporária criada ao início +de um sync para fornecer um estado congelado para a verificação e a computação da paridade. +Após a verificação e salvamento do novo estado de conteúdo, ele substitui o instantâneo +pending anterior. +

    O instantâneo pending é a imagem usada por um sync interrompido. +Após a conclusão bem-sucedida da operação, o instantâneo stable anterior +é excluído, e o instantâneo pending é promovido para +tomar o seu lugar como a nova referência estável. +

    Se um sync for interrompido, o instantâneo pending é preservado. +Os comandos subsequentes scrub, check e fix utilizarão este +instantâneo pendente, pois ele corresponde ao estado do sistema de arquivos registrado no +arquivo .content, mesmo que a paridade esteja apenas parcialmente sincronizada. +

    No caso de uma interrupção do sync, os comandos check e fix +também leem do instantâneo stable para recuperar blocos de dados +de arquivos que foram atualizados ou excluídos durante o sync. +Isso é possível porque o arquivo .content retém metadados para +todos os arquivos modificados ou excluídos ao longo do processo de sync. +Esta informação histórica só é limpa quando um sync termina +com sucesso e a versão final do arquivo .content é salva. +

    Se um sync for reiniciado após uma interrupção, o instantâneo pending existente +é excluído e um novo é criado para +capturar o estado atual do sistema de arquivos ativo. +No entanto, se um sync for interrompido, evite modificar, excluir, +substituir ou mover arquivos até que um sync subsequente seja concluído +com sucesso. A paridade ainda pode conter blocos calculados a partir do +instantâneo usado pelo sync interrompido. Um sync posterior pode substituir +esse instantâneo, tornando as versões intermediárias dos arquivos indisponíveis +para recuperação. +

    +

    +Cópias de segurança externas com instantâneos do sistema de ficheiros (External backups with filesystem snapshots) +

    +

    Quando os instantâneos do sistema de ficheiros estão ativados, o SnapRAID +acede ou cria instantâneos na raiz de cada subvolume, volume ou conjunto +de dados (dataset). +

    Uma forma simples de evitar qualquer interferência com ferramentas externas +é apontar a configuração data para um subdiretório normal dentro do +subvolume ou volume (por exemplo, /mnt/subvol/data em vez de /mnt/subvol). +O SnapRAID cria sempre o diretório de instantâneos na raiz do subvolume +(por exemplo, /mnt/subvol/.snapraid/), deixando o subdiretório de dados +limpo, de modo que os instantâneos permaneçam fora e invisíveis para as +ferramentas de cópia de segurança que operam dentro dele. +

    Caso contrário, se o diretório data configurado for ele próprio a raiz +do subvolume ou do volume, o SnapRAID cria um diretório .snapraid/ +diretamente dentro dele (em Btrfs, Bcachefs e NTFS). Embora o SnapRAID +exclua automaticamente esse diretório das suas próprias verificações, +ferramentas externas de cópia de segurança ou de sincronização irão +encontrá-lo. Se não for excluído, podem atravessar os instantâneos ou +ligações de diretório e copiar toda a árvore de dados congelada, duplicando +dados e esgotando o armazenamento de backup. Configure sempre as +ferramentas de cópia de segurança externas para excluir o diretório +.snapraid/. +

    No ZFS, os instantâneos são expostos através do diretório virtual padrão +.zfs/snapshot/ em vez de .snapraid/. Por predefinição (snapdir=hidden), +o ZFS oculta esse diretório das listagens, de modo que ferramentas externas +de cópia de segurança não o percorrem. Se tiver ativado snapdir=visible, +certifique-se de que as suas ferramentas de cópia de segurança excluem o +diretório .zfs/. +

    +
    +
    +

    Padrão (Pattern)

    Os padrões fornecem uma maneira flexível de filtrar arquivos para inclusão ou @@ -1856,25 +2068,26 @@ ponto de interrogação, nunca cruza as fronteiras do diretório. Ele para na barra invertida, tornando-o adequado para correspondência dentro de um único componente de caminho. Este é o comportamento padrão de curinga familiar do globbing de shell. -

    O asterisco duplo ** é mais poderoso, ele corresponde a qualquer sequência de -caracteres, incluindo separadores de diretórios. Isso permite que os padrões correspondam -em vários níveis de diretório. Quando o ** aparece incorporado diretamente em -um padrão, ele pode corresponder a zero ou mais caracteres, incluindo barras entre -o texto literal circundante. -

    O uso mais importante do ** é na forma especial /**/. Isso corresponde a -zero ou mais níveis de diretório completos, tornando possível corresponder arquivos -em qualquer profundidade em uma árvore de diretórios sem conhecer a estrutura exata do caminho. -Por exemplo, o padrão src/**/main.js corresponde a src/main.js (pulando -zero diretórios), src/ui/main.js (pulando um diretório) e -src/ui/components/main.js (pulando dois diretórios). +

    O curinga de asterisco duplo ** corresponde através de separadores de +diretório apenas quando for adjacente a um separador de diretório (precedido +ou seguido por uma barra). Nessa forma, ele corresponde a zero ou mais +caracteres através de níveis de diretório. Por exemplo, foo/**/bar +corresponde a foo/bar, foo/a/bar e foo/a/b/bar; **/build corresponde a +build e foo/bar/build; e src/**.js corresponde a src/main.js e +src/ui/components/main.js. +A forma avulsa /**/ não é aceita como um padrão completo. +

    Quando ** não for adjacente a uma barra, ele se comporta como * e não +corresponde a separadores de diretório. Por exemplo, **.jpg corresponde a +photo.jpg no diretório atual, mas não corresponde a dir/photo.jpg. Use +**/*.jpg para essa finalidade.

    Classes de caracteres usando colchetes [] correspondem a um único caractere de um conjunto ou intervalo especificado. Como os outros padrões de caractere único, elas não correspondem a separadores de diretório. As classes suportam intervalos e negação usando um ponto de exclamação.

    A distinção fundamental a ser lembrada é que *, ? e classes de caracteres respeitam os limites do diretório e correspondem apenas dentro de um único -componente de caminho, enquanto ** é o único padrão que pode corresponder através de -separadores de diretório. +componente de caminho, enquanto ** só pode corresponder através de separadores +de diretório quando for adjacente a uma barra.

    Existem quatro tipos diferentes de padrões:

    @@ -1962,6 +2175,25 @@ include /movies/ include /musics/ include /pictures/ +

    Observe que a exclusão de um diretório (usando DIR/ ou /CAMINHO/DIR/) +impede que o SnapRAID entre e examine esse diretório. Consequentemente, +não é possível reincluir um arquivo ou subdiretório localizado dentro +de um diretório pai excluído, porque o verificador nunca entra nele. +

    Por exemplo, a seguinte configuração NÃO incluirá file.dat porque +/keep/ é podado antes que file.dat possa ser examinado: +

    +# NÃO funciona: /keep/ é ignorado completamente
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Para excluir arquivos dentro de um diretório mantendo arquivos específicos, +aplique o padrão aos arquivos dentro do diretório em vez de excluir o +próprio diretório: +

    +# Funciona: /keep/ é percorrido, mas os outros arquivos nele são excluídos
    +include /keep/file.dat
    +exclude /keep/*
    +

    Na linha de comando, usando a opção -f, você pode usar apenas padrões include. Por exemplo:

    @@ -1970,10 +2202,10 @@ Por exemplo:
     snapraid -f "*.mp3" check
     

    No Unix, ao usar caracteres globbing na linha de comando, você deve -citá-los para evitar que o shell os expanda. +colocá-los entre aspas para evitar que o shell os expanda.

    -

    +

    Ignorar Arquivos (Ignore File)

    Além das regras globais no arquivo de configuração, você pode colocar @@ -2039,17 +2271,19 @@ build/

    -

    +

    Conteúdo (Content)

    SnapRAID armazena a lista e os checksums de seus arquivos no arquivo content.

    É um arquivo binário que lista todos os arquivos presentes em seu array de discos, juntamente com todos os checksums para verificar sua integridade. -

    Este arquivo é lido e escrito pelos comandos sync e scrub e -lido pelos comandos fix, check e status. +

    O arquivo content é lido e escrito pelos comandos sync, scrub, +touch e rehash. É lido pelos comandos status, diff, check, +fix, list, dup, locate e pool, e é completamente ignorado +pelos comandos smart, probe, up, down e devices.

    -

    +

    Paridade (Parity)

    SnapRAID armazena as informações de paridade do seu array nos arquivos parity. @@ -2059,7 +2293,7 @@ blocos definidos no arquivo content. apenas lidos pelos comandos scrub e check.

    -

    +

    Codificação (Encoding)

    SnapRAID no Unix ignora qualquer codificação. Ele lê e armazena os @@ -2074,16 +2308,279 @@ redirecionar a saída do console para um arquivo, o arquivo resultante estará sempre no formato UTF-8.

    -

    -Direitos Autorais (Copyright) +

    +Código de Saída (Exit Code)

    -

    Este arquivo é Copyright (C) 2025 Andrea Mazzoleni +

    O SnapRAID termina com os seguintes códigos de erro: +

    +
    +
    +0 +
    +Tudo OK. +
    +
    +
    +
    +1 +
    +O comando encontrou alguns erros. +
    +
    +
    +
    +2 +
    +O comando diff determinou que tudo está OK, mas é necessário um sync. +
    +
    +
    +
    +3 +
    +Um comando de dispositivo de disco (probe, smart, devices, up, +down) foi concluído, mas pelo menos um sistema de arquivos está operando +em modo degradado com dispositivo(s) ausente(s). +
    +
    +
    +
    +
    +

    +Problemas Conhecidos (Known Issues) +

    +
    +

    +Limites do sistema de arquivos +

    +

    O SnapRAID não cruza limites de sistema de arquivos, pontos de montagem ou +subvolumes ao verificar um disco de dados. Quando tal limite é detectado, +o SnapRAID relata um AVISO e não verifica além dele. +

    Arquivos localizados além desses limites não são incluídos no disco de +dados e devem ser configurados separadamente se precisarem ser protegidos. +

    +
    +

    +Pontos de montagem com instantâneos do sistema de arquivos +

    +

    Quando os instantâneos do sistema de arquivos estão ativados, pontos de +montagem aninhados e montagens bind dentro de um disco de dados não são +suportados. +

    Os pontos de montagem fazem parte do namespace de montagem do sistema ativo +e não são preservados em instantâneos do sistema de arquivos. Consequentemente, +ao verificar um instantâneo, um diretório oculto por um ponto de montagem no +sistema de arquivos ativo pode se tornar visível. +

    Não coloque pontos de montagem aninhados ou montagens bind dentro de discos +de dados quando os instantâneos do sistema de arquivos estiverem ativados. +

    +
    +

    +Múltiplas configurações com instantâneos do sistema de arquivos +

    +

    O suporte a instantâneos não pode ser compartilhado com segurança por +múltiplas configurações independentes do SnapRAID que usem o mesmo +namespace de instantâneos do sistema de arquivos. +

    No Btrfs e Bcachefs, apenas uma configuração do SnapRAID com suporte a +instantâneos ativado pode usar diretórios de dados dentro do mesmo +subvolume. No ZFS, a mesma restrição se aplica a um dataset, e no NTFS +a um volume. +

    Múltiplas configurações que compartilham o mesmo namespace de instantâneos +usam os mesmos instantâneos stable, pending e scan. A execução de uma +configuração pode, portanto, substituir ou excluir instantâneos de +recuperação necessários para outra. +

    +
    +

    +Modificações de arquivo no local sem alteração de data/hora +

    +

    O SnapRAID detecta modificações em arquivos comparando tamanhos de arquivo e +carimbos de data/hora de modificação (mtime). +

    Se um aplicativo modificar um arquivo no local sem alterar seu tamanho nem +atualizar seu carimbo de data/hora de modificação, o "diff" e o "sync" não +detectarão que o arquivo foi alterado e sua paridade não será atualizada. +

    Para garantir que o SnapRAID reconheça essas alterações, atualize o carimbo +de data/hora de modificação do arquivo (por exemplo, com o utilitário "touch"). +Caso contrário, a diferença só será detectada como uma incompatibilidade de +hash durante um "scrub" ou "check" subsequente. +

    +
    +

    +Correspondência de maiúsculas/minúsculas não-ASCII no Windows +

    +

    O SnapRAID utiliza codificação UTF-8 padrão e previsível em todas as plataformas, +limitando a correspondência insensível a maiúsculas e minúsculas a caracteres +ASCII. +

    Os sistemas de arquivos do Windows sofrem com o design legado de forçar a +insensibilidade a maiúsculas e minúsculas em nomes de arquivo Unicode por meio +de tabelas de conversão arbitrárias e dependentes do sistema. Consequentemente, +o Windows oculta a realidade do sistema de arquivos ao tratar sequências de bytes +Unicode completamente diferentes como se fossem o mesmo arquivo. +

    Por exemplo, À.txt e à.txt são nomes Unicode distintos, mas o Windows os +trata ilogicamente como idênticos, enquanto o SnapRAID preserva sua verdadeira +distinção. +

    Essa limitação é causada pelo tratamento inconsistente de nomes de arquivo +Unicode pelo Windows e por sua insistência no uso de aliases sem diferenciação de +maiúsculas/minúsculas. Para evitar discrepâncias decorrentes da conversão do +Windows, sempre especifique a combinação exata de maiúsculas e minúsculas para +caracteres não-ASCII em caminhos de configuração e filtros. +

    +
    +

    +Recuperação com fix parcial +

    +

    Quando o fix é restrito usando -S, --start ou -B, --count, +o SnapRAID opera apenas nos blocos selecionados e não realiza a +finalização em nível de arquivo nem a quarentena. +

    Se a recuperação produzir dados de melhor esforço (best-effort) que não +possam ser comprovados como representativos do conteúdo atual, esses +blocos ainda poderão ser gravados com o nome de arquivo normal. A incerteza +associada a esses blocos recuperados não persiste após o término do comando. +

    Como consequência, um fix posterior tratará esses blocos legíveis como +dados de arquivo válidos e não tentará recuperá-los novamente. Isso pode +fazer com que uma recuperação posterior relate sucesso, deixando dados +incompletos ou obsoletos no arquivo. +

    As opções -S e -B destinam-se apenas à recuperação manual avançada, +normalmente após a falha de um fix normal. Se um fix parcial relatar +dados irrecuperáveis, remova ou renomeie os arquivos afetados antes de tentar +outra recuperação, ou verifique manualmente seu conteúdo. +

    +
    +

    +Links físicos no NTFS e caminhos excluídos +

    +

    No NTFS, as entradas de diretório armazenam em cache o tamanho do arquivo +e os registros de data/hora de forma independente para cada link físico. +Quando um arquivo é modificado por meio de um link, as entradas de diretório +de outros links que apontam para o mesmo arquivo podem reter metadados +obsoletos até que sejam acessadas. +

    O SnapRAID detecta e normaliza automaticamente essa condição sempre que +pelo menos dois links físicos para o mesmo arquivo são encontrados durante +uma verificação. No entanto, se apenas um link físico for verificado +enquanto os outros forem excluídos por filtros ou residirem fora do caminho +do disco de dados, o SnapRAID não conseguirá detectar a colisão de inodes e +dependerá dos metadados em cache do único link visível. +

    Consequentemente, modificações feitas por meio de um link físico excluído +ou externo podem passar despercebidas pelo SnapRAID até que os metadados do +link incluído sejam atualizados pelo sistema operacional (como quando o +arquivo é acessado ou aberto por meio desse caminho). +

    Para evitar essa limitação, evite modificar arquivos protegidos por meio +de links físicos excluídos do SnapRAID, ou certifique-se de que todos os +links físicos de um arquivo sejam incluídos na verificação para que o +SnapRAID possa normalizá-los. +

    +
    +

    +Recuperação após uma sincronização de multiparidade interrompida +

    +

    Em uma matriz com múltiplos discos de paridade, um sync interrompido +pode deixar os níveis de paridade temporariamente fora de sincronia entre +si. Por exemplo, a paridade 1 já pode conter dados recém-atualizados, +enquanto a paridade 2 ainda contém os dados antigos. +

    Durante check ou fix, o SnapRAID testa diferentes combinações de +paridade e valida os dados reconstruídos em relação aos hashes de bloco +conhecidos (cobrindo o bloco completo, normalmente 256 KiB). +

    Se o SnapRAID tentar uma reconstrução usando uma combinação inconsistente +de paridade antiga e nova, as equações lineares de RAID produzirão dados +incorretos. Para que essa combinação inválida seja aceita por engano, +as equações teriam que reconstruir acidentalmente pelo menos um bloco +completo de 256 KiB de maneira tão perfeita que seu hash corresponda, +enquanto outros blocos não sincronizados na mesma faixa são reconstruídos +com dados incorretos. +

    Esse cenário não depende de uma colisão de hash; em vez disso, as próprias +equações de paridade mista teriam que gerar coincidentemente o conteúdo +exato do bloco de 256 KiB original. Embora seja matematicamente concebível +com dados especialmente preparados ou altamente repetitivos, é +praticamente impossível com dados reais. +

    Se todos os discos estiverem íntegros, concluir o sync interrompido +antes de fazer novas alterações remove essa ambiguidade. Se um disco tiver +falhado e a recuperação for necessária, evite modificar os discos de dados +antes de executar check ou fix. +

    +
    +

    +Nomes reservados de arquivos e diretórios +

    +

    O SnapRAID reserva alguns nomes de arquivos, diretórios e snapshots para +suas operações internas. Não use esses nomes para dados do usuário: +

    +
    +
    +.snapraidignore +
    +Arquivo local de regras de exclusão. +
    +
    +
    +
    +.snapraid +
    +Diretório contêiner de snapshots. +
    +
    +
    +
    +snapraid-* +
    +Nomes de snapshots ZFS gerenciados pelo SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Arquivos danificados colocados em quarentena durante +a recuperação. +
    +
    +
    +
    +CONTENT.tmp +
    +Arquivo temporário para atualizações do content. +
    +
    +
    +
    +CONTENT.lock +
    +Arquivo de bloqueio do content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Arquivo temporário de reserva de espaço durante a +alocação de paridade no Windows. +
    +
    +
    +

    O uso desses nomes para dados não relacionados pode fazer com que arquivos ou +snapshots sejam ignorados, interpretados incorretamente como metadados, +sobrescritos, renomeados ou excluídos. +

    No Windows, todas as variações de maiúsculas e minúsculas também são reservadas, +mesmo em diretórios NTFS configurados para diferenciar maiúsculas de minúsculas +(por exemplo, .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP e CONTENT.Lock). +

    +
    +
    +

    +Tradução (Translation) +

    +

    Este documento é uma tradução automática do manual em inglês. +Consulte o manual em inglês para a versão oficial.

    -

    +

    +Direitos Autorais (Copyright) +

    +

    Este arquivo é Copyright (C) 2026 Andrea Mazzoleni +

    +
    +

    Veja Também (See Also)

    -

    snapraid_log(1), snapraidd(1) +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-ro.html b/manual-ro.html index 795ebaa6..ade6820a 100644 --- a/manual-ro.html +++ b/manual-ro.html @@ -114,7 +114,7 @@

    -Sintaxă +Sintaxă (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Descriere +Descriere (Description)

    SnapRAID este un program de backup conceput pentru matrici de discuri, care stochează informații de paritate pentru recuperarea datelor în cazul a până la șase @@ -152,7 +152,7 @@ care se schimbă rar, SnapRAID oferă câteva caracteristici:

    • Puteți utiliza discuri deja pline cu fișiere fără -nevoia de a le reformat, accesându-le ca de obicei. +nevoia de a le reformata, accesându-le ca de obicei.
    • Toate datele dvs. sunt hash-uite pentru a asigura integritatea datelor și a preveni @@ -175,7 +175,7 @@ Puteți adăuga discuri în orice moment.
    • SnapRAID nu vă blochează datele; puteți înceta să-l utilizați -oricând fără a reforma sau muta date. +oricând fără a reformata sau muta date.
    • Pentru a accesa un fișier, este necesar să se rotească doar un singur disc, economisind @@ -189,22 +189,36 @@ energie și reducând zgomotul.

    -Limitări +Limitări (Limitations)

    -

    SnapRAID este un hibrid între un program RAID și unul de backup, care urmărește să combine -cele mai bune beneficii ale ambelor. Cu toate acestea, are unele limitări pe care ar trebui +

    SnapRAID este un hibrid între un RAID și un program de backup, având ca scop combinarea +celor mai bune avantaje ale ambelor. Cu toate acestea, are unele limitări pe care ar trebui să le luați în considerare înainte de a-l utiliza. -

    Principala limitare este că, dacă un disc se defectează și nu ați făcut recent o sincronizare, -este posibil să nu puteți recupera complet. -Mai exact, este posibil să nu puteți recupera până la dimensiunea -fișierelor modificate sau șterse de la ultima operațiune de sincronizare. -Acest lucru se întâmplă chiar dacă fișierele modificate sau șterse nu sunt pe -discul defect. Acesta este motivul pentru care SnapRAID este mai potrivit pentru -date care se schimbă rar. -

    Pe de altă parte, fișierele nou adăugate nu împiedică recuperarea fișierelor -deja existente. Veți pierde doar fișierele adăugate recent dacă acestea -se află pe discul defect. -

    Alte limitări ale SnapRAID sunt: +

    Principala limitare este că, dacă un disc se defectează, puteți recupera datele doar până la +starea ultimei operațiuni de sync. Orice date adăugate sau modificări efectuate +de la ultima sincronizare care se află pe discul defect vor fi pierdute. +

    Prin urmare, SnapRAID este potrivit în principal pentru date care se modifică rar. +

    Pentru datele care existau deja la ultima sincronizare, fiabilitatea recuperării depinde +de utilizarea sau nu a opțiunii snapshot: +

      +
    • +Cu suport pentru snapshot (disponibil pe Btrfs, ZFS, Bcachefs și NTFS), +SnapRAID poate menține automat o referință înghețată independentă +a fiecărui sistem de fișiere de date acceptat. +Acest lucru asigură că, chiar dacă modificați sau ștergeți fișiere pe sistemul de fișiere live +în timpul sau după un sync, procesul de recuperare rămâne consistent și de încredere. +
    • +
    +
      +
    • +Fără suport pentru snapshot, ștergerea sau modificarea fișierelor după un sync +poate împiedica recuperarea completă a altor discuri defecte. Acest lucru se întâmplă +deoarece paritatea nu mai corespunde cu fișierele modificate, chiar dacă +acele fișiere nu se află pe discul defect. Pe de altă parte, fișierele nou adăugate +nu împiedică recuperarea fișierelor deja existente. +
    • +
    +

    Alte limitări ale SnapRAID sunt:

    • Cu SnapRAID, aveți în continuare sisteme de fișiere separate pentru fiecare disc. @@ -231,7 +245,7 @@ Permisiunile, proprietarul și atributele extinse nu sunt salvate.

    -Noțiuni de Bază +Noțiuni de Bază (Getting Started)

    Pentru a utiliza SnapRAID, trebuie mai întâi să selectați un disc în matricea dvs. de discuri pentru a-l dedica informațiilor de paritate. Cu un singur disc pentru paritate, veți @@ -305,7 +319,7 @@ va relua de unde a fost întrerupt. să actualizați periodic informațiile de paritate rulând comanda sync.

    -Scrubbing (Verificare) +Verificare (Scrubbing)

    Pentru a verifica periodic datele și paritatea pentru erori, puteți rula comanda scrub. @@ -345,11 +359,11 @@ dar blocurile aferente nu sunt marcate ca defecte.

    -Pooling (Agregare) +Agregare (Pooling)

    Notă: Funcționalitatea de pooling descrisă mai jos a fost înlocuită de instrumentul mergerfs, care este acum opțiunea recomandată pentru utilizatorii Linux în -comunitatea SnapRAID. Mergefs oferă o modalitate mai flexibilă și eficientă +comunitatea SnapRAID. Mergerfs oferă o modalitate mai flexibilă și eficientă de a agrega mai multe discuri într-un singur punct de montare unificat, permițând accesul neîntrerupt la fișiere pe toată matricea dvs. fără a se baza pe link-uri simbolice. Se integrează bine cu SnapRAID pentru protecția parității @@ -357,7 +371,7 @@ pe link-uri simbolice. Se integrează bine cu SnapRAID pentru protecția parită sau configurații NAS personalizate.

    Pentru a avea toate fișierele din matricea dvs. afișate în același arbore de directoare, puteți activa funcționalitatea de pooling. Aceasta creează o vizualizare virtuală -doar în citire a tuturor fișierelor din matricea dvs. folosind link-uri simbolice. +read-only a tuturor fișierelor din matricea dvs. folosind link-uri simbolice.

    Puteți configura directorul de pooling în fișierul de configurare cu:

     pool /pool
    @@ -417,7 +431,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
     

    -Undeleting (Anulare Ștergere) +Anulare ștergere (Undeleting)

    SnapRAID funcționează mai mult ca un program de backup decât un sistem RAID și poate fi folosit pentru a restaura sau anula ștergerea fișierelor la starea lor anterioară utilizând @@ -442,7 +456,7 @@ snapraid fix -m

    -Recuperare +Recuperare (Recovering)

    Cel mai rău s-a întâmplat și ați pierdut unul sau mai multe discuri!

    NU INTRAȚI ÎN PANICĂ! Veți putea să le recuperați! @@ -459,7 +473,7 @@ suplimentare, dar un disc USB extern sau un disc la distanță vor fi suficiente

    Modificați fișierul de configurare SnapRAID pentru a face ca opțiunea data sau parity a discului defect să indice o locație cu suficient spațiu gol pentru a recupera fișierele. -

    De exemplu, dacă discul d1 a eșuat, schimbați de la: +

    De exemplu, dacă discul d1 s-a defectat, schimbați de la:

     data d1 /mnt/disk1/
     
    @@ -492,7 +506,7 @@ sau total nerecuperabile, vor fi redenumite adăugând extensia .unrecoverabl verificând toate liniile care încep cu unrecoverable:.

    Dacă nu sunteți mulțumit de recuperare, o puteți reîncerca de câte ori doriți. -

    De exemplu, dacă ați eliminat fișiere din matrice după ultima +

    De exemplu, dacă ați eliminat fișiere din matrice după ultimul sync, acest lucru poate duce la nerecuperarea unor fișiere. În acest caz, puteți reîncerca fix-ul utilizând opțiunea -i, --import, specificând unde se află acum aceste fișiere pentru a le include din nou în @@ -530,24 +544,24 @@ snapraid sync

    -Comenzi +Comenzi (Commands)

    SnapRAID oferă câteva comenzi simple care vă permit să:

    • -Tipăriți starea matricei -> status +Afișați starea matricei -> status
    • Controlați discurile -> smart, probe, up, down
    • -Faceți un backup/snapshot -> sync +Creați un punct de backup/recuperare -> sync
    • Verificați periodic datele -> scrub
    • -Restaurați ultimul backup/snapshot -> fix. +Restaurați ultimul punct de backup/recuperare -> fix.

    Comenzile trebuie scrise cu litere mici. @@ -574,14 +588,14 @@ smart

    Tipărește un raport SMART al tuturor discurilor din sistem.

    Include o estimare a probabilității de eșec în anul următor, -permițându-vă să planificați înlocuiri de întreținere a discurilor care prezintă +permițându-vă să planificați înlocuiri de întreținere ale discurilor care prezintă atribute suspecte.

    Această estimare a probabilității este obținută prin corelarea atributelor SMART ale discurilor cu datele Backblaze disponibile la:

     https://www.backblaze.com/hard-drive-test-data.html
     
    -

    Dacă SMART raportează că un disc este pe cale să eșueze, FAIL sau PREFAIL este tipărit +

    Dacă SMART raportează că un disc este pe cale să se defecteze, FAIL sau PREFAIL este tipărit pentru acel disc, iar SnapRAID returnează o eroare. În acest caz, înlocuirea imediată a discului este puternic recomandată.

    Alte șiruri de stare posibile sunt: @@ -635,7 +649,7 @@ o comandă personalizată utilizând opțiunea smartctl în fișierul de

    up

    -

    Pornirea tuturor discurilor din matrice. +

    Pornește toate discurile din matrice.

    Puteți porni doar discuri specifice utilizând opțiunea -d, --filter-disk.

    Pornirea tuturor discurilor în același timp necesită multă energie. Asigurați-vă că sursa dvs. de alimentare o poate susține. @@ -645,7 +659,7 @@ Asigurați-vă că sursa dvs. de alimentare o poate susține.

    down

    -

    Oprirea (spin down) tuturor discurilor din matrice. +

    Oprește (spin down) toate discurile din matrice.

    Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea smartctl -s standby,now pe toate dispozitivele.

    Puteți opri doar discuri specifice utilizând opțiunea -d, --filter-disk. @@ -658,7 +672,7 @@ atunci când apare o eroare.

    diff

    -

    Listează toate fișierele modificate de la ultima sync care trebuie +

    Listează toate fișierele modificate de la ultimul sync care trebuie să li se recalculeze datele de paritate.

    Această comandă nu verifică datele fișierului, ci doar marca temporală, dimensiunea și inodul fișierului. @@ -698,9 +712,10 @@ fost modificate.

    moved
    -Fișiere mutate într-un director diferit pe același disc. -Sunt identificate având același nume, dimensiune, marcă temporală -și inod, dar un director diferit. +Fișiere mutate sau redenumite pe același disc, păstrând +același inod. Sunt identificate prin faptul că au același inod, +dimensiune și marcă temporală, dar o cale diferită. Numele +fișierului poate fi, de asemenea, diferit.
    @@ -710,8 +725,8 @@ copied Fișiere copiate pe același disc sau pe un disc diferit unde fișierul original încă există. Acestea sunt identificate prin faptul că au același nume, -dimensiune și amprentă temporală. -Dacă amprenta temporală sub-secundă este zero, calea completă +dimensiune și marcă temporală. +Dacă marca temporală sub-secundă este zero, calea completă trebuie să se potrivească pentru a fi identificate, nu doar numele.
    @@ -720,14 +735,13 @@ numele.
    relocated
    -Fișiere mutate pe același disc sau pe un disc diferit -unde originalul a dispărut. -Acestea sunt identificate prin faptul că au același nume, -dimensiune și amprentă temporală. -Dacă amprenta temporală sub-secundă este zero, calea completă -trebuie să se potrivească pentru a fi identificate. -Spre deosebire de fișierele 'moved' de pe același disc, fișierele -relocate au un inod diferit. +Fișiere mutate într-un director sau pe un disc diferit, +unde fișierul original a dispărut și inodul nu este păstrat. +Sunt identificate prin faptul că au același nume, dimensiune și +marcă temporală. Dacă marca temporală sub-secundă este zero, +calea completă trebuie să se potrivească pentru a fi identificate. +Spre deosebire de fișierele 'moved', fișierele relocate necesită +ca numele fișierului să rămână neschimbat.
    @@ -735,12 +749,12 @@ relocate au un inod diferit. restored
    Fișiere cu un inod diferit, dar care se potrivesc ca -director, nume, dimensiune și amprentă temporală. +director, nume, dimensiune și marcă temporală. Acestea sunt de obicei fișiere restaurate după ce au fost șterse.
    -

    Dacă este necesară o sync, codul de retur al procesului este 2, în loc de +

    Dacă este necesară o sincronizare, codul de retur al procesului este 2, în loc de cel implicit 0. Codul de retur 1 este utilizat pentru o condiție de eroare generică.

    Nimic nu este modificat.

    @@ -810,18 +824,17 @@ Fișierele din matrice NU sunt modificate. fix

    Repară toate fișierele și datele de paritate. -

    Toate fișierele și datele de paritate sunt comparate cu starea snapshot-ului -salvată la ultima sync. -Dacă se găsește o diferență, este readusă la snapshot-ul stocat. -

    ATENȚIE! Comanda fix nu face diferența între erori și -modificări intenționate. Ea revine necondiționat la starea fișierului -de la ultima sync. +

    Toate fișierele și datele de paritate sunt comparate cu starea salvată în +ultimul sync. Dacă se găsește o diferență, aceasta este readusă la starea stocată. +

    AVERTISMENT! +Comanda fix nu face diferența între erori și modificări intenționate. +Ea revine necondiționat la starea fișierelor de la ultimul sync.

    Dacă nu este specificată nicio altă opțiune, întreaga matrice este procesată. Utilizați opțiunile de filtrare pentru a selecta un subset de fișiere sau discuri de operat.

    Pentru a repara doar blocurile marcate ca defecte în timpul sync și scrub, utilizați opțiunea -e, --filter-error. Spre deosebire de alte opțiuni de filtrare, aceasta aplică reparații doar fișierelor care sunt -neschimbate de la ultima sync. +neschimbate de la ultimul sync.

    SnapRAID redenumește toate fișierele care nu pot fi reparate adăugând extensia .unrecoverable.

    Înainte de reparare, întreaga matrice este scanată pentru a găsi orice fișiere mutate @@ -856,7 +869,7 @@ rulare mai rapidă. list

    Listează toate fișierele conținute în matrice la momentul -ultimei sync. +ultimului sync.

    Cu -v sau --verbose, este afișat și timpul sub-secundă.

    Nimic nu este modificat.

    @@ -940,15 +953,14 @@ potrivit, afișează locația acestuia în fișierul de paritate și numărul de fragmente pe care le ocupă.

    Puteți utiliza opțiunea -t, --tail pentru a restricționa operațiunea la fișierele care ocupă porțiunea finală specificată a parității. -Dacă doriți să realocați aceste fișiere, puteți utiliza apoi opțiunea --W, --force-realloc-tail. -

    Rețineți că astfel de fișiere nu vor fi protejate de paritate în timpul procesului -de realocare. +

    Dacă doriți să realocați aceste fișiere, puteți utiliza apoi opțiunea +-W, --force-realloc-tail. Rețineți că astfel de fișiere nu vor +fi protejate de paritate în timpul procesului de realocare.

    -Opțiuni +Opțiuni (Options)

    SnapRAID oferă următoarele opțiuni:

    @@ -1097,7 +1109,7 @@ Această opțiune poate fi utilizată doar cu sync. -i, --import DIR
    Importă din directorul specificat orice fișiere șterse -din matrice după ultima sync. +din matrice după ultimul sync. Dacă mai aveți astfel de fișiere, ele pot fi utilizate de check și fix pentru a îmbunătăți procesul de recuperare. Fișierele sunt citite, inclusiv în subdirectoare, și sunt @@ -1127,14 +1139,14 @@ chiar și atunci când o comandă eșuează.
    Aplică o limită globală de lățime de bandă pentru toate discurile. RATE este numărul de octeți pe secundă. Puteți specifica un multiplicator -cum ar fi K, M sau G (de exemplu, --bw-limit 1G). +cum ar fi K, M, G sau T (de exemplu, --bw-limit 1G).
    --t, --tail DIMENSIUNE +-t, --tail SIZE
    Limitează listarea fișierelor la cele care nu utilizează mai mult de dimensiunea finală specificată a discurilor de paritate. @@ -1196,11 +1208,7 @@ pe disc lipsesc sau au fost rescrise, se oprește din a continua dacă nu specificați această opțiune. Acest lucru vă permite să detectați cu ușurință când un sistem de fișiere de date nu este montat. -Este permis, totuși, să aveți o singură schimbare de UUID cu -paritate simplă și mai multe cu paritate multiplă, deoarece acesta este -cazul normal la înlocuirea discurilor după o recuperare. -Această opțiune poate fi utilizată doar cu sync, check sau -fix. +Această opțiune poate fi utilizată doar cu sync.
    @@ -1292,7 +1300,7 @@ NU aveți protecție a datelor în timpul operațiunii sync.
    --W, --force-realloc-tail DIMENSIUNE +-W, --force-realloc-tail SIZE
    Funcționează ca -R, --force-realloc, dar limitat la porțiunea finală specificată (ultimii DIMENSIUNE octeți) ai fiecărui fișier de paritate. @@ -1347,7 +1355,7 @@ Vedeți fișierul snapraid_log.txt sau pagina de manual pentru descrieri ale eti
    Setează o nouă limită de erori înainte de a opri execuția. În mod implicit, SnapRAID se oprește dacă întâlnește mai mult de 100 -de erori de intrare/ieșire, indicând că un disc probabil eșuează. +de erori de intrare/ieșire, indicând că un disc probabil se defectează. Această opțiune afectează sync și scrub, cărora li se permite să continue după primul set de erori de disc pentru a încerca să își finalizeze operațiunile. @@ -1363,7 +1371,8 @@ Cu toate acestea, check și fix se opresc întotdeauna la prima er Începe procesarea de la numărul de bloc specificat. Acest lucru poate fi util pentru a reîncerca verificarea sau repararea anumitor blocuri în cazul unui disc deteriorat. -Această opțiune este în principal pentru recuperarea manuală avansată. +Această opțiune este în principal pentru recuperarea manuală avansată +și este acceptată numai de check și fix.
    @@ -1373,7 +1382,8 @@ Această opțiune este în principal pentru recuperarea manuală avansată. -B, --count BLKCOUNT
    Procesează doar numărul specificat de blocuri. -Această opțiune este în principal pentru recuperarea manuală avansată. +Această opțiune este în principal pentru recuperarea manuală avansată +și este acceptată numai de check și fix.
    @@ -1439,7 +1449,7 @@ Tipărește versiunea programului.

    -Configurare +Configurare (Configuration)

    SnapRAID necesită un fișier de configurare pentru a ști unde se află matricea dvs. de discuri și unde să stocheze informațiile de paritate. @@ -1481,7 +1491,7 @@ avertismentul despre discuri pline. 3-parity activează paritatea triplă.

  • -4-parity activează paritatea quad (patru). +4-parity activează paritatea cvadruplă (patru).
  • 5-parity activează paritatea penta (cinci). @@ -1504,7 +1514,7 @@ z-parity FILE [,FILE] ... CPU-urilor low-end precum ARM sau AMD Phenom, Athlon și Opteron care nu suportă setul de instrucțiuni SSSE3. În astfel de cazuri, oferă o performanță mai bună. -

    Acest format este similar, dar mai rapid decât cel utilizat de ZFS RAIDZ3. +

    Acest format este similar cu cel utilizat de ZFS RAIDZ3, dar mai rapid decât acesta. Ca și ZFS, nu funcționează dincolo de paritatea triplă.

    Când utilizați 3-parity, veți fi avertizați dacă este recomandat să utilizați formatul z-parity pentru îmbunătățirea performanței. @@ -1516,7 +1526,7 @@ fișierul de configurare cu fișierul z-parity sau 3-parity dorit

    content FILE

    -

    Definește fișierul de utilizat pentru a stoca lista și sumele de control (checksums) a tuturor +

    Definește fișierul de utilizat pentru a stoca lista și sumele de control (checksums) ale tuturor fișierelor prezente în matricea dvs. de discuri.

    Poate fi plasat pe un disc utilizat pentru date, paritate sau orice alt disc disponibil. @@ -1537,6 +1547,10 @@ să fie unic. DIR este punctul de montare al discului în sistemul de fișiere.

    Puteți schimba punctul de montare după cum este necesar, atâta timp cât păstrați NAME fix. +

    Cu toate acestea, calea configurată trebuie să indice în mod consecvent +aceleași date subiacente. Dacă calea conține legături simbolice, +țintele acestora trebuie să rămână stabile. Redirecționarea acestor linkuri +pentru a schimba directorul de date din mers nu este acceptată.

    Ar trebui să utilizați o opțiune pentru fiecare disc de date din matrice.

    Puteți redenumi un disc mai târziu schimbând NAME direct în fișierul de configurare și apoi rulând o comandă sync. @@ -1557,6 +1571,30 @@ sistemului, cum ar fi discul de pornire.

  • +snapshot +

    +

    Activează utilizarea snapshot-urilor sistemului de fișiere pentru comenzile sync, scrub, +check și fix. +

    Când este activată, SnapRAID creează un snapshot read-only al fiecărui sistem +de fișiere de date acceptat la începutul unui 'sync'. Acest lucru oferă o vizualizare +stabilă a fiecărui sistem de fișiere, împiedicând modificările ulterioare să modifice +datele utilizate pentru calculul parității. +

    Acest lucru îmbunătățește semnificativ recuperarea: dacă un fișier este șters din sistemul de fișiere live, +el rămâne păstrat în snapshot. Acest lucru previne ca paritatea să devină „ruptă” +pentru acel bloc, asigurându-vă că puteți recupera cu succes datele +dacă un alt disc se defectează. +

    Această opțiune se aplică exclusiv discurilor de date formatate cu sistemele de +fișiere Btrfs, Bcachefs sau ZFS în Linux și NTFS în Windows. +Discurile de paritate, sau discurile de date care utilizează alte sisteme de fișiere, vor folosi întotdeauna +versiunea live a sistemului de fișiere. +

    Crearea și ștergerea snapshot-urilor necesită privilegii administrative. +Asigurați-vă că SnapRAID este rulat cu permisiunile necesare (de exemplu, sudo) când +această opțiune este activată. +

    Consultați secțiunea SNAPSHOTS pentru o explicație detaliată a ciclului de viață +al snapshot-urilor. +

    +
    +

    nohidden

    Exclude toate fișierele și directoarele ascunse. @@ -1564,7 +1602,7 @@ nohidden În Windows, sunt cele cu atributul ascuns.

    -

    +

    exclude/include PATTERN

    Definește modelele de fișiere sau directoare de exclus sau inclus @@ -1575,12 +1613,16 @@ este exclus. Dacă este un include, fișierul este inclus. Dacă niciun model nu se potrivește, fișierul este exclus dacă ultimul model specificat este un include, sau inclus dacă ultimul model specificat este un exclude. +

    Rețineți că filtrarea se produce ierarhic în timpul parcurgerii +directoarelor. Dacă un director se potrivește cu o regulă exclude, +întregul director este omis (eliminat), iar regulile include pentru +fișierele sau subdirectoarele din interiorul său nu vor fi evaluate.

    Vedeți secțiunea PATTERN pentru mai multe detalii despre specificațiile modelului.

    Această opțiune poate fi utilizată de mai multe ori.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Definește dimensiunea de bază a blocului în kibibytes pentru paritate. @@ -1621,7 +1663,7 @@ un disc de 4 TB, ceea ce permite aproximativ 460.000 de fișiere pe fiecare disc niciun spațiu irosit.

    -

    +

    hashsize SIZE_IN_BYTES

    Definește dimensiunea hash-ului în octeți pentru blocurile salvate. @@ -1656,16 +1698,16 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    Salvează automat starea la sincronizare sau verificare după cantitatea specificată de GB procesați. Această opțiune este utilă pentru a evita repornirea comenzilor sync lungi -de la zero dacă sunt întrerupte de o cădere a mașinii sau de orice alt eveniment. +de la zero dacă sunt întrerupte de o pană de sistem sau de orice alt eveniment.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Setează temperatura maximă permisă a discului în Celsius. Când este specificată, @@ -1674,12 +1716,12 @@ instrumentul smartctl. Temperaturile curente ale discurilor sunt afișate în ti SnapRAID funcționează. Dacă un disc depășește această limită, toate operațiunile se opresc, iar discurile sunt oprite (puse în standby) pentru durata definită de opțiunea temp_sleep. După perioada de așteptare, operațiunile -reiau, putând întrerupe din nou dacă limita de temperatură este atinsă +se reiau, putând fi întrerupte din nou dacă limita de temperatură este atinsă încă o dată.

    În timpul funcționării, SnapRAID analizează și curba de încălzire a fiecărui disc și estimează temperatura constantă pe termen lung pe care se așteaptă să o atingă dacă activitatea continuă. Estimarea este efectuată numai după -ce temperatura discului a crescut de patru ori, asigurându-se că sunt disponibile +ce temperatura discului a înregistrat patru creșteri, asigurându-se că sunt disponibile suficiente puncte de date pentru a stabili o tendință fiabilă. Această temperatură constantă prezisă este afișată între paranteze lângă valoarea curentă și ajută la evaluarea dacă răcirea sistemului este @@ -1694,7 +1736,7 @@ cea mai scăzută temperatură a discului măsurată la începutul rulării ca r Pentru a afișa temperatura tuturor discurilor, utilizați opțiunea -A sau --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Setează timpul de așteptare (standby), în minute, când limita de temperatură este @@ -1702,7 +1744,7 @@ atinsă. În această perioadă, discurile rămân oprite. Valoarea implicită este 5 minute.

    -

    +

    pool DIR

    Definește directorul de pooling unde este creată vizualizarea virtuală a matricei @@ -1710,7 +1752,7 @@ de discuri utilizând comanda pool.

    Directorul trebuie să existe deja.

    -

    +

    share UNC_DIR

    Definește calea UNC Windows necesară pentru a accesa discurile de la distanță. @@ -1724,7 +1766,7 @@ directorul și numele fișierului.

    Această opțiune este necesară doar pentru Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Definește opțiuni smartctl personalizate pentru a obține atributele SMART pentru @@ -1737,6 +1779,8 @@ PARITY este unul dintre numele de paritate: parity, 2-parity, 3

    În OPȚIUNILE specificate, șirul %s este înlocuit de numele dispozitivului. Pentru controlerele RAID, dispozitivul este probabil fix și este posibil să nu fie nevoie să utilizați %s. +

    De asemenea, puteți specifica un șir de opțiuni de informații personalizate +utilizând eticheta [info: ...] pentru a înlocui opțiunea implicită -a.

    Consultați documentația smartmontools pentru opțiuni posibile:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1744,32 +1788,37 @@ probabil fix și este posibil să nu fie nevoie să utilizați %s.
     

    De exemplu:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignoră atributul SMART specificat la calcularea probabilității -de eșec a discului. Această opțiune este utilă dacă un disc raportează valori neobișnuite sau +de eșec al discului. Această opțiune este utilă dacă un disc raportează valori neobișnuite sau înșelătoare pentru un anumit atribut.

    DISK este același nume de disc specificat în opțiunea data. PARITY este unul dintre numele de paritate: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity sau z-parity. Valoarea specială * poate fi utilizată pentru a ignora atributul pe toate discurile. -

    De exemplu, pentru a ignora atributul Current Pending Sector Count pe -toate discurile: +

    Mai multe atribute pot fi specificate separate prin spații. +Fiecare atribut poate fi specificat ca un număr de la 1 la 255 sau ca un +nume insensibil la majuscule (de exemplu, Current_Pending_Sector). +

    De exemplu, pentru a ignora atributele Current Pending Sector Count și +Reallocated Sectors Count pe toate discurile după numărul sau numele lor:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Pentru a-l ignora doar pe primul disc de paritate: +

    Pentru a le ignora doar pe primul disc de paritate:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Exemple

    Un exemplu de configurare tipică pentru Unix este: @@ -1782,7 +1831,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1798,7 +1847,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1807,6 +1856,164 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    +Snapshot-uri (Snapshots) +

    +

    Dacă opțiunea snapshot este activată în configurație, SnapRAID +utilizează snapshot-urile sistemului de fișiere pentru a menține stabile datele citite +în timpul unei operațiuni, chiar și atunci când fișierele de pe sistemele de fișiere live +sunt modificate sau șterse ulterior. +

    Gestionarea snapshot-urilor este complet automată și transparentă. +Puteți continua să utilizați SnapRAID exact ca înainte, cu protecția +suplimentară oferită de snapshot-uri gestionate în întregime în +background. +

    Acest lucru oferă două avantaje principale: +

    +
    +
    +Consistență +
    +Fișierele modificate pe sistemul de fișiere live în timpul unui sync sau scrub +de lungă durată nu vor cauza nepotriviri de paritate sau operațiuni abandonate, +deoarece fiecare sistem de fișiere cu snapshot rămâne neschimbat pe durata operațiunii. +
    +
    +
    +
    +Recuperare +
    +Dacă un fișier este actualizat sau șters din sistemul de fișiere live, +el rămâne păstrat în snapshot. Dacă se produce o defecțiune a discului +înainte de rularea următorului sync, SnapRAID utilizează datele păstrate +în snapshot pentru a reconstrui discul defect. +În cazul unei defecțiuni a discului în timpul unui proces de sync activ, +SnapRAID este, de asemenea, capabil să citească automat atât din snapshot-ul +calculului anterior de paritate, cât și din cel curent. +Acest lucru maximizează probabilitatea unei recuperări complete prin +oferirea accesului la blocurile exacte de date necesare pentru a rezolva +ecuațiile de paritate, chiar dacă acele blocuri au fost modificate +sau șterse între sync-uri. +Fără snapshot-uri, un fișier actualizat sau șters pe un disc sănătos +are ca rezultat lipsa unor blocuri de date care pot fi necesare pentru +a repara alte discuri defecte. +
    +
    +
    +

    Snapshot-urile sunt create doar pentru discurile de date și numai dacă sistemul de fișiere +subiacent acceptă această funcționalitate. Discurile de paritate folosesc întotdeauna +sistemul de fișiere live. +

    În prezent, acest lucru este acceptat pe Btrfs, Bcachefs și ZFS în Linux +și pe NTFS în Windows. +

    Puteți amesteca discuri de date cu sisteme de fișiere diferite. Doar cele care +acceptă snapshot-uri le vor utiliza, în timp ce celelalte discuri vor continua +să funcționeze direct pe sistemul de fișiere live. +

    Crearea și ștergerea snapshot-urilor necesită privilegii administrative. +Asigurați-vă că SnapRAID este rulat cu permisiunile necesare (de exemplu, sudo) +atunci când snapshot-urile sunt activate. +

    +

    +Comportamentul comenzilor cu snapshot-uri +

    +

    Comenzile sync și scrub folosesc snapshot-uri pentru discurile de date ale căror +sisteme de fișiere le acceptă. Pe un disc cu snapshot, comanda vede o imagine +stabilă a sistemului de fișiere, neafectată de modificările concurente de pe sistemul +de fișiere live. +În timpul unui sync, un nou snapshot este creat în mod independent pentru fiecare +sistem de fișiere de date acceptat. Aceste snapshot-uri oferă colectiv datele +utilizate pentru calculul parității. +În schimb, comanda scrub utilizează ultimul snapshot, cel +creat în timpul celui mai recent sync, pentru a menține un punct de referință de încredere +care se potrivește cu paritatea existentă. +

    Pentru comenzile check și fix, utilizarea ultimului snapshot +depinde dacă anumite discuri sunt vizate folosind opțiunea +-d, --filter-disk. +

    Un disc selectat în mod explicit prin -d („ținta” operațiunii) +folosește întotdeauna sistemul de fișiere live. Pentru fix, acest lucru permite restaurarea +datelor pe discul de înlocuire activ. Pentru check, permite simularea +operațiunii fix în aceleași condiții. +

    Toate celelalte discuri de date (discurile de „referință”) vor fi accesate prin intermediul +snapshot-urilor lor. Acest lucru asigură că, chiar dacă modificați fișiere +pe discurile sănătoase în timp ce o recuperare este în curs, SnapRAID +are o referință stabilă, înghețată pentru a rezolva ecuațiile de paritate. +

    Dacă nu este furnizată nicio opțiune -d, SnapRAID presupune că operațiunea se aplică +întregii matrice, caz în care check și fix vor folosi exclusiv +sistemele de fișiere live. +

    Toate celelalte comenzi operează exclusiv pe sistemul de fișiere live. +

    +
    +
    +

    +Ciclul de viață al snapshot-urilor (Snapshots Lifecycle) +

    +

    SnapRAID gestionează trei snapshot-uri specifice, stable, pending și scan, +într-un director ascuns la rădăcina fiecărui subvolum de date. +În Btrfs, Bcachefs și NTFS se folosește directorul .snapraid/, +în ZFS cel standard .zfs/snapshot/. +

    Snapshot-ul stable reprezintă starea ultimului +sync finalizat cu succes, conținând datele exacte utilizate pentru +a calcula paritatea curentă. Acesta servește ca sursă principală de date +pentru comenzile scrub, check și fix. +

    Snapshot-ul scan este o imagine temporară creată la începutul +unui sync pentru a oferi o stare înghețată pentru scanare și calculul parității. +După scanarea și salvarea stării noi de conținut, acesta înlocuiește snapshot-ul +pending anterior. +

    Snapshot-ul pending este imaginea utilizată de un sync întrerupt. +După finalizarea cu succes a operațiunii, snapshot-ul stable anterior +este șters, iar snapshot-ul pending este promovat pentru +a-i lua locul ca nouă referință stabilă. +

    Dacă un sync este întrerupt, snapshot-ul pending este păstrat. +Comenzile ulterioare scrub, check și fix vor folosi acest +snapshot în așteptare, deoarece se potrivește cu starea sistemului de fișiere înregistrată în +fișierul .content, chiar dacă paritatea este sincronizată doar parțial. +

    În cazul unei întreruperi a sync, comenzile check și fix +citesc, de asemenea, din snapshot-ul stable pentru a recupera blocurile de date +din fișierele care au fost actualizate sau șterse în timpul sync-ului. +Acest lucru este posibil deoarece fișierul .content păstrează metadatele pentru +toate fișierele modificate sau șterse pe parcursul procesului de sync. +Aceste informații istorice sunt șterse numai după ce un sync se termină +cu succes și versiunea finală a fișierului .content este salvată. +

    Dacă un sync este repornit după o întrerupere, snapshot-ul pending existent +este șters și se creează unul nou pentru +a captura starea curentă a sistemului de fișiere live. +Cu toate acestea, dacă un sync este întrerupt, evitați modificarea, ștergerea, +înlocuirea sau mutarea fișierelor până când un sync ulterior se finalizează +cu succes. Paritatea poate conține în continuare blocuri calculate din +snapshot-ul utilizat de sync-ul întrerupt. Un sync ulterior poate înlocui +acel snapshot, făcând versiunile intermediare ale fișierelor indisponibile +pentru recuperare. +

    +

    +Copii de rezervă externe cu snapshot-uri de sistem de fișiere (External backups with filesystem snapshots) +

    +

    Când snapshot-urile sistemului de fișiere sunt activate, SnapRAID accesează +sau creează snapshot-uri la rădăcina fiecărui subvolum, volum sau set de +date (dataset). +

    O modalitate simplă de a evita orice interferență cu instrumentele externe +este de a configura discul data astfel încât să indice spre un subdirector +obișnuit din cadrul subvolumului sau volumului (de exemplu +/mnt/subvol/data în loc de /mnt/subvol). SnapRAID creează întotdeauna +directorul de snapshot-uri la rădăcina subvolumului (de exemplu +/mnt/subvol/.snapraid/), lăsând subdirectorul de date curat, astfel încât +snapshot-urile să rămână în exterior și invizibile pentru instrumentele de +backup care operează în interiorul său. +

    În caz contrar, dacă directorul data configurat este chiar rădăcina +subvolumului sau a volumului, SnapRAID creează un director .snapraid/ +direct în interiorul acestuia (pe Btrfs, Bcachefs și NTFS). Deși SnapRAID +exclude automat acest director din scanarea proprie, instrumentele externe +de backup sau sincronizare îl vor întâlni. Dacă nu este exclus, acestea pot +traversa snapshot-urile sau legăturile de directoare și pot copia întregul +arbore de date înghețat, duplicând datele și epuizând spațiul de stocare al +backup-ului. Configurați întotdeauna instrumentele externe de backup să +excludă directorul .snapraid/. +

    Pe ZFS, snapshot-urile sunt expuse prin directorul virtual standard +.zfs/snapshot/ în loc de .snapraid/. În mod implicit (snapdir=hidden), +ZFS ascunde acest director din listările de directoare, astfel încât +instrumentele externe de backup nu îl vor parcurge. Dacă ați activat +snapdir=visible, asigurați-vă că instrumentele de backup exclud +directorul .zfs/. +

    +
    +
    +

    Model (Pattern)

    Modelele oferă o modalitate flexibilă de a filtra fișierele pentru includere sau @@ -1818,28 +2025,29 @@ separatorului de directoare. Acest lucru îl face util pentru potrivirea numelor caractere variabile, păstrând în același timp modelul limitat la un singur nivel de director.

    Asteriscul simplu * se potrivește cu orice secvență de caractere, dar, la fel ca semnul întrebării, nu trece niciodată de limitele directoarelor. Se oprește la -slash-ul înainte, ceea ce îl face potrivit pentru potrivirea în cadrul unei singure +bara oblică (/), ceea ce îl face potrivit pentru potrivirea în cadrul unei singure componente a căii. Acesta este comportamentul standard al metacaracterelor, familiar din shell globbing. -

    Asteriscul dublu ** este mai puternic, se potrivește cu orice secvență de -caractere, inclusiv separatori de directoare. Acest lucru permite modelelor să se potrivească -pe mai multe niveluri de directoare. Când ** apare inserat direct într-un -model, se poate potrivi cu zero sau mai multe caractere, inclusiv slash-uri între -textul literal înconjurător. -

    Cea mai importantă utilizare a lui ** este în forma specială /**/. Aceasta se potrivește cu -zero sau mai multe niveluri complete de directoare, făcând posibilă potrivirea fișierelor -la orice adâncime într-un arbore de directoare fără a cunoaște structura exactă a căii. -De exemplu, modelul src/**/main.js se potrivește cu src/main.js (sărind -peste zero directoare), src/ui/main.js (sărind peste un director) și -src/ui/components/main.js (sărind peste două directoare). +

    Metacaracterul asterisc dublu ** se potrivește peste separatorii de +directoare numai atunci când este adiacent unui separator de directoare +(precedat sau urmat de o bară oblică). În această formă, se potrivește cu +zero sau mai multe caractere pe mai multe niveluri de directoare. De exemplu, +foo/**/bar se potrivește cu foo/bar, foo/a/bar și foo/a/b/bar; +**/build se potrivește cu build și foo/bar/build; iar src/**.js se +potrivește cu src/main.js și src/ui/components/main.js. +Forma de sine stătătoare /**/ nu este acceptată ca un model complet. +

    Când ** nu este adiacent unei bare oblice, se comportă ca * și nu se +potrivește cu separatorii de directoare. De exemplu, **.jpg se potrivește cu +photo.jpg în directorul curent, dar nu se potrivește cu dir/photo.jpg. +Folosiți **/*.jpg în acest scop.

    Clasele de caractere care utilizează paranteze pătrate [] se potrivesc cu un singur caracter dintr-un set sau interval specificat. La fel ca și celelalte modele de un singur caracter, acestea nu se potrivesc cu separatorii de directoare. Clasele suportă intervale și negarea folosind un semn de exclamare.

    Distincția fundamentală de reținut este că *, ? și clasele de caractere respectă toate limitele directoarelor și se potrivesc doar în cadrul unei singure -componente a căii, în timp ce ** este singurul model care se poate potrivi peste -separatorii de directoare. +componente a căii, în timp ce ** se poate potrivi peste separatorii de directoare +numai atunci când este adiacent unei bare oblice.

    Există patru tipuri diferite de modele:

    @@ -1927,6 +2135,25 @@ include /movies/ include /musics/ include /pictures/ +

    Rețineți că excluderea unui director (folosind DIR/ sau /CALE/DIR/) +împiedică SnapRAID să intre și să scaneze acel director. Prin urmare, +nu este posibil să reincludeți un fișier sau un subdirector situat +într-un director părinte exclus, deoarece scanerul nu îl parcurge niciodată. +

    De exemplu, următoarea configurație NU va include file.dat deoarece +/keep/ este eliminat înainte ca file.dat să poată fi examinat: +

    +# NU funcționează: /keep/ este omis complet
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Pentru a exclude fișierele dintr-un director păstrând anumite fișiere +specifice, excludeți modelul fișierelor din interiorul directorului, +în loc să excludeți directorul în sine: +

    +# Funcționează: /keep/ este parcurs, dar celelalte fișiere din interior sunt excluse
    +include /keep/file.dat
    +exclude /keep/*
    +

    Pe linia de comandă, utilizând opțiunea -f, puteți utiliza doar modele include. De exemplu:

    @@ -1938,7 +2165,7 @@ snapraid -f "*.mp3" check
     să le citați pentru a împiedica shell-ul să le extindă.
     

    -

    +

    Fișiere de Ignorat (Ignore File)

    Pe lângă regulile globale din fișierul de configurare, puteți plasa fișiere @@ -2004,17 +2231,19 @@ build/

    -

    +

    Conținut (Content)

    SnapRAID stochează lista și sumele de control (checksums) ale fișierelor dvs. în fișierul de conținut.

    Este un fișier binar care listează toate fișierele prezente în matricea dvs. de discuri, împreună cu toate sumele de control pentru a le verifica integritatea. -

    Acest fișier este citit și scris de comenzile sync și scrub și -citit de comenzile fix, check și status. +

    Fișierul de conținut este citit și scris de comenzile sync, scrub, +touch și rehash. Este citit de comenzile status, diff, check, +fix, list, dup, locate și pool, și este complet ignorat +de comenzile smart, probe, up, down și devices.

    -

    +

    Paritate (Parity)

    SnapRAID stochează informațiile de paritate ale matricei dvs. în fișierele de paritate. @@ -2024,7 +2253,7 @@ blocurilor definite în fișierul de content. doar citite de comenzile scrub și check.

    -

    +

    Codare (Encoding)

    SnapRAID în Unix ignoră orice codare. Citește și stochează @@ -2039,16 +2268,278 @@ redirecționați ieșirea consolei către un fișier, fișierul rezultat este î în format UTF-8.

    -

    -Drept de Autor (Copyright) +

    +Cod de ieșire (Exit Code)

    -

    Acest fișier este Copyright (C) 2025 Andrea Mazzoleni +

    SnapRAID se termină cu următoarele coduri de eroare: +

    +
    +
    +0 +
    +Totul este OK. +
    +
    +
    +
    +1 +
    +Comanda a întâmpinat unele erori. +
    +
    +
    +
    +2 +
    +Comanda diff a constatat că totul este OK, dar este necesar un sync. +
    +
    +
    +
    +3 +
    +O comandă de dispozitiv de disc (probe, smart, devices, up, +down) s-a finalizat, dar cel puțin un sistem de fișiere funcționează +în mod degradat cu dispozitive lipsă. +
    +
    +
    +
    +
    +

    +Probleme Cunoscute (Known Issues) +

    +
    +

    +Limitele sistemului de fișiere +

    +

    SnapRAID nu traversează limitele sistemului de fișiere, punctelor de montare +sau subvolumelor în timpul scanării unui disc de date. Când este detectată +o astfel de limită, SnapRAID raportează un AVERTISMENT și nu scanează dincolo de ea. +

    Fișierele situate dincolo de aceste limite nu sunt incluse pe discul de date +și trebuie configurate separat dacă trebuie protejate. +

    +
    +

    +Puncte de montare cu instantanee ale sistemului de fișiere +

    +

    Când instantanee ale sistemului de fișiere sunt activate, punctele de montare +imbricate și montările bind din interiorul unui disc de date nu sunt acceptate. +

    Punctele de montare fac parte din spațiul de nume de montare al sistemului +activ și nu sunt păstrate în instantaneele sistemului de fișiere. În consecință, +la scanarea unui instantaneu, un director ascuns de un punct de montare în +sistemul de fișiere activ poate deveni vizibil. +

    Nu plasați puncte de montare imbricate sau montări bind în interiorul discurilor +de date când instantaneele sistemului de fișiere sunt activate. +

    +
    +

    +Configurații multiple cu instantanee ale sistemului de fișiere +

    +

    Suportul pentru instantanee nu poate fi partajat în siguranță de mai multe +configurații independente SnapRAID care utilizează același spațiu de nume +pentru instantanee al sistemului de fișiere. +

    Pe Btrfs și Bcachefs, o singură configurație SnapRAID cu suportul pentru +instantanee activat poate utiliza directoare de date din cadrul aceluiași +subvolum. Pe ZFS, aceeași restricție se aplică unui dataset, iar pe NTFS +unui volum. +

    Configurațiile multiple care partajează același spațiu de nume pentru instantanee +folosesc aceleași instantanee stable, pending și scan. Rularea unei +configurații poate astfel înlocui sau șterge instantaneele de recuperare +necesare alteia. +

    +
    +

    +Modificări ale fișierelor pe loc fără schimbarea marcajului temporal +

    +

    SnapRAID detectează modificările fișierelor comparând dimensiunile fișierelor +și marcajele temporale de modificare (mtime). +

    Dacă o aplicație modifică un fișier pe loc fără a-i modifica dimensiunea +și fără a-i actualiza marcajul temporal de modificare, "diff" și "sync" nu +vor detecta că fișierul s-a modificat, iar paritatea acestuia nu va fi +actualizată. +

    Pentru a vă asigura că SnapRAID recunoaște astfel de modificări, actualizați +marcajul temporal de modificare al fișierului (de exemplu, cu utilitarul +"touch"). În caz contrar, diferența va fi detectată doar ca o neconcordanță +de hash în timpul unui "scrub" sau "check" ulterior. +

    +
    +

    +Potrivirea majusculelor/minusculelor non-ASCII în Windows +

    +

    SnapRAID utilizează codificarea UTF-8 standard și previzibilă pe toate +platformele, limitând potrivirea fără distincție între majuscule și minuscule +la caracterele ASCII. +

    Sistemele de fișiere Windows suferă din cauza designului moștenit de a impune +insensibilitatea la majuscule/minuscule asupra numelor de fișiere Unicode prin +tabele arbitrare de conversie dependente de sistem. În consecință, Windows +maschează realitatea sistemului de fișiere tratând secvențe de octeți Unicode +complet diferite ca și cum ar fi același fișier. +

    De exemplu, À.txt și à.txt sunt nume Unicode distincte, însă Windows le +tratează în mod ilogic ca fiind identice, în timp ce SnapRAID le păstrează +distincția reală. +

    Această limitare este cauzată de gestionarea incoerentă a numelor de fișiere +Unicode de către Windows și de insistența sa asupra aplicării de aliasuri fără +distincție între majuscule și minuscule. Pentru a preveni discrepanțele apărute +din conversia efectuată de Windows, specificați întotdeauna forma exactă a +caracterelor non-ASCII în căile de configurare și filtre. +

    +
    +

    +Recuperare cu fix parțial +

    +

    Când fix este restricționat folosind -S, --start sau -B, --count, +SnapRAID operează doar pe blocurile selectate și nu efectuează finalizarea +la nivel de fișier sau carantina. +

    Dacă recuperarea produce date de tip „best-effort” despre care nu se poate +dovedi că reprezintă conținutul curent, astfel de blocuri pot fi totuși +scrise sub numele de fișier normal. Incertitudinea asociată cu aceste blocuri +recuperate nu este păstrată după terminarea comenzii. +

    În consecință, un fix ulterior va trata aceste blocuri lizibile drept date +de fișier valide și nu va încerca să le recupereze din nou. Acest lucru poate +face ca o recuperare ulterioară să raporteze succes, lăsând în același timp date +incomplete sau învechite în fișier. +

    Opțiunile -S și -B sunt destinate exclusiv recuperării manuale avansate, +de obicei după ce un fix normal a eșuat. Dacă un fix parțial raportează +date nerecuperabile, eliminați sau redenumiți fișierele afectate înainte de a +încerca o nouă recuperare, sau verificați manual conținutul acestora. +

    +
    +

    +Legături dure NTFS și căi excluse +

    +

    Pe NTFS, intrările din director memorează în cache dimensiunea fișierului +și marcajele temporale în mod independent pentru fiecare legătură dură. +Când un fișier este modificat printr-o legătură, intrările din director ale +celorlalte legături care indică spre același fișier pot păstra metadate +învechite până când sunt accesate. +

    SnapRAID detectează și normalizează automat această stare ori de câte ori +întâlnește cel puțin două legături dure către același fișier în timpul unei +scanări. Cu toate acestea, dacă este scanată o singură legătură dură în +timp ce celelalte sunt excluse prin filtre sau se află în afara căii +discului de date, SnapRAID nu poate detecta coliziunea de inoduri și se +bazează pe metadatele din cache ale singurei legături vizibile. +

    Prin urmare, modificările efectuate printr-o legătură dură exclusă sau +externă pot trece neobservate de SnapRAID până când metadatele legăturii +incluse sunt reîmprospătate de sistemul de operare (cum ar fi atunci când +fișierul este accesat sau deschis prin acea cale). +

    Pentru a evita această limitare, evitați modificarea fișierelor protejate +prin legături dure care sunt excluse din SnapRAID, sau asigurați-vă că toate +legăturile dure către un fișier sunt incluse în scanare, astfel încât +SnapRAID să le poată normaliza. +

    +
    +

    +Recuperare după un sync multi-paritate întrerupt +

    +

    Într-o matrice cu mai multe discuri de paritate, un sync întrerupt +poate lăsa nivelurile de paritate temporar nesincronizate între ele. +De exemplu, paritatea 1 ar putea conține deja date nou actualizate, +în timp ce paritatea 2 conține încă datele vechi. +

    În timpul check sau fix, SnapRAID încearcă diferite combinații de +paritate și validează datele reconstruite pe baza hash-urilor de bloc +cunoscute (acoperind blocul complet, de obicei 256 KiB). +

    Dacă SnapRAID încearcă o reconstrucție folosind un amestec inconsistent +de paritate veche și nouă, ecuațiile liniare RAID vor produce date +incorecte. Pentru ca această combinație invalidă să fie acceptată în mod +eronat, ecuațiile ar trebui să reconstruiască accidental cel puțin un +bloc complet de 256 KiB atât de perfect încât hash-ul său să se +potrivească, în timp ce alte blocuri nesincronizate din aceeași bandă +sunt reconstruite cu date incorecte. +

    Acest scenariu nu depinde de o coliziune de hash; mai degrabă, ecuațiile +de paritate mixtă în sine ar trebui să producă din întâmplare conținutul +exact al blocului original de 256 KiB. Deși este matematic posibil în +cazul datelor special concepute sau extrem de repetitive, este practic +imposibil cu date reale. +

    Dacă toate discurile sunt integre, finalizarea sync-ului întrerupt +înainte de a face alte modificări elimină această ambiguitate. Dacă un +disc a cedat și este necesară recuperarea, evitați modificarea discurilor +de date înainte de a rula check sau fix. +

    +
    +

    +Nume rezervate de fișiere și directoare +

    +

    SnapRAID rezervă anumite nume de fișiere, directoare și snapshot-uri pentru +operațiunile sale interne. Nu utilizați aceste nume pentru datele utilizatorului: +

    +
    +
    +.snapraidignore +
    +Fișier local cu reguli de excludere. +
    +
    +
    +
    +.snapraid +
    +Director container pentru snapshot-uri. +
    +
    +
    +
    +snapraid-* +
    +Nume de snapshot-uri ZFS gestionate de SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Fișiere deteriorate puse în carantină în timpul recuperării. +
    +
    +
    +
    +CONTENT.tmp +
    +Fișier temporar pentru actualizările fișierului content. +
    +
    +
    +
    +CONTENT.lock +
    +Fișier de blocare pentru fișierul content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Fișier temporar pentru rezervarea spațiului în timpul +alocării parității pe Windows. +
    +
    +
    +

    Utilizarea acestor nume pentru date fără legătură poate face ca fișierele sau +snapshot-urile să fie ignorate, interpretate eronat ca metadate, suprascrise, +redenumite sau șterse. +

    Pe Windows, toate variantele majuscule/minuscule sunt de asemenea rezervate, +chiar și în directoarele NTFS configurate pentru diferențierea majusculelor de +minuscule (de exemplu, .SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP și CONTENT.Lock). +

    +
    +
    +

    +Traducere (Translation) +

    +

    Acest document este o traducere automată a manualului în limba engleză. +Consultați manualul în limba engleză pentru versiunea oficială.

    -

    +

    +Drept de Autor (Copyright) +

    +

    Acest fișier este Copyright (C) 2026 Andrea Mazzoleni +

    +
    +

    Vezi și (See Also)

    -

    snapraid_log(1), snapraidd(1) +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-ru.html b/manual-ru.html index 80fe0c67..ff597cb8 100644 --- a/manual-ru.html +++ b/manual-ru.html @@ -114,7 +114,7 @@

    -Synopsis +Синопсис (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Description +Описание (Description)

    SnapRAID — это программа резервного копирования, разработанная для дисковых массивов, хранящая информацию четности для восстановления данных в случае сбоя @@ -188,22 +188,36 @@ SnapRAID не блокирует ваши данные; вы можете пре

    -Limitations +Ограничения (Limitations)

    -

    SnapRAID — это гибрид программы RAID и программы резервного копирования, -стремящийся объединить лучшие преимущества обеих. Однако у него есть -некоторые ограничения, которые следует учитывать перед использованием. -

    Основное ограничение заключается в том, что если диск выходит из строя, а вы -недавно не выполняли синхронизацию, вы можете не восстановить данные полностью. -В частности, вы можете не восстановить данные в объеме, равном размеру -измененных или удаленных файлов с момента последней операции синхронизации. -Это происходит, даже если измененные или удаленные файлы не находятся -на отказавшем диске. Вот почему SnapRAID лучше подходит для -данных, которые редко меняются. -

    С другой стороны, недавно добавленные файлы не препятствуют восстановлению уже -существующих файлов. Вы потеряете только недавно добавленные файлы, -если они находятся на отказавшем диске. -

    Другие ограничения SnapRAID: +

    SnapRAID — это гибрид между RAID и программой резервного копирования, стремящийся сочетать +в себе лучшие преимущества обоих подходов. Однако у него есть некоторые ограничения, которые вам +следует учесть перед использованием. +

    Основное ограничение заключается в том, что в случае сбоя диска вы можете восстановить данные только до +состояния последней операции синхронизации (sync). Любые данные, добавленные или измененные +с момента последней синхронизации и находящиеся на отказавшем диске, будут потеряны. +

    Следовательно, SnapRAID в первую очередь подходит для данных, которые редко меняются. +

    Для данных, которые уже существовали на момент последней синхронизации, надежность восстановления зависит +от того, используется ли опция снимка (snapshot): +

      +
    • +При наличии поддержки снимков (доступно на Btrfs, ZFS, Bcachefs и NTFS), +SnapRAID может автоматически поддерживать независимую замороженную копию +каждой поддерживаемой файловой системы данных. +Это гарантирует, что даже если вы измените или удалите файлы в вашей живой файловой системе +во время или после синхронизации, процесс восстановления останется согласованным и надежным. +
    • +
    +
      +
    • +Без поддержки снимков удаление или изменение файлов после sync +может предотвратить полное восстановление других отказавших дисков. Это происходит +потому, что четность больше не соответствует измененным файлам, даже если +эти файлы находятся не на отказавшем диске. С другой стороны, недавно добавленные +файлы не препятствуют восстановлению уже существующих файлов. +
    • +
    +

    Другие ограничения SnapRAID:

    • Со SnapRAID у вас все еще отдельные файловые системы для каждого диска. @@ -230,7 +244,7 @@ SnapRAID может восстановить данные только при о

    -Getting Started +Начало работы (Getting Started)

    Чтобы использовать SnapRAID, вам нужно сначала выбрать один диск в вашем дисковом массиве для выделения под информацию четности (parity). С одним диском для четности, вы @@ -304,7 +318,7 @@ snapraid sync обновлять информацию четности, запуская команду sync.

    -Scrubbing +Скрабирование (Scrubbing)

    Для периодической проверки данных и четности на наличие ошибок, вы можете запустить команду scrub. @@ -344,11 +358,11 @@ snapraid -p bad scrub

    -Pooling +Объединение (Pooling)

    Примечание: Функция объединения (pooling), описанная ниже, была заменена инструментом mergerfs, который теперь является рекомендуемым вариантом для пользователей Linux -в сообществе SnapRAID. Mergefs предоставляет более гибкий и эффективный +в сообществе SnapRAID. Mergerfs предоставляет более гибкий и эффективный способ объединения нескольких дисков в единую точку монтирования, обеспечивая беспрепятственный доступ к файлам по всему массиву без опоры на символические ссылки. Он хорошо интегрируется со SnapRAID для @@ -419,7 +433,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +Восстановление удаленных файлов (Undeleting)

    SnapRAID функционирует скорее как программа резервного копирования, чем как система RAID, и может использоваться для восстановления или отмены удаления файлов до их @@ -444,7 +458,7 @@ snapraid fix -m

    -Recovering +Восстановление (Recovering)

    Случилось худшее, и вы потеряли один или несколько дисков!

    НЕ ПАНИКУЙТЕ! Вы сможете их восстановить! @@ -532,27 +546,27 @@ snapraid sync

    -Commands +Команды (Commands)

    SnapRAID предоставляет несколько простых команд, которые позволяют:

    • -Печатать статус массива -> status +Вывести статус массива -> status
    • Управлять дисками -> smart, probe, up, down
    • -Сделать резервную копию/снимок -> sync +Создать точку резервного копирования/восстановления -> sync
    • Периодически проверять данные -> scrub
    • -Восстановить последнюю резервную копию/снимок -> fix. +Восстановить последнюю точку резервного копирования/восстановления -> fix.
    -

    Команды должны быть написаны строчными буквами. +

    Команды должны быть написаны строчными (маленькими) буквами.

    status @@ -703,9 +717,10 @@ updated
    moved
    -Файлы, перемещенные в другой каталог на том же диске. -Они идентифицируются как имеющие то же имя, размер, метку времени -и inode, но другой каталог. +Файлы, перемещенные или переименованные на том же диске с +сохранением того же inode. Они идентифицируются по совпадению +inode, размера и метки времени, но имеют другой путь. Имя файла +также может отличаться.

    @@ -724,14 +739,13 @@ copied
    relocated
    -файлы, перемещенные на тот же или другой диск, где -оригинал исчез. +Файлы, перемещенные в другой каталог или на другой диск, +где исходный файл исчез, а inode не сохранился. Они идентифицируются по совпадению имени, размера и метки -времени. -Если дробная часть метки времени равна нулю, для идентификации -должен совпадать полный путь. -В отличие от файлов 'moved' на том же диске, перемещенные файлы -имеют другой inode. +времени. Если дробная часть метки времени равна нулю, для +идентификации должен совпадать полный путь. В отличие от файлов +'moved', перемещенные (relocated) файлы требуют, чтобы имя файла +оставалось прежним.
    @@ -813,13 +827,12 @@ full - Проверить все.

    fix

    -

    Исправляет все файлы и данные четности. -

    Все файлы и данные четности сравниваются с состоянием снимка, -сохраненным при последнем sync. -Если обнаружено различие, оно возвращается к сохраненному снимку. -

    ВНИМАНИЕ! Команда fix не различает ошибки и -преднамеренные изменения. Она безусловно возвращает состояние файла -к последнему sync. +

    Восстанавливает все файлы и данные четности. +

    Все файлы и данные четности сравниваются с состоянием, сохраненным во время +последней синхронизации sync. Если обнаружено отличие, оно возвращается к сохраненному состоянию. +

    ВНИМАНИЕ! +Команда fix не делает различий между ошибками и преднамеренными изменениями. +Она безоговорочно возвращает состояние файлов к моменту последней sync.

    Если не указана другая опция, обрабатывается весь массив. Используйте опции фильтрации, чтобы выбрать подмножество файлов или дисков для работы.

    Чтобы исправить только блоки, помеченные как плохие во время sync и scrub, @@ -952,7 +965,7 @@ locate

    -Options +Параметры (Options)

    SnapRAID предоставляет следующие опции:

    @@ -1131,14 +1144,14 @@ DAYS — это минимальный возраст в днях для бло
    Применяет глобальное ограничение пропускной способности для всех дисков. RATE — это количество байтов в секунду. Вы можете указать множитель, -например K, M или G (например, --bw-limit 1G). +например K, M, G или T (например, --bw-limit 1G).
    --t, --tail РАЗМЕР +-t, --tail SIZE
    Ограничивает список файлов теми, которые используют не более указанного размера хвоста дисков четности. @@ -1294,10 +1307,10 @@ DAYS — это минимальный возраст в днях для бло
    --W, --force-realloc-tail РАЗМЕР +-W, --force-realloc-tail SIZE
    Работает как -R, --force-realloc, но ограничивается указанной хвостовой -частью (последние РАЗМЕР байт) каждого файла четности. +частью (последние SIZE байт) каждого файла четности. Принудительно перераспределяет (перемещает) любые фрагменты/блоки файлов, хранящиеся в данный момент в этой хвостовой части, позволяя разместить их в любом месте файла(ов) четности, где есть свободное место @@ -1365,7 +1378,8 @@ SnapRAID. Начинает обработку с указанного номера блока. Это может быть полезно для повторной попытки проверить или исправить конкретные блоки в случае поврежденного диска. -Эта опция в основном предназначена для расширенного ручного восстановления. +Эта опция в основном предназначена для расширенного ручного восстановления +и поддерживается только командами check и fix.
    @@ -1375,7 +1389,8 @@ SnapRAID. -B, --count BLKCOUNT
    Обрабатывает только указанное количество блоков. -Эта опция в основном предназначена для расширенного ручного восстановления. +Эта опция в основном предназначена для расширенного ручного восстановления +и поддерживается только командами check и fix.
    @@ -1441,7 +1456,7 @@ SnapRAID.

    -Configuration +Конфигурация (Configuration)

    SnapRAID требует файл конфигурации, чтобы знать, где находится ваш дисковый массив и где хранить информацию четности. @@ -1538,6 +1553,10 @@ data NAME DIR файловой системе.

    Вы можете изменять точку монтирования по мере необходимости, пока вы сохраняете NAME фиксированным. +

    Однако настроенный путь должен постоянно указывать на те же +базовые данные. Если путь содержит символические ссылки, +их целевые объекты должны оставаться неизменными. Перенаправление +таких ссылок для смены каталога данных на лету не поддерживается.

    Вы должны использовать одну опцию для каждого диска данных в массиве.

    Вы можете переименовать диск позже, изменив NAME непосредственно в файле конфигурации, а затем запустив команду sync. @@ -1558,6 +1577,29 @@ extra NAME DIR

    +snapshot +

    +

    Включает использование снимков файловой системы для команд sync, scrub, +check и fix. +

    Если опция включена, SnapRAID создает снимок только для чтения каждой поддерживаемой +файловой системы данных в начале операции 'sync'. Это обеспечивает стабильный срез +каждой файловой системы, предотвращая изменение данных, используемых для вычисления +четности, последующими модификациями. +

    Это значительно улучшает восстановление: если файл удаляется из живой файловой системы, +он остается сохраненным в снимке. Это предотвращает «нарушение» четности +для этого блока, гарантируя, что вы все еще сможете успешно восстановить данные +в случае сбоя другого диска. +

    Эта опция применяется исключительно к дискам с данными, отформатированным в файловых +системах Btrfs, Bcachefs или ZFS в Linux и NTFS в Windows. +Диски четности или диски с данными, использующие другие файловые системы, всегда будут использовать +живую версию файловой системы. +

    Создание и удаление снимков требуют прав администратора. +Убедитесь, что SnapRAID запущен с необходимыми привилегиями (например, sudo), когда +включена эта опция. +

    Подробное объяснение жизненного цикла снимков см. в разделе SNAPSHOTS. +

    +
    +

    nohidden

    Исключает все скрытые файлы и каталоги. @@ -1565,7 +1607,7 @@ nohidden В Windows — это те, у которых есть скрытый атрибут.

    -

    +

    exclude/include PATTERN

    Определяет шаблоны файлов или каталогов для исключения или включения @@ -1576,11 +1618,15 @@ exclude/include PATTERN Если ни один шаблон не совпадает, файл исключается, если последний указанный шаблон — это include, или включается, если последний шаблон — это exclude. +

    Обратите внимание, что фильтрация выполняется иерархически во время +обхода каталогов. Если каталог совпадает с правилом exclude, весь +каталог пропускается (отсекается), и любые правила include для +файлов или подкаталогов внутри него не будут оцениваться.

    Подробнее о спецификациях шаблонов см. в разделе PATTERN.

    Эту опцию можно использовать несколько раз.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Определяет базовый размер блока в кибибайтах для четности. @@ -1622,7 +1668,7 @@ mkfs.ext4 -m 0 -T largefile4 DEVICE каких-либо потерь пространства.

    -

    +

    hashsize SIZE_IN_BYTES

    Определяет размер хэша в байтах для сохраненных блоков. @@ -1657,7 +1703,7 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    Автоматически сохраняет состояние при синхронизации или проверке после @@ -1666,7 +1712,7 @@ autosave SIZE_IN_GIGABYTES с нуля, если они были прерваны сбоем машины или любым другим событием.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Устанавливает максимально допустимую температуру диска в Цельсиях. Если указано, @@ -1697,14 +1743,14 @@ SnapRAID периодически проверяет температуру вс Чтобы отобразить температуру всех дисков, используйте опцию -A или --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Устанавливает время ожидания, в минутах, когда достигается предел температуры. В течение этого периода диски остаются остановленными. По умолчанию — 5 минут.

    -

    +

    pool DIR

    Определяет каталог объединения (pooling), где создается виртуальное представление @@ -1712,7 +1758,7 @@ pool DIR

    Каталог должен уже существовать.

    -

    +

    share UNC_DIR

    Определяет путь UNC Windows, необходимый для удаленного доступа к дискам. @@ -1726,7 +1772,7 @@ share UNC_DIR

    Эта опция требуется только для Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Определяет пользовательские опции smartctl для получения атрибутов SMART для @@ -1740,6 +1786,8 @@ PARITY — это одно из имен четности: parity, 2-p

    В указанных OPTIONS строка %s заменяется именем устройства. Для контроллеров RAID устройство, вероятно, фиксировано, и вам может не потребоваться использовать %s. +

    Вы также можете указать пользовательскую строку параметров информации с помощью +тега [info: ...], чтобы заменить параметр по умолчанию -a.

    Возможные опции см. в документации smartmontools:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1747,11 +1795,12 @@ PARITY — это одно из имен четности: parity, 2-p
     

    Например:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Игнорирует указанный атрибут SMART при вычислении вероятности @@ -1761,19 +1810,23 @@ smartignore DISK/PARITY ATTR [ATTR...] PARITY — это одно из имен четности: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity или z-parity. Специальное значение * может использоваться для игнорирования атрибута на всех дисках. -

    Например, чтобы игнорировать атрибут Current Pending Sector Count на -всех дисках: +

    Можно указать несколько атрибутов, разделенных пробелами. +Каждый атрибут может быть указан как число от 1 до 255 или как имя, +нечувствительное к регистру (например, Current_Pending_Sector). +

    Например, чтобы игнорировать атрибуты Current Pending Sector Count и +Reallocated Sectors Count на всех дисках по их номеру или имени:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Чтобы игнорировать его только на первом диске четности: +

    Чтобы игнорировать их только на первом диске четности:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    -Examples +

    +Примеры (Examples)

    Пример типичной конфигурации для Unix:

    @@ -1785,7 +1838,7 @@ data d2 /mnt/disk2/
     data d3 /mnt/disk3/
     exclude /lost+found/
     exclude /tmp/
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/sg0
     smartctl 2-parity -d areca,2/1 /dev/sg0
    @@ -1801,7 +1854,7 @@ data d3 I:\array\
     exclude Thumbs.db
     exclude \$RECYCLE.BIN
     exclude \System Volume Information
    -smartctl d1 -d sat %s
    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl d2 -d usbjmicron %s
     smartctl parity -d areca,1/1 /dev/arcmsr0
     smartctl 2-parity -d areca,2/1 /dev/arcmsr0
    @@ -1810,7 +1863,149 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0
     

    -Pattern +Снимки (Snapshots) +

    +

    Если в конфигурации включена опция снимков, SnapRAID использует снимки +файловой системы для сохранения стабильности данных, считываемых во время +операции, даже если файлы в живых файловых системах впоследствии изменяются +или удаляются. +

    Управление снимками происходит полностью автоматически и прозрачно. +Вы можете продолжать использовать SnapRAID точно так же, как и раньше, получая +дополнительную защиту, обеспечиваемую снимками, которые полностью обрабатываются в +фоновом режиме. +

    Это дает два основных преимущества: +

    Согласованность — Файлы, измененные в живой файловой системе во время длительного +

    процесса sync или scrub, не вызовут несоответствия четности или прерывания +операций, поскольку каждая файловая система со снимком остается неизменной +на протяжении всей операции. +

    Восстановление — Если файл обновляется или удаляется из живой файловой системы, +

    он остается сохраненным в снимке. Если сбой диска произойдет +до запуска следующей синхронизации sync, SnapRAID использует данные, сохраненные +в снимке, для реконструкции отказавшего диска. +

    В случае сбоя диска во время активного процесса sync, +SnapRAID также может автоматически читать как из снимка предыдущего +вычисления четности, так и из текущего. +Это максимизирует вероятность полного восстановления, предоставляя +доступ к точным блокам данных, необходимым для решения уравнений четности, +даже если эти блоки были изменены или удалены между синхронизациями. +

    Без снимков обновленный или удаленный файл на исправном диске +приводит к отсутствию блоков данных, которые могут потребоваться для +восстановления других отказавших дисков. +

    Снимки создаются только для дисков с данными и только в том случае, если базовая +файловая система поддерживает эту функциональность. Диски четности всегда используют +живую файловую систему. +

    В настоящее время это поддерживается на Btrfs, Bcachefs и ZFS в Linux +и на NTFS в Windows. +

    Вы можете комбинировать диски с данными с различными файловыми системами. Только те из них, +которые поддерживают снимки, будут использовать их, в то время как другие диски продолжат +работать напрямую с живой файловой системой. +

    Создание и удаление снимков требуют прав администратора. +Убедитесь, что SnapRAID запущен с необходимыми привилегиями (например, sudo), +когда снимки включены. +

    +

    +Поведение команд при использовании снимков +

    +

    Команды sync и scrub используют снимки для дисков с данными, чьи +файловые системы их поддерживают. На диске со снимком команда видит +стабильный образ файловой системы, не затронутый одновременными изменениями +в живой файловой системе. +Во время sync новый снимок создается независимо для каждой поддерживаемой +файловой системы данных. Эти снимки в совокупности предоставляют данные, +используемые для вычисления четности. +Напротив, команда scrub использует последний снимок, созданный во время +самой последней синхронизации, чтобы поддерживать надежную точку отсчета, +соответствующую существующей четности. +

    Для команд check и fix использование последнего снимка +зависит от того, нацелены ли конкретные диски с помощью опции +-d, --filter-disk. +

    Диск, явно выбранный с помощью -d («цель» операции), +всегда использует живую файловую систему. Для fix это позволяет восстановить +данные на активную замену диска. Для check это позволяет симулировать +операцию fix при тех же условиях. +

    Доступ ко всем остальным дискам с данными («справочным» дискам) будет осуществляться через +их снимки. Это гарантирует, что даже если вы изменяете файлы +на своих исправных дисках во время восстановления, SnapRAID +имеет стабильную, замороженную точку отсчета для решения уравнений четности. +

    Если опция -d не предоставлена, SnapRAID предполагает, что операция применяется +ко всему массиву; в этом случае check и fix будут использовать исключительно +живые файловые системы. +

    Все остальные команды работают исключительно с живой файловой системой. +

    +
    +
    +

    +Жизненный цикл снимков (Snapshots Lifecycle) +

    +

    SnapRAID управляет тремя конкретными снимками, stable, pending и scan, +внутри скрытого каталога в корне каждого подтома данных. +В Btrfs, Bcachefs и NTFS используется каталог .snapraid/, +в ZFS — стандартный .zfs/snapshot/. +

    Снимок stable представляет собой состояние последней успешно +завершенной синхронизации sync, содержащей точные данные, использованные для +вычисления текущей четности. Он служит основным источником данных +для команд scrub, check и fix. +

    Снимок scan — это временный образ, создаваемый в начале +sync для обеспечения замороженного состояния для сканирования и вычисления четности. +После сканирования и сохранения нового состояния содержимого он заменяет предыдущий +снимок pending. +

    Снимок pending — это образ, используемый прерванной синхронизацией sync. +После успешного завершения операции предыдущий снимок stable +удаляется, а снимок pending повышается в статусе, чтобы +занять его место в качестве нового стабильного ориентира. +

    Если процесс sync прерывается, снимок pending сохраняется. +Последующие команды scrub, check и fix будут использовать этот +ожидающий снимок, так как он соответствует состоянию файловой системы, записанному в +файле .content, даже если четность синхронизирована лишь частично. +

    В случае прерывания sync команды check и fix +также читают данные из снимка stable для извлечения блоков данных +из файлов, которые были обновлены или удалены во время синхронизации. +Это возможно потому, что файл .content сохраняет метаданные для +всех измененных или удаленных файлов на протяжении всего процесса sync. +Эта историческая информация очищается только после успешного завершения sync +и сохранения финальной версии файла .content. +

    Если sync перезапускается после прерывания, существующий +ожидающий (pending) снимок удаляется, и создается новый для +фиксации текущего состояния живой файловой системы. +Однако, если sync был прерван, избегайте изменения, удаления, +замены или перемещения файлов до тех пор, пока последующий sync не завершится +успешно. Четность все еще может содержать блоки, вычисленные на основе снимка, +использованного прерванной синхронизацией. Более поздняя синхронизация может +заменить этот снимок, сделав промежуточные версии файлов недоступными для +восстановления. +

    +

    +Внешнее резервное копирование со снимками файловой системы (External backups with filesystem snapshots) +

    +

    Когда снимки файловой системы включены, SnapRAID обращается к снимкам или +создает их в корне каждого подтома, тома или набора данных (dataset). +

    Простой способ избежать любых конфликтов со сторонними инструментами — +указать в директиве data обычный подкаталог внутри подтома или тома +(например, /mnt/subvol/data вместо /mnt/subvol). SnapRAID всегда +создает каталог снимков в корне подтома (например, +/mnt/subvol/.snapraid/), оставив подкаталог данных чистым, благодаря +чему снимки останутся снаружи и будут невидимы для программ резервного +копирования, работающих внутри него. +

    В противном случае, если настроенный каталог data сам по себе является +корнем подтома или тома, SnapRAID создает каталог .snapraid/ прямо внутри +него (в Btrfs, Bcachefs и NTFS). Хотя SnapRAID автоматически исключает этот +каталог из собственного сканирования, внешние утилиты резервного +копирования или синхронизации файлов обнаружат его. Если каталог не +исключен, они могут войти в снимки или ссылки на каталоги и скопировать +все замороженное дерево данных, дублируя файлы и исчерпывая место в +хранилище резервных копий. Всегда настраивайте внешние утилиты резервного +копирования на исключение каталога .snapraid/. +

    В ZFS снимки доступны через стандартный виртуальный каталог +.zfs/snapshot/, а не через .snapraid/. По умолчанию (snapdir=hidden) +ZFS скрывает этот каталог из списков директорий, поэтому внешние утилиты +резервного копирования не будут сканировать его. Если вы включили +snapdir=visible, обязательно настройте утилиты резервного копирования на +исключение каталога .zfs/. +

    +
    +
    +

    +Шаблон (Pattern)

    Шаблоны обеспечивают гибкий способ фильтрации файлов для включения или исключения. Используя символы подстановки (globbing), вы можете определить правила, @@ -1824,25 +2019,26 @@ Pattern прямой косой черте, что делает ее подходящей для сопоставления внутри одного компонента пути. Это стандартное поведение подстановочных знаков, знакомое по оболочке (shell). -

    Двойная звездочка ** более мощная, она соответствует любой последовательности -символов, включая разделители каталогов. Это позволяет шаблонам соответствовать -нескольким уровням каталогов. Когда ** появляется непосредственно в -шаблоне, она может соответствовать нулю или более символам, включая косые черты между -окружающим буквальным текстом. -

    Наиболее важным использованием ** является специальная форма /**/. Она соответствует -нулю или более полным уровням каталогов, что позволяет сопоставлять файлы -на любой глубине в дереве каталогов, не зная точной структуры пути. -Например, шаблон src/**/main.js соответствует src/main.js (пропуск -ноля каталогов), src/ui/main.js (пропуск одного каталога) и -src/ui/components/main.js (пропуск двух каталогов). +

    Символ подстановки двойная звездочка ** сопоставляется через разделители +каталогов только тогда, когда он примыкает к разделителю каталогов (перед ним +или после него стоит косая черта). В этой форме он соответствует нулю или +более символам на нескольких уровнях каталогов. Например, foo/**/bar +соответствует foo/bar, foo/a/bar и foo/a/b/bar; **/build соответствует +build и foo/bar/build; а src/**.js соответствует src/main.js и +src/ui/components/main.js. +Автономная форма /**/ не принимается в качестве полного шаблона. +

    Когда ** не примыкает к косой черте, он ведет себя как * и не +соответствует разделителям каталогов. Например, **.jpg соответствует +photo.jpg в текущем каталоге, но не соответствует dir/photo.jpg. Для этой +цели используйте **/*.jpg.

    Классы символов с использованием квадратных скобок [] соответствуют одному символу из заданного набора или диапазона. Как и другие односимвольные шаблоны, они не соответствуют разделителям каталогов. Классы поддерживают диапазоны и отрицание с использованием восклицательного знака.

    Фундаментальное различие, которое следует помнить, заключается в том, что *, ? и классы символов соблюдают границы каталогов и соответствуют только внутри одного -компонента пути, в то время как ** — единственный шаблон, который может соответствовать -через разделители каталогов. +компонента пути, в то время как ** может соответствовать через разделители +каталогов только тогда, когда примыкает к косой черте.

    Существует четыре различных типа шаблонов:

    @@ -1930,6 +2126,25 @@ include /movies/ include /musics/ include /pictures/ +

    Обратите внимание, что исключение каталога (с помощью DIR/ или /PATH/DIR/) +предотвращает вход SnapRAID в этот каталог и его сканирование. +Следовательно, невозможно повторно включить файл или подкаталог, +находящийся внутри исключенного родительского каталога, поскольку сканер +никогда не переходит в него. +

    Например, следующая конфигурация НЕ включит file.dat, поскольку +/keep/ отсекается до того, как file.dat сможет быть проверен: +

    +# НЕ работает как ожидается: /keep/ полностью пропускается
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Чтобы исключить файлы внутри каталога, сохранив определенные файлы, +исключайте шаблон файлов внутри каталога, а не сам каталог: +

    +# Работает: /keep/ сканируется, но остальные файлы внутри него исключаются
    +include /keep/file.dat
    +exclude /keep/*
    +

    В командной строке, используя опцию -f, вы можете использовать только шаблоны include. Например:

    @@ -1941,8 +2156,8 @@ snapraid -f "*.mp3" check
     заключить их в кавычки, чтобы предотвратить их расширение оболочкой.
     

    -

    -Ignore File +

    +Файл исключений (Ignore File)

    В дополнение к глобальным правилам в файле конфигурации, вы можете размещать файлы .snapraidignore в любом каталоге внутри массива для @@ -2007,18 +2222,20 @@ build/

    -

    -Content +

    +Содержимое (Content)

    SnapRAID хранит список и контрольные суммы ваших файлов в файле content.

    Это бинарный файл, который перечисляет все файлы, присутствующие в вашем дисковом массиве, вместе со всеми контрольными суммами для проверки их целостности. -

    Этот файл считывается и записывается командами sync и scrub и -считывается командами fix, check и status. +

    Файл content считывается и записывается командами sync, scrub, +touch и rehash. Он считывается командами status, diff, check, +fix, list, dup, locate и pool, и полностью игнорируется +командами smart, probe, up, down и devices.

    -

    -Parity +

    +Четность (Parity)

    SnapRAID хранит информацию четности вашего массива в файлах parity.

    Это бинарные файлы, содержащие вычисленную четность всех @@ -2027,8 +2244,8 @@ Parity только считываются командами scrub и check.

    -

    -Encoding +

    +Кодировка (Encoding)

    SnapRAID в Unix игнорирует любое кодирование. Он считывает и хранит имена файлов с тем же кодированием, которое используется файловой системой. @@ -2040,6 +2257,279 @@ Encoding Это влияет только на печатаемые имена файлов; если вы перенаправляете вывод консоли в файл, результирующий файл всегда в формате UTF-8. +

    +
    +

    +Код возврата (Exit Code) +

    +

    SnapRAID завершает работу со следующими кодами ошибок: +

    +
    +
    +0 +
    +Все в порядке. +
    +
    +
    +
    +1 +
    +Команда обнаружила ошибки. +
    +
    +
    +
    +2 +
    +Команда diff определила, что все в порядке, но требуется sync. +
    +
    +
    +
    +3 +
    +Команда дискового устройства (probe, smart, devices, up, +down) завершена, но по крайней мере одна файловая система работает +в деградированном режиме с отсутствующими устройствами. +
    +
    +
    +
    +
    +

    +Известные проблемы (Known Issues) +

    +
    +

    +Границы файловой системы +

    +

    SnapRAID не пересекает границы файловых систем, точек монтирования или +подтомов при сканировании диска данных. При обнаружении такой границы +SnapRAID сообщает ПРЕДУПРЕЖДЕНИЕ и не выполняет сканирование за ее пределами. +

    Файлы, расположенные за такими границами, не включаются в диск данных и +должны настраиваться отдельно, если их необходимо защитить. +

    +
    +

    +Точки монтирования со снимками файловой системы +

    +

    Когда снимки файловой системы включены, вложенные точки монтирования и +bind-монтирования внутри диска данных не поддерживаются. +

    Точки монтирования являются частью пространства имен монтирования работающей +системы и не сохраняются в снимках файловой системы. Следовательно, при +сканировании снимка каталог, скрытый точкой монтирования в активной файловой +системе, может стать видимым. +

    Не размещайте вложенные точки монтирования или bind-монтирования внутри дисков +данных, когда включены снимки файловой системы. +

    +
    +

    +Несколько конфигураций со снимками файловой системы +

    +

    Поддержка снимков не может безопасно совместно использоваться несколькими +независимыми конфигурациями SnapRAID, использующими одно и то же +пространство имен снимков файловой системы. +

    В Btrfs и Bcachefs только одна конфигурация SnapRAID с включенной поддержкой +снимков может использовать каталоги данных в пределах одного и того же +подтома. В ZFS то же ограничение применяется к датасету, а в NTFS — к тому. +

    Несколько конфигураций, использующих одно и то же пространство имен снимков, +работают с одними и теми же снимками stable, pending и scan. Запуск +одной конфигурации может перезаписать или удалить снимки восстановления, +необходимые другой. +

    +
    +

    +Изменения файлов на месте без изменения временных меток +

    +

    SnapRAID обнаруживает изменения файлов путем сравнения размеров файлов и +временных меток модификации (mtime). +

    Если приложение изменяет файл на месте без изменения его размера или +обновления временной метки модификации, "diff" и "sync" не обнаружат +изменение файла, и его четность не будет обновлена. +

    Чтобы SnapRAID гарантированно распознал такие изменения, обновите временную +метку модификации файла (например, с помощью утилиты "touch"). В противном +случае различие будет обнаружено только как несоответствие хэша во время +последующего "scrub" или "check". +

    +
    +

    +Сопоставление регистра символов non-ASCII в Windows +

    +

    SnapRAID использует стандартную, предсказуемую кодировку UTF-8 на всех +платформах, ограничивая нечувствительное к регистру сопоставление символами +ASCII. +

    Файловые системы Windows страдают от устаревшего архитектурного решения, +навязывающего нечувствительность к регистру для имен файлов Unicode с помощью +произвольных, зависящих от системы таблиц сопоставления. В результате Windows +искажает реальность файловой системы, обрабатывая совершенно разные +последовательности байтов Unicode так, как если бы они были одним и тем же +файлом. +

    Например, À.txt и à.txt — это разные имена Unicode, однако Windows +нелогично считает их идентичными, тогда как SnapRAID сохраняет их подлинное +различие. +

    Это ограничение вызвано непоследовательной обработкой имен файлов Unicode в +Windows и ее упорным стремлением к псевдонимизации без учета регистра. Чтобы +предотвратить расхождения, возникающие из-за преобразования регистра в Windows, +всегда указывайте точный регистр для любых символов non-ASCII в путях +конфигурации и фильтрах. +

    +
    +

    +Восстановление с частичным fix +

    +

    Когда fix ограничен с помощью -S, --start или -B, --count, +SnapRAID работает только с выбранными блоками и не выполняет финализацию +на уровне файлов или помещение в карантин. +

    Если в результате восстановления получаются данные наилучшей попытки (best-effort), +для которых нельзя доказать, что они соответствуют текущему содержимому, такие +блоки все равно могут быть записаны под обычным именем файла. Неопределенность, +связанная с этими восстановленными блоками, не сохраняется после завершения команды. +

    Как следствие, последующий fix будет рассматривать эти читаемые блоки как +корректные данные файла и не попытается восстановить их снова. Это может привести +к тому, что последующее восстановление сообщит об успехе, оставив в файле +неполные или устаревшие данные. +

    Параметры -S и -B предназначены только для расширенного ручного +восстановления, обычно после сбоя обычного fix. Если частичный fix сообщает +о невосстановимых данных, удалите или переименуйте затронутые файлы перед +попыткой повторного восстановления либо проверьте их содержимое вручную. +

    +
    +

    +Жесткие ссылки NTFS и исключенные пути +

    +

    В NTFS записи каталогов кэшируют размер файла и временные метки независимо +для каждой жесткой ссылки. Когда файл изменяется через одну ссылку, записи +каталогов других ссылок, указывающих на тот же файл, могут сохранять +устаревшие метаданные до тех пор, пока к ним не будет осуществлен доступ. +

    SnapRAID автоматически обнаруживает и нормализует это состояние всякий +раз, когда во время сканирования обнаруживаются как минимум две жесткие +ссылки на один и тот же файл. Однако если сканируется только одна жесткая +ссылка, тогда как другие исключены фильтрами или находятся за пределами +пути диска данных, SnapRAID не может обнаружить коллизию inode и полагается +на кэшированные метаданные единственной видимой ссылки. +

    Следовательно, изменения, внесенные через исключенную или внешнюю жесткую +ссылку, могут остаться незамеченными SnapRAID до тех пор, пока метаданные +включенной ссылки не будут обновлены операционной системой (например, +когда к файлу обращаются или открывают его по этому пути). +

    Чтобы избежать этого ограничения, не изменяйте защищенные файлы через +жесткие ссылки, исключенные из SnapRAID, либо убедитесь, что все жесткие +ссылки на файл включены в сканирование, чтобы SnapRAID мог их нормализовать. +

    +
    +

    +Восстановление после прерванного sync с несколькими четностями +

    +

    В массиве с несколькими дисками четности прерванный sync может оставить +уровни четности временно рассинхронизированными относительно друг друга. +Например, четность 1 уже может содержать обновленные данные, тогда как +четность 2 все еще содержит старые данные. +

    Во время выполнения check или fix SnapRAID проверяет различные +комбинации четностей и проверяет восстановленные данные по известным +хэшам блоков (охватывающим блок целиком, обычно 256 КиБ). +

    Если SnapRAID пытается выполнить восстановление, используя +несогласованную смесь старой и новой четности, линейные уравнения RAID +дадут некорректные данные. Чтобы такая недействительная комбинация была +ошибочно принята, уравнения должны были бы случайно восстановить хотя бы +один полный блок размером 256 КиБ настолько идеально, чтобы его хэш +совпал, тогда как другие несинхронизированные блоки в том же страйпе +будут восстановлены с ошибочными данными. +

    Этот сценарий не зависит от коллизии хэшей; напротив, сами уравнения +смешанной четности должны были бы случайно воспроизвести точное исходное +содержимое 256-КиБ блока. Хотя это математически возможно при специально +подготовленных или сильно повторяющихся данных, на реальных данных это +практически невозможно. +

    Если все диски исправны, завершение прерванного sync перед внесением +дальнейших изменений устраняет эту неоднозначность. Если диск вышел из +строя и требуется восстановление, избегайте изменения дисков данных перед +запуском check или fix. +

    +
    +

    +Зарезервированные имена файлов и каталогов +

    +

    SnapRAID резервирует некоторые имена файлов, каталогов и снимков для +своих внутренних операций. Не используйте эти имена для пользовательских +данных: +

    +
    +
    +.snapraidignore +
    +Локальный файл правил исключения. +
    +
    +
    +
    +.snapraid +
    +Каталог-контейнер снимков. +
    +
    +
    +
    +snapraid-* +
    +Имена снимков ZFS, управляемых SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Поврежденные файлы, помещенные в карантин во время +восстановления. +
    +
    +
    +
    +CONTENT.tmp +
    +Временный файл для обновлений файла content. +
    +
    +
    +
    +CONTENT.lock +
    +Файл блокировки файла content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Временный файл резервирования места при выделении +четности в Windows. +
    +
    +
    +

    Использование этих имен для несвязанных данных может привести к тому, +что файлы или снимки будут проигнорированы, ошибочно приняты за метаданные, +перезаписаны, переименованы или удалены. +

    В Windows все варианты регистра также зарезервированы, даже в каталогах +NTFS, настроенных с учетом регистра (например, .SNAPRAIDIGNORE, .SnapRaid, +CONTENT.TMP и CONTENT.Lock). +

    +
    +
    +

    +Перевод (Translation) +

    +

    Этот документ является автоматическим переводом английского руководства. +Обратитесь к английскому руководству за официальной версией. +

    +
    +

    +Авторские права (Copyright) +

    +

    Этот файл защищен авторским правом (C) 2026 Andrea Mazzoleni +

    +
    +

    +См. также (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-sv.html b/manual-sv.html index 670730b4..ae119666 100644 --- a/manual-sv.html +++ b/manual-sv.html @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]

    -Beskrivning +Beskrivning (Description)

    SnapRAID är ett säkerhetskopieringsprogram designat för disk-arrayer, som lagrar paritetsinformation för dataåterställning vid upp till sex @@ -189,22 +189,36 @@ vilket sparar ström och minskar buller.

    -Begränsningar +Begränsningar (Limitations)

    -

    SnapRAID är en hybrid mellan ett RAID- och ett säkerhetskopieringsprogram, -som syftar till att kombinera de bästa fördelarna med båda. Den har dock -vissa begränsningar som du bör överväga innan du använder den. -

    Huvudbegränsningen är att om en disk misslyckas och du inte nyligen har -synkat, kanske du inte kan återställa fullständigt. -Mer specifikt, kanske du inte kan återställa upp till storleken på -de ändrade eller raderade filerna sedan den senaste synkroniseringsoperationen. -Detta inträffar även om de ändrade eller raderade filerna inte finns på -den felaktiga disken. Det är därför SnapRAID passar bättre för -data som sällan ändras. -

    Å andra sidan förhindrar nyligen tillagda filer inte återställning av redan -befintliga filer. Du kommer bara att förlora de nyligen tillagda filerna om de -finns på den felaktiga disken. -

    Andra SnapRAID-begränsningar är: +

    SnapRAID är en hybrid mellan en RAID och ett backupprogram, med målet att kombinera +de bästa fördelarna med båda. Det har dock vissa begränsningar som du bör +överväga innan du använder det. +

    Den huvudsakliga begränsningen är att om en disk havererar kan du endast återställa data fram till +tillståndet för den senaste sync-operationen. Data som lagts till eller modifieringar som gjorts +sedan den senaste synkroniseringen och som är placerade på den felaktiga disken kommer att gå förlorade. +

    Följaktligen är SnapRAID främst lämpat för data som sällan ändras. +

    För data som redan existerade vid den senaste synkroniseringen beror återställningens tillförlitlighet +på om alternativet snapshot (ögonblicksbild) används: +

      +
    • +Med stöd för ögonblicksbilder (tillgängligt på Btrfs, ZFS, Bcachefs och NTFS) +kan SnapRAID automatiskt upprätthålla en oberoende frusen referens +för varje datafilsystem som stöds. +Detta säkerställer att även om du ändrar eller tar bort filer på ditt aktiva filsystem +under eller efter en synkronisering, förblir återställningsprocessen konsekvent och tillförlitlig. +
    • +
    +
      +
    • +Utan stöd för ögonblicksbilder kan borttagning eller ändring av filer efter en sync +förhindra fullständig återställning av andra felaktiga diskar. Detta inträffar +eftersom pariteten inte längre matchar de modifierade filerna, även om +dessa filer inte finns på den havererade disken. Å andra sidan förhindrar inte nyinkomna +filer återställning av redan existerande filer. +
    • +
    +

    Andra SnapRAID-begränsningar är:

    • Med SnapRAID har du fortfarande separata filsystem för varje disk. @@ -231,7 +245,7 @@ Behörigheter, ägarskap och utökade attribut sparas inte.

    -Kom igång +Kom igång (Getting Started)

    För att använda SnapRAID måste du först välja en disk i din disk-array som ska dediceras till parity-information. Med en disk för paritet, @@ -346,11 +360,11 @@ utdata, men de relaterade blocken markeras inte som dåliga.

    -Poolning +Poolning (Pooling)

    Obs: Poolningsfunktionen som beskrivs nedan har ersatts av verktyget mergerfs, som nu är det rekommenderade alternativet för Linux-användare i -SnapRAID-communityt. Mergefs ger ett mer flexibelt och effektivt +SnapRAID-communityt. Mergerfs ger ett mer flexibelt och effektivt sätt att poola flera enheter till en enda enhetlig monteringspunkt, vilket möjliggör sömlös åtkomst till filer över din array utan att förlita sig på symboliska länkar. Det integreras väl med SnapRAID för paritetsskydd @@ -425,17 +439,17 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1 kan användas för att återställa eller ångra radering av filer till deras tidigare tillstånd med hjälp av alternativet -f, --filter:

    -snapraid fix -f FIL
    +snapraid fix -f FILE
     

    eller för en katalog:

    -snapraid fix -f KATALOG/
    +snapraid fix -f DIR/
     

    Du kan också använda det för att återställa endast oavsiktligt raderade filer inuti en katalog med hjälp av alternativet -m, --filter-missing, som återställer endast saknade filer, och lämnar alla andra orörda.

    -snapraid fix -m -f KATALOG/
    +snapraid fix -m -f DIR/
     

    Eller för att återställa alla raderade filer på alla enheter med:

    @@ -444,7 +458,7 @@ snapraid fix -m
     

    -Återställning +Återställning (Recovering)

    Det värsta har hänt, och du har förlorat en eller flera diskar!

    FÅ INTE PANIK! Du kommer att kunna återställa dem! @@ -479,9 +493,9 @@ STEG 2 -> Fixa

    Kör kommandot fix och lagra loggen i en extern fil med:

    -snapraid -d NAMN -l fix.log fix
    +snapraid -d NAME -l fix.log fix
     
    -

    Där NAMN är namnet på disken, till exempel d1 i vårt tidigare exempel. +

    Där NAME är namnet på disken, till exempel d1 i vårt tidigare exempel. Om disken som ska återställas är en paritetsdisk, använd namnen parity, 2-parity, etc. Om du har flera felaktiga diskar, använd flera -d-alternativ för att specificera alla @@ -498,11 +512,11 @@ genom att kontrollera alla rader som börjar med unrecoverable:. gånger du vill.

    Om du till exempel har tagit bort filer från arrayen efter den senaste sync, kan detta leda till att vissa filer inte återställs. -I detta fall kan du försöka igen fix med alternativet -i, --import, +I detta fall kan du köra fix igen med alternativet -i, --import, specificera var dessa filer nu finns för att inkludera dem igen i återställningsprocessen.

    Om du är nöjd med återställningen kan du fortsätta, -men notera att efter synkronisering kan du inte försöka igen kommandot fix +men notera att efter synkronisering kan du inte köra fix-kommandot igen längre!

    @@ -512,9 +526,9 @@ STEG 3 -> Kontrollera

    Som en försiktighetsåtgärd kan du nu köra ett check-kommando för att säkerställa att allt är korrekt på den återställda disken.

    -snapraid -d NAMN -a check
    +snapraid -d NAME -a check
     
    -

    Där NAMN är namnet på disken, till exempel d1 i vårt tidigare exempel. +

    Där NAME är namnet på disken, till exempel d1 i vårt tidigare exempel.

    Alternativen -d och -a talar om för SnapRAID att endast kontrollera den specificerade disken och ignorera all paritetsdata.

    Detta kommando kommer att ta lång tid, men om du inte är alltför försiktig, @@ -534,27 +548,27 @@ snapraid sync

    -Kommandon +Kommandon (Commands)

    -

    SnapRAID tillhandahåller några enkla kommandon som låter dig: +

    SnapRAID tillhandahåller några enkla kommandon som gör att du kan:

    • -Skriva ut statusen för arrayen -> status +Skriva ut arrayens status -> status
    • Kontrollera diskarna -> smart, probe, up, down
    • -Göra en säkerhetskopia/ögonblicksbild -> sync +Skapa en backup-/återställningspunkt -> sync
    • Periodiskt kontrollera data -> scrub
    • -Återställa den senaste säkerhetskopian/ögonblicksbilden -> fix. +Återställa den senaste backup-/återställningspunkten -> fix.
    -

    Kommandon måste skrivas med gemener. +

    Kommandon måste skrivas med gemener (små bokstäver).

    status @@ -705,9 +719,9 @@ modifierades.
    moved
    -Filer flyttade till en annan katalog på samma disk. -De identifieras genom att ha samma namn, storlek, tidsstämpel -och inode, men en annan katalog. +Filer som flyttats eller bytt namn på samma disk med bibehållen +inode. De identifieras genom att ha samma inode, storlek och +tidsstämpel, men en annan sökväg. Filnamnet kan också vara annorlunda.

    @@ -726,14 +740,12 @@ matcha för att identifieras, inte bara namnet.
    relocated
    -Filer som flyttats på samma eller en annan disk där -originalet har försvunnit. -De identifieras genom att ha samma namn, storlek och -tidsstämpel. +Filer som flyttats till en annan katalog eller disk där +originalfilen har försvunnit och inoden inte bibehålls. +De identifieras genom att ha samma namn, storlek och tidsstämpel. Om tidsstämpeln för undersekunder är noll måste hela sökvägen -matcha för att identifieras. -Till skillnad från 'moved' filer på samma disk har omlokaliserade -filer en annan inode. +matcha för att identifieras. Till skillnad från 'moved'-filer kräver +omlokaliserade filer att filnamnet förblir detsamma.
    @@ -815,13 +827,12 @@ Filerna i arrayen modifieras INTE.

    fix

    -

    Fixar alla filer och paritetsdata. -

    Alla filer och paritetsdata jämförs med ögonblicksbilds- -tillståndet som sparades i den senaste sync. -Om en skillnad hittas, återställs den till det lagrade ögonblicksbildstillståndet. -

    VARNING! Kommandot fix skiljer inte mellan fel och -avsiktliga modifieringar. Det återställer ovillkorligen filtillståndet -till den senaste sync. +

    Lagar alla filer och paritetsdata. +

    Alla filer och paritetsdata jämförs med det tillstånd som sparades i +den senaste sync-operationen. Om en skillnad hittas återställs den till det sparade tillståndet. +

    VARNING! +Kommandot fix skiljer inte mellan fel och avsiktliga modifieringar. +Det återställer villkorslöst filtillståndet till den senaste sync-operationen.

    Om inget annat alternativ specificeras, behandlas hela arrayen. Använd filteralternativen för att välja en delmängd av filer eller diskar att arbeta med.

    För att fixa endast blocken markerade som dåliga under sync och scrub, @@ -832,7 +843,7 @@ oförändrade sedan den senaste sync. .unrecoverable.

    Innan fixningen skannas hela arrayen för att hitta alla filer som flyttats sedan den senaste sync-operationen. -Dessa filer identifieras av deras tidsstämpel, ignorera deras namn +Dessa filer identifieras av deras tidsstämpel, oavsett namn och katalog, och används i återställningsprocessen vid behov. Om du flyttade några av dem utanför arrayen kan du använda alternativet -i, --import för att specificera ytterligare kataloger att skanna. @@ -863,7 +874,7 @@ list

    Listar alla filer som finns i arrayen vid tidpunkten för den senaste sync. -

    Med -v eller --verbose visas även undertiden. +

    Med -v eller --verbose visas även subsekundprecisionen.

    Inget ändras.

    @@ -907,14 +918,14 @@ lågnivåenheter som används av en enda disk i arrayen.

    touch

    -

    Anger en godtycklig undertidsstämpel för alla filer +

    Anger en godtycklig tidsstämpel för undersekunder för alla filer som har den satt till noll.

    Detta förbättrar SnapRAIDs förmåga att känna igen flyttade och kopierade filer, eftersom det gör tidsstämpeln nästan unik, vilket minskar möjliga dubbletter. -

    Mer specifikt, om undertidsstämpeln inte är noll, +

    Mer specifikt, om tidsstämpeln för undersekunder inte är noll, identifieras en flyttad eller kopierad fil som sådan om den matchar -namn, storlek och tidsstämpel. Om undertidsstämpeln +namn, storlek och tidsstämpel. Om tidsstämpeln för undersekunder är noll, betraktas den som en kopia endast om hela sökvägen, storlek och tidsstämpel alla matchar.

    Tidsstämpeln med sekundprecision modifieras inte, @@ -953,7 +964,7 @@ omallokeringsprocessen.

    -Alternativ +Alternativ (Options)

    SnapRAID tillhandahåller följande alternativ:

    @@ -977,7 +988,7 @@ katalog som snapraid.exe. Filtrerar filerna att behandla i check och fix. Endast filerna som matchar det specificerade mönstret behandlas. Detta alternativ kan användas flera gånger. -Se avsnittet MÖNSTER för mer information om +Se avsnittet PATTERN för mer information om mönsterspecifikationer. I Unix, se till att globbing-tecken citeras om de används. Detta alternativ kan endast användas med check och fix. @@ -1140,7 +1151,7 @@ som K, M eller G (t.ex. --bw-limit 1G).
    --t, --tail STORLEK +-t, --tail SIZE
    Begränsa fillistan till de som inte använder mer än den angivna slutstorleken på paritetsdiskarna. @@ -1233,7 +1244,7 @@ Detta alternativ kan endast användas med sync, check eller
    Tvingar den osäkra operationen att fixa med otillgängliga diskar eller med diskar på samma fysiska enhet. -Till exempel, om du förlorade två datadisker och har en reservdisk för att återställa +Till exempel, om du förlorade två datadiskar och har en reservdisk för att återställa endast den första, kan du ignorera den andra otillgängliga disken. Eller, om du vill återställa en disk i det lediga utrymme som finns kvar på en redan använd disk, dela samma fysiska enhet. @@ -1295,10 +1306,10 @@ Du HAR INGET dataskydd under sync-operationen.
    --W, --force-realloc-tail STORLEK +-W, --force-realloc-tail SIZE
    Fungerar som -R, --force-realloc, men begränsat till den angivna -slutdelen (de sista STORLEK byten) av varje paritetsfil. +slutdelen (de sista SIZE byten) av varje paritetsfil. Den tvingar omallokering (flytt) av alla filfragment/block som för närvarande lagras i den slutsektionen, vilket gör att de kan placeras var som helst i paritetsfilen/filerna där ledigt utrymme finns @@ -1363,9 +1374,10 @@ Däremot stoppar check och fix alltid vid det första felet. -S, --start BLKSTART
    Börjar behandlingen från det specificerade -blocknumret. Detta kan vara användbart för att försöka igen att kontrollera +blocknumret. Detta kan vara användbart för att på nytt försöka kontrollera eller fixa specifika block i händelse av en skadad disk. -Detta alternativ är främst för avancerad manuell återställning. +Detta alternativ är främst för avancerad manuell återställning +och stöds endast av check och fix.
    @@ -1375,7 +1387,8 @@ Detta alternativ är främst för avancerad manuell återställning. -B, --count BLKCOUNT
    Behandlar endast det specificerade antalet block. -Detta alternativ är främst för avancerad manuell återställning. +Detta alternativ är främst för avancerad manuell återställning +och stöds endast av check och fix.
    @@ -1441,7 +1454,7 @@ Skriver ut programversionen.

    -Konfiguration +Konfiguration (Configuration)

    SnapRAID kräver en konfigurationsfil för att veta var din disk-array finns och var paritetsinformationen ska lagras. @@ -1452,7 +1465,7 @@ katalog som snapraid.exe.

    Den måste innehålla följande alternativ (skiftlägeskänsligt):

    -parity FIL [,FIL] ... +parity FILE [,FILE] ...

    Definierar de filer som ska användas för att lagra paritetsinformationen. Pariteten möjliggör skydd från ett enda disk- @@ -1471,7 +1484,7 @@ varningen om fulla diskar.

    -(2,3,4,5,6)-parity FIL [,FIL] ... +(2,3,4,5,6)-parity FILE [,FILE] ...

    Definierar de filer som ska användas för att lagra extra paritetsinformation.

    För varje paritetsnivå som specificeras aktiveras en ytterligare skyddsnivå: @@ -1499,7 +1512,7 @@ nivåer.

    -z-parity FIL [,FIL] ... +z-parity FILE [,FILE] ...

    Definierar en alternativ fil och ett format för att lagra trippel paritet.

    Detta alternativ är ett alternativ till 3-parity, främst avsett för @@ -1516,7 +1529,7 @@ och använda fix för att återskapa den.

    -content FIL +content FILE

    Definierar den fil som ska användas för att lagra listan och checksummorna för alla filer som finns i din disk-array. @@ -1531,16 +1544,20 @@ plus en. Att använda ytterligare kopior skadar inte.

    -data NAMN KATALOG +data NAME DIR

    Definierar namnet och monteringspunkten för datadiskarna i -arrayen. NAMN används för att identifiera disken och måste -vara unikt. KATALOG är monteringspunkten för disken i +arrayen. NAME används för att identifiera disken och måste +vara unikt. DIR är monteringspunkten för disken i filsystemet.

    Du kan ändra monteringspunkten vid behov, så länge -du behåller NAMN fixerat. +du behåller NAME fixerat. +

    Den konfigurerade sökvägen måste dock konsekvent matcha samma +underliggande data. Om sökvägen innehåller symboliska länkar +måste deras mål förbli stabila. Att ändra sådana symlänkar för +att byta datakatalog i farten stöds inte.

    Du bör använda ett alternativ för varje datadisk i arrayen. -

    Du kan byta namn på en disk senare genom att ändra NAMN direkt +

    Du kan byta namn på en disk senare genom att ändra NAME direkt i konfigurationsfilen och sedan köra ett sync-kommando. I händelse av namnbyte görs associationen med hjälp av den lagrade UUID:n för diskarna. @@ -1559,6 +1576,29 @@ startdisken.

    +snapshot +

    +

    Aktiverar användningen av filsystemets ögonblicksbilder för kommandona sync, scrub, +check och fix. +

    När det är aktiverat skapar SnapRAID en skrivskyddad ögonblicksbild av varje +datafilsystem som stöds vid början av en 'sync'. Detta ger en stabil vy av varje +filsystem och förhindrar att senare ändringar ändrar den data som används för +paritetsberäkningen. +

    Detta förbättrar återställningen avsevärt: om en fil tas bort från det aktiva filsystemet +förblir den bevarad i ögonblicksbilden. Detta förhindrar att pariteten blir "trasig" +för det blocket, vilket säkerställer att du fortfarande kan återställa data framgångsrikt +om en annan disk havererar. +

    Detta alternativ gäller uteslutande datadiskar formaterade med filsystemen +Btrfs, Bcachefs eller ZFS i Linux och NTFS i Windows. +Paritetsdiskar, eller datadiskar som använder andra filsystem, kommer alltid att använda +den aktiva versionen av filsystemet. +

    Att skapa och ta bort ögonblicksbilder kräver administratörsbehörighet. +Se till att SnapRAID körs med nödvändiga rättigheter (t.ex. sudo) när +detta alternativ är aktiverat. +

    Se avsnittet SNAPSHOTS för en detaljerad förklaring av ögonblicksbildens livscykel. +

    +
    +

    nohidden

    Exkluderar alla dolda filer och kataloger. @@ -1566,8 +1606,8 @@ I Unix är dolda filer de som börjar med .. I Windows är de de med det dolda attributet.

    -

    -exclude/include MÖNSTER +

    +exclude/include PATTERN

    Definierar fil- eller katalogmönstren att exkludera eller inkludera i sync-processen. @@ -1577,13 +1617,17 @@ exkluderas filen. Om det är ett include-mönster, inkluderas filen. Om inget mönster matchar, exkluderas filen om det sista mönstret som specificerats är ett include-mönster, eller inkluderas om det sista mönstret som specificerats är ett exclude-mönster. -

    Se avsnittet MÖNSTER för mer information om mönster- +

    Observera att filtrering sker hierarkiskt under kataloggenomgång. +Om en katalog matchar en exclude-regel hoppas hela katalogen över +(beskärs), och eventuella include-regler för filer eller underkataloger +inuti den kommer inte att utvärderas. +

    Se avsnittet PATTERN för mer information om mönster- specifikationer.

    Detta alternativ kan användas flera gånger.

    -

    -blocksize STORLEK_I_KIBIBYTES +

    +blocksize SIZE_IN_KIBIBYTES

    Definierar den grundläggande blockstorleken i kibibytes för pariteten. En kibibyte är 1024 byte. @@ -1623,8 +1667,8 @@ en 4 TB-disk, vilket möjliggör cirka 460 000 filer på varje datadisk utan något bortkastat utrymme.

    -

    -hashsize STORLEK_I_BYTE +

    +hashsize SIZE_IN_BYTES

    Definierar hash-storleken i byte för de sparade blocken.

    Standard hash-storlek är 16 byte (128 bitar), vilket bör fungera @@ -1658,8 +1702,8 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 GiB

    -

    -autosave STORLEK_I_GIGABYTES +

    +autosave SIZE_IN_GIGABYTES

    Sparar automatiskt tillståndet vid synkronisering eller skrubbning efter att den specificerade mängden GB har behandlats. @@ -1667,8 +1711,8 @@ Detta alternativ är användbart för att undvika att starta om långa sync

    -

    -temp_limit TEMPERATUR_CELSIUS +

    +temp_limit TEMPERATURE_CELSIUS

    Anger den maximalt tillåtna disk-temperaturen i Celsius. När den specificeras, kontrollerar SnapRAID periodiskt temperaturen på alla diskar med hjälp av @@ -1683,37 +1727,37 @@ disk och uppskattar den långsiktiga stabila temperaturen de förväntas nå om aktiviteten fortsätter. Uppskattningen utförs först efter att disk-temperaturen har ökat fyra gånger, vilket säkerställer att tillräckligt med datapoäng finns tillgängliga för att fastställa en pålitlig trend. -Denna förutsagda stabila temperatur visas inom parentes bredvid den +Denna förutsagda stabila temperatur visas inom parentes bredvid det aktuella värdet och hjälper till att bedöma om systemets kylning är tillräcklig. Denna uppskattade temperatur är endast för informationssyfte -och har ingen effekt på SnapRAIDs beteende. Programmens +och har ingen effekt på SnapRAIDs beteende. Programmets åtgärder baseras enbart på de faktiska uppmätta disk-temperaturerna. -

    För att utföra denna analys behöver SnapRAID en referens för system- -temperaturen. Det försöker först läsa den från tillgängliga hårdvaru- -sensorer. Om ingen system-sensor kan nås, används den lägsta disk- -temperaturen som mättes vid start av körningen som en reservreferens. +

    För att utföra denna analys behöver SnapRAID en referens för systemtemperaturen. +Det försöker först läsa den från tillgängliga hårdvarusensorer. +Om ingen systemsensor kan nås, används den lägsta disk- +temperaturen som mättes i början av körningen som en reservreferens.

    Normalt visar SnapRAID endast temperaturen på den hetaste disken. För att visa temperaturen på alla diskar, använd alternativet -A eller --stats.

    -

    -temp_sleep TID_I_MINUTER +

    +temp_sleep TIME_IN_MINUTES

    Anger standby-tiden, i minuter, när temperaturgränsen har nåtts. Under denna period förblir diskarna nedsnurrade. Standard är 5 minuter.

    -

    -pool KATALOG +

    +pool DIR

    Definierar poolningskatalogen där den virtuella vyn av disk- arrayen skapas med hjälp av kommandot pool.

    Katalogen måste redan existera.

    -

    -share UNC_KATALOG +

    +share UNC_DIR

    Definierar Windows UNC-sökvägen som krävs för att få åtkomst till diskarna på distans.

    Om detta alternativ specificeras, använder de symboliska länkarna som skapats i pool- @@ -1726,8 +1770,8 @@ katalog och namn.

    Detta alternativ krävs endast för Windows.

    -

    -smartctl DISK/PARITY ALTERNATIV... +

    +smartctl DISK/PARITY OPTIONS...

    Definierar anpassade smartctl-alternativ för att få SMART-attributen för varje disk. Detta kan krävas för RAID-kontroller och vissa USB- @@ -1739,6 +1783,8 @@ PARITY är ett av paritetsnamnen: parity, 2-parity, 3-parity

    I de specificerade ALTERNATIVEN ersätts strängen %s med enhetens namn. För RAID-kontroller är enheten sannolikt fixerad, och du kanske inte behöver använda %s. +

    Du kan också specificera en anpassad sträng för informationsalternativ med +hjälp av taggen [info: ...] för att ersätta standardalternativet -a.

    Se smartmontools dokumentation för möjliga alternativ:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1746,11 +1792,12 @@ sannolikt fixerad, och du kanske inte behöver använda %s.
     

    Till exempel:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignorerar det specificerade SMART-attributet vid beräkning av sannolikheten @@ -1760,18 +1807,22 @@ vilseledande värden för ett visst attribut. PARITY är ett av paritetsnamnen: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity eller z-parity. Det speciella värdet * kan användas för att ignorera attributet på alla diskar. -

    Till exempel, för att ignorera attributet Current Pending Sector Count på -alla diskar: +

    Flera attribut kan specificeras separerade med mellanslag. +Varje attribut kan specificeras som ett nummer från 1 till 255, eller som ett +skiftlägesokänsligt namn (t.ex. Current_Pending_Sector). +

    Till exempel, för att ignorera attributen Current Pending Sector Count och +Reallocated Sectors Count på alla diskar med deras nummer eller namn:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    För att ignorera det endast på den första paritetsdisken: +

    För att ignorera dem endast på den första paritetsdisken:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Exempel

    Ett exempel på en typisk konfiguration för Unix är: @@ -1784,7 +1835,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1800,7 +1851,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1809,6 +1860,159 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    +Ögonblicksbilder (Snapshots) +

    +

    Om alternativet för ögonblicksbilder är aktiverat i konfigurationen använder SnapRAID +filsystemets ögonblicksbilder för att hålla data som läses under en operation stabil, +även om filer på de aktiva filsystemen senare ändras eller tas bort. +

    Hanteringen av ögonblicksbilder är helt automatisk och transparent. +Du kan fortsätta att använda SnapRAID exakt som tidigare, med det +ytterligare skydd som ögonblicksbilder ger, helt hanterat i +bakgrunden. +

    Detta ger två huvudsakliga fördelar: +

    +
    +
    +Konsistens +
    +Filer som ändras på det aktiva filsystemet under en långvarig +sync eller scrub kommer inte att orsaka paritetsfel eller avbrutna +operationer, eftersom varje filsystem med ögonblicksbild förblir oförändrat +under hela operationen. +
    +
    +
    +
    +Återställning +
    +Om en fil uppdateras eller tas bort från det aktiva filsystemet +förblir den bevarad i ögonblicksbilden. Om ett diskhaveri inträffar +innan nästa sync körs, använder SnapRAID den data som bevarats +i ögonblicksbilden för att rekonstruera den felaktiga disken. +I händelse av ett diskhaveri under en aktiv synkroniseringsprocess +kan SnapRAID också läsa automatiskt från både ögonblicksbilden +av den föregående paritetsberäkningen och den aktuella. +Detta maximerar sannolikheten för en fullständig återställning genom att +ge tillgång till de exakta datablock som krävs för att lösa paritetsekvationerna, +även om dessa block modifierades eller togs bort mellan synkroniseringar. +Utan ögonblicksbilder leder en uppdaterad eller borttagen fil på en frisk disk +till saknade datablock som kan krävas för att laga andra felaktiga diskar. +
    +
    +
    +

    Ögonblicksbilder skapas endast för datadiskar och endast om det underliggande +filsystemet stöder denna funktionalitet. Paritetsdiskar använder alltid +det aktiva filsystemet. +

    För närvarande stöds detta på Btrfs, Bcachefs och ZFS i Linux +och på NTFS i Windows. +

    Du kan blanda datadiskar med olika filsystem. Endast de som +stöder ögonblicksbilder kommer att använda dem, medan andra diskar kommer att fortsätta +att fungera direkt på det aktiva filsystemet. +

    Att skapa och ta bort ögonblicksbilder kräver administratörsbehörighet. +Se till att SnapRAID körs med nödvändiga rättigheter (t.ex. sudo) +när ögonblicksbilder är aktiverade. +

    +

    +Kommandobeteende med ögonblicksbilder +

    +

    Kommandona sync och scrub använder ögonblicksbilder för datadiskar vars +filsystem stöder dem. På en disk med ögonblicksbild ser kommandot en stabil +filsystembild som inte påverkas av samtidiga ändringar på det aktiva filsystemet. +Under en sync skapas en ny ögonblicksbild oberoende för varje datafilsystem +som stöds. Dessa ögonblicksbilder tillhandahåller gemensamt den data som används +för paritetsberäkning. +I motsats till detta använder kommandot scrub den senaste ögonblicksbilden, den som +skapades under den senaste synkroniseringen, för att upprätthålla en tillförlitlig referenspunkt +som matchar den befintliga pariteten. +

    För kommandona check och fix beror användningen av den senaste ögonblicksbilden +på om specifika diskar är måltavla med alternativet +-d, --filter-disk. +

    En disk som uttryckligen valts via -d (operationens "mål") +använder alltid det aktiva filsystemet. För fix tillåter detta återställning +av data till den aktiva ersättningsdisken. För check tillåter det att simulera +fix-operationen under samma förhållanden. +

    Alla andra datadiskar ("referensdiskarna") kommer att nås via +sina ögonblicksbilder. Detta säkerställer att även om du ändrar filer +på dina friska diskar medan en återställning pågår, har SnapRAID +en stabil, frusen referens för att lösa paritetsekvationerna. +

    Om inget -d-alternativ anges antar SnapRAID att operationen gäller +hela arrayen, i detta fall kommer check och fix att använda de +aktiva filsystemen uteslutande. +

    Alla andra kommandon fungerar uteslutande på det aktiva filsystemet. +

    +
    +
    +

    +Livscykel för ögonblicksbilder (Snapshots Lifecycle) +

    +

    SnapRAID hanterar tre specifika ögonblicksbilder, stable, pending och scan, +inom en dold katalog i roten av varje datavolym. +I Btrfs, Bcachefs och NTFS används katalogen .snapraid/, +i ZFS standardkatalogen .zfs/snapshot/. +

    Ögonblicksbilden stable representerar tillståndet för den senaste +framgångsrikt slutförda sync-iseringen, och innehåller exakt den data som användes för +att beräkna den aktuella pariteten. Den fungerar som den primära datakällan +för kommandona scrub, check och fix. +

    Ögonblicksbilden scan är en tillfällig bild som skapas i början +av en sync för att tillhandahålla ett fruset tillstånd för skanning och paritetsberäkning. +Efter skanning och sparning av det nya innehållstillståndet ersätter den den föregående +pending-ögonblicksbilden. +

    Ögonblicksbilden pending är bilden som används av en avbruten sync. +Efter framgångsrik slutförande av operationen raderas den föregående stable +ögonblicksbilden, och pending-ögonblicksbilden upphöjs till +att ta dess plats som den nya stabila referensen. +

    Om en sync avbryts bevaras ögonblicksbilden pending. +Efterföljande scrub-, check- och fix-kommandon kommer att använda denna +vilande ögonblicksbild eftersom den matchar filsystemets tillstånd som registrerats i +.content-filen, även om pariteten endast är delvis synkroniserad. +

    I händelse av ett avbrott i en sync läser kommandona check och fix +också från ögonblicksbilden stable för att hämta datablock +från filer som uppdaterades eller togs bort under synkroniseringen. +Detta är möjligt eftersom .content-filen behåller metadata för +alla modifierade eller borttagna filer under hela synkroniseringsprocessen. +Denna historiska information rensas först när en sync slutförts +framgångsrikt och den slutliga versionen av .content-filen sparats. +

    Om en sync startas om efter ett avbrott raderas den befintliga +vilande (pending) ögonblicksbilden och en ny skapas för att +fånga det aktuella tillståndet för det aktiva filsystemet. +Om en sync avbryts bör du dock undvika att modifiera, ta bort, +ersätta eller flytta filer tills en efterföljande sync slutförs +framgångsrikt. Pariteten kan fortfarande innehålla block som beräknats från +ögonblicksbilden som användes av den avbrutna synkroniseringen. En senare +synkronisering kan ersätta den ögonblicksbilden, vilket gör mellanliggande +filversioner otillgängliga för återställning. +

    +

    +Externa säkerhetskopior med ögonblicksbilder av filsystem (External backups with filesystem snapshots) +

    +

    När ögonblicksbilder av filsystem är aktiverade ansluter eller skapar +SnapRAID ögonblicksbilder vid roten av varje dataundervolym, volym eller +datauppsättning (dataset). +

    Ett enkelt sätt att undvika konflikter med externa verktyg är att peka +din data-konfiguration till en vanlig underkatalog i undervolymen eller +volymen (till exempel /mnt/subvol/data istället för /mnt/subvol). +SnapRAID skapar alltid katalogen för ögonblicksbilder i undervolymens rot +(till exempel /mnt/subvol/.snapraid/), vilket håller underkatalogen för +data ren så att ögonblicksbilderna förblir utanför och osynliga för +säkerhetskopieringsverktyg som arbetar i den. +

    Annars, om din konfigurerade data-katalog i sig är roten på undervolymen +eller volymen, skapar SnapRAID en .snapraid/-katalog direkt i den (på +Btrfs, Bcachefs och NTFS). Även om SnapRAID automatiskt utesluter denna +katalog från sin egen skanning, kommer externa säkerhetskopieringsverktyg +eller synkroniseringsprogram att stöta på den. Om den inte utesluts kan de +gå in i ögonblicksbilderna eller kataloglänkarna och kopiera hela det frysta +dataträdet, vilket duplicerar data och kan tömma lagringsutrymmet för +säkerhetskopior. Konfigurera alltid externa säkerhetskopieringsverktyg till +att utesluta katalogen .snapraid/. +

    På ZFS exponeras ögonblicksbilder via den virtuella standardkatalogen +.zfs/snapshot/ istället för .snapraid/. Som standard (snapdir=hidden) +döljer ZFS denna katalog från kataloglistor så att externa säkerhetskopieringsverktyg +inte söker igenom den. Om du har aktiverat snapdir=visible, se till att dina +säkerhetskopieringsverktyg utesluter katalogen .zfs/. +

    +
    +
    +

    Mönster (Pattern)

    Mönster ger ett flexibelt sätt att filtrera filer för inkludering eller @@ -1823,25 +2027,24 @@ frågetecknet korsar den aldrig kataloggränser. Den stannar vid snedstrecket, vilket gör den lämplig för matchning inom en enskild sökvägskomponent. Detta är det standardbeteende för jokertecken som är bekant från skal-globbing. -

    Den dubbla stjärnan ** är mer kraftfull; den matchar valfri teckensekvens -inklusive katalogavgränsare. Detta gör att mönster kan matcha över -flera katalognivåer. När ** förekommer direkt i ett mönster kan det -matcha noll eller fler tecken inklusive snedstreck mellan den -omkringliggande bokstavliga texten. -

    Den viktigaste användningen av ** är i den speciella formen /**/. Detta matchar -noll eller flera kompletta katalognivåer, vilket gör det möjligt att matcha filer -på valfritt djup i ett katalogträd utan att känna till den exakta sökvägsstrukturen. -Till exempel matchar mönstret src/**/main.js filerna src/main.js (hoppar över -noll kataloger), src/ui/main.js (hoppar över en katalog) och -src/ui/components/main.js (hoppar över två kataloger). +

    Jokertecknet med dubbelstjärna ** matchar över katalogavgränsare endast när +det gränsar till en katalogavgränsare (föregås eller efterföljs av ett +snedstreck). I denna form matchar det noll eller fler tecken över flera +katalognivåer. Till exempel matchar foo/**/bar sökvägarna foo/bar, +foo/a/bar och foo/a/b/bar; **/build matchar build och foo/bar/build; +och src/**.js matchar src/main.js och src/ui/components/main.js. +Den fristående formen /**/ accepteras inte som ett fullständigt mönster. +

    När ** inte gränsar till ett snedstreck beter det sig som * och matchar +inte katalogavgränsare. Till exempel matchar **.jpg filen photo.jpg i den +aktuella katalogen, men inte dir/photo.jpg. Använd **/*.jpg för detta ändamål.

    Teckenklasser som använder hakparenteser [] matchar ett enskilt tecken från en angiven uppsättning eller ett intervall. Precis som de andra mönstren för enskilda tecken matchar de inte katalogavgränsare. Klasser stöder intervall och negering med ett utropstecken.

    Den grundläggande skillnaden att komma ihåg är att *, ? och teckenklasser alla respekterar kataloggränser och endast matchar inom en enskild -sökvägskomponent, medan ** är det enda mönstret som kan matcha över -katalogavgränsare. +sökvägskomponent, medan ** endast kan matcha över katalogavgränsare när det +gränsar till ett snedstreck.

    Det finns fyra olika typer av mönster:

    @@ -1929,6 +2132,25 @@ include /movies/ include /musics/ include /pictures/ +

    Observera att exkludering av en katalog (med DIR/ eller /SÖKVÄG/DIR/) +förhindrar SnapRAID från att gå in i och skanna den katalogen. +Följaktligen är det inte möjligt att åter inkludera en fil eller +underkatalog som finns i en exkluderad överordnad katalog, eftersom +skannern aldrig går in i den. +

    Till exempel kommer följande konfiguration INTE att inkludera file.dat +eftersom /keep/ beskärs innan file.dat kan utvärderas: +

    +# Fungerar INTE: /keep/ hoppas över helt
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    För att exkludera filer i en katalog men behålla specifika filer, +matcha filmönstret inuti katalogen istället för att exkludera själva katalogen: +

    +# Fungerar: /keep/ genomsöks, men övriga filer inuti exkluderas
    +include /keep/file.dat
    +exclude /keep/*
    +

    På kommandoraden, med hjälp av alternativet -f, kan du bara använda include- mönster. Till exempel:

    @@ -1940,7 +2162,7 @@ snapraid -f "*.mp3" check
     citattecken dem för att förhindra att skalet expanderar dem.
     

    -

    +

    Ignorera filer (Ignore File)

    Utöver de globala reglerna i konfigurationsfilen kan du placera @@ -2006,17 +2228,19 @@ build/

    -

    +

    Innehåll (Content)

    SnapRAID lagrar listan och checksummorna för dina filer i content-filen.

    Det är en binär fil som listar alla filer som finns i din disk-array, tillsammans med alla checksummor för att verifiera deras integritet. -

    Denna fil läses och skrivs av kommandona sync och scrub och -läses av kommandona fix, check och status. +

    Content-filen läses och skrivs av kommandona sync, scrub, touch +och rehash. Den läses av kommandona status, diff, check, fix, +list, dup, locate och pool, och den ignoreras helt av +kommandona smart, probe, up, down och devices.

    -

    +

    Paritet (Parity)

    SnapRAID lagrar paritetsinformationen för din array i parity- @@ -2027,8 +2251,8 @@ block definierade i content-filen. läses endast av kommandona scrub och check.

    -

    -Kodning +

    +Kodning (Encoding)

    SnapRAID i Unix ignorerar all kodning. Det läser och lagrar filnamnen med samma kodning som används av filsystemet. @@ -2042,16 +2266,268 @@ omdirigerar konsolutdata till en fil, är den resulterande filen alltid i UTF-8-format.

    -

    -Upphovsrätt (Copyright) +

    +Slutkod (Exit Code)

    -

    Denna fil är Copyright (C) 2025 Andrea Mazzoleni +

    SnapRAID avslutas med följande statuskoder: +

    +
    +
    +0 +
    +Allt OK. +
    +
    +
    +
    +1 +
    +Kommandot stötte på fel. +
    +
    +
    +
    +2 +
    +Kommandot diff fann att allt är OK, men en sync behövs. +
    +
    +
    +
    +3 +
    +Ett diskenhetskommando (probe, smart, devices, up, down) +slutfördes, men minst ett filsystem körs i degraderat läge med +saknade enheter. +
    +
    +
    +
    +
    +

    +Kända problem (Known Issues) +

    +
    +

    +Filsystemgränser +

    +

    SnapRAID korsar inte filsystems-, monterings- eller undervolymsgränser vid +skanning av en datadisk. När en sådan gräns upptäcks rapporterar SnapRAID +en VARNING och skannar inte bortom den. +

    Filer som finns bortom sådana gränser inkluderas inte i datadisken och +måste konfigureras separat om de ska skyddas. +

    +
    +

    +Monteringspunkter med filsystemögonblicksbilder +

    +

    När filsystemögonblicksbilder är aktiverade stöds inte kapslade +monteringspunkter och bind-monteringar inuti en datadisk. +

    Monteringspunkter är en del av det aktiva systemets monteringsnamnrymd och +bevaras inte i filsystemögonblicksbilder. Följaktligen kan en katalog som +dolts av en monteringspunkt i det aktiva filsystemet bli synlig vid +skanning av en ögonblicksbild. +

    Placera inte kapslade monteringspunkter eller bind-monteringar inuti +datadiskar när filsystemögonblicksbilder är aktiverade. +

    +
    +

    +Flera konfigurationer med filsystemögonblicksbilder +

    +

    Stöd för ögonblicksbilder kan inte delas säkert mellan flera oberoende +SnapRAID-konfigurationer som använder samma namnrymd för +filsystemögonblicksbilder. +

    På Btrfs och Bcachefs får endast en SnapRAID-konfiguration med stöd för +ögonblicksbilder aktiverat använda datakataloger inom samma undervolym. +På ZFS gäller samma begränsning för ett dataset, och på NTFS för en volym. +

    Flera konfigurationer som delar samma namnrymd för ögonblicksbilder använder +samma stable-, pending- och scan-ögonblicksbilder. Att köra en +konfiguration kan därför ersätta eller ta bort återställningsögonblicksbilder +som krävs av en annan. +

    +
    +

    +Filändringar på plats utan tidsstämpeländringar +

    +

    SnapRAID upptäcker filändringar genom att jämföra filstorlekar och +ändringstidsstämplar (mtime). +

    Om ett program ändrar en fil på plats utan att ändra dess storlek eller +uppdatera dess ändringstidsstämpel, kommer "diff" och "sync" inte att +upptäcka att filen har ändrats, och dess paritet kommer inte att uppdateras. +

    För att säkerställa att SnapRAID känner igen sådana ändringar, uppdatera +filens ändringstidsstämpel (till exempel med verktyget "touch"). Annars +kommer skillnaden endast att upptäckas som en hash-avvikelse under en +efterföljande "scrub" eller "check". +

    +
    +

    +Icke-ASCII skiftlägesmatchning i Windows +

    +

    SnapRAID använder standardiserad, förutsägbar UTF-8-kodning på alla plattformar +och begränsar skiftlägesokänslig matchning till ASCII-tecken. +

    Windows filsystem lider av den föråldrade designen att tvinga fram +skiftlägesokänslighet över Unicode-filnamn via godtyckliga, systemberoende +konverteringstabeller. Följaktligen döljer Windows filsystemets verklighet genom +att behandla helt olika Unicode-bytesekvenser som om de vore samma fil. +

    Till exempel är À.txt och à.txt distinkta Unicode-namn, men Windows behandlar +dem ologiskt som identiska, medan SnapRAID bevarar deras verkliga åtskillnad. +

    Denna begränsning orsakas av Windows inkonsekventa hantering av Unicode-filnamn +och dess insisterande på skiftlägesokänslig aliasning. För att förhindra +avvikelser till följd av Windows skiftlägesvikning, ange alltid det exakta +skiftläget för eventuella icke-ASCII-tecken i konfigurationssökvägar och filter. +

    +
    +

    +Återställning med partiell fix +

    +

    När fix begränsas med -S, --start eller -B, --count, +arbetar SnapRAID endast på de markerade blocken och utför varken +slutförande på filnivå eller karantän. +

    Om återställningen producerar "best-effort"-data som inte kan bevisas +representera det aktuella innehållet, kan sådana block ändå skrivas under det +normala filnamnet. Osäkerheten förknippad med dessa återställda block bevaras +inte efter att kommandot har avslutats. +

    Som en konsekvens kommer en senare fix att behandla dessa läsbara block som +giltiga fildata och inte försöka återställa dem igen. Detta kan leda till att +en efterföljande återställning rapporterar framgång samtidigt som ofullständiga +eller inaktuella data lämnas kvar i filen. +

    Alternativen -S och -B är endast avsedda för avancerad manuell återställning, +vanligtvis efter att en normal fix har misslyckats. Om en partiell fix +rapporterar oåterkalleliga data, ta bort eller byt namn på de berörda filerna +innan du försöker med en ny återställning, eller verifiera deras innehåll manuellt. +

    +
    +

    +NTFS hårda länkar och exkluderade sökvägar +

    +

    På NTFS cachelagrar katalogposter filstorlek och tidsstämplar oberoende +för varje hård länk. När en fil modifieras via en länk kan katalogposterna +för andra länkar som pekar på samma fil behålla inaktuella metadata tills +de används. +

    SnapRAID upptäcker och normaliserar automatiskt detta tillstånd när minst +två hårda länkar till samma fil påträffas under en skanning. Men om endast +en hård länk skannas medan de andra exkluderas av filter eller ligger +utanför hårddiskens sökväg för data, kan SnapRAID inte upptäcka +inodkollisionen och förlitar sig på cachade metadata för den enda synliga +länken. +

    Följaktligen kan ändringar som görs via en exkluderad eller extern hård länk +gå obemärkta förbi för SnapRAID tills metadatan för den inkluderade länken +uppdateras av operativsystemet (till exempel när filen nås eller öppnas via +den sökvägen). +

    För att undvika denna begränsning, undvik att modifiera skyddade filer via +hårda länkar som är exkluderade från SnapRAID, eller se till att alla hårda +länkar till en fil inkluderas i skanningen så att SnapRAID kan normalisera dem. +

    +
    +

    +Återställning efter ett avbrutet multi-paritets-sync +

    +

    I en array med flera paritetsdiskar kan ett avbrutet sync lämna +paritetsnivåerna tillfälligt osynkroniserade med varandra. Till exempel +kan paritet 1 redan innehålla nyligen uppdaterade data, medan paritet 2 +fortfarande innehåller gamla data. +

    Under check eller fix provar SnapRAID olika paritetskombinationer och +validerar rekonstruerade data mot kända blockhashar (som täcker hela +blocket, vanligtvis 256 KiB). +

    Om SnapRAID försöker en rekonstruktion med en inkonsekvent blandning av +gammal och ny paritet ger de linjära RAID-ekvationerna felaktiga data. +För att en sådan ogiltig kombination felaktigt ska accepteras måste +ekvationerna av en slump rekonstruera minst ett helt 256 KiB-block så +perfekt att dess hash matchar, medan andra osynkroniserade block i samma +stripe rekonstrueras med felaktiga data. +

    Detta scenario beror inte på en hashkollision; snarare måste ekvationerna +med blandad paritet i sig råka producera det exakta ursprungliga +innehållet i 256 KiB-blocket. Även om detta är matematiskt tänkbart med +specialkonstruerade eller mycket repetitiva data, är det praktiskt taget +omöjligt med verkliga data. +

    Om alla diskar är felfria elimineras denna tvetydighet genom att slutföra +det avbrutna sync innan fler ändringar görs. Om en disk har gått sönder +och återställning krävs bör du undvika att ändra datadiskarna innan du kör +check eller fix. +

    +
    +

    +Reserverade fil- och katalognamn +

    +

    SnapRAID reserverar vissa fil-, katalog- och ögonblicksbildnamn för sina +interna operationer. Använd inte dessa namn för användardata: +

    +
    +
    +.snapraidignore +
    +Lokal fil med exkluderingsregler. +
    +
    +
    +
    +.snapraid +
    +Katalog för container av ögonblicksbilder. +
    +
    +
    +
    +snapraid-* +
    +ZFS-ögonblicksbildnamn som hanteras av SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Skadade filer satta i karantän under återställning. +
    +
    +
    +
    +CONTENT.tmp +
    +Temporär fil för content-uppdateringar. +
    +
    +
    +
    +CONTENT.lock +
    +Content-låsfil. +
    +
    +
    +
    +PARITY.spaceholder +
    +Temporär platshållarfil under paritetstilldelning +i Windows. +
    +
    +
    +

    Om du använder dessa namn för orelaterade data kan filer eller ögonblicksbilder +ignoreras, feltolkas som metadata, skrivas över, döpas om eller raderas. +

    I Windows är även alla skiftlägesvarianter reserverade, även i NTFS-kataloger +som konfigurerats för att skilja på stora och små bokstäver (till exempel +.SNAPRAIDIGNORE, .SnapRaid, CONTENT.TMP och CONTENT.Lock). +

    +
    +
    +

    +Översättning (Translation) +

    +

    Detta dokument är en automatisk översättning av den engelska manualen. +Se den engelska manualen för den officiella versionen.

    -

    -Se Även (See Also) +

    +Upphovsrätt (Copyright)

    -

    snapraid_log(1), snapraidd(1) +

    Denna fil är Copyright (C) 2026 Andrea Mazzoleni +

    +
    +

    +Se även (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-uk.html b/manual-uk.html index be930e61..2121f964 100644 --- a/manual-uk.html +++ b/manual-uk.html @@ -114,7 +114,7 @@

    -Короткий опис +Короткий опис (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,13 +142,13 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Опис +Опис (Description)

    SnapRAID — це програма резервного копіювання, розроблена для дискових масивів, яка зберігає інформацію парності для відновлення даних у випадку відмови до шести дисків. -

    В першу чергу призначена для домашніх медіацентрів з великими -файлами, що рідко змінюються, SnapRAID пропонує кілька функцій: +

    Насамперед призначений для домашніх медіацентрів з великими +файлами, які рідко змінюються, SnapRAID пропонує кілька функцій:

    • Ви можете використовувати диски, вже заповнені файлами, без @@ -192,24 +192,36 @@ SnapRAID:

    -Обмеження +Обмеження (Limitations)

    -

    SnapRAID є гібридом між RAID та програмою резервного копіювання, -прагнучи поєднати найкращі переваги обох. Однак, він має деякі -обмеження, які слід врахувати перед його використанням. -

    Основне обмеження полягає в тому, що якщо диск виходить з ладу, -а ви нещодавно не виконували синхронізацію, ви можете не -змогти повністю відновити дані. -Конкретніше, ви можете втратити можливість відновлення даних -обсягом до розміру змінених або видалених файлів з моменту -останньої операції синхронізації. -Це відбувається, навіть якщо змінені або видалені файли не -знаходяться на диску, що вийшов з ладу. Ось чому SnapRAID -краще підходить для даних, які рідко змінюються. -

    З іншого боку, щойно додані файли не перешкоджають відновленню -вже існуючих файлів. Ви втратите лише нещодавно додані файли, -якщо вони знаходяться на диску, що вийшов з ладу. -

    Інші обмеження SnapRAID: +

    SnapRAID є гібридом між RAID і програмою резервного копіювання, що має на меті поєднати +найкращі переваги обох рішень. Однак у нього є деякі обмеження, які вам слід +врахувати перед використанням. +

    Головне обмеження полягає в тому, що у разі збою диска ви можете відновити дані лише до +стану останньої операції синхронізації (sync). Будь-які дані, додані або змінені +з моменту останньої синхронізації, які розташовані на пошкодженому диску, будуть втрачені. +

    Відповідно, SnapRAID насамперед підходить для даних, які рідко змінюються. +

    Для даних, які вже існували на момент останньої синхронізації, надійність відновлення залежить +від того, чи використовується опція знімка (snapshot): +

      +
    • +За наявності підтримки знімків (доступно на Btrfs, ZFS, Bcachefs та NTFS), +SnapRAID може автоматично підтримувати незалежну заморожену копію +кожної підтримуваної файлової системи даних. +Це гарантує, що навіть якщо ви зміните або видалите файли у вашій живій файловій системі +під час або після синхронізації, процес відновлення залишиться узгодженим і надійним. +
    • +
    +
      +
    • +Без підтримки знімків видалення або зміна файлів після sync +може запобігти повному відновленню інших дисків, що зазнали збою. Це відбувається +тому, що парність більше не відповідає зміненим файлам, навіть якщо +ці файли знаходяться не на пошкодженому диску. З іншого боку, щойно додані +файли не перешкоджають відновленню вже існуючих файлів. +
    • +
    +

    Інші обмеження SnapRAID:

    • З SnapRAID у вас все ще є окремі файлові системи для @@ -233,14 +245,14 @@ SnapRAID може відновлювати дані лише з обмежено
    • Зберігаються лише імена файлів, часові мітки, символічні -та жорсткі посилання. Права доступу, власність та +та жорсткі посилання. Права доступу, власники та розширені атрибути не зберігаються.

    -Початок роботи +Початок роботи (Getting Started)

    Щоб використовувати SnapRAID, спершу потрібно вибрати один диск у вашому дисковому масиві, щоб присвятити його інформації @@ -368,7 +380,7 @@ snapraid -p bad scrub

    Примітка: Функція об'єднання, описана нижче, була замінена інструментом mergerfs, який тепер є рекомендованою опцією для -користувачів Linux у спільноті SnapRAID. Mergefs забезпечує +користувачів Linux у спільноті SnapRAID. Mergerfs забезпечує більш гнучкий та ефективний спосіб об'єднання кількох дисків в єдину уніфіковану точку монтування, дозволяючи безперешкодний доступ до файлів у вашому масиві без використання символічних @@ -575,7 +587,7 @@ snapraid sync

    -Команди +Команди (Commands)

    SnapRAID надає кілька простих команд, які дозволяють:

      @@ -586,16 +598,16 @@ snapraid sync Керувати дисками -> smart, probe, up, down
    • -Створити резервну копію/знімок -> sync +Створити точку резервного копіювання/відновлення -> sync
    • Періодично перевіряти дані -> scrub
    • -Відновити останню резервну копію/знімок -> fix. +Відновити останню точку резервного копіювання/відновлення -> fix.
    -

    Команди повинні бути написані малими літерами. +

    Команди обов'язково повинні бути написані малими літерами.

    status @@ -620,7 +632,7 @@ smart

    Виводить звіт SMART усіх дисків у системі.

    Включає оцінку ймовірності відмови протягом наступного року, -дозволяючи вам планувати планову заміну дисків, які +дозволяючи вам планувати своєчасну заміну дисків, які виявляють підозрілі атрибути.

    Ця оцінка ймовірності отримана шляхом кореляції атрибутів SMART дисків з даними Backblaze, доступними за адресою: @@ -629,7 +641,7 @@ SMART дисків з даними Backblaze, доступними за адре

    Якщо SMART повідомляє, що диск виходить з ладу, для цього диска виводиться FAIL або PREFAIL, і SnapRAID повертає -помилку. У цьому випадку настійно рекомендується негайна +помилку. У цьому випадку наполегливо рекомендується негайна заміна диска.

    Інші можливі рядки стану:

    @@ -750,17 +762,17 @@ updated (оновлені)
    moved (переміщені)
    -Файли, переміщені в інший каталог -на тому ж диску. Вони ідентифікуються за тим же -іменем, розміром, часовою міткою та inode, але іншим -каталогом. +Файли, переміщені або перейменовані на тому ж +диску зі збереженням того ж inode. Вони ідентифікуються за +тим самим inode, розміром і міткою часу, але іншим шляхом. +Назва файлу також може відрізнятися.
    -copied +copied (скопійовані)
    -файли, скопійовані на той самий або інший диск, де +Файли, скопійовані на той самий або інший диск, де оригінальний файл все ще існує. Вони ідентифікуються за однаковою назвою, розміром та міткою часу. @@ -770,23 +782,22 @@ copied
    -relocated +relocated (перерозміщені)
    -файли, переміщені на той самий або інший диск, де -оригінал зник. -Вони ідентифікуються за однаковою назвою, розміром та міткою -часу. +Файли, переміщені в інший каталог або на +інший диск, де оригінальний файл зник, а inode не зберігся. +Вони ідентифікуються за однаковою назвою, розміром та міткою часу. Якщо мітка часу з точністю до часток секунди дорівнює нулю, для -ідентифікації має збігатися повний шлях. -На відміну від файлів 'moved' на тому ж диску, переміщені файли -мають інший inode. +ідентифікації має збігатися повний шлях. На відміну від файлів +'moved', перерозміщені файли вимагають, щоб назва файлу залишалася +незмінною.
    -restored +restored (відновлені)
    -файли з іншим inode, але зі збігом каталогу, назви, +Файли з іншим inode, але зі збігом каталогу, назви, розміру та мітки часу. Зазвичай це файли, відновлені після видалення.
    @@ -884,13 +895,12 @@ full

    fix

    -

    Виправляє всі файли та дані парності. -

    Усі файли та дані парності порівнюються зі станом знімка, -збереженим під час останньої sync. -Якщо знайдено різницю, вона повертається до збереженого знімка. -

    УВАГА! Команда fix не розрізняє помилки та навмисні -модифікації. Вона безумовно повертає стан файлу до останньої -sync. +

    Відновлює всі файли та дані парності. +

    Усі файли та дані парності порівнюються зі станом, збереженим під час +останньої синхронізації sync. Якщо виявлено відмінність, стан повертається до збереженого. +

    УВАГА! +Команда fix не робить різниці між помилками та навмисними змінами. +Вона безумовно повертає стан файлів до моменту останньої синхронізації sync.

    Якщо не вказано жодної іншої опції, обробляється весь масив. Використовуйте опції фільтра, щоб вибрати підмножину файлів або дисків для роботи. @@ -920,7 +930,7 @@ check

    Перевіряє всі файли та дані парності.

    Працює як fix, але лише імітує відновлення, і жодні зміни не записуються в масив. -

    Ця команда в першу чергу призначена для ручної перевірки, +

    Ця команда насамперед призначена для ручної перевірки, наприклад, після процесу відновлення або в інших особливих умовах. Для періодичних та запланованих перевірок використовуйте scrub. @@ -937,7 +947,7 @@ list

    Виводить список усіх файлів, що містяться в масиві на момент останньої sync.

    З -v або --verbose також показується час з точністю до -долі секунди. +часток секунди.

    Нічого не змінюється.

    @@ -985,15 +995,15 @@ devices

    touch

    -

    Встановлює довільну часову мітку з точністю до долі секунди +

    Встановлює довільну часову мітку з точністю до часток секунди для всіх файлів, у яких вона встановлена на нуль.

    Це покращує здатність SnapRAID розпізнавати переміщені та скопійовані файли, оскільки робить часову мітку майже унікальною, зменшуючи можливі дублікати. -

    Зокрема, якщо часова мітка з точністю до долі секунди не +

    Зокрема, якщо часова мітка з точністю до часток секунди не дорівнює нулю, переміщений або скопійований файл ідентифікується як такий, якщо він збігається з іменем, розміром та часовою -міткою. Якщо часова мітка з точністю до долі секунди дорівнює +міткою. Якщо часова мітка з точністю до часток секунди дорівнює нулю, він вважається копією, лише якщо повний шлях, розмір та часова мітка збігаються.

    Часова мітка з точністю до секунди не змінюється, тому @@ -1034,7 +1044,7 @@ locate

    -Опції +Опції (Options)

    SnapRAID надає наступні опції:

    @@ -1060,7 +1070,7 @@ locate шаблону. Цю опцію можна використовувати кілька разів. Дивіться розділ PATTERN для отримання додаткової інформації про специфікації шаблонів. -В Unix переконайтеся, що символи глоббінгу взяті +В Unix переконайтеся, що символи глобінгу взяті в лапки, якщо вони використовуються. Цю опцію можна використовувати лише з check та fix. Її не можна використовувати з sync та scrub, оскільки @@ -1236,7 +1246,7 @@ DAYS — це мінімальний вік у днях для блоку, як
    --t, --tail РОЗМІР +-t, --tail SIZE
    Обмежує список файлів тими, що використовують не більше зазначеного розміру хвоста дисків парності. @@ -1398,7 +1408,7 @@ ext3/ext4. вмісту, для перевірки даних. Цю опцію можна використовувати лише з sync. УВАГА! Ця опція лише для експертів, і -настійно не рекомендується її використовувати. +наполегливо не рекомендується її використовувати. Ви НЕ маєте захисту даних під час операції sync.
    @@ -1406,10 +1416,10 @@ ext3/ext4.
    --W, --force-realloc-tail РОЗМІР +-W, --force-realloc-tail SIZE
    Працює як -R, --force-realloc, але обмежується вказаною кінцевою -частиною (останні РОЗМІР байт) кожного файлу парності. +частиною (останні SIZE-байт) кожного файлу парності. Примусово перерозподіляє (переміщує) будь-які фрагменти/блоки файлів, що наразі зберігаються в цій кінцевій секції, дозволяючи розмістити їх будь-де у файлі(ах) парності, де є вільне місце (включно з @@ -1423,7 +1433,7 @@ ext3/ext4. Ви можете використовувати locate -t, --tail, щоб заздалегідь дізнатися про зачеплені файли. УВАГА! -Цей параметр призначений лише для експертів, і його настійно +Цей параметр призначений лише для експертів, і його наполегливо не рекомендується використовувати. Під час операції sync захист даних для зачеплених файлів ВІДСУТНІЙ.
    @@ -1482,7 +1492,7 @@ ext3/ext4. перевірки або виправлення певних блоків у випадку пошкодженого диска. Ця опція в основному для розширеного ручного -відновлення. +відновлення і підтримується лише check та fix.
    @@ -1493,7 +1503,7 @@ ext3/ext4.
    Обробляє лише вказану кількість блоків. Ця опція в основному для розширеного ручного -відновлення. +відновлення і підтримується лише check та fix.
    @@ -1559,7 +1569,7 @@ ext3/ext4.

    -Конфігурація +Конфігурація (Configuration)

    SnapRAID вимагає конфігураційний файл, щоб знати, де розташований ваш дисковий масив і де зберігати інформацію @@ -1627,8 +1637,8 @@ z-parity FILE [,FILE] ...

    Визначає альтернативний файл та формат для зберігання потрійної парності. -

    Ця опція є альтернативою 3-parity, в першу чергу -призначена для ЦП низького класу, таких як ARM або +

    Ця опція є альтернативою 3-parity, насамперед +призначена для малопотужних ЦП, таких як ARM або AMD Phenom, Athlon та Opteron, які не підтримують набір інструкцій SSSE3. У таких випадках вона забезпечує кращу продуктивність. @@ -1669,6 +1679,10 @@ data NAME DIR диска у файловій системі.

    Ви можете змінювати точку монтування за потреби, поки ви зберігаєте NAME фіксованим. +

    Однак налаштований шлях повинен постійно вказувати на ті самі +базові дані. Якщо шлях містить символічні посилання, +їхні цілі повинні залишатися стабільними. Перенаправлення +таких посилань для зміни каталогу даних на льоту не підтримується.

    Ви повинні використовувати одну опцію для кожного диска даних у масиві.

    Ви можете перейменувати диск пізніше, змінивши NAME @@ -1691,6 +1705,29 @@ extra NAME DIR

    +snapshot +

    +

    Включає використання знімків файлової системи для команд sync, scrub, +check та fix. +

    Якщо увімкнено, SnapRAID створює знімок лише для читання кожної підтримуваної +файлової системи даних на початку операції 'sync'. Це забезпечує стабільний зріз +кожної файлової системи, запобігаючи зміні даних, що використовуються для обчислення +парності, подальшими модифікаціями. +

    Це значно покращує відновлення: якщо файл видаляється з живої файлової системи, +він залишається збереженим у знімку. Це запобігає «порушенню» парності +для цього блоку, гарантуючи, що ви все одно зможете успішно відновити дані, +якщо інший диск зазнає збою. +

    Ця опція застосовується виключно до дисків із даними, відформатованих у файлових +системах Btrfs, Bcachefs або ZFS у Linux та NTFS у Windows. +Диски парності або диски з даними, що використовують інші файлові системи, завжди використовуватимуть +живу версію файлової системи. +

    Створення та видалення знімків вимагають прав адміністратора. +Переконайтеся, що SnapRAID запущено з необхідними привілеями (наприклад, sudo), коли +увімкнено цю опцію. +

    Детальне пояснення життєвого циклу знімків див. у розділі SNAPSHOTS. +

    +
    +

    nohidden

    Виключає всі приховані файли та каталоги. @@ -1698,7 +1735,7 @@ nohidden У Windows це ті, що мають прихований атрибут.

    -

    +

    exclude/include PATTERN

    Визначає шаблони файлів або каталогів для виключення @@ -1710,19 +1747,23 @@ exclude/include PATTERN Якщо жоден шаблон не збігається, файл виключається, якщо останній вказаний шаблон є include, або включається, якщо останній вказаний шаблон є exclude. +

    Зверніть увагу, що фільтрація відбувається ієрархічно під час +обходу каталогів. Якщо каталог відповідає правилу exclude, весь +каталог пропускається (відсікається), і будь-які правила include +для файлів або підкаталогів у ньому не оцінюватимуться.

    Дивіться розділ PATTERN для отримання додаткової інформації про специфікації шаблонів.

    Цю опцію можна використовувати кілька разів.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Визначає основний розмір блоку в кібібайтах для парності. Один кібібайт дорівнює 1024 байтам.

    Розмір блоку за замовчуванням становить 256, що має працювати для більшості випадків. -

    УВАГА! Ця опція лише для експертів, і настійно +

    УВАГА! Ця опція лише для експертів, і наполегливо не рекомендується змінювати це значення. Щоб змінити це значення в майбутньому, вам потрібно буде перестворити всю парність! @@ -1734,14 +1775,14 @@ blocksize SIZE_IN_KIBIBYTES це може призвести до значного невикористаного місця парності. Коли ви повністю заповнюєте диск парності, вам не дозволяється додавати більше файлів на диски -даних. Однак, витрачена парність не накопичується -між дисками даних. Витрачене місце внаслідок великої +даних. Однак, втрачена парність не накопичується +між дисками даних. Марно втрачений простір внаслідок великої кількості файлів на диску даних обмежує лише кількість даних на цьому диску даних, а не на інших.

    Як наближення, ви можете припустити, що половина -розміру блоку витрачається для кожного файлу. +розміру блоку втрачається марно для кожного файлу. Наприклад, зі 100 000 файлами та розміром блоку 256 КіБ -ви витратите 12,8 ГБ парності, що може призвести до +ви втратите 12,8 ГБ парності, що може призвести до того, що на диску даних буде на 12,8 ГБ менше місця.

    Ви можете перевірити кількість витраченого місця на кожному диску за допомогою status. Це кількість @@ -1768,45 +1809,45 @@ mkfs.ext4 -m 0 -T largefile4 DEVICE без будь-якого витраченого місця.

    -

    +

    hashsize SIZE_IN_BYTES

    Визначає розмір хешу в байтах для збережених блоків.

    Розмір хешу за замовчуванням становить 16 байтів (128 біт), що має працювати для більшості випадків. -

    УВАГА! Ця опція лише для експертів, і настійно +

    УВАГА! Ця опція лише для експертів, і наполегливо не рекомендується змінювати це значення. Щоб змінити це значення в майбутньому, вам потрібно буде перестворити всю парність! -

    Причина використовувати інший розмір хешу полягає -в тому, якщо ваша система має обмежену пам'ять. -Як правило, SnapRAID зазвичай вимагає 1 ГіБ ОЗП -на кожні 16 ТБ даних у масиві. +

    Інший розмір хешу варто використовувати, якщо ваша +система має обмежену пам'ять. +Зазвичай SnapRAID потребує 1 ГіБ ОЗП на кожні 16 ТБ +даних у масиві.

    Зокрема, для зберігання хешів даних SnapRAID -вимагає приблизно $TS \times (1+HS) / BS$ байтів +вимагає приблизно TS*(1+HS)/BS байтів ОЗП, де TS — загальний розмір вашого дискового масиву у байтах, BS — розмір блоку у байтах, а HS — розмір хешу у байтах.

    Наприклад, з 8 дисками по 4 ТБ, розміром блоку 256 КіБ (1 КіБ = 1024 байта) та розміром хешу 16, ви отримуєте:

    -RAM = $(8 \times 4 \times 10^{12}) \times (1+16) / (256 \times 2^{10}) = 1.93$ ГіБ
    +RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 ГіБ
     

    Перехід до розміру хешу 8, ви отримуєте:

    -RAM = $(8 \times 4 \times 10^{12}) \times (1+8) / (256 \times 2^{10}) = 1.02$ ГіБ
    +RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 ГіБ
     

    Перехід до розміру блоку 512, ви отримуєте:

    -RAM = $(8 \times 4 \times 10^{12}) \times (1+16) / (512 \times 2^{10}) = 0.96$ ГіБ
    +RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 ГіБ
     

    Перехід до розміру хешу 8 та розміру блоку 512, ви отримуєте:

    -RAM = $(8 \times 4 \times 10^{12}) \times (1+8) / (512 \times 2^{10}) = 0.51$ ГіБ
    +RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 ГіБ
     
    -

    +

    autosave SIZE_IN_GIGABYTES

    Автоматично зберігає стан під час синхронізації або @@ -1816,7 +1857,7 @@ autosave SIZE_IN_GIGABYTES збоєм машини або будь-якою іншою подією.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Встановлює максимальну дозволену температуру диска @@ -1845,19 +1886,19 @@ smartctl. Поточні температури дисків відобража поведінку SnapRAID. Дії програми базуються виключно на фактично виміряних температурах дисків. -

    Для виконання цього аналізу SnapRAID потрібна -довідкова інформація про температуру системи. +

    Для виконання цього аналізу SnapRAID потрібне +опорне значення температури системи. Спочатку він намагається зчитати її з доступних апаратних датчиків. Якщо до системного датчика неможливо отримати доступ, він використовує найнижчу температуру диска, виміряну на початку -запуску, як резервну довідкову інформацію. +запуску, як резервне опорне значення.

    Зазвичай SnapRAID показує лише температуру найгарячішого диска. Щоб відобразити температуру всіх дисків, використовуйте опцію -A або --stats.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Встановлює час очікування, у хвилинах, коли @@ -1866,7 +1907,7 @@ temp_sleep TIME_IN_MINUTES За замовчуванням 5 хвилин.

    -

    +

    pool DIR

    Визначає каталог об'єднання, де створюється @@ -1875,7 +1916,7 @@ pool DIR

    Каталог повинен вже існувати.

    -

    +

    share UNC_DIR

    Визначає шлях Windows UNC, необхідний для @@ -1894,7 +1935,7 @@ share UNC_DIR

    Ця опція потрібна лише для Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Визначає користувацькі опції smartctl для @@ -1913,6 +1954,8 @@ PARITY — це одне з імен парності: parity, іменем пристрою. Для RAID-контролерів пристрій ймовірно фіксований, і вам може не знадобитися використовувати %s. +

    Ви також можете вказати користувацький рядок параметрів інформації за допомогою +тега [info: ...], щоб замінити параметр за замовчуванням -a.

    Зверніться до документації smartmontools для можливих опцій:

    @@ -1921,11 +1964,12 @@ PARITY — це одне з імен парності: parity,
     

    Наприклад:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ігнорує вказаний атрибут SMART при обчисленні @@ -1938,18 +1982,22 @@ PARITY — це одне з імен парності: parity, 6-parity або z-parity. Спеціальне значення * можна використовувати для ігнорування атрибута на всіх дисках. -

    Наприклад, щоб ігнорувати атрибут Current Pending Sector Count -на всіх дисках: +

    Можна вказати кілька атрибутів, розділених пробілами. +Кожен атрибут може бути вказаний як число від 1 до 255 або як регістронезалежне +ім'я (наприклад, Current_Pending_Sector). +

    Наприклад, щоб ігнорувати атрибути Current Pending Sector Count та +Reallocated Sectors Count на всіх дисках за їхнім номером або ім'ям:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    Щоб ігнорувати його лише на першому диску парності: +

    Щоб ігнорувати їх лише на першому диску парності:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Приклади

    Приклад типової конфігурації для Unix: @@ -1962,7 +2010,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1978,7 +2026,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1987,6 +2035,148 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    +Знімки (Snapshots) +

    +

    Якщо в конфігурації увімкнено опцію знімків, SnapRAID використовує знімки +файлової системи для збереження стабільності даних, що зчитуються під час +операції, навіть якщо файли в живих файлових системах згодом змінюються +або видаляються. +

    Керування знімками відбувається повністю автоматично та прозоро. +Ви можете продовжувати використовувати SnapRAID точно так само, як і раніше, отримуючи +додатковий захист, що забезпечується знімками, які повністю обробляються у +фоновому режимі. +

    Це дає дві основні переваги: +

    Узгодженість — Файли, змінені в живій файловій системі під час тривалого +

    процесу sync або scrub, не викликатимуть невідповідності парності або переривання +операцій, оскільки кожна файлова система зі знімком залишається незмінною +протягом усієї операції. +

    Відновлення — Якщо файл оновлюється або видаляється з живої файлової системи, +

    він залишається збереженим у знімку. Якщо збій диска станеться +до запуску наступної синхронізації sync, SnapRAID використає дані, збережені +в знімку, для реконструкції диска, що зазнав збою. +

    У разі збою диска під час активного процесу sync, +SnapRAID також може автоматично читати як зі знімка попереднього +обчислення парності, так і з поточного. +Це максимізує ймовірність повного відновлення, надаючи +доступ до точних блоків даних, необхідних для вирішення рівнянь парності, +навіть якщо ці блоки були змінені або видалені між синхронізаціями. +

    Без знімків оновлений або видалений файл на справному диску +призводить до відсутності блоків даних, які можуть знадобитися для +відновлення інших дисків, що зазнали збою. +

    Знімки створюються лише для дисків із даними і лише в тому випадку, якщо базова +файлова система підтримує цю функціональність. Диски парності завжди використовують +живу файлову систему. +

    Наразі це підтримується на Btrfs, Bcachefs та ZFS в Linux +і на NTFS у Windows. +

    Ви можете комбінувати диски з даними з різними файловими системами. Тільки ті з них, +які підтримують знімки, використовуватимуть їх, тоді як інші диски продовжуватимуть +працювати безпосередньо з живою файловою системою. +

    Створення та видалення знімків вимагають прав адміністратора. +Переконайтеся, що SnapRAID запущено з необхідними привілеями (наприклад, sudo), +коли знімки увімкнено. +

    +

    +Поведінка команд із знімками +

    +

    Команди sync та scrub використовують знімки для дисків із даними, чиї +файлові системи їх підтримують. На диску зі знімком команда бачить стабільний +образ файлової системи, не зачеплений одночасними змінами в живій файловій +системі. +Під час sync новий знімок створюється незалежно для кожної підтримуваної +файлової системи даних. Ці знімки сукупно надають дані, що використовуються +для обчислення парності. +Навпаки, команда scrub використовує останній знімок, створений під час +найостаннішої синхронізації, щоб підтримувати надійну точку відліку, +яка відповідає існуючій парності. +

    Для команд check та fix використання останнього знімка +залежить від того, чи націлені конкретні диски за допомогою опції +-d, --filter-disk. +

    Диск, явно вибраний за допомогою -d («ціль» операції), +завжди використовує живу файлову систему. Для fix це дозволяє відновити +дані на активну заміну диска. Для check це дозволяє симулювати +операцію fix за тих самих умов. +

    Доступ до всіх інших дисків із даними («довідкових» дисків) здійснюватиметься через +їхні знімки. Це гарантує, що навіть якщо ви змінюєте файли +на своїх справних дисках під час відновлення, SnapRAID +має стабільну, замороженну точку відліку для вирішення рівнянь парності. +

    Якщо опція -d не надана, SnapRAID припускає, що операція застосовується +до всього масиву; у цьому випадку check та fix використовуватимуть виключно +живі файлові системи. +

    Усі інші команди працюють виключно з живою файловою системою. +

    +
    +
    +

    +Життєвий цикл знімків (Snapshots Lifecycle) +

    +

    SnapRAID керує трьома конкретними знімками, stable, pending та scan, +всередині прихованого каталогу в корінному каталозі кожного підтому даних. +У Btrfs, Bcachefs та NTFS використовується каталог .snapraid/, +у ZFS — стандартний .zfs/snapshot/. +

    Знімок stable представляє стан останньої успішно +завершеної синхронізації sync, що містить точні дані, використані для +обчислення поточної парності. Він служить основним джерелом даних +для команд scrub, check та fix. +

    Знімок scan — це тимчасовий образ, що створюється на початку +sync для забезпечення замороженого стану для сканування та обчислення парності. +Після сканування та збереження нового стану вмісту він замінює попередній +знімок pending. +

    Знімок pending — це образ, використовуваний перерваною синхронізацією sync. +Після успішного завершення операції попередній знімок stable +видаляється, а знімок pending підвищується в статусі, щоб +зайняти його місце в якості нового стабільного орієнтира. +

    Якщо процес sync переривається, знімок pending зберігається. +Наступні команди scrub, check та fix використовуватимуть цей +очікуваний знімок, оскільки він відповідає стану файлової системи, записаному в +файлі .content, навіть якщо парність синхронізована лише частково. +

    У разі переривання sync команди check та fix +також читають дані зі знімка stable для вилучення блоків даних +із файлів, які були оновлені або видалені під час синхронізації. +Це можливо тому, що файл .content зберігає метадані для +усіх змінених або видалених файлів протягом усього процесу sync. +Ця історична інформація очищається лише після успішного завершення sync +і збереження фінальної версії файлу .content. +

    Якщо sync перезапускається після переривання, існуючий +очікуваний (pending) знімок видаляється, і створюється новий для +фіксації поточного стану живої файлової системи. +Однак, якщо sync було перервано, уникайте зміни, видалення, +заміни або переміщення файлів, доки наступний sync не завершиться +успішно. Парність все ще може містити блоки, обчислені на основі знімка, +використаного перерваною синхронізацією. Пізніша синхронізація може +замінити цей знімок, зробивши проміжні версії файлів недоступними для +відновлення. +

    +

    +Зовнішнє резервне копіювання зі знімками файлової системи (External backups with filesystem snapshots) +

    +

    Коли знімки файлової системи ввімкнено, SnapRAID звертається до знімків або +створює їх у корені кожного підтому даних, тому або набору даних (dataset). +

    Простий спосіб уникнути будь-яких конфліктів зі сторонніми інструментами — +вказати в налаштуванні data звичайний підкаталог усередині підтому або +тому (наприклад, /mnt/subvol/data замість /mnt/subvol). SnapRAID завжди +створює каталог знімків у корені підтому (наприклад, +/mnt/subvol/.snapraid/), залишивши підкаталог даних чистим, завдяки чому +знімки залишаться ззовні та будуть невидимими для засобів резервного +копіювання, що працюють у ньому. +

    В іншому випадку, якщо налаштований каталог data сам по собі є коренем +підтому або тому, SnapRAID створює каталог .snapraid/ безпосередньо +всередині нього (у Btrfs, Bcachefs та NTFS). Хоча SnapRAID автоматично +виключає цей каталог із власного сканування, зовнішні інструменти +резервного копіювання або синхронізації файлів виявлять його. Якщо каталог +не виключено, вони можуть увійти у знімки або посилання на каталоги та +скопіювати все заморожене дерево даних, дублюючи файли й вичерпуючи +дисковий простір резервного сховища. Завжди налаштовуйте зовнішні засоби +резервного копіювання на виключення каталогу .snapraid/. +

    У ZFS знімки надаються через стандартний віртуальний каталог +.zfs/snapshot/ замість .snapraid/. За замовчуванням (snapdir=hidden) +ZFS приховує цей каталог зі списків каталогів, тому зовнішні інструменти +резервного копіювання не скануватимуть його. Якщо ви ввімкнули +snapdir=visible, обов'язково переконайтеся, що ваші інструменти +резервного копіювання виключають каталог .zfs/. +

    +
    +
    +

    Шаблон (Pattern)

    Шаблони забезпечують гнучкий спосіб фільтрації файлів для включення або @@ -2001,25 +2191,26 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0 прямій косій рисці, що робить її придатною для зіставлення всередині одного компонента шляху. Це стандартна поведінка підстановочних знаків, знайома з командної оболонки (shell globbing). -

    Подвійна зірочка ** є потужнішою, вона відповідає будь-якій послідовності -символів, включаючи роздільники каталогів. Це дозволяє шаблонам відповідати -кільком рівням каталогів. Коли ** з'являється безпосередньо в шаблоні, -вона може відповідати нулю або більше символам, включаючи косі риски між -оточуючим літеральним текстом. -

    Найважливішим використанням ** є спеціальна форма /**/. Вона відповідає -нулю або більше повним рівням каталогів, що дозволяє зіставляти файли -на будь-якій глибині в дереві каталогів, не знаючи точної структури шляху. -Наприклад, шаблон src/**/main.js відповідає src/main.js (пропуск -нуля каталогів), src/ui/main.js (пропуск одного каталогу) та -src/ui/components/main.js (пропуск двох каталогів). +

    Символ підстановки подвійна зірочка ** зіставляється через роздільники +каталогів лише тоді, коли він прилягає до роздільника каталогів (перед ним або +після нього стоїть скісна риска). У цій формі він відповідає нулю або більше +символам на кількох рівнях каталогів. Наприклад, foo/**/bar відповідає +foo/bar, foo/a/bar та foo/a/b/bar; **/build відповідає build та +foo/bar/build; а src/**.js відповідає src/main.js та +src/ui/components/main.js. +Окрема форма /**/ не приймається як повний шаблон. +

    Коли ** не прилягає до скісної риски, він поводиться як * і не відповідає +роздільникам каталогів. Наприклад, **.jpg відповідає photo.jpg у поточному +каталозі, але не відповідає dir/photo.jpg. Для цієї мети використовуйте +**/*.jpg.

    Класи символів із використанням квадратних дужок [] відповідають одному символу з визначеного набору або діапазону. Як і інші односимвольні шаблони, вони не відповідають роздільникам каталогів. Класи підтримують діапазони та заперечення за допомогою -знаку оклику. +знака оклику.

    Фундаментальна відмінність, яку слід пам'ятати, полягає в тому, що *, ? та класи символів усі дотримуються меж каталогів і відповідають лише в межах одного компонента -шляху, тоді як ** — єдиний шаблон, який може відповідати через роздільники -каталогів. +шляху, тоді як ** може відповідати через роздільники каталогів лише тоді, +коли прилягає до скісної риски.

    Існує чотири різні типи шаблонів:

    @@ -2027,7 +2218,7 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0 FILE
    Вибирає будь-який файл з ім'ям FILE. -Цей шаблон застосовується тільки до файлів, а не до директорій. +Цей шаблон застосовується тільки до файлів, а не до каталогів.
    @@ -2036,8 +2227,8 @@ FILE
    DIR/
    -Вибирає будь-яку директорію з ім'ям DIR і все, що знаходиться всередині. -Цей шаблон застосовується тільки до директорій, а не до файлів. +Вибирає будь-який каталог з ім'ям DIR і все, що знаходиться всередині. +Цей шаблон застосовується тільки до каталогів, а не до файлів.
    @@ -2047,7 +2238,7 @@ DIR/ /PATH/FILE
    Вибирає точно вказаний шлях до файлу. Цей шаблон застосовується -тільки до файлів, а не до директорій. +тільки до файлів, а не до каталогів.
    @@ -2056,8 +2247,8 @@ DIR/
    /PATH/DIR/
    -Вибирає точно вказаний шлях до директорії і все, що знаходиться -всередині. Цей шаблон застосовується тільки до директорій, а не до файлів. +Вибирає точно вказаний шлях до каталогу і все, що знаходиться +всередині. Цей шаблон застосовується тільки до каталогів, а не до файлів.
    @@ -2074,7 +2265,7 @@ DIR/ файлу, а не правило каталогу.

    Якщо ім'я файлу містить символи *, ?, [, або ], ви повинні екранувати їх, щоб уникнути -їх інтерпретації як символу глоббінгу. +їх інтерпретації як символу глобінгу. В Unix символом екранування є \; у Windows — ^. Коли шаблон знаходиться в командному рядку, ви повинні подвоїти символ екранування, щоб @@ -2120,21 +2311,39 @@ include /movies/ include /musics/ include /pictures/ +

    Зверніть увагу, що виключення каталогу (за допомогою DIR/ або /ШЛЯХ/DIR/) +запобігає входу SnapRAID у цей каталог та його скануванню. Відповідно, +неможливо повторно включити файл або підкаталог, розташований усередині +виключеного батьківського каталогу, оскільки сканер ніколи не переходить у нього. +

    Наприклад, наступна конфігурація НЕ включить file.dat, оскільки +/keep/ відсікається до того, як file.dat буде перевірено: +

    +# НЕ працює як очікується: /keep/ повністю пропускається
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    Щоб виключити файли всередині каталогу, зберігши конкретні файли, +виключайте шаблон файлів усередині каталогу замість виключення самого каталогу: +

    +# Працює: /keep/ сканується, але інші файли всередині виключаються
    +include /keep/file.dat
    +exclude /keep/*
    +

    У командному рядку, використовуючи опцію -f, ви можете використовувати лише шаблони include. Наприклад:

     # Перевіряє лише файли .mp3.
     # В Unix використовуйте лапки, щоб уникнути
    -# розширення глоббінгу оболонкою.
    +# розширення глобінгу оболонкою.
     snapraid -f "*.mp3" check
     
    -

    В Unix, при використанні символів глоббінгу в +

    В Unix, при використанні символів глобінгу в командному рядку, ви повинні взяти їх у лапки, щоб запобігти їх розширенню оболонкою.

    -

    +

    Ігнорування файлів (Ignore File)

    На додаток до глобальних правил у файлі конфігурації, ви можете розміщувати @@ -2200,7 +2409,7 @@ build/

    -

    +

    Вміст (Content)

    SnapRAID зберігає список та контрольні суми @@ -2209,12 +2418,13 @@ build/ присутні у вашому дисковому масиві, разом з усіма контрольними сумами для перевірки їх цілісності. -

    Цей файл зчитується та записується командами -sync та scrub та зчитується командами fix, -check та status. +

    Файл вмісту зчитується та записується командами sync, scrub, +touch та rehash. Він зчитується командами status, diff, +check, fix, list, dup, locate та pool, і повністю +ігнорується командами smart, probe, up, down та devices.

    -

    +

    Парність (Parity)

    SnapRAID зберігає інформацію парності вашого @@ -2227,7 +2437,7 @@ build/ scrub та check.

    -

    +

    Кодування (Encoding)

    SnapRAID в Unix ігнорує будь-яке кодування. @@ -2249,16 +2459,273 @@ TrueType, такий як Lucida Console, як буде у форматі UTF-8.

    -

    -Авторське право (Copyright) +

    +Код завершення (Exit Code)

    -

    Цей файл захищений авторським правом (C) 2025 Andrea Mazzoleni +

    SnapRAID завершує роботу з такими кодами помилок: +

    +
    +
    +0 +
    +Все в порядку. +
    +
    +
    +
    +1 +
    +Команда виявила помилки. +
    +
    +
    +
    +2 +
    +Команда diff визначила, що все в порядку, але потрібен sync. +
    +
    +
    +
    +3 +
    +Команда дискового пристрою (probe, smart, devices, up, +down) завершена, але принаймні одна файлова система працює +у деградованому режимі з відсутніми пристроями. +
    +
    +
    +
    +
    +

    +Відомі проблеми (Known Issues) +

    +
    +

    +Межі файлової системи +

    +

    SnapRAID не перетинає межі файлових систем, точок монтування або підтомів +під час сканування диска даних. Коли виявляється така межа, SnapRAID +повідомляє ПОПЕРЕДЖЕННЯ і не виконує сканування за її межами. +

    Файли, розташовані за такими межами, не включаються до диска даних і +повинні бути налаштовані окремо, якщо їх потрібно захистити. +

    +
    +

    +Точки монтування зі знімками файлової системи +

    +

    Коли знімки файлової системи увімкнено, вкладені точки монтування та +bind-монтування всередині диска даних не підтримуються. +

    Точки монтування є частиною простору імен монтування працюючої системи і +не зберігаються у знімках файлової системи. Отже, під час сканування знімка +каталог, прихований точкою монтування в активній файловій системі, може +стати видимим. +

    Не розміщуйте вкладені точки монтування або bind-монтування всередині дисків +даних, коли ввімкнено знімки файлової системи. +

    +
    +

    +Кілька конфігурацій зі знімками файлової системи +

    +

    Підтримка знімків не може безпечно спільно використовуватися кількома +незалежними конфігураціями SnapRAID, які використовують один і той самий +простір імен знімків файлової системи. +

    У Btrfs та Bcachefs лише одна конфігурація SnapRAID з увімкненою підтримкою +знімків може використовувати каталоги даних у межах одного підтому. У ZFS +це ж обмеження стосується датасету, а в NTFS — тому. +

    Кілька конфігурацій, які спільно використовують один і той самий простір +імен знімків, використовують однакові знімки stable, pending та scan. +Запуск однієї конфігурації може замінити або видалити знімки відновлення, +необхідні для іншої. +

    +
    +

    +Модифікації файлів на місці без зміни позначок часу +

    +

    SnapRAID виявляє модифікації файлів шляхом порівняння розмірів файлів та +позначок часу модифікації (mtime). +

    Якщо програма змінює файл на місці без зміни його розміру або оновлення +позначки часу модифікації, "diff" та "sync" не виявлять, що файл змінився, +і його парність не буде оновлено. +

    Щоб гарантувати, що SnapRAID розпізнає такі зміни, оновіть позначку часу +модифікації файлу (наприклад, за допомогою утиліти "touch"). В іншому +випадку різниця буде виявлена лише як невідповідність хешу під час +наступного "scrub" або "check". +

    +
    +

    +Зіставлення регістру символів non-ASCII у Windows +

    +

    SnapRAID використовує стандартне, передбачуване кодування UTF-8 на всіх +платформах, обмежуючи нечутливе до регістру зіставлення символами ASCII. +

    Файлові системи Windows страждають від застарілого архітектурного рішення, +що нав'язує нечутливість до регістру для імен файлів Unicode за допомогою +довільних, залежних від системи таблиць перетворення. Як наслідок, Windows +приховує реальність файлової системи, обробляючи абсолютно різні +послідовності байтів Unicode так, ніби це один і той самий файл. +

    Наприклад, À.txt та à.txt є різними іменами Unicode, але Windows нелогічно +вважає їх ідентичними, тоді як SnapRAID зберігає їхню справжню відмінність. +

    Це обмеження спричинене непослідовною обробкою імен файлів Unicode у Windows +та її наполегливим використанням псевдонімів без урахування регістру. Щоб +запобігти розбіжностям через зведення регістру у Windows, завжди вказуйте +точний регістр для будь-яких символів non-ASCII у шляхах конфігурації та +фільтрах. +

    +
    +

    +Відновлення з частковим fix +

    +

    Коли fix обмежено за допомогою -S, --start або -B, --count, +SnapRAID працює лише з вибраними блоками і не виконує фіналізацію +на рівні файлів або переміщення в карантин. +

    Якщо в результаті відновлення отримано дані найкращої спроби (best-effort), +щодо яких не можна довести відповідність поточному вмісту, такі блоки все +одно можуть бути записані під звичайним ім'ям файлу. Невизначеність, пов'язана +з цими відновленими блоками, не зберігається після завершення команди. +

    Як наслідок, наступний fix сприйматиме ці доступні для читання блоки як дійсні +дані файлу і не намагатиметься відновити їх знову. Це може призвести до того, +що подальше відновлення повідомить про успіх, залишивши у файлі неповні або +застарілі дані. +

    Параметри -S та -B призначені лише для розширеного ручного відновлення, +зазвичай після збою звичайного fix. Якщо частковий fix повідомляє про +невідновлювані дані, видаліть або перейменуйте уражені файли перед спробою +повторного відновлення або перевірте їхній вміст вручну. +

    +
    +

    +Жорсткі посилання NTFS та виключені шляхи +

    +

    У файловій системі NTFS записи каталогів кешують розмір файлу та часові +позначки незалежно для кожного жорсткого посилання. Коли файл змінюється +через одне посилання, записи каталогів інших посилань, що вказують на +той самий файл, можуть зберігати застарілі метадані, доки до них не +буде здійснено доступ. +

    SnapRAID автоматично виявляє та нормалізує цей стан щоразу, коли під +час сканування виявляється щонайменше два жорстких посилання на один +і той самий файл. Однак, якщо сканується лише одне жорстке посилання, +тоді як інші виключені фільтрами або знаходяться за межами шляху диска +даних, SnapRAID не може виявити колізію inode і покладається на +кешовані метадані єдиного видимого посилання. +

    Отже, зміни, внесені через виключене або зовнішнє жорстке посилання, +можуть залишитися непоміченими для SnapRAID, доки метадані включеного +посилання не будуть оновлені операційною системою (наприклад, коли до +файлу звертаються або відкривають його за цим шляхом). +

    Щоб уникнути цього обмеження, не змінюйте захищені файли через жорсткі +посилання, виключені зі SnapRAID, або переконайтеся, що всі жорсткі +посилання на файл включені до сканування, щоб SnapRAID міг їх нормалізувати. +

    +
    +

    +Відновлення після перерваного sync з кількома парностями +

    +

    У масиві з кількома дисками парності перерваний sync може залишити +рівні парності тимчасово розсинхронізованими між собою. Наприклад, +парність 1 вже може містити оновлені дані, тоді як парність 2 все ще +містить старі дані. +

    Під час виконання check або fix SnapRAID випробовує різні комбінації +парностей і перевіряє відновлені дані за відомими хешами блоків +(що охоплюють блок цілком, зазвичай 256 КіБ). +

    Якщо SnapRAID намагається виконати відновлення, використовуючи +неузгоджену суміш старої та нової парності, лінійні рівняння RAID +дадуть неправильні дані. Щоб така недійсна комбінація була помилково +прийнята, рівняння мали б випадково відновити хоча б один повний блок +розміром 256 КіБ настільки ідеально, щоб його хеш збігся, тоді як інші +несинхронізовані блоки в тій самій смузі будуть відновлені з помилковими +даними. +

    Цей сценарій не залежить від колізії хешів; навпаки, самі рівняння +змішаної парності мали б випадково відтворити точний вихідний вміст +256-КіБ блоку. Хоча це математично можливо для спеціально підготовлених +або сильно повторюваних даних, на реальних даних це практично неможливо. +

    Якщо всі диски справні, завершення перерваного sync перед внесенням +подальших змін усуває цю неоднозначність. Якщо диск вийшов з ладу і +потрібне відновлення, уникайте змін на дисках даних перед запуском +check або fix. +

    +
    +

    +Зарезервовані імена файлів і каталогів +

    +

    SnapRAID резервує деякі імена файлів, каталогів і знімків для своїх +внутрішніх операцій. Не використовуйте ці імена для даних користувача: +

    +
    +
    +.snapraidignore +
    +Локальний файл правил виключення. +
    +
    +
    +
    +.snapraid +
    +Каталог-контейнер знімків. +
    +
    +
    +
    +snapraid-* +
    +Імена знімків ZFS, керованих SnapRAID. +
    +
    +
    +
    +*.unrecoverable +
    +Пошкоджені файли, поміщені в карантин під час +відновлення. +
    +
    +
    +
    +CONTENT.tmp +
    +Тимчасовий файл для оновлень файлу content. +
    +
    +
    +
    +CONTENT.lock +
    +Файл блокування файлу content. +
    +
    +
    +
    +PARITY.spaceholder +
    +Тимчасовий файл резервування місця під час виділення +парності у Windows. +
    +
    +
    +

    Використання цих імен для непов'язаних даних може призвести до того, що +файли або знімки будуть проігноровані, помилково сприйняті як метадані, +перезаписані, перейменовані або видалені. +

    У Windows усі варіанти регістру також зарезервовані, навіть у каталогах +NTFS, налаштованих з урахуванням регістру (наприклад, .SNAPRAIDIGNORE, +.SnapRaid, CONTENT.TMP та CONTENT.Lock). +

    +
    +
    +

    +Переклад (Translation) +

    +

    Цей документ є автоматичним перекладом англійського посібника. +Зверніться до англійського посібника для отримання офіційної версії.

    -

    +

    +Авторське право (Copyright) +

    +

    Цей файл захищений авторським правом (C) 2026 Andrea Mazzoleni +

    +
    +

    Див. також (See Also)

    -

    snapraid_log(1), snapraidd(1) +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual-zh.html b/manual-zh.html index 3856d48f..18f9f606 100644 --- a/manual-zh.html +++ b/manual-zh.html @@ -114,7 +114,7 @@

    -Synopsis +概要 (Synopsis)

     snapraid [-c, --conf CONFIG]
    @@ -142,7 +142,7 @@ snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
     

    -Description +描述 (Description)

    SnapRAID 是一款专为磁盘阵列设计的备份程序,它存储奇偶校验信息, 以在最多六个磁盘发生故障时进行数据恢复。 @@ -181,19 +181,32 @@ SnapRAID 不会锁定您的数据;您可以随时停止使用它,无需重

    -Limitations +限制 (Limitations)

    -

    SnapRAID 是 RAID 和备份程序之间的混合体,旨在结合两者的优点。 -然而,在使用它之前,您应该考虑一些限制。 -

    主要的限制是,如果一个磁盘发生故障而您最近没有进行同步(sync), -您可能无法完全恢复。 -更具体地说,您可能无法恢复自上次同步操作以来已更改或已删除文件的 -大小所对应的部分。 -即使更改或删除的文件不在发生故障的磁盘上,也会发生这种情况。 -这就是为什么 SnapRAID 更适用于很少更改的数据。 -

    另一方面,新添加的文件不会阻止对已有文件的恢复。 -您只会丢失位于发生故障磁盘上的最近添加的文件。 -

    SnapRAID 的其他限制包括: +

    SnapRAID 是 RAID 和备份程序之间的混合体,旨在结合两者的最佳优势。 +但是,在使用它之前,您应该考虑它的一些限制。 +

    主要的限制是,如果磁盘发生故障,您只能将数据恢复到上一次 sync(同步)操作的状态。 +自上次同步以来添加的任何数据或进行的任何修改(如果位于发生故障的磁盘上)都将丢失。 +

    因此,SnapRAID 主要适用于很少更改的数据。 +

    对于上次同步时已经存在的数据,恢复的可靠性取决于是否使用了 snapshot(快照)选项: +

      +
    • +具有快照支持(在 Btrfs、ZFS、Bcachefs 和 NTFS 上可用), +SnapRAID 可以自动维护每个受支持的数据文件系统的独立冻结引用。 +这确保了即使您在同步期间或之后在活动文件系统上修改或删除文件, +恢复过程仍保持一致且可靠。 +
    • +
    +
      +
    • +在没有快照支持的情况下,在 sync 之后删除或更改文件 +可能会阻止其他损坏磁盘的完全恢复。发生这种情况 +是因为校验数据不再与修改后的文件匹配,即使 +这些文件不在损坏的磁盘上。另一方面,新添加的文件 +不会阻止已存在文件的恢复。 +
    • +
    +

    SnapRAID 的其他限制包括:

    • 使用 SnapRAID,每个磁盘仍然有单独的文件系统。 @@ -219,7 +232,7 @@ SnapRAID 只能从有限数量的磁盘故障中恢复数据。

    -Getting Started +入门 (Getting Started)

    要使用 SnapRAID,您需要首先选择磁盘阵列中的一个磁盘专用于 parity(奇偶校验)信息。使用一个奇偶校验磁盘, @@ -282,7 +295,7 @@ snapraid sync

    现在您可以开始随意使用您的阵列,并定期运行 sync 命令更新奇偶校验信息。

    -Scrubbing +数据擦洗 (Scrubbing)

    要定期检查数据和奇偶校验的错误,您可以运行 scrub 命令。

    @@ -317,11 +330,11 @@ snapraid -p bad scrub
     

    -Pooling +合并池 (Pooling)

    注意:下面描述的 pooling 功能已被 mergerfs 工具取代, mergerfs 现在是 SnapRAID 社区推荐的 Linux 用户选项。 -Mergefs 提供了一种更灵活、更高效的方式,将多个驱动器汇集到一个 +Mergerfs 提供了一种更灵活、更高效的方式,将多个驱动器汇集到一个 统一的挂载点中,允许跨阵列无缝访问文件,而无需依赖符号链接。 它与 SnapRAID 很好地集成以提供奇偶校验保护,常用于 OpenMediaVault (OMV) 或自定义 NAS 配置等设置中。 @@ -384,7 +397,7 @@ fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1

    -Undeleting +取消删除 (Undeleting)

    SnapRAID 的功能更像一个备份程序而不是 RAID 系统, 它可以使用 -f, --filter 选项来恢复或取消删除文件到其以前的状态: @@ -407,7 +420,7 @@ snapraid fix -m

    -Recovering +数据恢复 (Recovering)

    最糟糕的情况发生了,您丢失了一个或多个磁盘!

    **不要惊慌!** 您将能够恢复它们! @@ -494,9 +507,9 @@ snapraid sync

    -Commands +命令 (Commands)

    -

    SnapRAID 提供了一些简单的命令,允许您: +

    SnapRAID 提供了几个简单的命令,允许您:

    • 打印阵列的状态 -> status @@ -505,22 +518,22 @@ Commands 控制磁盘 -> smart、probe、up、down
    • -进行备份/快照 -> sync +创建备份/恢复点 -> sync
    • 定期检查数据 -> scrub
    • -恢复上次备份/快照 -> fix。 +恢复上一个备份/恢复点 -> fix。
    -

    命令必须用小写字母书写。 +

    命令必须用小写字母编写。

    status

    打印磁盘阵列状态的摘要。 -

    它包括有关奇偶校验碎片、块未经检查有多久,以及在 scrubbing +

    它包括有关奇偶校验碎片、块未经检查有多久,以及在数据擦洗 (scrubbing) 期间遇到的所有记录的静默错误的信息。

    所提供的信息指的是您上次运行 sync 的时间。 不考虑后来的修改。 @@ -652,8 +665,9 @@ updated

    moved
    -在同一磁盘上移动到不同目录的文件。 -它们通过具有相同的名称、大小、时间戳和 inode,但目录不同来识别。 +在同一磁盘上移动或重命名并保留相同 inode 的文件。 +它们通过具有相同的 inode、大小和时间戳,但路径不同来识别。 +文件名也可以不同。
    @@ -670,10 +684,10 @@ copied
    relocated
    -在相同或不同磁盘上移动的文件,且原始文件已消失。 +移动到不同目录或磁盘的文件,且原始文件已消失并不保留 inode。 它们通过具有相同的名称、大小和时间戳进行识别。 如果亚秒级时间戳为零,则必须完整路径匹配才能识别。 -与同一磁盘上的 'moved' 文件不同,重定位的文件具有不同的 inode。 +与 'moved' 文件不同,重定位的文件要求文件名保持不变。
    @@ -745,12 +759,12 @@ full - Scrub 所有内容。

    fix

    -

    修复所有文件和奇偶校验数据。 -

    所有文件和奇偶校验数据都与上次 sync 中保存的快照 -状态进行比较。 -如果发现差异,则将其恢复到存储的快照。 -

    **警告!** fix 命令不区分错误和 -故意修改。它**无条件地**将文件状态恢复到上次 sync。 +

    修复所有文件和校验数据。 +

    将所有文件和校验数据与上一次 sync 中保存的状态进行比较。 +如果发现差异,则将其恢复到存储的状态。 +

    警告! +fix 命令不区分错误和故意修改。 +它会无条件地将文件状态恢复到上一次 sync 的状态。

    如果未指定其他选项,则处理整个阵列。 使用过滤选项选择要操作的文件或磁盘的子集。

    要仅修复在 sync 和 scrub 期间标记为坏块的块, @@ -871,7 +885,7 @@ locate

    -Options +选项 (Options)

    SnapRAID 提供以下选项:

    @@ -1045,7 +1059,7 @@ DAYS 是块被 scrub 的最小天数;默认值为 10。
    --t, --tail 大小 +-t, --tail SIZE
    将文件列表限制为那些使用校验盘指定尾部大小以内的文件。 您可以使用乘数,如 K、M、G 或 T(例如 --tail 1G)。 @@ -1182,10 +1196,10 @@ DAYS 是块被 scrub 的最小天数;默认值为 10。
    --W, --force-realloc-tail 大小 +-W, --force-realloc-tail SIZE
    工作方式类似于 -R, --force-realloc,但仅限于每个校验文件的 -指定尾部部分(最后“大小”字节)。 +指定尾部部分(最后 SIZE 字节)。 它会强制重新分配(移动)当前存储在该尾部部分的任何文件分片/块, 允许它们被放置在校验文件中任何有可用空间的地方(包括现有的 空隙)。 @@ -1243,7 +1257,7 @@ HHMMSS。在 Windows 批处理文件中,您必须双写 % 字符,
    从指定的块号开始处理。 在磁盘损坏的情况下,这对于重试检查或修复特定块可能很有用。 -此选项主要用于高级手动恢复。 +此选项主要用于高级手动恢复,并且仅受 check 和 fix 支持。
    @@ -1253,7 +1267,7 @@ HHMMSS。在 Windows 批处理文件中,您必须双写 % 字符, -B, --count BLKCOUNT
    仅处理指定数量的块。 -此选项主要用于高级手动恢复。 +此选项主要用于高级手动恢复,并且仅受 check 和 fix 支持。
    @@ -1316,7 +1330,7 @@ HHMMSS。在 Windows 批处理文件中,您必须双写 % 字符,

    -Configuration +配置 (Configuration)

    SnapRAID 需要一个配置文件来了解您的磁盘阵列 位于何处以及在哪里存储奇偶校验信息。 @@ -1404,6 +1418,8 @@ data NAME DIR NAME 用于标识磁盘,并且必须是唯一的。 DIR 是磁盘在文件系统中的挂载点。

    您可以根据需要更改挂载点,只要保持 NAME 固定即可。 +

    但是,配置的路径必须始终解析为相同的基础数据。如果路径包含符号链接, +其目标必须保持稳定。不支持重定向此类符号链接以在运行中切换数据目录。

    您应该为阵列中的每个数据磁盘使用一个选项。

    您可以通过直接在配置文件中更改 NAME,然后运行 sync 命令来 稍后重命名磁盘。 @@ -1420,6 +1436,24 @@ extra NAME DIR

    +snapshot +

    +

    为 sync、scrub、check 和 fix 命令启用文件系统快照的使用。 +

    启用后,SnapRAID 会在“sync”开始时为每个受支持的数据文件系统创建 +只读快照。这提供了每个文件系统的稳定视图,防止后续修改改变用于 +计算校验的数据。 +

    这显著提高了恢复能力:如果从实时文件系统中删除了一个文件, +它仍会保留在快照中。这可以防止该数据块的校验数据变得“损坏”, +从而确保在另一个磁盘发生故障时您仍能成功恢复数据。 +

    此选项仅适用于在 Linux 中格式化为 Btrfs、Bcachefs 或 ZFS 文件系统, +以及在 Windows 中格式化为 NTFS 的数据磁盘。 +校验磁盘或使用其他文件系统的数据磁盘将始终使用文件系统的活动版本。 +

    快照的创建和删除需要管理权限。 +启用此选项时,请确保以必要的权限(例如 sudo)运行 SnapRAID。 +

    有关快照生命周期的详细说明,请参阅 SNAPSHOTS(快照)部分。 +

    +
    +

    nohidden

    排除所有隐藏文件和目录。 @@ -1427,7 +1461,7 @@ nohidden 在 Windows 中,它们是具有隐藏属性的文件。

    -

    +

    exclude/include PATTERN

    定义要从同步过程中排除或包含的文件或目录模式。 @@ -1436,11 +1470,13 @@ exclude/include PATTERN 如果它是 include 模式,则包含该文件。 如果没有模式匹配,则如果指定的最后一个模式是 include,则排除该文件, 或者如果指定的最后一个模式是 exclude,则包含该文件。 +

    请注意,过滤是在目录遍历期间分层进行的。如果目录匹配 exclude 规则, +则整个目录将被跳过(修剪),并且不会评估其内部文件或子目录的任何 include 规则。

    有关模式规范的更多详细信息,请参阅 PATTERN 部分。

    此选项可以多次使用。

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    定义奇偶校验的基本块大小(以 KiB 为单位)。 @@ -1477,7 +1513,7 @@ mkfs.ext4 -m 0 -T largefile4 DEVICE 这允许每个数据磁盘上大约 460,000 个文件而不会浪费任何空间。

    -

    +

    hashsize SIZE_IN_BYTES

    定义保存块的散列大小(以字节为单位)。 @@ -1487,37 +1523,37 @@ hashsize SIZE_IN_BYTES

    使用不同 hashsize 的一个原因是,如果您的系统内存有限。 根据经验,SnapRAID 通常每 16 TB 的阵列数据需要 1 GiB 的 RAM。

    具体来说,为了存储数据的散列,SnapRAID 大约需要 -$TS*(1+HS)/BS$ 字节的 RAM, -其中 $TS$ 是您的磁盘阵列的总大小(以字节为单位),$BS$ 是块大小(以字节为单位), -$HS$ 是散列大小(以字节为单位)。 +TS*(1+HS)/BS 字节的 RAM, +其中 TS 是您的磁盘阵列的总大小(以字节为单位),BS 是块大小(以字节为单位), +HS 是散列大小(以字节为单位)。

    例如,对于 8 个 4 TB 磁盘,块大小为 256 KiB (1 KiB = 1024 字节),散列大小为 16,您将获得:

    -RAM = $(8 * 4 * 10^{12}) * (1+16) / (256 * 2^{10}) = 1.93$ GiB
    +RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
     

    切换到散列大小为 8,您将获得:

    -RAM = $(8 * 4 * 10^{12}) * (1+8) / (256 * 2^{10}) = 1.02$ GiB
    +RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
     

    切换到块大小为 512,您将获得:

    -RAM = $(8 * 4 * 10^{12}) * (1+16) / (512 * 2^{10}) = 0.96$ GiB
    +RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
     

    切换到散列大小为 8 和块大小为 512,您将获得:

    -RAM = $(8 * 4 * 10^{12}) * (1+8) / (512 * 2^{10}) = 0.51$ GiB
    +RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
     
    -

    +

    autosave SIZE_IN_GIGABYTES

    -

    在同步或 scrub 之后,处理指定数量的 GB 后,自动保存状态。 +

    在同步或 scrub 期间,每处理指定数量的 GB 后就自动保存状态。 此选项有助于避免在机器崩溃或任何其他事件中断时, 从头开始重新启动长时间的 sync 命令。

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    设置允许的最高磁盘温度(摄氏度)。指定后, @@ -1535,22 +1571,22 @@ SnapRAID 运行时会显示当前磁盘温度。 有助于评估系统的冷却是否足够。 此估计温度仅供参考,对 SnapRAID 的行为没有影响。 程序的动作仅基于实际测量的磁盘温度。 -

    要执行此分析,SnapRAID 需要一个系统温度的参考。 +

    要执行此分析,SnapRAID 需要一个系统温度的参考基准值。 它首先尝试从可用的硬件传感器读取。 如果无法访问系统传感器,它会使用运行时测量的最低磁盘温度 -作为备用参考。 +作为备用基准值。

    通常,SnapRAID 只显示最热磁盘的温度。 要显示所有磁盘的温度,请使用 -A 或 --stats 选项。

    -

    +

    temp_sleep TIME_IN_MINUTES

    设置达到温度限制时的待机时间(以分钟为单位)。 在此期间,磁盘保持停转状态。默认值为 5 分钟。

    -

    +

    pool DIR

    定义 pooling 目录,其中使用 pool 命令创建磁盘 @@ -1558,7 +1594,7 @@ pool DIR

    目录必须已经存在。

    -

    +

    share UNC_DIR

    定义远程访问磁盘所需的 Windows UNC 路径。 @@ -1571,7 +1607,7 @@ share UNC_DIR

    此选项仅在 Windows 中需要。

    -

    +

    smartctl DISK/PARITY OPTIONS...

    定义自定义 smartctl 选项以获取每个磁盘的 SMART 属性。 @@ -1584,6 +1620,7 @@ PARITY 是奇偶校验名称之一:parity、2-parity、3-pari

    在指定的 OPTIONS 中,字符串 %s 被设备名称替换。 对于 RAID 控制器,设备可能是固定的, 您可能不需要使用 %s。 +

    您还可以使用 [info: ...] 标记指定自定义信息选项字符串,以替换默认的 -a 选项。

    请参阅 smartmontools 文档以了解可能的选项:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1591,11 +1628,12 @@ PARITY 是奇偶校验名称之一:parity、2-parity、3-pari
     

    例如:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    在计算磁盘故障概率时忽略指定的 SMART 属性。 @@ -1604,17 +1642,22 @@ smartignore DISK/PARITY ATTR [ATTR...] PARITY 是奇偶校验名称之一:parity、2-parity、3-parity、 4-parity、5-parity、6-parity 或 z-parity。 特殊值 * 可用于在所有磁盘上忽略该属性。 -

    例如,要在所有磁盘上忽略 Current Pending Sector Count 属性: +

    可以指定多个属性,用空格分隔。 +每个属性可以指定为 1 到 255 之间的数字,或者不区分大小写的名称 +(例如 Current_Pending_Sector)。 +

    例如,要在所有磁盘上通过编号或名称忽略 Current Pending Sector Count 和 +Reallocated Sectors Count 属性:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    要仅在第一个奇偶校验磁盘上忽略它: +

    要仅在第一个奇偶校验磁盘上忽略它们:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Examples

    Unix 的典型配置示例如下: @@ -1627,7 +1670,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1643,7 +1686,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1652,7 +1695,125 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    -Pattern +快照 (Snapshots) +

    +

    如果配置中启用了快照选项,SnapRAID 将使用文件系统快照来保持操作期间 +读取的数据稳定,即使实时文件系统上的文件随后被修改或删除也是如此。 +

    快照的管理是完全自动且透明的。 +您可以完全像以前一样继续使用 SnapRAID,而快照提供的 +额外保护完全在后台处理。 +

    这提供了两个主要好处: +

    +
    +
    +一致性 +
    +在运行时间较长的 sync 或 scrub 期间在活动文件系统上修改的文件 +不会导致校验不匹配或操作中止,因为每个创建了快照的文件系统在操作期间 +都保持不变。 +
    +
    +
    +
    +恢复 +
    +如果从实时文件系统中更新或删除了一个文件, +它仍会保留在快照中。如果下次 sync 运行之前发生磁盘故障, +SnapRAID 会使用快照中保留的数据来重建发生故障的磁盘。 +在活动同步过程中发生磁盘故障的情况下, +SnapRAID 还能自动从上一次校验计算的快照和当前的快照中读取数据。 +这通过提供解校验方程所需的精确数据块访问, +最大程度地提高了完全恢复的概率,即使这些数据块在同步之间被修改或删除。 +如果没有快照,健康磁盘上更新或删除的文件会导致缺少数据块, +而这些数据块可能是修复其他损坏磁盘所必需的。 +
    +
    +
    +

    快照仅为数据磁盘创建,并且仅在底层文件系统支持此功能时创建。 +校验磁盘始终使用实时文件系统。 +

    目前,Linux 上的 Btrfs、Bcachefs 和 ZFS 以及 Windows 上的 NTFS 支持此功能。 +

    您可以混合使用具有不同文件系统的数据磁盘。只有那些 +支持快照的磁盘才会利用它们,而其他磁盘将继续直接在实时文件系统上运行。 +

    快照的创建和删除需要管理权限。 +启用快照时,请确保以必要的权限(例如 sudo)运行 SnapRAID。 +

    +

    +快照的命令行为 +

    +

    sync 和 scrub 命令对支持快照的文件系统的数据磁盘使用快照。 +在启用了快照的磁盘上,该命令看到的是一个不受实时文件系统并发更改影响的 +稳定文件系统镜像。 +在 sync 期间,会为每个受支持的数据文件系统独立创建新的快照。 +这些快照共同提供用于校验计算的数据。 +相比之下,scrub 命令利用上一个快照(即在最近一次同步期间创建的快照) +来维持与现有校验匹配的可靠参考点。 +

    对于 check 和 fix 命令,上一个快照的使用 +取决于是否使用 -d, --filter-disk 选项指定了特定磁盘。 +

    通过 -d 明确选择的磁盘(操作的“目标”)始终使用实时文件系统。 +对于 fix,这允许将数据恢复到活动的替代磁盘。对于 check, +它允许在相同条件下模拟 fix 操作。 +

    所有其他数据磁盘(“参考”磁盘)都将通过其快照进行访问。 +这确保了即使您在恢复进行时修改健康磁盘上的文件, +SnapRAID 也有一个稳定、冻结的参考来求解校验方程。 +

    如果没有提供 -d 选项,SnapRAID 会假设该操作适用于整个阵列, +在这种情况下,check 和 fix 将排他性地使用实时文件系统。 +

    所有其他命令完全在实时文件系统上运行。 +

    +
    +
    +

    +快照生命周期 (Snapshots Lifecycle) +

    +

    SnapRAID 在每个数据子卷根目录下的隐藏目录中管理三个特定的快照: +stable(稳定)、pending(待定)和 scan(扫描)。 +在 Btrfs、Bcachefs 和 NTFS 中使用 .snapraid/ 目录, +在 ZFS 中使用标准的 .zfs/snapshot/。 +

    stable 快照代表上一次成功完成的 sync 的状态, +包含用于计算当前校验的准确数据。它作为 scrub、check +和 fix 命令的主要数据源。 +

    scan 快照是在 sync 开始时创建的临时镜像, +用于为扫描和校验计算提供冻结状态。在扫描并保存新的内容状态后, +它将替换以前的 pending 快照。 +

    pending 快照是中断的 sync 所使用的镜像。 +在操作成功完成后,以前的 stable 快照将被删除, +并且 pending 快照将被提升以接替其作为新的稳定参考。 +

    如果 sync 中断,pending 快照将被保留。 +随后的 scrub、check 和 fix 命令将使用此待定快照, +因为它与 .content 文件中记录的文件系统状态相匹配,即使校验仅部分同步。 +

    在 sync 中断的情况下,check 和 fix 命令 +还会从 stable 快照中读取数据,以检索在同步期间更新或删除的文件的 +数据块。这是可能的,因为 .content 文件在整个同步过程中保留了 +所有修改或删除的文件的元数据。此历史信息仅在同步 +成功完成并保存 .content 文件的最终版本后才会清除。 +

    如果 sync 在中断后重新启动,现有的 pending 快照将被删除, +并创建一个新快照以捕获实时文件系统的当前状态。 +但是,如果 sync 中断,请避免在后续 sync 成功完成之前修改、删除、 +替换或移动文件。校验可能仍包含根据中断的同步所使用的快照计算的块。 +以后的同步可能会替换该快照,从而导致中间文件版本无法用于恢复。 +

    +

    +使用文件系统快照进行外部备份 (External backups with filesystem snapshots) +

    +

    当启用文件系统快照时,SnapRAID 会在每个数据子卷、卷或数据集(dataset) +的根目录下访问或创建快照。 +

    避免与外部工具发生冲突的一种简单方法,是将 data 配置指向子卷或卷内的 +常规子目录(例如 /mnt/subvol/data 而不是 /mnt/subvol)。SnapRAID +始终会在子卷根目录下创建快照目录(例如 /mnt/subvol/.snapraid/),从而保持 +数据子目录整洁,使快照保留在外部且对在该目录内运行的备份工具不可见。 +

    否则,如果配置的 data 目录本身就是子卷或卷的根目录,SnapRAID 会直接在其中 +创建 .snapraid/ 目录(在 Btrfs、Bcachefs 和 NTFS 上)。虽然 SnapRAID +会在其自身的扫描中自动排除此目录,但外部备份工具或文件同步工具会发现它。如果未 +将其排除,它们可能会遍历快照或目录链接并复制整个冻结的数据树,从而导致数据 +重复并耗尽备份存储空间。请务必将外部备份工具配置为排除 .snapraid/ 目录。 +

    在 ZFS 上,快照是通过标准虚拟目录 .zfs/snapshot/ 而不是 .snapraid/ +公开的。默认情况下(snapdir=hidden),ZFS 会在目录列表中隐藏此目录,因此 +外部备份工具不会遍历它。如果您启用了 snapdir=visible,请确保您的备份工具 +排除 .zfs/ 目录。 +

    +
    +
    +

    +模式 (Pattern)

    模式提供了一种灵活的方法来过滤要包含或排除的文件。通过使用通配符(globbing), 您可以定义匹配特定文件名或整个目录结构的规则,而无需手动列出每个路径。 @@ -1661,19 +1822,21 @@ Pattern

    单星号 * 匹配任何字符序列,但与问号一样,它绝不会跨越目录边界。 它在正斜杠处停止,因此适用于匹配单个路径组件内的内容。 这是 Shell 通配符中常见的标准行为。 -

    双星号 ** 功能更强大,它可以匹配任何字符序列,包括目录分隔符。 -这允许模式匹配跨越多个目录层级。当 ** 直接嵌入在模式中时, -它可以匹配零个或多个字符,包括周围文字文本之间的斜杠。 -

    ** 最重要的用法是特殊形式 /**/。它可以匹配零个或多个完整的目录层级, -从而可以在不知道确切路径结构的情况下,匹配目录树中任何深度的文件。 -例如,模式 src/**/main.js 匹配 src/main.js(跳过零个目录)、 -src/ui/main.js(跳过一个目录)以及 src/ui/components/main.js -(跳过两个目录)。 +

    双星号通配符 ** 仅在与目录分隔符相邻时(前面或后面有斜杠)才能跨越 +目录分隔符进行匹配。在此形式下,它可以跨越多个目录层级匹配零个或多个字符。 +例如,foo/**/bar 匹配 foo/bar、foo/a/bar 和 foo/a/b/bar; +**/build 匹配 build 和 foo/bar/build;src/**.js 匹配 src/main.js +和 src/ui/components/main.js。 +单独的形式 /**/ 不被接受为完整的模式。 +

    当 ** 不与斜杠相邻时,其行为类似于 *,不会匹配目录分隔符。例如, +**.jpg 匹配当前目录中的 photo.jpg,但不会匹配 dir/photo.jpg。 +如需匹配子目录中的文件,请使用 **/*.jpg。

    使用方括号 [] 的字符类匹配指定集合或范围内的单个字符。 与其他单字符模式一样,它们不匹配目录分隔符。字符类支持使用 感叹号进行范围指定和否定。

    需要记住的根本区别是,*、? 和字符类都遵循目录边界, -并且仅在单个路径组件内匹配,而 ** 是唯一可以跨越目录分隔符匹配的模式。 +并且仅在单个路径组件内匹配,而 ** 仅在与斜杠相邻时才能跨越 +目录分隔符进行匹配。

    有四种不同类型的模式:

    @@ -1758,6 +1921,21 @@ include /movies/ include /musics/ include /pictures/ +

    请注意,排除目录(使用 DIR/ 或 /PATH/DIR/)会阻止 SnapRAID 进入并扫描该目录。 +因此,无法使用 include 规则重新包含位于已排除父目录内的文件或子目录, +因为扫描器根本不会遍历到该目录中。 +

    例如,以下配置将不会包含 file.dat,因为 /keep/ 在看到 file.dat 之前已被修剪: +

    +# 无法按预期工作: /keep/ 会被完全跳过
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    若要排除目录中的文件但保留特定文件,请匹配目录内的文件模式,而不是排除目录本身: +

    +# 可以正常工作: 会遍历 /keep/,但其中的其他文件会被排除
    +include /keep/file.dat
    +exclude /keep/*
    +

    在命令行上,使用 -f 选项,您只能使用 include 模式。例如:

    @@ -1769,8 +1947,8 @@ snapraid -f "*.mp3" check
     引用它们以防止 shell 扩展它们。
     

    -

    -Ignore File +

    +忽略文件 (Ignore File)

    除了配置文件中的全局规则外,您还可以在阵列内的任何目录中放置 .snapraidignore 文件,以定义分散的排除规则。 @@ -1831,18 +2009,20 @@ build/

    -

    -Content +

    +内容 (Content)

    SnapRAID 将文件列表和校验和存储在 content 文件中。

    它是一个二进制文件,列出了磁盘阵列中存在的所有文件, 以及用于验证其完整性的所有校验和。 -

    此文件由 sync 和 scrub 命令读取和写入,并由 -fix、check 和 status 命令读取。 +

    content 文件由 sync、scrub、touch 和 rehash 命令读取和写入。 +它由 status、diff、check、fix、list、dup、locate 和 +pool 命令读取,并被 smart、probe、up、down 和 devices +命令完全忽略。

    -

    -Parity +

    +奇偶校验 (Parity)

    SnapRAID 将阵列的奇偶校验信息存储在 parity 文件中。

    这些是二进制文件,包含 content 文件中定义的所有 @@ -1851,8 +2031,8 @@ Parity 并且仅由 scrub 和 check 命令读取。

    -

    -Encoding +

    +编码 (Encoding)

    SnapRAID 在 Unix 中忽略任何编码。它读取并存储 文件系统使用的相同编码的文件名。 @@ -1863,6 +2043,234 @@ Encoding 作为控制台字体。这仅影响打印的文件名;如果 您将控制台输出重定向到文件,则生成的文件始终 采用 UTF-8 格式。 +

    +
    +

    +退出码 (Exit Code) +

    +

    SnapRAID 终止并返回以下错误代码: +

    +
    +
    +0 +
    +一切正常。 +
    +
    +
    +
    +1 +
    +命令遇到一些错误。 +
    +
    +
    +
    +2 +
    +diff 命令发现一切正常,但需要进行 sync。 +
    +
    +
    +
    +3 +
    +磁盘设备命令(probe、smart、devices、up、down)已完成, +但至少有一个文件系统因缺少设备而以降级(degraded)模式运行。 +
    +
    +
    +
    +
    +

    +已知问题 (Known Issues) +

    +
    +

    +文件系统边界 +

    +

    SnapRAID 在扫描数据磁盘时不会跨越文件系统、挂载点或子卷边界。 +当检测到此类边界时,SnapRAID 会报告警告(WARNING)并且不会扫描其范围之外的内容。 +

    位于此类边界之外的文件不包含在数据磁盘中,如果需要保护它们,则必须单独配置。 +

    +
    +

    +带有文件系统快照的挂载点 +

    +

    启用文件系统快照时,不支持数据磁盘内的嵌套挂载点和 bind 挂载。 +

    挂载点属于活动系统的挂载命名空间,不会保存在文件系统快照中。 +因此,在扫描快照时,活动文件系统中被挂载点隐藏的目录可能会变为可见。 +

    启用文件系统快照时,请勿在数据磁盘内放置嵌套挂载点或 bind 挂载。 +

    +
    +

    +带有文件系统快照的多套配置 +

    +

    使用相同文件系统快照命名空间的多套独立 SnapRAID 配置无法安全共享快照支持。 +

    在 Btrfs 和 Bcachefs 上,只有一套启用了快照支持的 SnapRAID 配置可以使用 +同一子卷内的数据目录。在 ZFS 上,相同的限制适用于数据集,在 NTFS 上适用于卷。 +

    共享相同快照命名空间的多套配置使用相同的 stable、pending 和 scan 快照。 +因此,运行其中一套配置可能会替换或删除另一套配置所需的恢复快照。 +

    +
    +

    +未更改时间戳的原地文件修改 +

    +

    SnapRAID 通过比较文件大小和修改时间戳(mtime)来检测文件修改。 +

    如果应用程序在不更改文件大小或不更新其修改时间戳的情况下原地修改文件, +则 “diff” 和 “sync” 将不会检测到文件已更改,并且其奇偶校验也不会更新。 +

    为确保 SnapRAID 识别此类更改,请更新文件的修改时间戳(例如使用 “touch” 实用程序)。 +否则,该差异仅在后续的 “scrub” 或 “check” 期间作为哈希不匹配被检测到。 +

    +
    +

    +Windows 非 ASCII 大小写匹配 +

    +

    SnapRAID 在所有平台上均使用标准且可预测的 UTF-8 编码,仅对 ASCII 字符进行 +不区分大小写的匹配。 +

    Windows 文件系统受到遗留设计的困扰,即通过任意的、依赖于系统的大小写折叠表在 +Unicode 文件名之间强制实行不区分大小写。因此,Windows 掩盖了文件系统的真实情况, +将完全不同的 Unicode 字节序列视为同一个文件。 +

    例如,À.txt 和 à.txt 是不同的 Unicode 名称,但 Windows 却不合逻辑地将它们 +视为相同文件,而 SnapRAID 则保留了它们的真实区别。 +

    该限制是由于 Windows 对 Unicode 文件名的不一致处理及其对不区分大小写别名的 +执着所致。为了防止因 Windows 的大小写折叠而产生差异,请在配置路径和过滤器中 +始终为非 ASCII 字符指定准确的大小写。 +

    +
    +

    +部分 fix 恢复 +

    +

    当使用 -S, --start 或 -B, --count 限制 fix 时, +SnapRAID 仅对选定的块进行操作,而不执行文件级别的最终化处理或隔离。 +

    如果恢复产生了无法证实代表当前内容的尽力而为(best-effort)数据, +此类块仍可能以常规文件名写入。与这些已恢复块相关的不确定性在命令终止后 +不会保留。 +

    因此,后续的 fix 会将这些可读取的块视为有效的文件数据,并且不会尝试 +再次恢复它们。这可能导致后续恢复报告成功,但在文件中留下不完整或过时的数据。 +

    -S 和 -B 选项仅适用于高级手动恢复,通常在常规 fix 失败后使用。 +如果部分 fix 报告了无法恢复的数据,请在尝试另一次恢复之前删除受影响的 +文件或对其重命名,或者手动验证其内容。 +

    +
    +

    +NTFS 硬链接与排除的路径 +

    +

    在 NTFS 上,目录条目会为每个硬链接单独缓存文件大小和时间戳。 +当通过其中一个链接修改文件时,指向同一文件的其他链接的目录条目 +可能会保留过时的元数据,直到它们被访问为止。 +

    如果在扫描过程中遇到同一文件的至少两个硬链接,SnapRAID 会自动 +检测并规范化这种情况。但是,如果仅扫描了一个硬链接,而其他硬链接 +被过滤器排除或位于数据磁盘路径之外,SnapRAID 将无法检测到 inode 冲突, +并会依赖单个可见链接的缓存元数据。 +

    因此,通过被排除或外部的硬链接所做的修改,在操作系统刷新所包含链接 +的元数据之前(例如通过该路径访问或打开文件时),可能会被 SnapRAID 忽略。 +

    为避免此限制,请避免通过已从 SnapRAID 中排除的硬链接来修改受保护 +的文件,或者确保文件的所有硬链接都包含在扫描中,以便 SnapRAID 可以 +对它们进行规范化。 +

    +
    +

    +中断的多重奇偶校验 sync 后的恢复 +

    +

    在具有多个奇偶校验磁盘的阵列中,中断的 sync 可能会使不同奇偶校验 +级别之间暂时彼此不同步。例如,奇偶校验 1 可能已经包含新更新的数据, +而奇偶校验 2 仍包含旧数据。 +

    在执行 check 或 fix 期间,SnapRAID 会尝试不同的奇偶校验组合, +并根据已知的块哈希(覆盖整个块,通常为 256 KiB)验证重建的数据。 +

    如果 SnapRAID 尝试使用新旧奇偶校验的不一致混合进行重建,线性 RAID +方程将产生不正确的数据。要错误地接受这种无效组合,这些方程必须在同一 +条带中的其他未同步块被重建为错误数据的情况下,巧合地完美重建出至少一个 +完整的 256 KiB 块以使其哈希完全匹配。 +

    这种情况并不依赖于哈希碰撞;相反,它需要混合奇偶校验方程本身碰巧 +生成原始的完整 256 KiB 块内容。虽然在特别构造的数据或高度重复的数据 +情况下在数学上是可能的,但在实际数据中这几乎是不可能的。 +

    如果所有磁盘都运行良好,在进行进一步更改之前完成中断的 sync 可以消除 +这种不确定性。如果磁盘发生故障且需要恢复,在运行 check 或 fix 之前 +请避免修改任何数据磁盘。 +

    +
    +

    +保留的文件和目录名称 +

    +

    SnapRAID 保留了一些文件、目录和快照名称用于其内部操作。请勿将这些名称 +用于用户数据: +

    +
    +
    +.snapraidignore +
    +本地排除规则文件。 +
    +
    +
    +
    +.snapraid +
    +快照容器目录。 +
    +
    +
    +
    +snapraid-* +
    +由 SnapRAID 管理的 ZFS 快照名称。 +
    +
    +
    +
    +*.unrecoverable +
    +在恢复过程中被隔离的受损文件。 +
    +
    +
    +
    +CONTENT.tmp +
    +用于 content 更新的临时文件。 +
    +
    +
    +
    +CONTENT.lock +
    +content 锁定文件。 +
    +
    +
    +
    +PARITY.spaceholder +
    +在 Windows 上分配奇偶校验期间使用的临时占位文件。 +
    +
    +
    +

    将这些名称用于无关数据可能会导致文件或快照被忽略、被误认为是元数据、 +被覆盖、重命名或删除。 +

    在 Windows 上,所有大小写变体也都被保留,即使在配置为区分大小写的 NTFS +目录中也是如此(例如 .SNAPRAIDIGNORE、.SnapRaid、CONTENT.TMP 和 +CONTENT.Lock)。 +

    +
    +
    +

    +翻译 (Translation) +

    +

    本文档是英文手册的自动翻译。 +请参阅英文手册以获取权威版本。 +

    +
    +

    +版权 (Copyright) +

    +

    此文件版权所有 (C) 2026 Andrea Mazzoleni +

    +
    +

    +参见 (See Also) +

    +

    snapraid_log(1), snapraidd(1), rsync(1)

    diff --git a/manual.html b/manual.html index 87dd19cd..2ee2c84a 100644 --- a/manual.html +++ b/manual.html @@ -194,17 +194,32 @@ Limitations

    SnapRAID is a hybrid between a RAID and a backup program, aiming to combine the best benefits of both. However, it has some limitations that you should consider before using it. -

    The main limitation is that if a disk fails and you haven't recently synced, -you may not be able to fully recover. -More specifically, you may be unable to recover up to the size of -the changed or deleted files since the last sync operation. -This occurs even if the changed or deleted files are not on the -failed disk. This is why SnapRAID is better suited for -data that rarely changes. -

    On the other hand, newly added files don't prevent recovery of already -existing files. You will only lose the recently added files if they -are on the failed disk. -

    Other SnapRAID limitations are: +

    The main limitation is that if a disk fails, you can only recover data up to +the state of the last sync operation. Any data added or modifications made +since the last sync that are located on the failed disk will be lost. +

    Consequently, SnapRAID is primarily suited for data that rarely changes. +

    For data that already existed at the last sync, recovery reliability depends +on whether the snapshot option is used: +

      +
    • +With snapshot support (available on Btrfs, ZFS, Bcachefs, and NTFS), +SnapRAID can automatically maintain an independent frozen reference +of each supported data filesystem. +This ensures that even if you modify or delete files on your live +filesystem during or after a sync, the recovery process remains +consistent and reliable. +
    • +
    +
      +
    • +Without snapshot support, deleting or changing files after a sync +can prevent the full recovery of other failed disks. This occurs +because the parity no longer matches the modified files, even if +those files are not on the failed disk. On the other hand, newly added +files don't prevent recovery of already    existing files. +
    • +
    +

    Other SnapRAID limitations are:

    • With SnapRAID, you still have separate file systems for each disk. @@ -350,7 +365,7 @@ Pooling

      Note: The pooling feature described below has been superseded by the mergerfs tool, which is now the recommended option for Linux users in -the SnapRAID community. Mergefs provides a more flexible and efficient +the SnapRAID community. Mergerfs provides a more flexible and efficient way to pool multiple drives into a single unified mount point, allowing seamless access to files across your array without relying on symbolic links. It integrates well with SnapRAID for parity @@ -545,13 +560,13 @@ Print the status of the array -> status Control the disks -> smart, probe, up, down

    • -Make a backup/snapshot -> sync +Make a backup/recovery point -> sync
    • Periodically check data -> scrub
    • -Restore the last backup/snapshot -> fix. +Restore the last backup/recovery point -> fix.

    Commands must be written in lowercase. @@ -705,9 +720,10 @@ were modified.

    moved
    -Files moved to a different directory on the same disk. -They are identified by having the same name, size, timestamp, -and inode, but a different directory. +Files moved or renamed on the same disk while retaining +the same inode. They are identified by having the same inode, +size, and timestamp, but a different path. The file name may +also be different.
    @@ -725,12 +741,12 @@ identified, not just the name.
    relocated
    -Files moved on the same or a different disk where -the original has disappeared. They are identified by -having the same name, size, and timestamp. If the -sub-second timestamp is zero, the full path must match -to be identified. Unlike 'moved' files on the same disk, -relocated files have a different inode. +Files moved to a different directory or disk where the +original file has disappeared and the inode is not retained. +They are identified by having the same name, size, and timestamp. +If the sub-second timestamp is zero, the full path must match to +be identified. Unlike 'moved' files, relocated files require the +file name to remain the same.
    @@ -813,9 +829,9 @@ The files in the array are NOT modified. fix

    Fixes all the files and the parity data. -

    All files and parity data are compared with the snapshot -state saved in the last sync. -If a difference is found, it is reverted to the stored snapshot. +

    All files and parity data are compared with the state saved in +the last sync. +If a difference is found, it is reverted to the stored state.

    WARNING! The fix command does not differentiate between errors and intentional modifications. It unconditionally reverts the file state to the last sync. @@ -1362,7 +1378,8 @@ However, check and fix always stop at the first error. Starts processing from the specified block number. This can be useful for retrying to check or fix specific blocks in case of a damaged disk. -This option is mainly for advanced manual recovery. +This option is mainly for advanced manual recovery and +is supported only by check and fix.

    @@ -1372,7 +1389,8 @@ This option is mainly for advanced manual recovery. -B, --count BLKCOUNT
    Processes only the specified number of blocks. -This option is mainly for advanced manual recovery. +This option is mainly for advanced manual recovery and +is supported only by check and fix.
    @@ -1537,6 +1555,10 @@ be unique. DIR is the mount point of the disk in the file system.

    You can change the mount point as needed, as long as you keep the NAME fixed. +

    However, the configured path must consistently resolve to the +same underlying data. If the path contains symbolic links, +their targets must remain stable. Retargeting such symlinks +to switch the data directory on the fly is unsupported.

    You should use one option for each data disk in the array.

    You can rename a disk later by changing the NAME directly in the configuration file and then running a sync command. @@ -1557,6 +1579,30 @@ because they are expected to be always spinning.

    +snapshot +

    +

    Enable the use of filesystem snapshots for the sync, scrub, +check, and fix commands. +

    When enabled, SnapRAID creates a read-only snapshot of each supported +data filesystem at the start of a 'sync'. This provides a stable view of +each filesystem, preventing later modifications from changing the data +used for parity computation. +

    This significantly improves recovery: if a file is deleted from the live +filesystem, it remains preserved in the snapshot. This prevents the parity +from becoming "broken" for that block, ensuring you can still successfully +recover data if another disk fails. +

    This option applies exclusively to data disks formatted with the +Btrfs, Bcachefs or ZFS filesystems in Linux and NTFS in Windows. +Parity disks, or data disks using other filesystems, will always use +the live version of the filesystem. +

    Snapshot creation and deletion require administrative privileges. +Ensure SnapRAID is run with the necessary permissions (e.g., sudo) when +this option is enabled. +

    See the SNAPSHOTS section for a detailed explanation of the snapshot +lifecycle. +

    +
    +

    nohidden

    Excludes all hidden files and directories. @@ -1564,7 +1610,7 @@ In Unix, hidden files are those starting with .. In Windows, they are those with the hidden attribute.

    -

    +

    exclude/include PATTERN

    Defines the file or directory patterns to exclude or include @@ -1575,12 +1621,16 @@ is excluded. If it is an include one, the file is included. If no pattern matches, the file is excluded if the last pattern specified is an include, or included if the last pattern specified is an exclude. +

    Note that filtering occurs hierarchically during directory traversal. +If a directory matches an exclude rule, the entire directory is +skipped (pruned), and any include rules for files or subdirectories +inside it will not be evaluated.

    See the PATTERN section for more details on pattern specifications.

    This option can be used multiple times.

    -

    +

    blocksize SIZE_IN_KIBIBYTES

    Defines the basic block size in kibibytes for the parity. @@ -1621,7 +1671,7 @@ a 4 TB disk, which allows about 460,000 files on each data disk without any wasted space.

    -

    +

    hashsize SIZE_IN_BYTES

    Defines the hash size in bytes for the saved blocks. @@ -1656,7 +1706,7 @@ RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB

    -

    +

    autosave SIZE_IN_GIGABYTES

    Automatically saves the state when syncing or scrubbing after the @@ -1665,7 +1715,7 @@ This option is useful to avoid restarting long sync commands from scratch if interrupted by a machine crash or any other event.

    -

    +

    temp_limit TEMPERATURE_CELSIUS

    Sets the maximum allowed disk temperature in Celsius. When specified, @@ -1694,7 +1744,7 @@ temperature measured at the start of the run as a fallback reference. To display the temperature of all disks, use the -A or --stats option.

    -

    +

    temp_sleep TIME_IN_MINUTES

    Sets the standby time, in minutes, when the temperature limit is @@ -1702,7 +1752,7 @@ reached. During this period, the disks remain spun down. The default is 5 minutes.

    -

    +

    pool DIR

    Defines the pooling directory where the virtual view of the disk @@ -1710,7 +1760,7 @@ array is created using the pool command.

    The directory must already exist.

    -

    +

    share UNC_DIR

    Defines the Windows UNC path required to access the disks remotely. @@ -1724,7 +1774,7 @@ file directory and name.

    This option is required only for Windows.

    -

    +

    smartctl DISK/PARITY OPTIONS...

    Defines custom smartctl options to obtain the SMART attributes for @@ -1737,6 +1787,8 @@ PARITY is one of the parity names: parity, 2-parity, 3-parity

    In the specified OPTIONS, the %s string is replaced by the device name. For RAID controllers, the device is likely fixed, and you may not need to use %s. +

    You can also specify a custom info options string using the +[info: ...] tag to override the default -a option.

    Refer to the smartmontools documentation for possible options:

     https://www.smartmontools.org/wiki/Supported_RAID-Controllers
    @@ -1744,11 +1796,12 @@ likely fixed, and you may not need to use %s.
     

    For example:

    +smartctl d1 [info: -H -i -c -A] -d sat %s
     smartctl parity -d sat %s
     
    -

    +

    smartignore DISK/PARITY ATTR [ATTR...]

    Ignores the specified SMART attribute when computing the probability @@ -1758,18 +1811,23 @@ misleading values for a particular attribute. PARITY is one of the parity names: parity, 2-parity, 3-parity, 4-parity, 5-parity, 6-parity, or z-parity. The special value * can be used to ignore the attribute on all disks. -

    For example, to ignore the Current Pending Sector Count attribute on -all disks: +

    Multiple attributes can be specified separated by spaces. +Each attribute can be specified as a number from 1 to 255, or as a +case-insensitive name (e.g. Current_Pending_Sector). +

    For example, to ignore the Current Pending Sector Count and +Reallocated Sectors Count attributes on all disks by their number +or name:

    -smartignore * 197
    +smartignore * 197 5
    +smartignore * Current_Pending_Sector Reallocated_Sector_Ct
     
    -

    To ignore it only on the first parity disk: +

    To ignore them only on the first parity disk:

    -smartignore parity 197
    +smartignore parity 197 5
     
    -

    +

    Examples

    An example of a typical configuration for Unix is: @@ -1782,7 +1840,7 @@ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 @@ -1798,7 +1856,7 @@ data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information -smartctl d1 -d sat %s +smartctl d1 [info: -H -i -c -A] -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 @@ -1807,6 +1865,162 @@ smartctl 2-parity -d areca,2/1 /dev/arcmsr0

    +Snapshots +

    +

    If the snapshot option is enabled in the configuration, SnapRAID +uses filesystem snapshots to keep the data read during an operation +stable, even when files on the live filesystems are subsequently +modified or deleted. +

    The management of snapshots is completely automatic and transparent. +You can continue to use SnapRAID exactly as before, with the +additional protection provided by snapshots handled entirely in +the background. +

    This provides two primary benefits: +

    +
    +
    +Consistency +
    +Files modified on the live filesystem during a long-running +sync or scrub will not cause parity mismatches or aborted +operations, because each snapshotted filesystem remains unchanged +for the duration of the operation. +
    +
    +
    +
    +Recovery +
    +If a file is updated or deleted from the live filesystem, +it remains preserved in the snapshot. If a disk failure occurs +before the next sync is run, SnapRAID uses the data preserved +in the snapshot to reconstruct the failed disk. +In case of a disk failure during an active sync process, +SnapRAID is also able to read automatically from both the +snapshot of the previous parity computation and the current one. +This maximizes the probability of a full recovery by +providing access to the exact data blocks required to solve +the parity equations, even if those blocks were modified +or deleted between syncs. +Without snapshots, an updated or deleted file on a healthy +disk results in missing data blocks that may be required to +fix other failed disks. +
    +
    +
    +

    Snapshots are created only for data disks and only if the underlying +filesystem supports this functionality. Parity disks always use +the live filesystem. +

    At present, this is supported on Btrfs, Bcachefs, and ZFS in Linux +and on NTFS in Windows. +

    You can mix data disks with different filesystems. Only those that +support snapshots will utilize them, while other disks will continue +to operate directly on the live filesystem. +

    Snapshot creation and deletion require administrative privileges. +Ensure SnapRAID is run with the necessary permissions (e.g., sudo) +when snapshots are enabled. +

    +

    +Command Behavior with Snapshots +

    +

    The sync and scrub commands use snapshots for data disks whose +filesystems support them. On a snapshotted disk, the command sees +a stable filesystem image unaffected by concurrent changes to the +live filesystem. +During a sync, a new snapshot is created independently for each +supported data filesystem. These snapshots collectively provide the +data used for parity computation. +In contrast, the scrub command utilizes the last snapshot, the one +created during the most recent sync, to maintain a reliable reference +point that matches the existing parity. +

    For the check and fix commands, the use of the last snapshot +depends on whether specific disks are targeted using the +-d, --filter-disk option. +

    A disk explicitly selected via -d (the "target" of the operation) +always uses the live filesystem. For fix, this allows restoring +data to the active disk replacement. For check, it allows simulating +the fix operation under the same conditions. +

    All other data disks (the "reference" disks) will be accessed via +their snapshots. This ensures that even if you are modifying files +on your healthy disks while a recovery is in progress, SnapRAID +has a stable, frozen reference to solve the parity equations. +

    If no -d option is provided, SnapRAID assumes the operation applies +to the entire array, in this case, check and fix will use the +live filesystems exclusively. +

    All other commands operate exclusively on the live filesystem. +

    +
    +
    +

    +Snapshots Lifecycle +

    +

    SnapRAID manages three specific snapshots, stable, pending, and scan, +within a hidden directory at the root of each data subvolume. +In Btrfs, Bcachefs, and NTFS it's used the .snapraid/ directory, +in ZFS the standard .zfs/snapshot/. +

    The stable snapshot represents the state of the last +successfully completed sync, containing the exact data used to +compute the current parity. It serves as the primary data source +for scrub, check, and fix commands. +

    The scan snapshot is a temporary image created at the start +of a sync to provide a frozen state for scanning and parity computation. +After scanning and saving the new content state, it replaces the previous +pending snapshot. +

    The pending snapshot is the image used by an interrupted sync. +Upon successful completion of the operation, the previous stable +snapshot is deleted, and the pending snapshot is promoted to +take its place as the new stable reference. +

    If a sync is interrupted, the pending snapshot is preserved. +Subsequent scrub, check, and fix commands will use this +pending snapshot as it matches the filesystem state recorded in +the .content file, even if the parity is only partially synchronized. +

    In the event of a sync interruption, check and fix commands +also read from the stable snapshot to retrieve data blocks +from files that were updated or deleted during the sync. +This is possible because the .content file retains metadata for +all modified or deleted files throughout the sync process. +This historical information is only cleared once a sync finishes +successfully and the final version of the .content file is saved. +

    If a sync is restarted after an interruption, the existing +pending snapshot is deleted and a new one is created to +capture the current state of the live filesystem. +However, if a sync is interrupted, avoid modifying, deleting, +replacing, or moving files until a subsequent sync completes +successfully. Parity may still contain blocks computed from the +snapshot used by the interrupted sync. A later sync may replace +that snapshot, making intermediate file versions unavailable for +recovery. +

    +

    +External backups with filesystem snapshots +

    +

    When filesystem snapshots are enabled, SnapRAID accesses or creates +snapshots at the root of each data subvolume, volume, or dataset. +

    A simple way to avoid any interference with external tools is to point +your data configuration to a regular subdirectory within the subvolume +or volume (for example, /mnt/subvol/data instead of /mnt/subvol). +SnapRAID always creates the snapshot directory at the subvolume root +(for example, /mnt/subvol/.snapraid/), leaving the data subdirectory +clean so that snapshots remain outside and invisible to backup tools +operating inside it. +

    Otherwise, if your configured data directory is itself the subvolume +or volume root, SnapRAID creates the .snapraid/ directory directly +inside it (on Btrfs, Bcachefs, and NTFS). While SnapRAID automatically +excludes this directory from its own scanning, external backup tools +or file synchronizers will encounter it. If not excluded, they may +traverse into the snapshots or directory links and copy the entire +frozen data tree, duplicating data and potentially exhausting backup +storage. Always configure external backup tools to exclude the +.snapraid/ directory. +

    On ZFS, snapshots are exposed through the standard .zfs/snapshot/ +virtual directory rather than .snapraid/. By default (snapdir=hidden), +ZFS hides this directory from directory listings, so external backup +tools will not traverse it. If you have enabled snapdir=visible, +ensure your backup tools exclude the .zfs/ directory. +

    +
    +
    +

    Pattern

    Patterns are used to select a subset of files to exclude or include in @@ -1820,25 +2034,25 @@ question mark, it never crosses directory boundaries. It stops at the forward slash, making it suitable for matching within a single path component. This is the standard wildcard behavior familiar from shell globbing. -

    The double star ** is more powerful, it matches any sequence of -characters including directory separators. This allows patterns to match -across multiple directory levels. When ** appears embedded directly in -a pattern, it can match zero or more characters including slashes between -the surrounding literal text. -

    The most important use of ** is in the special form /**/. This matches -zero or more complete directory levels, making it possible to match files -at any depth in a directory tree without knowing the exact path structure. -For example, the pattern src/**/main.js matches src/main.js (skipping -zero directories), src/ui/main.js (skipping one directory), and -src/ui/components/main.js (skipping two directories). +

    The double star ** wildcard matches across directory separators only +when it is adjacent to a directory separator (preceded or followed by a +slash). In this form, it matches zero or more characters across directory +levels. For example, foo/**/bar matches foo/bar, foo/a/bar, and +foo/a/b/bar; **/build matches build and foo/bar/build; and +src/**.js matches src/main.js and src/ui/components/main.js. +The standalone form /**/ is not accepted as a complete pattern. +

    When ** is not adjacent to a slash, it behaves like * and does not +match directory separators. For example, **.jpg matches photo.jpg +within the current directory, but does not match dir/photo.jpg. Use +**/*.jpg for that purpose.

    Character classes using square brackets match a single character from a specified set or range. Like the other single character patterns, they do not match directory separators. Classes support ranges and negation using an exclamation mark.

    The fundamental distinction to remember is that *, ?, and character -classes all respect directory boundaries and only match within a single path -component, while ** is the only pattern that can match across directory -separators. +classes all respect directory boundaries and only match within a single path +component, while ** can match across directory separators only when +adjacent to a slash.

    There are four different types of patterns:

    @@ -1886,9 +2100,9 @@ the array root directory, not the local file system root directory. Windows system directories, junctions, mount points, and other Windows special directories are treated as files, meaning that to exclude them, you must use a file rule, not a directory one. -

    If the file name contains a *, ?, [, -or ] character, you must escape it to avoid having it interpreted as a -globbing character. In Unix, the escape character is \; in Windows, it is ^. +

    If the file name contains a *, ?, [, or ] character, you must +escape it to avoid having it interpreted as a globbing character. +In Unix, the escape character is \; in Windows, it is ^. When the pattern is on the command line, you must double the escape character to avoid having it interpreted by the command shell.

    In the configuration file, you can use different strategies to filter @@ -1926,6 +2140,24 @@ include /movies/ include /musics/ include /pictures/ +

    Note that excluding a directory (using DIR/ or /PATH/DIR/) prevents +SnapRAID from entering and scanning that directory. Consequently, it is +not possible to re-include a file or subdirectory located inside an +excluded parent directory, because the scanner never traverses into it. +

    For example, the following configuration will NOT include file.dat +because /keep/ is pruned before file.dat can be seen: +

    +# Does NOT work: /keep/ is skipped entirely
    +include /keep/file.dat
    +exclude /keep/
    +
    +

    To exclude files inside a directory while keeping specific ones, match +the files within the directory rather than excluding the directory itself: +

    +# Works: /keep/ is traversed, but other files inside are excluded
    +include /keep/file.dat
    +exclude /keep/*
    +

    On the command line, using the -f option, you can only use include patterns. For example:

    @@ -1937,7 +2169,7 @@ snapraid -f "*.mp3" check
     quote them to prevent the shell from expanding them.
     

    -

    +

    Ignore File

    In addition to the global rules in the configuration file, you can @@ -2003,17 +2235,19 @@ build/

    -

    +

    Content

    SnapRAID stores the list and checksums of your files in the content file.

    It is a binary file that lists all the files present in your disk array, along with all the checksums to verify their integrity. -

    This file is read and written by the sync and scrub commands and -read by the fix, check, and status commands. +

    The content file is read and written by the sync, scrub, touch, and +rehash commands. It is read by the status, diff, check, fix, +list, dup, locate, and pool commands, and it is completely +ignored by the smart, probe, up, down, and devices commands.

    -

    +

    Parity

    SnapRAID stores the parity information of your array in the parity @@ -2024,7 +2258,7 @@ blocks defined in the content file. only read by the scrub and check commands.

    -

    +

    Encoding

    SnapRAID in Unix ignores any encoding. It reads and stores the @@ -2038,6 +2272,252 @@ This affects only the printed file names; if you redirect the console output to a file, the resulting file is always in UTF-8 format.

    +
    +

    +Exit Code +

    +

    SnapRAID terminates with the following error codes: +

    +
    +
    +0 +
    +Everything OK. +
    +
    +
    +
    +1 +
    +The command encountered some errors. +
    +
    +
    +
    +2 +
    +The diff command found everything is OK, but a sync is +needed. +
    +
    +
    +
    +3 +
    +A disk device command (probe, smart, devices, up, +down) completed, but at least one filesystem is running in +degraded mode with missing device(s). +
    +
    +
    +
    +
    +

    +Known Issues +

    +
    +

    +Filesystem boundaries +

    +

    SnapRAID does not cross filesystem, mount, or subvolume boundaries while +scanning a data disk. When such a boundary is detected, SnapRAID reports +a WARNING and does not scan beyond it. +

    Files located beyond such boundaries are not included in the data disk and +must be configured separately if they have to be protected. +

    +
    +

    +Mount points with filesystem snapshots +

    +

    When filesystem snapshots are enabled, nested mount points and bind mounts +inside a data disk are not supported. +

    Mount points are part of the live system mount namespace and are not +preserved in filesystem snapshots. Consequently, when scanning a snapshot, +a directory hidden by a mount point in the live filesystem may become +visible. +

    Do not place nested mount points or bind mounts inside data disks when +filesystem snapshots are enabled. +

    +
    +

    +Multiple configurations with filesystem snapshots +

    +

    Snapshot support cannot be safely shared by multiple independent +SnapRAID configurations using the same filesystem snapshot namespace. +

    On Btrfs and Bcachefs, only one SnapRAID configuration with snapshot +support enabled may use data directories within the same subvolume. +On ZFS, the same restriction applies to a dataset, and on NTFS to a volume. +

    Multiple configurations sharing the same snapshot namespace use the same +stable, pending, and scan snapshots. Running one configuration may +therefore replace or delete recovery snapshots required by another. +

    +
    +

    +In-place file modifications without timestamp changes +

    +

    SnapRAID detects file modifications by comparing file sizes and +modification timestamps (mtime). +

    If an application modifies a file in-place without altering its size +or updating its modification timestamp, "diff" and "sync" will not +detect that the file has changed, and its parity will not be updated. +

    To ensure SnapRAID recognizes such changes, update the file's +modification timestamp (for example, with the "touch" utility). +Otherwise, the difference will only be detected as a hash mismatch +during a subsequent "scrub" or "check". +

    +
    +

    +Windows non-ASCII case matching +

    +

    SnapRAID uses standard, predictable UTF-8 encoding across all platforms, +limiting case-insensitive matching to ASCII characters. +

    Windows filesystems suffer from the legacy design of enforcing case +insensitivity across Unicode filenames via arbitrary, system-dependent +folding tables. Consequently, Windows obscures the reality of the +filesystem by treating completely different Unicode byte sequences as if +they were the same file. +

    For example, À.txt and à.txt are distinct Unicode names, yet Windows +illogically treats them as identical, while SnapRAID preserves their true +distinction. +

    This limitation is caused by Windows's inconsistent handling of Unicode +filenames and its insistence on case-insensitive aliasing. To prevent +discrepancies arising from Windows's case folding, always specify the +exact case for any non-ASCII characters in configuration paths and filters. +

    +
    +

    +Partial fix recovery +

    +

    When fix is restricted using -S, --start or -B, --count, +SnapRAID operates only on the selected blocks and does not perform +file-level finalization or quarantine. +

    If recovery produces best-effort data that cannot be proven to represent +the current contents, such blocks may still be written under the normal +filename. The uncertainty associated with these recovered blocks is not +persisted after the command terminates. +

    As a consequence, a later fix will treat these readable blocks as valid +file data and will not attempt to recover them again. This can cause a +subsequent recovery to report success while leaving incomplete or stale +data in the file. +

    The -S and -B options are intended only for advanced manual recovery, +typically after a normal fix has failed. If a partial fix reports +unrecoverable data, remove or rename the affected files before attempting +another recovery, or verify their contents manually. +

    +
    +

    +NTFS hard links and excluded paths +

    +

    On NTFS, directory entries cache file size and timestamps independently +for each hard link. When a file is modified through one link, the directory +entries of other links pointing to the same file may retain stale metadata +until they are accessed. +

    SnapRAID automatically detects and normalizes this condition whenever at +least two hard links to the same file are encountered during a scan. +However, if only one hard link is scanned while the others are excluded by +filters or reside outside the data disk path, SnapRAID cannot detect the +inode collision and relies on the cached metadata of the single visible +link. +

    Consequently, modifications made through an excluded or external hard link +may go unnoticed by SnapRAID until the metadata of the included link is +refreshed by the operating system (such as when the file is accessed or +opened through that path). +

    To avoid this limitation, avoid modifying protected files through hard +links that are excluded from SnapRAID, or ensure that all hard links to a +file are included in the scan so SnapRAID can normalize them. +

    +
    +

    +Recovery after an interrupted multi-parity sync +

    +

    In an array with multiple parity disks, an interrupted sync can leave +parity levels temporarily out of sync with each other. For example, +parity 1 might already contain newly updated data, while parity 2 still +contains the old data. +

    During check or fix, SnapRAID tries different parity combinations +and validates reconstructed data against the known block hashes (covering +the full block, typically 256 KiB). +

    If SnapRAID attempts a reconstruction using an inconsistent mix of old +and new parity, the linear RAID equations will produce incorrect data. +For this invalid combination to be falsely accepted, the equations would +have to accidentally reconstruct at least one complete 256 KiB block so +perfectly that its hash matches, while other unsynchronized blocks in the +same stripe are reconstructed with incorrect data. +

    This scenario does not depend on a hash collision; rather, the mixed +parity equations themselves would have to coincidentally yield the exact +original 256 KiB block contents. While mathematically possible with +specially crafted or highly repetitive data, it is practically impossible +with real-world data. +

    If all disks are healthy, completing the interrupted sync before making +further changes removes this ambiguity. If a disk has failed and recovery +is required, avoid modifying any data disks before running check or +fix. +

    +
    +

    +Reserved file and directory names +

    +

    SnapRAID reserves some file, directory, and snapshot names for its internal +operation. Do not use these names for user data: +

    +
    +
    +.snapraidignore +
    +Local exclusion-rules file. +
    +
    +
    +
    +.snapraid +
    +Snapshot container directory. +
    +
    +
    +
    +snapraid-* +
    +SnapRAID-managed ZFS snapshot names. +
    +
    +
    +
    +*.unrecoverable +
    +Damaged files quarantined during recovery. +
    +
    +
    +
    +CONTENT.tmp +
    +Temporary file for content updates. +
    +
    +
    +
    +CONTENT.lock +
    +Content lock file. +
    +
    +
    +
    +PARITY.spaceholder +
    +Temporary space-holder file during Windows parity +allocation. +
    +
    +
    +

    Using these names for unrelated data may cause files or snapshots to be +ignored, misinterpreted as metadata, overwritten, renamed, or deleted. +

    On Windows, all case variants are reserved as well, even in NTFS directories +configured for case-sensitive operation (for example, .SNAPRAIDIGNORE, +.SnapRaid, CONTENT.TMP, and CONTENT.Lock). +

    +