mirror of
https://github.com/amadvance/snapraid.git
synced 2026-11-21 23:46:27 -05:00
Improves documentation.
This commit is contained in:
parent
9d00435b42
commit
ca52ecc4c5
5 changed files with 363 additions and 345 deletions
308
snapraid.1
308
snapraid.1
|
|
@ -48,7 +48,7 @@ snapraid [\(hyV, \(hy\(hyversion] [\(hyh, \(hy\(hyhelp]
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
SnapRAID is a backup program for a disk array.
|
SnapRAID is a backup program for disk arrays.
|
||||||
.PP
|
.PP
|
||||||
SnapRAID stores redundancy information in the disk array,
|
SnapRAID stores redundancy information in the disk array,
|
||||||
and it allows recovering from up to two disk failures.
|
and it allows recovering from up to two disk failures.
|
||||||
|
|
@ -129,8 +129,8 @@ To use SnapRAID you need to first select one disk of your disk array
|
||||||
to dedicate at the \(a"parity\(a" information. With one disk for parity you
|
to dedicate at the \(a"parity\(a" information. With one disk for parity you
|
||||||
will be able to recover from a single disk failure, like RAID5.
|
will be able to recover from a single disk failure, like RAID5.
|
||||||
.PP
|
.PP
|
||||||
If you want to recover from two disk failures, like RAID6, you must
|
If you want to be able to recover from two disk failures, like RAID6,
|
||||||
reserve another disk for the \(a"q\(hyparity\(a" information.
|
you must reserve another disk for the \(a"q\(hyparity\(a" information.
|
||||||
.PP
|
.PP
|
||||||
As parity disks, you have to pick the biggest disks in the array,
|
As parity disks, you have to pick the biggest disks in the array,
|
||||||
as the redundancy information may grow in size as the biggest data
|
as the redundancy information may grow in size as the biggest data
|
||||||
|
|
@ -258,6 +258,106 @@ When this command completes, your data is SAFE.
|
||||||
.PP
|
.PP
|
||||||
At this point you can start using your array as you like, and periodically
|
At this point you can start using your array as you like, and periodically
|
||||||
update the redundancy information running the \(a"sync\(a" command.
|
update the redundancy information running the \(a"sync\(a" command.
|
||||||
|
.SS Checking & Fixing
|
||||||
|
To check the integrity of your data you can use the \(a"check\(a" command:
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid check
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
If will read all your data, to check if it\(cqs correct.
|
||||||
|
.PP
|
||||||
|
If an error is found, you can use the \(a"fix\(a" command to fix it.
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid fix
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
Note that the fix command will revert your data at the state of the
|
||||||
|
last \(a"sync\(a" command executed. It works like a snapshot was taken
|
||||||
|
in \(a"sync\(a".
|
||||||
|
.PP
|
||||||
|
In this regard SnapRAID is more like a backup program than a RAID
|
||||||
|
system. For example, you can use it to restore a file or directory to
|
||||||
|
its previous state using the \(hyf, \(hy\(hyfilter option :
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid fix \(hyf FILE
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
or for a directory:
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid fix \(hyf DIR/
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
You can also use it to recover only accidentally deleted files inside
|
||||||
|
a directory using the \(hym, \(hy\(hyfilter\(hymissing option, like:
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid fix \(hym \(hyf DIR/
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
Or to recover all the deleted files with:
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid fix \(hym
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.SS Scrubbing
|
||||||
|
To periodically check the old data for errors, you can run the \(a"scrub\(a"
|
||||||
|
command.
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid scrub
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
As difference than \(a"check\(a" this command verifies only the oldest data
|
||||||
|
in your array. Every run of the command checks about 12% of the data,
|
||||||
|
but nothing newer than 10 days.
|
||||||
|
.PP
|
||||||
|
If a silent error is found, the corresponding blocks are marked as bad
|
||||||
|
in the \(a"concent\(a" file, and listed in the \(a"status\(a" command.
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid status
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
To fix them, you can use the \(a"fix\(a" command filtering for files
|
||||||
|
containing bad blocks:
|
||||||
|
.PP
|
||||||
|
.RS 4
|
||||||
|
snapraid \(hye fix
|
||||||
|
.PD 0
|
||||||
|
.PP
|
||||||
|
.PD
|
||||||
|
.RE
|
||||||
|
.PP
|
||||||
|
and at the next \(a"scrub\(a" the errors will disappear from the \(a"status\(a"
|
||||||
|
report.
|
||||||
.SS Pooling
|
.SS Pooling
|
||||||
To have all the files in your array shown in the same directory tree,
|
To have all the files in your array shown in the same directory tree,
|
||||||
you can enable \(a"pooling\(a", that consists in creating a virtual view of all
|
you can enable \(a"pooling\(a", that consists in creating a virtual view of all
|
||||||
|
|
@ -288,105 +388,16 @@ snapraid pool
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
.RE
|
.RE
|
||||||
.SS Checking & Fixing
|
|
||||||
To check the integrity of your data you can use the \(a"check\(a" command:
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid check
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
If will read all your data, to check if it\(cqs correct.
|
|
||||||
.PP
|
|
||||||
If an error is found, you can use the \(a"fix\(a" command to fix it.
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid fix
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Note that the fix command will revert your data at the state of the
|
|
||||||
last \(a"sync\(a" command executed. It works like a snapshot was taken
|
|
||||||
in \(a"sync\(a".
|
|
||||||
.PP
|
|
||||||
In this regard SnapRAID is more like a backup program than a RAID
|
|
||||||
system. For example, you can use it to recover from an accidentally
|
|
||||||
deleted directory, simply running the fix command using the
|
|
||||||
\(hym, \(hy\(hyfilter\(hymissing filter, like:
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid fix \(hym \(hyf DIR/
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Or to simply recover one file you can use:
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid fix \(hym \(hyf FILE
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
Or to recover all the delete files with:
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid fix \(hym
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.SS Scrubbing
|
|
||||||
To progressively check the old synched data, it\(cqs recommended to always
|
|
||||||
run a \(a"scrub\(a" command after a \(a"sync\(a".
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid scrub
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
This command checks the oldest data in your array to ensure that no silent
|
|
||||||
error is present. Every run of the command checks about 12% of the data,
|
|
||||||
but nothing newer than 10 days.
|
|
||||||
.PP
|
|
||||||
If an error is found, the corresponding blocks are marked as bad, and listed
|
|
||||||
in the \(a"status\(a" command.
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid status
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
To fix them, you can use the \(a"fix\(a" command filtering for bad blocks:
|
|
||||||
.PP
|
|
||||||
.RS 4
|
|
||||||
snapraid \(hye fix
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
.RE
|
|
||||||
.PP
|
|
||||||
and at the next \(a"scrub\(a" the errors will disappears from the status.
|
|
||||||
.SH COMMANDS
|
.SH COMMANDS
|
||||||
SnapRAID provides four simple commands that allow to:
|
SnapRAID provides some simple commands that allow to:
|
||||||
.PD 0
|
.PD 0
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
Make a backup/snapshot \(hy> \(a"sync\(a"
|
Make a backup/snapshot \(hy> \(a"sync\(a"
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
See the files changed from the previous sync \(hy> \(a"diff\(a"
|
|
||||||
.IP \(bu
|
|
||||||
Periodically checks old data \(hy> \(a"scrub\(a"
|
Periodically checks old data \(hy> \(a"scrub\(a"
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
|
Prints a report of the status of the array \(hy> \(a"status\(a"
|
||||||
|
.IP \(bu
|
||||||
Check for integrity the full array \(hy> \(a"check\(a"
|
Check for integrity the full array \(hy> \(a"check\(a"
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
Restore the last backup/snapshot \(hy> \(a"fix\(a".
|
Restore the last backup/snapshot \(hy> \(a"fix\(a".
|
||||||
|
|
@ -407,19 +418,39 @@ without losing the work already done.
|
||||||
.PP
|
.PP
|
||||||
The \(a"content\(a", \(a"parity\(a" and \(a"q\(hyparity\(a" files are modified if necessary.
|
The \(a"content\(a", \(a"parity\(a" and \(a"q\(hyparity\(a" files are modified if necessary.
|
||||||
The files in the array are NOT modified.
|
The files in the array are NOT modified.
|
||||||
.SS status
|
.SS check
|
||||||
Prints a summary of the state of the disk array.
|
Checks all the files and the redundancy data.
|
||||||
|
All the files are hashed and compared with the snapshot saved
|
||||||
|
in the previous \(a"sync\(a" command.
|
||||||
.PP
|
.PP
|
||||||
It includes information about the parity fragmentation, how old
|
If an error if found, a recovery attempt is simulated to check
|
||||||
are the blocks without checking, and all the recorded silent
|
if the error is a recoverable one or not.
|
||||||
errors encoutered while scrubbing.
|
.PP
|
||||||
|
If you use the \(hya, \(hy\(hyaudit\(hyonly option, only the file
|
||||||
|
data is checked, and the redundandy data is ignored.
|
||||||
|
.PP
|
||||||
|
Files are identified by path, and checked by content.
|
||||||
.PP
|
.PP
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
|
.SS fix
|
||||||
|
Checks and fix all the files. It\(cqs like \(a"check\(a" but it also fixes
|
||||||
|
errors reverting the state of the disk array to the previous \(a"sync\(a"
|
||||||
|
command.
|
||||||
|
.PP
|
||||||
|
After a successful \(a"fix\(a", you should also run a \(a"sync\(a" command to
|
||||||
|
update the new state of the files.
|
||||||
|
.PP
|
||||||
|
All the files that cannot be fixed are renamed adding
|
||||||
|
the \(a".unrecoverable\(a" extension.
|
||||||
|
.PP
|
||||||
|
The \(a"content\(a" file is NOT modified.
|
||||||
|
The \(a"parity\(a" and \(a"q\(hyparity\(a" files are modified if necessary.
|
||||||
|
The files in the array are modified if necessary.
|
||||||
.SS scrub
|
.SS scrub
|
||||||
Scrubs the array, checking for silent errors.
|
Scrubs the array, checking for silent errors.
|
||||||
.PP
|
.PP
|
||||||
For each command invocation, the 12% of the array is checked,
|
For each command invocation, the 12% of the array is checked, but
|
||||||
but nothing that it\(cqs more recent than 10 days.
|
nothing that it\(cqs more recent than 10 days.
|
||||||
This means that scrubbing once a week, every bit of data is checked
|
This means that scrubbing once a week, every bit of data is checked
|
||||||
at least one time every two months.
|
at least one time every two months.
|
||||||
.PP
|
.PP
|
||||||
|
|
@ -435,6 +466,14 @@ and it\(cqs listed in the \(a"status\(a" command until it\(cqs fixed calling
|
||||||
.PP
|
.PP
|
||||||
The \(a"content\(a" file is modified to update the time of the last check
|
The \(a"content\(a" file is modified to update the time of the last check
|
||||||
of each block.
|
of each block.
|
||||||
|
.SS status
|
||||||
|
Prints a summary of the state of the disk array.
|
||||||
|
.PP
|
||||||
|
It includes information about the parity fragmentation, how old
|
||||||
|
are the blocks without checking, and all the recorded silent
|
||||||
|
errors encoutered while scrubbing.
|
||||||
|
.PP
|
||||||
|
Nothing is modified.
|
||||||
.SS diff
|
.SS diff
|
||||||
Lists all the files modified from the last \(a"sync\(a" command that
|
Lists all the files modified from the last \(a"sync\(a" command that
|
||||||
have to recompute their redundancy data.
|
have to recompute their redundancy data.
|
||||||
|
|
@ -449,31 +488,18 @@ hashes are matching. The file data is not read, but only the
|
||||||
precomputed hashes are used.
|
precomputed hashes are used.
|
||||||
.PP
|
.PP
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
.SS check
|
.SS pool
|
||||||
Checks all the files and the redundancy data.
|
Creates or updates in the \(a"pooling\(a" directory a virtual view of all
|
||||||
All the files are hashed and compared with the snapshot saved
|
the files of your disk array.
|
||||||
in the previous \(a"sync\(a" command.
|
|
||||||
.PP
|
.PP
|
||||||
If you use the \(hya, \(hy\(hyaudit\(hyonly option, only the file
|
The files are not really copied here, but just linked using
|
||||||
data is checked, and the redundandy data is ignored.
|
symbolic links.
|
||||||
.PP
|
.PP
|
||||||
Files are identified by path, and checked by content.
|
When updating, all the present symbolic links and empty
|
||||||
|
subdirectories are deleted and replaced with the new
|
||||||
|
view of the array. Any othe regular file is left in place.
|
||||||
.PP
|
.PP
|
||||||
Nothing is modified.
|
Nothing is modified outside the pool directory.
|
||||||
.SS fix
|
|
||||||
Checks and fix all the files. It\(cqs like \(a"check\(a" but it
|
|
||||||
also tries to fix problems reverting the state of the
|
|
||||||
disk array to the previous \(a"sync\(a" command.
|
|
||||||
.PP
|
|
||||||
After a successful \(a"fix\(a", you should also run a \(a"sync\(a"
|
|
||||||
command to update the new state of the files.
|
|
||||||
.PP
|
|
||||||
All the files that cannot be fixed are renamed adding
|
|
||||||
the \(a".unrecoverable\(a" extension.
|
|
||||||
.PP
|
|
||||||
The \(a"content\(a" file is NOT modified.
|
|
||||||
The \(a"parity\(a" and \(a"q\(hyparity\(a" files are modified if necessary.
|
|
||||||
The files in the array are modified if necessary.
|
|
||||||
.SS rehash
|
.SS rehash
|
||||||
Schedules a rehash of the whole array.
|
Schedules a rehash of the whole array.
|
||||||
.PP
|
.PP
|
||||||
|
|
@ -489,18 +515,6 @@ You can get the rehash state using the \(a"status\(a" command.
|
||||||
During the rehash, SnapRAID maintains full functionality,
|
During the rehash, SnapRAID maintains full functionality,
|
||||||
with the only expection of the \(a"dup\(a" command not able to detect
|
with the only expection of the \(a"dup\(a" command not able to detect
|
||||||
duplicated files using a different hash.
|
duplicated files using a different hash.
|
||||||
.SS pool
|
|
||||||
Creates or updates in the \(a"pooling\(a" directory a virtual view of all
|
|
||||||
the files of your disk array.
|
|
||||||
.PP
|
|
||||||
The files are not really copied here, but just linked using
|
|
||||||
symbolic links.
|
|
||||||
.PP
|
|
||||||
When updating, all the present symbolic links and empty
|
|
||||||
subdirectories are deleted and replaced with the new
|
|
||||||
view of the array. Any othe regular file is left in place.
|
|
||||||
.PP
|
|
||||||
Nothing is modified outside the pool directory.
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
SnapRAID provides the following options:
|
SnapRAID provides the following options:
|
||||||
.TP
|
.TP
|
||||||
|
|
@ -630,7 +644,7 @@ option will allow you to continue anyway.
|
||||||
.TP
|
.TP
|
||||||
.B \(hys, \(hy\(hystart BLKSTART
|
.B \(hys, \(hy\(hystart BLKSTART
|
||||||
Starts the processing from the specified
|
Starts the processing from the specified
|
||||||
block number. It could be useful to easy retry to check
|
block number. It could be useful to retry to check
|
||||||
or fix some specific block, in case of a damaged disk.
|
or fix some specific block, in case of a damaged disk.
|
||||||
.TP
|
.TP
|
||||||
.B \(hyt, \(hy\(hycount BLKCOUNT
|
.B \(hyt, \(hy\(hycount BLKCOUNT
|
||||||
|
|
@ -795,10 +809,6 @@ disk d3 /mnt/disk3/
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
exclude *.bak
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
exclude /lost+found/
|
exclude /lost+found/
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
|
|
@ -836,10 +846,6 @@ disk d3 I:\(rsarray\(rs
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
exclude *.bak
|
|
||||||
.PD 0
|
|
||||||
.PP
|
|
||||||
.PD
|
|
||||||
exclude Thumbs.db
|
exclude Thumbs.db
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
|
|
@ -894,11 +900,11 @@ The simplest one is to use only \(a"exclude\(a" rules to remove all the
|
||||||
files and directories you do not want to process. For example:
|
files and directories you do not want to process. For example:
|
||||||
.PP
|
.PP
|
||||||
.RS 4
|
.RS 4
|
||||||
# Excludes any file named \(a"*.bak\(a"
|
# Excludes any file named \(a"*.unrecoverable\(a"
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
exclude *.bak
|
exclude *.unrecoverable
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
|
|
@ -949,11 +955,11 @@ To get things simpler you can first have all the \(a"exclude\(a" rules and then
|
||||||
all the \(a"include\(a" ones. For example:
|
all the \(a"include\(a" ones. For example:
|
||||||
.PP
|
.PP
|
||||||
.RS 4
|
.RS 4
|
||||||
# Excludes any file named \(a"*.bak\(a"
|
# Excludes any file named \(a"*.unrecoverable\(a"
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
exclude *.bak
|
exclude *.unrecoverable
|
||||||
.PD 0
|
.PD 0
|
||||||
.PP
|
.PP
|
||||||
.PD
|
.PD
|
||||||
|
|
@ -1084,7 +1090,7 @@ snapraid \(hyd NAME \(hya check
|
||||||
Where NAME is the name of the disk, like \(a"d1\(a" as in our previous example.
|
Where NAME is the name of the disk, like \(a"d1\(a" as in our previous example.
|
||||||
.PP
|
.PP
|
||||||
The options \(hyd and \(hya tell SnapRAID to check only the specified disk,
|
The options \(hyd and \(hya tell SnapRAID to check only the specified disk,
|
||||||
and ignore all the other data and redundancy disks.
|
and ignore all the redundancy data.
|
||||||
.PP
|
.PP
|
||||||
This command will take a long time.
|
This command will take a long time.
|
||||||
.SS STEP 4 \(hy> Sync
|
.SS STEP 4 \(hy> Sync
|
||||||
|
|
@ -1111,7 +1117,7 @@ with all the checksums to verify their integrity.
|
||||||
You do not need to understand its format to use SnapRAID.
|
You do not need to understand its format to use SnapRAID.
|
||||||
.PP
|
.PP
|
||||||
This file is read and written by the \(a"sync\(a" and \(a"scrub\(a" commands, and
|
This file is read and written by the \(a"sync\(a" and \(a"scrub\(a" commands, and
|
||||||
only read by \(a"fix\(a" and \(a"check\(a".
|
only read by \(a"fix\(a", \(a"check\(a" and \(a"status\(a".
|
||||||
.SH PARITY
|
.SH PARITY
|
||||||
SnapRAID stores the redundancy information of your array in the parity
|
SnapRAID stores the redundancy information of your array in the parity
|
||||||
and q\(hyparity files.
|
and q\(hyparity files.
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ disk d3 /mnt/disk3/
|
||||||
# Format: "exclude DIR/"
|
# Format: "exclude DIR/"
|
||||||
# Format: "exclude /PATH/FILE"
|
# Format: "exclude /PATH/FILE"
|
||||||
# Format: "exclude /PATH/DIR/"
|
# Format: "exclude /PATH/DIR/"
|
||||||
exclude *.bak
|
|
||||||
exclude *.unrecoverable
|
exclude *.unrecoverable
|
||||||
exclude /tmp/
|
exclude /tmp/
|
||||||
exclude /lost+found/
|
exclude /lost+found/
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,6 @@ disk d3 I:\array\
|
||||||
# Format: "exclude DIR\"
|
# Format: "exclude DIR\"
|
||||||
# Format: "exclude \PATH\FILE"
|
# Format: "exclude \PATH\FILE"
|
||||||
# Format: "exclude \PATH\DIR\"
|
# Format: "exclude \PATH\DIR\"
|
||||||
exclude *.bak
|
|
||||||
exclude *.unrecoverable
|
exclude *.unrecoverable
|
||||||
exclude Thumbs.db
|
exclude Thumbs.db
|
||||||
exclude \$RECYCLE.BIN
|
exclude \$RECYCLE.BIN
|
||||||
|
|
|
||||||
185
snapraid.d
185
snapraid.d
|
|
@ -16,7 +16,7 @@ Synopsis
|
||||||
:snapraid [-V, --version] [-h, --help]
|
:snapraid [-V, --version] [-h, --help]
|
||||||
|
|
||||||
Description
|
Description
|
||||||
SnapRAID is a backup program for a disk array.
|
SnapRAID is a backup program for disk arrays.
|
||||||
|
|
||||||
SnapRAID stores redundancy information in the disk array,
|
SnapRAID stores redundancy information in the disk array,
|
||||||
and it allows recovering from up to two disk failures.
|
and it allows recovering from up to two disk failures.
|
||||||
|
|
@ -80,8 +80,8 @@ Getting Started
|
||||||
to dedicate at the "parity" information. With one disk for parity you
|
to dedicate at the "parity" information. With one disk for parity you
|
||||||
will be able to recover from a single disk failure, like RAID5.
|
will be able to recover from a single disk failure, like RAID5.
|
||||||
|
|
||||||
If you want to recover from two disk failures, like RAID6, you must
|
If you want to be able to recover from two disk failures, like RAID6,
|
||||||
reserve another disk for the "q-parity" information.
|
you must reserve another disk for the "q-parity" information.
|
||||||
|
|
||||||
As parity disks, you have to pick the biggest disks in the array,
|
As parity disks, you have to pick the biggest disks in the array,
|
||||||
as the redundancy information may grow in size as the biggest data
|
as the redundancy information may grow in size as the biggest data
|
||||||
|
|
@ -145,22 +145,6 @@ Getting Started
|
||||||
At this point you can start using your array as you like, and periodically
|
At this point you can start using your array as you like, and periodically
|
||||||
update the redundancy information running the "sync" command.
|
update the redundancy information running the "sync" command.
|
||||||
|
|
||||||
Pooling
|
|
||||||
To have all the files in your array shown in the same directory tree,
|
|
||||||
you can enable "pooling", that consists in creating a virtual view of all
|
|
||||||
the files in your array using symbolic links.
|
|
||||||
You can configure the "pooling" directory in the configuration file with:
|
|
||||||
|
|
||||||
:pool /pool
|
|
||||||
|
|
||||||
or, if you are in Windows, with:
|
|
||||||
|
|
||||||
:pool C:\pool
|
|
||||||
|
|
||||||
and then run the "pool" command.
|
|
||||||
|
|
||||||
:snapraid pool
|
|
||||||
|
|
||||||
Checking & Fixing
|
Checking & Fixing
|
||||||
To check the integrity of your data you can use the "check" command:
|
To check the integrity of your data you can use the "check" command:
|
||||||
|
|
||||||
|
|
@ -177,47 +161,69 @@ Getting Started
|
||||||
in "sync".
|
in "sync".
|
||||||
|
|
||||||
In this regard SnapRAID is more like a backup program than a RAID
|
In this regard SnapRAID is more like a backup program than a RAID
|
||||||
system. For example, you can use it to recover from an accidentally
|
system. For example, you can use it to restore a file or directory to
|
||||||
deleted directory, simply running the fix command using the
|
its previous state using the -f, --filter option :
|
||||||
-m, --filter-missing filter, like:
|
|
||||||
|
:snapraid fix -f FILE
|
||||||
|
|
||||||
|
or for a directory:
|
||||||
|
|
||||||
|
:snapraid fix -f DIR/
|
||||||
|
|
||||||
|
You can also use it to recover only accidentally deleted files inside
|
||||||
|
a directory using the -m, --filter-missing option, like:
|
||||||
|
|
||||||
:snapraid fix -m -f DIR/
|
:snapraid fix -m -f DIR/
|
||||||
|
|
||||||
Or to simply recover one file you can use:
|
Or to recover all the deleted files with:
|
||||||
|
|
||||||
:snapraid fix -m -f FILE
|
|
||||||
|
|
||||||
Or to recover all the delete files with:
|
|
||||||
|
|
||||||
:snapraid fix -m
|
:snapraid fix -m
|
||||||
|
|
||||||
Scrubbing
|
Scrubbing
|
||||||
To progressively check the old synched data, it's recommended to always
|
To periodically check the old data for errors, you can run the "scrub"
|
||||||
run a "scrub" command after a "sync".
|
command.
|
||||||
|
|
||||||
:snapraid scrub
|
:snapraid scrub
|
||||||
|
|
||||||
This command checks the oldest data in your array to ensure that no silent
|
As difference than "check" this command verifies only the oldest data
|
||||||
error is present. Every run of the command checks about 12% of the data,
|
in your array. Every run of the command checks about 12% of the data,
|
||||||
but nothing newer than 10 days.
|
but nothing newer than 10 days.
|
||||||
|
|
||||||
If an error is found, the corresponding blocks are marked as bad, and listed
|
If a silent error is found, the corresponding blocks are marked as bad
|
||||||
in the "status" command.
|
in the "concent" file, and listed in the "status" command.
|
||||||
|
|
||||||
:snapraid status
|
:snapraid status
|
||||||
|
|
||||||
To fix them, you can use the "fix" command filtering for bad blocks:
|
To fix them, you can use the "fix" command filtering for files
|
||||||
|
containing bad blocks:
|
||||||
|
|
||||||
:snapraid -e fix
|
:snapraid -e fix
|
||||||
|
|
||||||
and at the next "scrub" the errors will disappears from the status.
|
and at the next "scrub" the errors will disappear from the "status"
|
||||||
|
report.
|
||||||
|
|
||||||
|
Pooling
|
||||||
|
To have all the files in your array shown in the same directory tree,
|
||||||
|
you can enable "pooling", that consists in creating a virtual view of all
|
||||||
|
the files in your array using symbolic links.
|
||||||
|
You can configure the "pooling" directory in the configuration file with:
|
||||||
|
|
||||||
|
:pool /pool
|
||||||
|
|
||||||
|
or, if you are in Windows, with:
|
||||||
|
|
||||||
|
:pool C:\pool
|
||||||
|
|
||||||
|
and then run the "pool" command.
|
||||||
|
|
||||||
|
:snapraid pool
|
||||||
|
|
||||||
Commands
|
Commands
|
||||||
SnapRAID provides four simple commands that allow to:
|
SnapRAID provides some simple commands that allow to:
|
||||||
|
|
||||||
* Make a backup/snapshot -> "sync"
|
* Make a backup/snapshot -> "sync"
|
||||||
* See the files changed from the previous sync -> "diff"
|
|
||||||
* Periodically checks old data -> "scrub"
|
* Periodically checks old data -> "scrub"
|
||||||
|
* Prints a report of the status of the array -> "status"
|
||||||
* Check for integrity the full array -> "check"
|
* Check for integrity the full array -> "check"
|
||||||
* Restore the last backup/snapshot -> "fix".
|
* Restore the last backup/snapshot -> "fix".
|
||||||
|
|
||||||
|
|
@ -238,20 +244,41 @@ Commands
|
||||||
The "content", "parity" and "q-parity" files are modified if necessary.
|
The "content", "parity" and "q-parity" files are modified if necessary.
|
||||||
The files in the array are NOT modified.
|
The files in the array are NOT modified.
|
||||||
|
|
||||||
status
|
check
|
||||||
Prints a summary of the state of the disk array.
|
Checks all the files and the redundancy data.
|
||||||
|
All the files are hashed and compared with the snapshot saved
|
||||||
|
in the previous "sync" command.
|
||||||
|
|
||||||
It includes information about the parity fragmentation, how old
|
If an error if found, a recovery attempt is simulated to check
|
||||||
are the blocks without checking, and all the recorded silent
|
if the error is a recoverable one or not.
|
||||||
errors encoutered while scrubbing.
|
|
||||||
|
If you use the -a, --audit-only option, only the file
|
||||||
|
data is checked, and the redundandy data is ignored.
|
||||||
|
|
||||||
|
Files are identified by path, and checked by content.
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
|
|
||||||
|
fix
|
||||||
|
Checks and fix all the files. It's like "check" but it also fixes
|
||||||
|
errors reverting the state of the disk array to the previous "sync"
|
||||||
|
command.
|
||||||
|
|
||||||
|
After a successful "fix", you should also run a "sync" command to
|
||||||
|
update the new state of the files.
|
||||||
|
|
||||||
|
All the files that cannot be fixed are renamed adding
|
||||||
|
the ".unrecoverable" extension.
|
||||||
|
|
||||||
|
The "content" file is NOT modified.
|
||||||
|
The "parity" and "q-parity" files are modified if necessary.
|
||||||
|
The files in the array are modified if necessary.
|
||||||
|
|
||||||
scrub
|
scrub
|
||||||
Scrubs the array, checking for silent errors.
|
Scrubs the array, checking for silent errors.
|
||||||
|
|
||||||
For each command invocation, the 12% of the array is checked,
|
For each command invocation, the 12% of the array is checked, but
|
||||||
but nothing that it's more recent than 10 days.
|
nothing that it's more recent than 10 days.
|
||||||
This means that scrubbing once a week, every bit of data is checked
|
This means that scrubbing once a week, every bit of data is checked
|
||||||
at least one time every two months.
|
at least one time every two months.
|
||||||
|
|
||||||
|
|
@ -268,6 +295,15 @@ Commands
|
||||||
The "content" file is modified to update the time of the last check
|
The "content" file is modified to update the time of the last check
|
||||||
of each block.
|
of each block.
|
||||||
|
|
||||||
|
status
|
||||||
|
Prints a summary of the state of the disk array.
|
||||||
|
|
||||||
|
It includes information about the parity fragmentation, how old
|
||||||
|
are the blocks without checking, and all the recorded silent
|
||||||
|
errors encoutered while scrubbing.
|
||||||
|
|
||||||
|
Nothing is modified.
|
||||||
|
|
||||||
diff
|
diff
|
||||||
Lists all the files modified from the last "sync" command that
|
Lists all the files modified from the last "sync" command that
|
||||||
have to recompute their redundancy data.
|
have to recompute their redundancy data.
|
||||||
|
|
@ -284,32 +320,18 @@ Commands
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
|
|
||||||
check
|
pool
|
||||||
Checks all the files and the redundancy data.
|
Creates or updates in the "pooling" directory a virtual view of all
|
||||||
All the files are hashed and compared with the snapshot saved
|
the files of your disk array.
|
||||||
in the previous "sync" command.
|
|
||||||
|
|
||||||
If you use the -a, --audit-only option, only the file
|
The files are not really copied here, but just linked using
|
||||||
data is checked, and the redundandy data is ignored.
|
symbolic links.
|
||||||
|
|
||||||
Files are identified by path, and checked by content.
|
When updating, all the present symbolic links and empty
|
||||||
|
subdirectories are deleted and replaced with the new
|
||||||
|
view of the array. Any othe regular file is left in place.
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified outside the pool directory.
|
||||||
|
|
||||||
fix
|
|
||||||
Checks and fix all the files. It's like "check" but it
|
|
||||||
also tries to fix problems reverting the state of the
|
|
||||||
disk array to the previous "sync" command.
|
|
||||||
|
|
||||||
After a successful "fix", you should also run a "sync"
|
|
||||||
command to update the new state of the files.
|
|
||||||
|
|
||||||
All the files that cannot be fixed are renamed adding
|
|
||||||
the ".unrecoverable" extension.
|
|
||||||
|
|
||||||
The "content" file is NOT modified.
|
|
||||||
The "parity" and "q-parity" files are modified if necessary.
|
|
||||||
The files in the array are modified if necessary.
|
|
||||||
|
|
||||||
rehash
|
rehash
|
||||||
Schedules a rehash of the whole array.
|
Schedules a rehash of the whole array.
|
||||||
|
|
@ -327,19 +349,6 @@ Commands
|
||||||
with the only expection of the "dup" command not able to detect
|
with the only expection of the "dup" command not able to detect
|
||||||
duplicated files using a different hash.
|
duplicated files using a different hash.
|
||||||
|
|
||||||
pool
|
|
||||||
Creates or updates in the "pooling" directory a virtual view of all
|
|
||||||
the files of your disk array.
|
|
||||||
|
|
||||||
The files are not really copied here, but just linked using
|
|
||||||
symbolic links.
|
|
||||||
|
|
||||||
When updating, all the present symbolic links and empty
|
|
||||||
subdirectories are deleted and replaced with the new
|
|
||||||
view of the array. Any othe regular file is left in place.
|
|
||||||
|
|
||||||
Nothing is modified outside the pool directory.
|
|
||||||
|
|
||||||
Options
|
Options
|
||||||
SnapRAID provides the following options:
|
SnapRAID provides the following options:
|
||||||
|
|
||||||
|
|
@ -469,7 +478,7 @@ Options
|
||||||
|
|
||||||
-s, --start BLKSTART
|
-s, --start BLKSTART
|
||||||
Starts the processing from the specified
|
Starts the processing from the specified
|
||||||
block number. It could be useful to easy retry to check
|
block number. It could be useful to retry to check
|
||||||
or fix some specific block, in case of a damaged disk.
|
or fix some specific block, in case of a damaged disk.
|
||||||
|
|
||||||
-t, --count BLKCOUNT
|
-t, --count BLKCOUNT
|
||||||
|
|
@ -623,7 +632,6 @@ Configuration
|
||||||
:disk d1 /mnt/disk1/
|
:disk d1 /mnt/disk1/
|
||||||
:disk d2 /mnt/disk2/
|
:disk d2 /mnt/disk2/
|
||||||
:disk d3 /mnt/disk3/
|
:disk d3 /mnt/disk3/
|
||||||
:exclude *.bak
|
|
||||||
:exclude /lost+found/
|
:exclude /lost+found/
|
||||||
:exclude /tmp/
|
:exclude /tmp/
|
||||||
|
|
||||||
|
|
@ -635,7 +643,6 @@ Configuration
|
||||||
:disk d1 G:\array\
|
:disk d1 G:\array\
|
||||||
:disk d2 H:\array\
|
:disk d2 H:\array\
|
||||||
:disk d3 I:\array\
|
:disk d3 I:\array\
|
||||||
:exclude *.bak
|
|
||||||
:exclude Thumbs.db
|
:exclude Thumbs.db
|
||||||
:exclude \$RECYCLE.BIN
|
:exclude \$RECYCLE.BIN
|
||||||
:exclude \System Volume Information
|
:exclude \System Volume Information
|
||||||
|
|
@ -680,8 +687,8 @@ Pattern
|
||||||
The simplest one is to use only "exclude" rules to remove all the
|
The simplest one is to use only "exclude" rules to remove all the
|
||||||
files and directories you do not want to process. For example:
|
files and directories you do not want to process. For example:
|
||||||
|
|
||||||
:# Excludes any file named "*.bak"
|
:# Excludes any file named "*.unrecoverable"
|
||||||
:exclude *.bak
|
:exclude *.unrecoverable
|
||||||
:# Excludes the root directory "/lost+found"
|
:# Excludes the root directory "/lost+found"
|
||||||
:exclude /lost+found/
|
:exclude /lost+found/
|
||||||
:# Excludes any sub-directory named "tmp"
|
:# Excludes any sub-directory named "tmp"
|
||||||
|
|
@ -701,8 +708,8 @@ Pattern
|
||||||
To get things simpler you can first have all the "exclude" rules and then
|
To get things simpler you can first have all the "exclude" rules and then
|
||||||
all the "include" ones. For example:
|
all the "include" ones. For example:
|
||||||
|
|
||||||
:# Excludes any file named "*.bak"
|
:# Excludes any file named "*.unrecoverable"
|
||||||
:exclude *.bak
|
:exclude *.unrecoverable
|
||||||
:# Excludes any sub-directory named "tmp"
|
:# Excludes any sub-directory named "tmp"
|
||||||
:exclude tmp/
|
:exclude tmp/
|
||||||
:# Includes only some directories
|
:# Includes only some directories
|
||||||
|
|
@ -784,7 +791,7 @@ Recovering
|
||||||
Where NAME is the name of the disk, like "d1" as in our previous example.
|
Where NAME is the name of the disk, like "d1" as in our previous example.
|
||||||
|
|
||||||
The options -d and -a tell SnapRAID to check only the specified disk,
|
The options -d and -a tell SnapRAID to check only the specified disk,
|
||||||
and ignore all the other data and redundancy disks.
|
and ignore all the redundancy data.
|
||||||
|
|
||||||
This command will take a long time.
|
This command will take a long time.
|
||||||
|
|
||||||
|
|
@ -808,7 +815,7 @@ Content
|
||||||
You do not need to understand its format to use SnapRAID.
|
You do not need to understand its format to use SnapRAID.
|
||||||
|
|
||||||
This file is read and written by the "sync" and "scrub" commands, and
|
This file is read and written by the "sync" and "scrub" commands, and
|
||||||
only read by "fix" and "check".
|
only read by "fix", "check" and "status".
|
||||||
|
|
||||||
Parity
|
Parity
|
||||||
SnapRAID stores the redundancy information of your array in the parity
|
SnapRAID stores the redundancy information of your array in the parity
|
||||||
|
|
|
||||||
213
snapraid.txt
213
snapraid.txt
|
|
@ -23,7 +23,7 @@ snapraid [-V, --version] [-h, --help]
|
||||||
2 DESCRIPTION
|
2 DESCRIPTION
|
||||||
=============
|
=============
|
||||||
|
|
||||||
SnapRAID is a backup program for a disk array.
|
SnapRAID is a backup program for disk arrays.
|
||||||
|
|
||||||
SnapRAID stores redundancy information in the disk array,
|
SnapRAID stores redundancy information in the disk array,
|
||||||
and it allows recovering from up to two disk failures.
|
and it allows recovering from up to two disk failures.
|
||||||
|
|
@ -93,8 +93,8 @@ To use SnapRAID you need to first select one disk of your disk array
|
||||||
to dedicate at the "parity" information. With one disk for parity you
|
to dedicate at the "parity" information. With one disk for parity you
|
||||||
will be able to recover from a single disk failure, like RAID5.
|
will be able to recover from a single disk failure, like RAID5.
|
||||||
|
|
||||||
If you want to recover from two disk failures, like RAID6, you must
|
If you want to be able to recover from two disk failures, like RAID6,
|
||||||
reserve another disk for the "q-parity" information.
|
you must reserve another disk for the "q-parity" information.
|
||||||
|
|
||||||
As parity disks, you have to pick the biggest disks in the array,
|
As parity disks, you have to pick the biggest disks in the array,
|
||||||
as the redundancy information may grow in size as the biggest data
|
as the redundancy information may grow in size as the biggest data
|
||||||
|
|
@ -158,25 +158,7 @@ When this command completes, your data is SAFE.
|
||||||
At this point you can start using your array as you like, and periodically
|
At this point you can start using your array as you like, and periodically
|
||||||
update the redundancy information running the "sync" command.
|
update the redundancy information running the "sync" command.
|
||||||
|
|
||||||
4.1 Pooling
|
4.1 Checking & Fixing
|
||||||
-----------
|
|
||||||
|
|
||||||
To have all the files in your array shown in the same directory tree,
|
|
||||||
you can enable "pooling", that consists in creating a virtual view of all
|
|
||||||
the files in your array using symbolic links.
|
|
||||||
You can configure the "pooling" directory in the configuration file with:
|
|
||||||
|
|
||||||
pool /pool
|
|
||||||
|
|
||||||
or, if you are in Windows, with:
|
|
||||||
|
|
||||||
pool C:\pool
|
|
||||||
|
|
||||||
and then run the "pool" command.
|
|
||||||
|
|
||||||
snapraid pool
|
|
||||||
|
|
||||||
4.2 Checking & Fixing
|
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
To check the integrity of your data you can use the "check" command:
|
To check the integrity of your data you can use the "check" command:
|
||||||
|
|
@ -194,52 +176,76 @@ last "sync" command executed. It works like a snapshot was taken
|
||||||
in "sync".
|
in "sync".
|
||||||
|
|
||||||
In this regard SnapRAID is more like a backup program than a RAID
|
In this regard SnapRAID is more like a backup program than a RAID
|
||||||
system. For example, you can use it to recover from an accidentally
|
system. For example, you can use it to restore a file or directory to
|
||||||
deleted directory, simply running the fix command using the
|
its previous state using the -f, --filter option :
|
||||||
-m, --filter-missing filter, like:
|
|
||||||
|
snapraid fix -f FILE
|
||||||
|
|
||||||
|
or for a directory:
|
||||||
|
|
||||||
|
snapraid fix -f DIR/
|
||||||
|
|
||||||
|
You can also use it to recover only accidentally deleted files inside
|
||||||
|
a directory using the -m, --filter-missing option, like:
|
||||||
|
|
||||||
snapraid fix -m -f DIR/
|
snapraid fix -m -f DIR/
|
||||||
|
|
||||||
Or to simply recover one file you can use:
|
Or to recover all the deleted files with:
|
||||||
|
|
||||||
snapraid fix -m -f FILE
|
|
||||||
|
|
||||||
Or to recover all the delete files with:
|
|
||||||
|
|
||||||
snapraid fix -m
|
snapraid fix -m
|
||||||
|
|
||||||
4.3 Scrubbing
|
4.2 Scrubbing
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
To progressively check the old synched data, it's recommended to always
|
To periodically check the old data for errors, you can run the "scrub"
|
||||||
run a "scrub" command after a "sync".
|
command.
|
||||||
|
|
||||||
snapraid scrub
|
snapraid scrub
|
||||||
|
|
||||||
This command checks the oldest data in your array to ensure that no silent
|
As difference than "check" this command verifies only the oldest data
|
||||||
error is present. Every run of the command checks about 12% of the data,
|
in your array. Every run of the command checks about 12% of the data,
|
||||||
but nothing newer than 10 days.
|
but nothing newer than 10 days.
|
||||||
|
|
||||||
If an error is found, the corresponding blocks are marked as bad, and listed
|
If a silent error is found, the corresponding blocks are marked as bad
|
||||||
in the "status" command.
|
in the "concent" file, and listed in the "status" command.
|
||||||
|
|
||||||
snapraid status
|
snapraid status
|
||||||
|
|
||||||
To fix them, you can use the "fix" command filtering for bad blocks:
|
To fix them, you can use the "fix" command filtering for files
|
||||||
|
containing bad blocks:
|
||||||
|
|
||||||
snapraid -e fix
|
snapraid -e fix
|
||||||
|
|
||||||
and at the next "scrub" the errors will disappears from the status.
|
and at the next "scrub" the errors will disappear from the "status"
|
||||||
|
report.
|
||||||
|
|
||||||
|
4.3 Pooling
|
||||||
|
-----------
|
||||||
|
|
||||||
|
To have all the files in your array shown in the same directory tree,
|
||||||
|
you can enable "pooling", that consists in creating a virtual view of all
|
||||||
|
the files in your array using symbolic links.
|
||||||
|
You can configure the "pooling" directory in the configuration file with:
|
||||||
|
|
||||||
|
pool /pool
|
||||||
|
|
||||||
|
or, if you are in Windows, with:
|
||||||
|
|
||||||
|
pool C:\pool
|
||||||
|
|
||||||
|
and then run the "pool" command.
|
||||||
|
|
||||||
|
snapraid pool
|
||||||
|
|
||||||
|
|
||||||
5 COMMANDS
|
5 COMMANDS
|
||||||
==========
|
==========
|
||||||
|
|
||||||
SnapRAID provides four simple commands that allow to:
|
SnapRAID provides some simple commands that allow to:
|
||||||
|
|
||||||
* Make a backup/snapshot -> "sync"
|
* Make a backup/snapshot -> "sync"
|
||||||
* See the files changed from the previous sync -> "diff"
|
|
||||||
* Periodically checks old data -> "scrub"
|
* Periodically checks old data -> "scrub"
|
||||||
|
* Prints a report of the status of the array -> "status"
|
||||||
* Check for integrity the full array -> "check"
|
* Check for integrity the full array -> "check"
|
||||||
* Restore the last backup/snapshot -> "fix".
|
* Restore the last backup/snapshot -> "fix".
|
||||||
|
|
||||||
|
|
@ -262,24 +268,47 @@ without losing the work already done.
|
||||||
The "content", "parity" and "q-parity" files are modified if necessary.
|
The "content", "parity" and "q-parity" files are modified if necessary.
|
||||||
The files in the array are NOT modified.
|
The files in the array are NOT modified.
|
||||||
|
|
||||||
5.2 status
|
5.2 check
|
||||||
----------
|
---------
|
||||||
|
|
||||||
Prints a summary of the state of the disk array.
|
Checks all the files and the redundancy data.
|
||||||
|
All the files are hashed and compared with the snapshot saved
|
||||||
|
in the previous "sync" command.
|
||||||
|
|
||||||
It includes information about the parity fragmentation, how old
|
If an error if found, a recovery attempt is simulated to check
|
||||||
are the blocks without checking, and all the recorded silent
|
if the error is a recoverable one or not.
|
||||||
errors encoutered while scrubbing.
|
|
||||||
|
If you use the -a, --audit-only option, only the file
|
||||||
|
data is checked, and the redundandy data is ignored.
|
||||||
|
|
||||||
|
Files are identified by path, and checked by content.
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
|
|
||||||
5.3 scrub
|
5.3 fix
|
||||||
|
-------
|
||||||
|
|
||||||
|
Checks and fix all the files. It's like "check" but it also fixes
|
||||||
|
errors reverting the state of the disk array to the previous "sync"
|
||||||
|
command.
|
||||||
|
|
||||||
|
After a successful "fix", you should also run a "sync" command to
|
||||||
|
update the new state of the files.
|
||||||
|
|
||||||
|
All the files that cannot be fixed are renamed adding
|
||||||
|
the ".unrecoverable" extension.
|
||||||
|
|
||||||
|
The "content" file is NOT modified.
|
||||||
|
The "parity" and "q-parity" files are modified if necessary.
|
||||||
|
The files in the array are modified if necessary.
|
||||||
|
|
||||||
|
5.4 scrub
|
||||||
---------
|
---------
|
||||||
|
|
||||||
Scrubs the array, checking for silent errors.
|
Scrubs the array, checking for silent errors.
|
||||||
|
|
||||||
For each command invocation, the 12% of the array is checked,
|
For each command invocation, the 12% of the array is checked, but
|
||||||
but nothing that it's more recent than 10 days.
|
nothing that it's more recent than 10 days.
|
||||||
This means that scrubbing once a week, every bit of data is checked
|
This means that scrubbing once a week, every bit of data is checked
|
||||||
at least one time every two months.
|
at least one time every two months.
|
||||||
|
|
||||||
|
|
@ -296,7 +325,18 @@ and it's listed in the "status" command until it's fixed calling
|
||||||
The "content" file is modified to update the time of the last check
|
The "content" file is modified to update the time of the last check
|
||||||
of each block.
|
of each block.
|
||||||
|
|
||||||
5.4 diff
|
5.5 status
|
||||||
|
----------
|
||||||
|
|
||||||
|
Prints a summary of the state of the disk array.
|
||||||
|
|
||||||
|
It includes information about the parity fragmentation, how old
|
||||||
|
are the blocks without checking, and all the recorded silent
|
||||||
|
errors encoutered while scrubbing.
|
||||||
|
|
||||||
|
Nothing is modified.
|
||||||
|
|
||||||
|
5.6 diff
|
||||||
--------
|
--------
|
||||||
|
|
||||||
Lists all the files modified from the last "sync" command that
|
Lists all the files modified from the last "sync" command that
|
||||||
|
|
@ -307,7 +347,7 @@ size and inode.
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
|
|
||||||
5.5 dup
|
5.7 dup
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Lists all the duplicate files. Two files are assumed equal if their
|
Lists all the duplicate files. Two files are assumed equal if their
|
||||||
|
|
@ -316,38 +356,22 @@ precomputed hashes are used.
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified.
|
||||||
|
|
||||||
5.6 check
|
5.8 pool
|
||||||
---------
|
--------
|
||||||
|
|
||||||
Checks all the files and the redundancy data.
|
Creates or updates in the "pooling" directory a virtual view of all
|
||||||
All the files are hashed and compared with the snapshot saved
|
the files of your disk array.
|
||||||
in the previous "sync" command.
|
|
||||||
|
|
||||||
If you use the -a, --audit-only option, only the file
|
The files are not really copied here, but just linked using
|
||||||
data is checked, and the redundandy data is ignored.
|
symbolic links.
|
||||||
|
|
||||||
Files are identified by path, and checked by content.
|
When updating, all the present symbolic links and empty
|
||||||
|
subdirectories are deleted and replaced with the new
|
||||||
|
view of the array. Any othe regular file is left in place.
|
||||||
|
|
||||||
Nothing is modified.
|
Nothing is modified outside the pool directory.
|
||||||
|
|
||||||
5.7 fix
|
5.9 rehash
|
||||||
-------
|
|
||||||
|
|
||||||
Checks and fix all the files. It's like "check" but it
|
|
||||||
also tries to fix problems reverting the state of the
|
|
||||||
disk array to the previous "sync" command.
|
|
||||||
|
|
||||||
After a successful "fix", you should also run a "sync"
|
|
||||||
command to update the new state of the files.
|
|
||||||
|
|
||||||
All the files that cannot be fixed are renamed adding
|
|
||||||
the ".unrecoverable" extension.
|
|
||||||
|
|
||||||
The "content" file is NOT modified.
|
|
||||||
The "parity" and "q-parity" files are modified if necessary.
|
|
||||||
The files in the array are modified if necessary.
|
|
||||||
|
|
||||||
5.8 rehash
|
|
||||||
----------
|
----------
|
||||||
|
|
||||||
Schedules a rehash of the whole array.
|
Schedules a rehash of the whole array.
|
||||||
|
|
@ -365,21 +389,6 @@ During the rehash, SnapRAID maintains full functionality,
|
||||||
with the only expection of the "dup" command not able to detect
|
with the only expection of the "dup" command not able to detect
|
||||||
duplicated files using a different hash.
|
duplicated files using a different hash.
|
||||||
|
|
||||||
5.9 pool
|
|
||||||
--------
|
|
||||||
|
|
||||||
Creates or updates in the "pooling" directory a virtual view of all
|
|
||||||
the files of your disk array.
|
|
||||||
|
|
||||||
The files are not really copied here, but just linked using
|
|
||||||
symbolic links.
|
|
||||||
|
|
||||||
When updating, all the present symbolic links and empty
|
|
||||||
subdirectories are deleted and replaced with the new
|
|
||||||
view of the array. Any othe regular file is left in place.
|
|
||||||
|
|
||||||
Nothing is modified outside the pool directory.
|
|
||||||
|
|
||||||
|
|
||||||
6 OPTIONS
|
6 OPTIONS
|
||||||
=========
|
=========
|
||||||
|
|
@ -512,7 +521,7 @@ SnapRAID provides the following options:
|
||||||
|
|
||||||
-s, --start BLKSTART
|
-s, --start BLKSTART
|
||||||
Starts the processing from the specified
|
Starts the processing from the specified
|
||||||
block number. It could be useful to easy retry to check
|
block number. It could be useful to retry to check
|
||||||
or fix some specific block, in case of a damaged disk.
|
or fix some specific block, in case of a damaged disk.
|
||||||
|
|
||||||
-t, --count BLKCOUNT
|
-t, --count BLKCOUNT
|
||||||
|
|
@ -685,7 +694,6 @@ An example of a typical configuration for Unix is:
|
||||||
disk d1 /mnt/disk1/
|
disk d1 /mnt/disk1/
|
||||||
disk d2 /mnt/disk2/
|
disk d2 /mnt/disk2/
|
||||||
disk d3 /mnt/disk3/
|
disk d3 /mnt/disk3/
|
||||||
exclude *.bak
|
|
||||||
exclude /lost+found/
|
exclude /lost+found/
|
||||||
exclude /tmp/
|
exclude /tmp/
|
||||||
|
|
||||||
|
|
@ -697,7 +705,6 @@ An example of a typical configuration for Windows is:
|
||||||
disk d1 G:\array\
|
disk d1 G:\array\
|
||||||
disk d2 H:\array\
|
disk d2 H:\array\
|
||||||
disk d3 I:\array\
|
disk d3 I:\array\
|
||||||
exclude *.bak
|
|
||||||
exclude Thumbs.db
|
exclude Thumbs.db
|
||||||
exclude \$RECYCLE.BIN
|
exclude \$RECYCLE.BIN
|
||||||
exclude \System Volume Information
|
exclude \System Volume Information
|
||||||
|
|
@ -745,8 +752,8 @@ the files to process.
|
||||||
The simplest one is to use only "exclude" rules to remove all the
|
The simplest one is to use only "exclude" rules to remove all the
|
||||||
files and directories you do not want to process. For example:
|
files and directories you do not want to process. For example:
|
||||||
|
|
||||||
# Excludes any file named "*.bak"
|
# Excludes any file named "*.unrecoverable"
|
||||||
exclude *.bak
|
exclude *.unrecoverable
|
||||||
# Excludes the root directory "/lost+found"
|
# Excludes the root directory "/lost+found"
|
||||||
exclude /lost+found/
|
exclude /lost+found/
|
||||||
# Excludes any sub-directory named "tmp"
|
# Excludes any sub-directory named "tmp"
|
||||||
|
|
@ -766,8 +773,8 @@ precedence over the later ones.
|
||||||
To get things simpler you can first have all the "exclude" rules and then
|
To get things simpler you can first have all the "exclude" rules and then
|
||||||
all the "include" ones. For example:
|
all the "include" ones. For example:
|
||||||
|
|
||||||
# Excludes any file named "*.bak"
|
# Excludes any file named "*.unrecoverable"
|
||||||
exclude *.bak
|
exclude *.unrecoverable
|
||||||
# Excludes any sub-directory named "tmp"
|
# Excludes any sub-directory named "tmp"
|
||||||
exclude tmp/
|
exclude tmp/
|
||||||
# Includes only some directories
|
# Includes only some directories
|
||||||
|
|
@ -858,7 +865,7 @@ that everything is OK on the disk.
|
||||||
Where NAME is the name of the disk, like "d1" as in our previous example.
|
Where NAME is the name of the disk, like "d1" as in our previous example.
|
||||||
|
|
||||||
The options -d and -a tell SnapRAID to check only the specified disk,
|
The options -d and -a tell SnapRAID to check only the specified disk,
|
||||||
and ignore all the other data and redundancy disks.
|
and ignore all the redundancy data.
|
||||||
|
|
||||||
This command will take a long time.
|
This command will take a long time.
|
||||||
|
|
||||||
|
|
@ -887,7 +894,7 @@ with all the checksums to verify their integrity.
|
||||||
You do not need to understand its format to use SnapRAID.
|
You do not need to understand its format to use SnapRAID.
|
||||||
|
|
||||||
This file is read and written by the "sync" and "scrub" commands, and
|
This file is read and written by the "sync" and "scrub" commands, and
|
||||||
only read by "fix" and "check".
|
only read by "fix", "check" and "status".
|
||||||
|
|
||||||
|
|
||||||
11 PARITY
|
11 PARITY
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue