snapraid/snapraid.txt

726 lines
23 KiB
Text
Raw Normal View History

2011-03-09 22:37:01 +01:00
===============================
SnapRAID Backup For Disk Arrays
===============================
1 SYNOPSIS
==========
snapraid [-c, --conf CONFIG] [-f, --filter PATTERN]
[-N, --find-by-name]
[-Z, --force-zero] [-E, --force-empty]
[-s, --start BLKSTART] [-t, --count BLKCOUNT]
[-v, --verbose]
sync|diff|dup|check|fix
2011-03-09 22:37:01 +01:00
snapraid [-V, --version] [-h, --help]
2011-03-09 22:37:01 +01:00
2 DESCRIPTION
=============
2011-05-04 19:51:30 +02:00
SnapRAID is a backup program for a disk array.
2011-03-09 22:37:01 +01:00
2011-05-04 19:51:30 +02:00
SnapRAID stores redundancy information in the disk array,
and it allows recovering from up to two disk failures.
2011-03-09 22:37:01 +01:00
2011-03-22 23:22:18 +01:00
SnapRAID is mainly targeted for a home media center, where you have
2011-03-12 23:21:32 +01:00
a lot of big files that rarely change.
2011-03-09 22:37:01 +01:00
2011-04-26 23:41:15 +02:00
Beside the ability to recover from disk failures, the other
2011-03-28 20:50:30 +02:00
features of SnapRAID are:
2011-03-09 22:37:01 +01:00
* You can start using SnapRAID with already filled disks.
2011-04-26 23:41:15 +02:00
* The disks can have different sizes.
* You can add more disks at any time.
2011-03-12 23:21:32 +01:00
* If you accidentally delete some files in a disk, you can
recover them.
2011-05-04 19:51:30 +02:00
* If more than two disks fail, you lose the data only on the
2011-03-12 23:21:32 +01:00
failed disks. All the data in the other disks is safe.
* It doesn't lock-in your data. You can stop using SnapRAID at any
time without the need to reformat or move data.
2011-05-04 19:51:30 +02:00
* All your data is hashed to ensure data integrity and avoid
silent corruption.
2011-03-12 23:21:32 +01:00
The official site of SnapRAID is:
http://snapraid.sourceforge.net
2011-03-09 22:37:01 +01:00
3 LIMITATIONS
2011-03-09 22:37:01 +01:00
=============
2011-04-26 23:41:15 +02:00
SnapRAID is in between a RAID and a Backup program trying to get the best
2011-03-22 23:22:18 +01:00
benefits of them. Although it also has some limitations that you should
2011-03-12 23:21:32 +01:00
consider before using it.
2011-05-04 19:51:30 +02:00
The main one is that if a disk fails, and you haven't recently synced,
2011-03-12 23:21:32 +01:00
you may not able to do a complete recover.
More specifically, you may be unable to recover up to the size of the
2011-09-03 11:17:25 +02:00
amount of the changed or deleted files from the last sync operation.
2011-03-12 23:21:32 +01:00
This happens even if the files changed or deleted are not in the
failed disk.
New added files don't prevent the recovering of the already existing
2011-04-29 23:21:27 +02:00
files. You may only lose the just added files, if they are on the failed
2011-03-12 23:21:32 +01:00
disk.
This is the reason because SnapRAID is better suited for data that
rarely change.
Other limitations are:
2011-04-23 08:58:00 +02:00
2011-03-22 23:22:18 +01:00
* You have different file-systems for each disk.
2011-04-23 08:58:00 +02:00
Using a RAID you have only a big file-system.
2011-03-09 22:37:01 +01:00
* It doesn't stripe data.
With RAID you get a speed boost with striping.
2011-03-22 23:22:18 +01:00
* It doesn't support real-time recovery.
2011-03-09 22:37:01 +01:00
With RAID you do not have to stop working when a disk fails.
* It's able to recover damages only from up to two disks.
2011-03-09 22:37:01 +01:00
With a Backup you are able to recover from a complete
failure of the whole disk array.
* Only file data, time and symlinks are saved. Permissions,
extended attributes and hard-links are not saved.
2011-03-09 22:37:01 +01:00
4 GETTING STARTED
=================
2011-10-31 15:49:42 +01:00
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
will be able to recover from a single disk failure, like RAID5.
2011-03-09 22:37:01 +01:00
If you want to recover from two disk failures, like RAID6, you must
2011-04-26 23:41:15 +02:00
reserve another disk for the "q-parity" information.
2011-03-09 22:37:01 +01:00
2011-09-03 11:17:25 +02:00
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
disk in the array.
2011-03-22 23:22:18 +01:00
2011-04-26 23:41:15 +02:00
These disks will be dedicated to store the "parity" and "q-parity"
files. You should not store your data in them.
The list of files is saved in the "content" files, usually
2011-09-19 20:45:35 +02:00
stored in the data, parity or boot disks.
These files contain the details of your backup, with all the
checksums to verify its integrity.
The "content" file is stored in multiple copies, and each one must
be in a different disk, to ensure that in even in case of multiple
disk failures at least one copy is available.
2011-03-09 22:37:01 +01:00
For example, suppose that you are interested only at one parity level
2011-04-26 23:41:15 +02:00
of protection, and that your disks are present in:
/mnt/diskpar <- selected disk for parity
2011-04-23 08:58:00 +02:00
/mnt/disk1 <- first disk to backup
/mnt/disk2 <- second disk to backup
/mnt/disk3 <- third disk to backup
2011-03-09 22:37:01 +01:00
you have to create the configuration file /etc/snapraid.conf with
2011-04-23 08:58:00 +02:00
the following options:
2011-03-09 22:37:01 +01:00
parity /mnt/diskpar/parity
2011-09-19 20:45:35 +02:00
content /var/snapraid/content
content /mnt/disk1/content
content /mnt/disk2/content
2011-03-09 22:37:01 +01:00
disk d1 /mnt/disk1/
disk d2 /mnt/disk2/
disk d3 /mnt/disk3/
2011-09-03 11:17:25 +02:00
If you are in Windows, you should use drive letters and backslashes
instead of slashes:
2011-04-23 08:58:00 +02:00
parity E:\par\parity
2011-09-19 20:45:35 +02:00
content C:\snapraid\content
content F:\array\content
content G:\array\content
2011-04-23 08:58:00 +02:00
disk d1 F:\array\
disk d2 G:\array\
disk d3 H:\array\
2011-03-09 22:37:01 +01:00
At this point you are ready to start the "sync" command to build the
redundancy information.
snapraid sync
2011-03-22 23:22:18 +01:00
This process may take some hours the first time, depending on the size
of the data already present in the disks. If the disks are empty
the process is immediate.
2011-03-09 22:37:01 +01:00
You can stop it at any time pressing Ctrl+C, and at the next run it
will start where interrupted.
When this command completes, your data is SAFE.
At this point you can start using your array as you like, and periodically
2011-03-09 22:37:01 +01:00
update the redundancy information running the "sync" command.
To check the integrity of your data you can use the "check" command:
snapraid check
If will read all your data, to check if it's correct.
If an error is found, you can use the "fix" command to fix it.
snapraid fix
Note that the fix command will revert your data at the state of the
last "sync" command executed. It works like a snapshot was taken
in "sync".
2011-03-22 23:22:18 +01:00
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 like.
snapraid fix -f JUST_DELETED_DIR/
2011-03-22 23:22:18 +01:00
2011-03-09 22:37:01 +01:00
2011-03-20 22:53:36 +01:00
5 COMMANDS
==========
2011-06-26 20:40:35 +02:00
SnapRAID provides four simple commands that allow to:
2011-03-20 22:53:36 +01:00
* Make a backup/snapshot -> "sync"
2011-06-26 20:40:35 +02:00
* See the files changed from the previous sync -> "diff"
2011-03-20 22:53:36 +01:00
* Check for integrity -> "check"
* Restore the last backup/snapshot -> "fix".
2011-10-31 15:49:42 +01:00
Take care that the commands have to be written in lower case.
2011-06-21 21:33:57 +02:00
2011-09-06 21:16:42 +02:00
5.1 sync
--------
2011-09-03 11:17:25 +02:00
Updates the redundancy information. All the modified files
in the disk array are read, and the redundancy data is
recomputed.
Files are identified by inode and checked by time and size,
meaning that you can move them on the disk without triggering
any redundancy recomputation.
You can stop this process at any time pressing Ctrl+C,
without losing the work already done.
The "content", "parity" and "q-parity" files are modified if necessary.
The files in the array are NOT modified.
2011-09-06 21:16:42 +02:00
5.2 diff
--------
2011-09-03 11:17:25 +02:00
Lists all the files modified from the last "sync" command that
have to recompute their redundancy data.
Nothing is modified.
5.3 dup
-------
Lists all the duplicate files. Two files are assumed equal if their hashes
are matching. The effective data is not read.
Nothing is modified.
5.4 check
2011-09-06 21:16:42 +02:00
---------
2011-09-03 11:17:25 +02:00
Checks all the files and the redundancy data.
All the files are hashed and compared with the snapshot saved
in the previous "sync" command.
Files are identified by path, and checked by content.
Nothing is modified.
5.5 fix
2011-09-06 21:16:42 +02:00
-------
2011-09-03 11:17:25 +02:00
Checks and fix all the files. It's like "check" but it
also tries to fix problems reverting the state of the
2011-10-31 15:49:42 +01:00
disk array to the previous "sync" command.
2011-09-03 11:17:25 +02:00
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
2011-11-16 20:42:27 +01:00
the ".unrecoverable" extension.
2011-09-03 11:17:25 +02:00
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.
2011-03-20 22:53:36 +01:00
6 OPTIONS
=========
2011-06-26 20:40:35 +02:00
SnapRAID provides the following options:
2011-06-20 20:35:04 +02:00
2011-03-20 22:53:36 +01:00
-c, --conf CONFIG
2011-09-03 11:17:25 +02:00
Selects the configuration file. If not specified it's assumed
2011-11-16 20:42:27 +01:00
the file "/etc/snapraid.conf" in Unix, and "snapraid.conf" in
2011-09-03 11:17:25 +02:00
the current directory in Windows.
2011-03-20 22:53:36 +01:00
-f, --filter PATTERN
Filters the files to operate on with the "check" and "fix"
commands. This option is ignored with the "sync" command.
See the PATTERN section for more details in the
pattern specifications.
This option can be used many times.
In Unix, ensure to quote globbing chars if used.
-N, --find-by-name
When syncing finds the files by path instead than by inode.
This option allows a fast sync command after having replaced
2011-11-16 20:42:27 +01:00
one physical disk with another, copying manually the files.
Without this option the "sync" command recognizes that
2011-10-31 15:49:42 +01:00
the files were copied to a different disk, and it will resync
them all. With this option, a file with the correct path,
size and time is assumed identical at the previous one,
and not resynched.
2011-11-16 20:42:27 +01:00
This option has effect only on the "sync" and "diff" commands.
2011-03-20 22:53:36 +01:00
-Z, --force-zero
2011-03-22 23:22:18 +01:00
Forces the insecure operation of syncing a file with zero
2011-09-03 11:17:25 +02:00
size that before was not.
2011-10-31 15:49:42 +01:00
If SnapRAID detects a such condition, it stops proceeding
2011-03-20 22:53:36 +01:00
unless you specify this option.
This allows to easily detect when after a system crash,
some accessed files were zeroed.
2011-09-03 11:17:25 +02:00
This is a possible condition in Linux with the ext3/ext4
filesystems.
2011-03-20 22:53:36 +01:00
-E, --force-empty
2011-07-05 21:45:24 +02:00
Forces the insecure operation of syncing a disk with all
the original files missing.
If SnapRAID detects that all the files originally present
2011-09-03 11:17:25 +02:00
in the disk are missing or rewritten, it stops proceeding
2011-03-20 22:53:36 +01:00
unless you specify this option.
2011-03-22 23:22:18 +01:00
This allows to easily detect when a data file-system is not
2011-03-20 22:53:36 +01:00
mounted.
-s, --start BLKSTART
Starts the processing from the specified
block number. It could be useful to easy retry to check
or fix some specific block, in case of a damaged disk.
-t, --count BLKCOUNT
Process only the specified number of blocks.
It's present mainly for advanced manual recovering.
2011-03-20 22:53:36 +01:00
-v, --verbose
Prints more information in the processing.
-h, --help
Prints a short help screen.
-V, --version
Prints the program version.
7 CONFIGURATION
2011-03-09 22:37:01 +01:00
===============
SnapRAID requires a configuration file to know where your disk array
is located, and where storing the redundancy information.
2011-04-26 23:41:15 +02:00
This configuration file is located in /etc/snapraid.conf in Unix or
in the execution directory in Windows.
2011-06-20 20:35:04 +02:00
It should contain the following options (case sensitive):
2011-03-09 22:37:01 +01:00
2011-09-06 21:16:42 +02:00
7.1 parity FILE
---------------
2011-09-03 11:17:25 +02:00
Defines the file to use to store the parity information.
The parity enables the protection from a single disk
failure, like RAID5.
It must be placed in a disk dedicated for this purpose with
as much free space as the biggest disk in the array.
Leaving the parity disk reserved for only this file ensures that
it doesn't get fragmented, improving the performance.
This option is mandatory and it can be used only one time.
2011-09-06 21:16:42 +02:00
7.2 q-parity FILE
-----------------
2011-09-03 11:17:25 +02:00
Defines the file to use to store the q-parity information.
If present, the q-parity enables the protection from two disk
failures, like RAID6.
It must be placed in a disk dedicated for this purpose with
as much free space as the biggest disk in the array.
Leaving the q-parity disk reserved for only this file ensures that
it doesn't get fragmented, improving the performance.
This option is optional and it can be used only one time.
2011-09-06 21:16:42 +02:00
7.3 content FILE
----------------
2011-09-03 11:17:25 +02:00
Defines the file to use to store the list and checksums of all the
files present in your disk array.
It can be placed in the disk used to store data, parity, or
any other disk available.
If you use a data disk, this file is automatically excluded
from the "sync" process.
2011-09-03 11:17:25 +02:00
This option is mandatory and it can be used more time to save
more copies of the same files.
2011-09-19 20:45:35 +02:00
You have to store at least one copy for each parity disk used
plus one. Using some more don't hurt.
2011-09-06 21:16:42 +02:00
7.4 disk NAME DIR
-----------------
2011-09-03 11:17:25 +02:00
Defines the name and the mount point of the disks of the array.
NAME is used to identify the disk, and it must be unique.
DIR is the mount point of the disk in the filesystem.
2011-03-09 22:37:01 +01:00
2011-09-03 11:17:25 +02:00
You can change the mount point as you like, as long you
keep the NAME fixed.
2011-03-09 22:37:01 +01:00
2011-09-03 11:17:25 +02:00
You should use one option for each disk of the array.
2011-04-23 08:58:00 +02:00
2011-09-06 21:16:42 +02:00
7.5 exclude/include PATTERN
---------------------------
2011-09-03 11:17:25 +02:00
Defines the file or directory patterns to exclude and include
in the sync process.
All the patterns are processed in the specified order.
2011-03-22 23:22:18 +01:00
2011-09-03 11:17:25 +02:00
If the first pattern that matches is an "exclude" one, the file
2011-10-31 15:49:42 +01:00
is excluded. If it's an "include" one, the file is included.
2011-09-03 11:17:25 +02:00
If no pattern matches, the file is excluded if the last pattern
2011-10-31 15:49:42 +01:00
specified is an "include", or included if the last pattern
specified is an "exclude".
2011-09-03 11:17:25 +02:00
See the PATTERN section for more details in the pattern
specifications.
This option can be used many times.
2011-09-06 21:16:42 +02:00
7.6 block_size SIZE_IN_KIBIBYTES
--------------------------------
2011-09-03 11:17:25 +02:00
Defines the basic block size in kibi bytes of the redundancy
blocks. Where one kibi bytes is 1024 bytes.
The default is 256 and it should work for most conditions.
You could increase this value if you do not have enough RAM
memory to run SnapRAID.
As a rule of thumb, with 4GB or more memory use the default 256,
with 2GB use 512, and with 1GB use 1024.
In more details SnapRAID requires about TS*24/BS bytes
of RAM memory to run. Where TS is the total size in bytes of
your disk array, and BS is the block size in bytes.
For example with 6 disk of 2 TiB and a block size of 256 KiB
(1 KiB = 1024 Bytes) you have:
RAM = (6 * 2 * 2^40) * 24 / (256 * 2^10) = 1.1 GiB
You could instead decrease this value if you have a lot of
small files in the disk array. For each file, even if of few
bytes, a whole block is always allocated, so you may have a lot
of unused space.
As approximation, you can assume that half of the block size is
wasted for each file.
For example, with 10000 files and a 256 KiB block size, you are
going to waste 1.2 GiB.
2011-09-06 21:16:42 +02:00
7.7 Examples
------------
2011-05-04 19:51:30 +02:00
An example of a typical configuration for Unix is:
2011-03-09 22:37:01 +01:00
parity /mnt/diskpar/parity
content /mnt/diskpar/content
content /var/snapraid/content
2011-03-09 22:37:01 +01:00
disk d1 /mnt/disk1/
disk d2 /mnt/disk2/
disk d3 /mnt/disk3/
exclude *.bak
exclude /lost+found/
2011-05-04 19:51:30 +02:00
exclude /tmp/
An example of a typical configuration for Windows is:
parity E:\par\parity
content E:\par\content
content C:\snapraid\content
disk d1 G:\array\
disk d2 H:\array\
disk d3 I:\array\
exclude *.bak
exclude Thumbs.db
exclude \$RECYCLE.BIN\
exclude \System Volume Information\
2011-03-09 22:37:01 +01:00
2011-03-20 22:53:36 +01:00
8 PATTERN
=========
2011-04-26 18:51:42 +02:00
Patterns are used to select a subset of files to exclude or include in
the process.
There are four different types of patterns:
FILE
Selects any file named as FILE. You can use any globbing
character like * and ?.
This pattern is applied only to files and not to directories.
DIR/
Selects any directory named DIR. You can use any globbing
character like * and ?.
This pattern is applied only to directories and not to files.
/PATH/FILE
Selects the exact specified file path. You can use any
globbing character like * and ? but they never matches a
directory slash.
This pattern is applied only to files and not to directories.
/PATH/DIR/
Selects the exact specified directory path. You can use any
globbing character like * and ? but they never matches a
directory slash.
This pattern is applied only to directories and not to files.
In Windows you can freely use the backslash \ instead of the forward slash /.
2011-04-26 23:41:15 +02:00
In the configuration file, you can use different strategies to filter
2011-04-26 18:51:42 +02:00
the files to process.
2011-04-26 23:41:15 +02:00
The simplest one is to only use "exclude" rules to remove all the
2011-04-26 18:51:42 +02:00
files and directories you do not want to process. For example:
# Excludes any file named "*.bak"
exclude *.bak
2011-03-22 23:22:18 +01:00
# Excludes the root directory "/lost+found"
exclude /lost+found/
2011-04-26 18:51:42 +02:00
# Excludes any sub-directory named "tmp"
exclude tmp/
The opposite way is to define only the file you want to process, using
only "include" rules. For example:
# Includes only some directories
include /movies/
include /musics/
include /pictures/
The final way, is to mix "exclude" and "include" rules. In this case take
care that the order of rules is important. Previous rules have the
precedence over the later ones.
To get things simpler you can first have all the "exclude" rules and then
all the "include" ones. For example:
# Excludes any file named "*.bak"
exclude *.bak
# Excludes any sub-directory named "tmp"
exclude tmp/
2011-04-26 18:51:42 +02:00
# Includes only some directories
include /movies/
include /musics/
include /pictures/
On the command line, using the -f option, you can only use "include"
patterns. For example:
# Checks only the .mp3 files.
2011-04-26 18:51:42 +02:00
# Note the "" use to avoid globbing expansion by the shell in Unix.
snapraid -f "*.mp3" check
In Unix, when using globbing chars in the command line, you have to quote them.
Otherwise the shell will try to expand them.
9 RECOVERING
============
The worst happened, and you lost a disk!
DO NOT PANIC! You will be able to recover it!
The first thing you have to do is to avoid futher changes at you disk array.
2011-11-16 20:42:27 +01:00
Disable any remote connection to it, any scheduled process, including any
scheduled SnapRAID nightly sync.
Then proceed with the following steps.
---- 9.0.1 STEP 1 -> Reconfigure ----
2011-10-31 15:49:42 +01:00
You need some space to recover, even better if you already have an additional
disk, but in case, also an external USB or remote one is enough.
2011-11-16 20:42:27 +01:00
Change the SnapRAID configuration and change the "disk" directory
of the failed disk to point to the new empty space.
---- 9.0.2 STEP 2 -> Fix ----
Run the fix command, storing the log in an external file with:
snapraid fix 2>fix.log
This command will take a long time.
Take care that you need also few GB free to store the fix.log file, so run it
from a disk with some free space.
2011-10-31 15:49:42 +01:00
Now you have recovered all the recoverable. If some file is partially or totally
unrecoverable, it will be renamed adding the ".unrecoverable" extension.
You can get a detailed list of all the unrecoverable blocks in the fix.log file
checking all the lines starting with "unrecoverable:"
If you are not satified of the recovering, you can retry it as many time you wish.
2011-11-16 20:42:27 +01:00
For example, if you have moved away some files from other disks after the last "sync",
you can retry to put them inplace, and retry the "fix".
2011-10-31 09:41:12 +01:00
If you are satisfied of the recovering, you can now proceed further,
but take care that after synching you will no more able to retry the
2011-11-16 20:42:27 +01:00
"fix" command!
2011-10-31 09:41:12 +01:00
---- 9.0.3 STEP 3 -> Check ----
2011-11-16 20:42:27 +01:00
As paranoid check, you can now run a whole "check" command to ensure that
2011-10-31 09:41:12 +01:00
everything is OK.
snapraid check
This command will take a long time.
---- 9.0.4 STEP 4 -> Sync ----
2011-11-16 20:42:27 +01:00
Run the "sync" command to resyncronize the array with the new disk.
2011-11-16 20:42:27 +01:00
To avoid a long time sync you can use the "--find-by-name" option to
2011-10-31 15:49:42 +01:00
force SnapRAID to ignore the fact that all the recovered files are now in
2011-11-16 20:42:27 +01:00
a different physical disk, but they are not changed.
snapraid --find-by-name sync
If everything was recovered, this command is immediate.
10 CONTENT
==========
2011-03-09 22:37:01 +01:00
2011-04-26 23:41:15 +02:00
SnapRAID stores the list and checksums of your files in the content file.
2011-03-22 23:22:18 +01:00
It's a text file, listing all the files present in your disk array,
with all the checksums to verify their integrity.
2011-04-29 23:21:27 +02:00
You do not need to understand its format, but it's described here
for documentation.
2011-03-29 18:57:13 +02:00
This file is read and written by the "sync" command, and only read by
"fix" and "check".
2011-03-09 22:37:01 +01:00
10.1 blk_size SIZE
------------------
2011-09-06 21:16:42 +02:00
2011-09-03 11:17:25 +02:00
Defines the size of the block in bytes. It must match the size
defined in the configuration file.
10.2 checksum CHECKSUM
----------------------
2011-09-06 21:16:42 +02:00
2011-09-03 11:17:25 +02:00
Defines the checksum kind used. It can be "md5" or "murmur3".
10.3 map NAME INDEX
-------------------
Defines the position INDEX of the disk NAME in the parity computation.
10.4 file DISK SIZE TIME INODE PATH
-----------------------------------
2011-09-06 21:16:42 +02:00
2011-09-03 11:17:25 +02:00
Defines a file in the specified DISK.
The INODE number is used to identify the file in the "sync"
command, allowing to rename or move the file in disk without
the need to recompute the parity for it.
The SIZE and TIME information are used to identify if the file
changed from the last "sync" command, and if there is the need
to recompute the parity.
The PATH information is used in the "check" and "fix" commands
to identify the file.
10.5 blk BLOCK HASH
-------------------
2011-09-06 21:16:42 +02:00
2011-09-03 11:17:25 +02:00
Defines the ordered parity block list used by the last defined file.
BLOCK is the block position in the "parity" file.
0 for the first block, 1 for the second one and so on.
HASH is the hash of the block. In the last block of the file,
the HASH is the hash of only the used part of the block.
10.6 inv BLOCK [HASH]
---------------------
2011-09-06 21:16:42 +02:00
2011-09-03 11:17:25 +02:00
Like "blk", but inform that the parity of this block is invalid.
The HASH may be missing if not yet computed.
This field is used only when you interrupt manually the "sync"
command.
2011-03-29 18:57:13 +02:00
2011-03-22 23:22:18 +01:00
11 PARITY
2011-03-22 23:22:18 +01:00
=========
SnapRAID stores the redundancy information of your array in the parity
and q-parity files.
2011-03-29 18:57:13 +02:00
They are binary files, containing the computed redundancy of all the
blocks defined in the "content" file.
2011-04-29 23:21:27 +02:00
You do not need to understand its format, but it's described here
for documentation.
2011-03-22 23:22:18 +01:00
These files are read and written by the "sync" and "fix" commands, and
2011-03-29 18:57:13 +02:00
only read by "check".
2011-03-22 23:22:18 +01:00
For all the blocks at a given position, the parity and the q-parity
are computed as specified in:
2011-04-26 23:41:15 +02:00
http://kernel.org/pub/linux/kernel/people/hpa/raid6.pdf
2011-03-22 23:22:18 +01:00
2011-03-29 18:57:13 +02:00
When a file block is shorter than the default block size, for example
because it's the last block of a file, it's assumed as filled with 0
at the end.
2011-03-09 22:37:01 +01:00
12 ENCODING
===========
2011-10-31 15:49:42 +01:00
SnapRAID in Unix ignores any encoding. It simply reads and stores the
file names with the same encoding used by the filesystem.
In Windows all the names read from the filesystem are converted and
processed in the UTF-8 format.
To have the file names printed correctly you have to set the Windows
console in the UTF-8 mode, with the command "chcp 65001", and use
2011-10-31 15:49:42 +01:00
a TrueType font like "Lucida Console" as console font.
Note that it has effect only on the printed file names, if you
redirect the console output to a file, the resulting file is always
in the UTF-8 format.
13 COPYRIGHT
2011-03-20 22:53:36 +01:00
============
2011-03-09 22:37:01 +01:00
This file is Copyright (C) 2011 Andrea Mazzoleni
14 SEE ALSO
===========
2011-03-09 22:37:01 +01:00
rsync(1)