mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-29 03:16:59 -05:00
Defer pending snapshot promotion until parity sync
This commit is contained in:
parent
950d4a0b10
commit
fbd9b9ea49
48 changed files with 1076 additions and 682 deletions
|
|
@ -133,7 +133,8 @@ on whether the \`snapshot\` option is used:
|
|||
.PD 0
|
||||
.IP \(bu
|
||||
With snapshot support (available on Btrfs, ZFS, Bcachefs, and NTFS),
|
||||
SnapRAID can automatically maintain a frozen reference of your data disks.
|
||||
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.
|
||||
|
|
@ -1443,9 +1444,10 @@ because they are expected to be always spinning.
|
|||
Enable the use of filesystem snapshots for the \`sync\`, \`scrub\`,
|
||||
\`check\`, and \`fix\` commands.
|
||||
.PP
|
||||
When enabled, SnapRAID creates a read\-only snapshot of your data at the
|
||||
start of a \'sync\'. This ensures a consistent, point\-in\-time view of your
|
||||
files, preventing errors caused by concurrent file modifications.
|
||||
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.
|
||||
.PP
|
||||
This significantly improves recovery: if a file is deleted from the live
|
||||
filesystem, it remains preserved in the snapshot. This prevents the parity
|
||||
|
|
@ -1814,8 +1816,9 @@ smartctl 2\-parity \-d areca,2/1 /dev/arcmsr0
|
|||
.RE
|
||||
.SH SNAPSHOTS
|
||||
If the snapshot option is enabled in the configuration, SnapRAID
|
||||
utilizes filesystem snapshot functionality to ensure atomic and
|
||||
consistent operations.
|
||||
uses filesystem snapshots to keep the data read during an operation
|
||||
stable, even when files on the live filesystems are subsequently
|
||||
modified or deleted.
|
||||
.PP
|
||||
The management of snapshots is completely automatic and transparent.
|
||||
You can continue to use SnapRAID exactly as before, with the
|
||||
|
|
@ -1829,7 +1832,8 @@ This provides two primary benefits:
|
|||
.I Consistency
|
||||
Files modified on the live filesystem during a long\-running
|
||||
sync or scrub will not cause parity mismatches or aborted
|
||||
operations, as SnapRAID sees a frozen point\-in\-time image.
|
||||
operations, because each snapshotted filesystem remains unchanged
|
||||
for the duration of the operation.
|
||||
.HP 4
|
||||
.I Recovery
|
||||
If a file is updated or deleted from the live filesystem,
|
||||
|
|
@ -1872,13 +1876,13 @@ Snapshot creation and deletion require administrative privileges.
|
|||
Ensure SnapRAID is run with the necessary permissions (e.g., sudo)
|
||||
when snapshots are enabled.
|
||||
.SS Command Behavior with Snapshots
|
||||
The \`sync\` and \`scrub\` commands both operate exclusively on snapshots
|
||||
to ensure that all data operations are performed against a consistent,
|
||||
frozen state. By utilizing these snapshots, SnapRAID prevents parity
|
||||
mismatches that would otherwise be triggered by concurrent file
|
||||
modifications on the live filesystem.
|
||||
During a \`sync\`, the command uses a new snapshot created at the
|
||||
start of the process to capture the current state for parity computation.
|
||||
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.
|
||||
|
|
@ -1903,7 +1907,7 @@ live filesystems exclusively.
|
|||
.PP
|
||||
All other commands operate exclusively on the live filesystem.
|
||||
.SH SNAPSHOTS LIFECYCLE
|
||||
SnapRAID manages two specific snapshots, \`stable\` and \`pending\`,
|
||||
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/\`.
|
||||
|
|
@ -1913,8 +1917,12 @@ 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.
|
||||
.PP
|
||||
The \`pending\` snapshot is a temporary image created at the start
|
||||
of a \`sync\` to provide a frozen state for parity computation.
|
||||
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.
|
||||
.PP
|
||||
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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue