diff --git a/manual.html b/manual.html index 9d54e806..de7721ea 100644 --- a/manual.html +++ b/manual.html @@ -61,7 +61,7 @@ snapraid [-c, --conf CONFIG]     [-L, --error-limit NUMBER]     [-v, --verbose] [-q, --quiet]     status|smart|up|down|diff|sync|scrub|fix|check|list|dup -    |up|down|pool|devices|rehash +    |up|down|pool|devices|touch|rehash

@@ -158,7 +158,7 @@ With a Backup you are able to recover from a complete
 failure of the whole disk array.
 
 
  • -Only file, timestamps, symlinks and hardlinks are saved. +Only file, time-stamps, symlinks and hardlinks are saved. Permissions, ownership and extended attributes are not saved.
  • @@ -189,7 +189,7 @@ disks. The list of files is saved in the "content" files, usually stored in the data, parity or boot disks. These files contain the details of your backup, with all the -checksums to verify its integrity. +check-sums 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. @@ -215,9 +215,9 @@ parity /mnt/diskp/snapraid.parity content /var/snapraid/snapraid.content content /mnt/disk1/snapraid.content content /mnt/disk2/snapraid.content -disk d1 /mnt/disk1/ -disk d2 /mnt/disk2/ -disk d3 /mnt/disk3/ +data d1 /mnt/disk1/ +data d2 /mnt/disk2/ +data d3 /mnt/disk3/

    @@ -230,9 +230,9 @@ parity E:\snapraid.parity content C:\snapraid\snapraid.content content F:\array\snapraid.content content G:\array\snapraid.content -disk d1 F:\array\ -disk d2 G:\array\ -disk d3 H:\array\ +data d1 F:\array\ +data d2 G:\array\ +data d3 H:\array\

    @@ -386,7 +386,7 @@ requires the network clients to resolve them remotely.

    To make it working, besides sharing in the network the pool directory, you must also share all the disks independently, using as share points -the disk names as defined in the config file. You must also specify in +the disk names as defined in the configuration file. You must also specify in the "share" option of the configure file, the Windows UNC path that remote clients needs to use to access such shared disks.

    @@ -395,9 +395,9 @@ the options:

    @@ -1017,7 +1085,7 @@ what cannot be detected because the data is not yet hashed. To avoid this risk, you can enable the "pre-hash" mode and have all the data read two times to ensure its integrity. This option also verifies the files moved inside the array, -to ensure that the move operation went succesfully, and in case +to ensure that the move operation went successfully, and in case to block the sync and to allow to run a fix operation. This option can be used only with "sync". @@ -1046,7 +1114,7 @@ unless you specify this option. This allows to easily detect when after a system crash, some accessed files were truncated. This is a possible condition in Linux with the ext3/ext4 -filesystems. +file-systems. This option can be used only with "sync".
    -disk d1 F:\array\
    -disk d2 G:\array\
    -disk d3 H:\array\
    +data d1 F:\array\
    +data d2 G:\array\
    +data d3 H:\array\
     pool C:\pool
     share \\darkstar
     
    @@ -488,7 +488,7 @@ For example, if you have that disk "d1" failed, you can change from:

    -disk d1 /mnt/disk1/
    +data d1 /mnt/disk1/
     

    @@ -496,7 +496,7 @@ to:

    -disk d1 /mnt/new_spare_disk/
    +data d1 /mnt/new_spare_disk/
     

    4.4.2 @@ -658,7 +658,7 @@ or less parity. This command uses the "smartctl" tool, and it's equivalent to run "smartctl -a" on all the devices.

    -If your devices are not autodetected correctly, you can configure +If your devices are not auto-detected correctly, you can configure a custom command using the "smartctl" option in the configuration file.

    @@ -668,6 +668,8 @@ up

    Spins up all the disks of the array.

    +You can spin-up only some specific disks using the -d, --filter-disk option. +

    Nothing is modified.

    5.4 down @@ -677,6 +679,8 @@ Spins down all the disks of the array. This command uses the "smartctl" tool, and it's equivalent to run "smartctl -s standby,now" on all the devices.

    +You can spin-down only some specific disks using the -d, --filter-disk option. +

    Nothing is modified.

    5.5 diff @@ -684,9 +688,58 @@ diff Lists all the files modified from the last "sync" that need to have their parity data recomputed.

    -This command doesn't check the file data, but only the file timestamp +This command doesn't check the file data, but only the file time-stamp size and inode.

    +At the end of the command, you'll get a summary of the file changes +grouped by: + + + + + + + + +
    +equal + +Files equal at before. +
    +added + +Files added that were not present before. +
    +removed + +Files removed. +
    +updated + +Files with a different size or time-stamp, meaning that +they were modified. +
    +moved + +Files moved to a different directory of the same disk. +They are identified by having the same name, size, time-stamp +and inode, but different directory. +
    +copied + +Files copied in the same or different disk. Note that if in +true they are moved to a different disk, you'll also have +them counted in "removed". +They are identified by having the same name, size, and +time-stamp. But if the sub-second time-stamp is zero, +then the full path should match, and not only the name. +
    +restored + +Files with a different inode but with name, size and time-stamp +matching. These are usually files restored after being deleted. +
    +

    If a "sync" is required, the process return code is 2, instead of the default 0. The return code 1 is instead for a generic error condition.

    @@ -707,8 +760,8 @@ If during the process, silent or input/output errors are found, the corresponding blocks are marked as bad.

    Files are identified by path and/or inode and checked by -size and timestamp. -If the file size or timestamp are different, the parity data +size and time-stamp. +If the file size or time-stamp are different, the parity data is recomputed for the whole file. If the file is moved or renamed in the same disk, keeping the same inode, the parity is not recomputed. @@ -787,7 +840,7 @@ All the files that cannot be fixed are renamed adding the

    Before fixing, the full array is scanned to find any moved file, after the last "sync" operation. -These files are identified by their timestamp, ignoring their name +These files are identified by their time-stamp, ignoring their name and directory, and are used in the recovering process if necessary. If you moved some of them outside the array, you can use the -i, --import option to specify additional directories to scan. @@ -875,6 +928,24 @@ low level devices used by a single disk in the array.

    Nothing is modified.

    5.16 +touch +

    +Sets arbitrarely the sub-second timestamp of all the files +that have it at zero. +

    +This improves the SnapRAID capability to recognize moved +and copied files as it makes the timestamp almost unique, +removing possible duplicates. +

    +More specifically, if the sub-second timestamp is not zero, +a moved or copied file is identified as such if it matches +the name, size and timestamp. If instead the sub-second timestamp +is zero, it's cosidered a copy only if it matches the full path, +size and timestamp. +

    +Note that the second precision timestamp is not modified, +and all the dates and times of your files will be maintained. +

    5.17 rehash

    Schedules a rehash of the whole array. @@ -926,18 +997,15 @@ process the whole array.
    -d, --filter-disk NAME
    -Filters the files to process in "check" and "fix". -Only the files present in the specified disk are processed. +Filters the disks to process in "check", "fix", "up" and "down". You must specify a disk name as named in the configuration file. -In "check", you can make it faster, specifying also -a, --audit-only -option, to avoid to access other disks to check parity data. -If you combine more --filter, --filter-disk and --filter-missing options, -only files matching all the set of filters are selected. You can also specify parity disks with the names: "parity", "2-parity", "3-parity", ... to limit the operations a specific parity disk. +If you combine more --filter, --filter-disk and --filter-missing options, +only files matching all the set of filters are selected. This option can be used many times. -This option can be used only with "check" and "fix". +This option can be used only with "check", "fix", "up" and "down". Note that it cannot be used with "sync" and "scrub", because they always process the whole array.
    @@ -1085,10 +1153,10 @@ This option can be used only with "sync", "check" or -D, --force-device -Forces the insecure operation of fixing with unaccessible disks, +Forces the insecure operation of fixing with inaccessible disks, or with disks on the same physical device. Like if you lost two data disks, and you have a spare disk to recover -only the first one, and you want to ignore the second unaccessible disk. +only the first one, and you want to ignore the second inaccessible disk. Or if you want to recover a disk in the free space left in an already used disk, sharing the same physical device. This option can be used only with "fix". @@ -1100,7 +1168,7 @@ This option can be used only with "fix". In "sync", "check and "fix", disables the copy detection heuristic. Without this option SnapRAID assumes that files with same -attributes, like name, size and timestamp are copies with the +attributes, like name, size and time-stamp are copies with the same data. This allows to identify copied or moved files from one disk to another, and to reuse the already computed hash information @@ -1302,7 +1370,7 @@ and using 'fix' to recreate it.

    7.4 content FILE

    -Defines the file to use to store the list and checksums of all the +Defines the file to use to store the list and check-sums of all the files present in your disk array.

    It can be placed in the disk used to store data, parity, or @@ -1316,16 +1384,22 @@ more copies of the same files. You have to store at least one copy for each parity disk used plus one. Using some more doesn't hurt.

    7.5 -disk NAME DIR +data NAME DIR

    -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. +Defines the name and the mount point of the data 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 +file-system.

    You can change the mount point as you like, as long you keep the NAME fixed.

    -You should use one option for each disk of the array. +You should use one option for each data disk of the array. +

    +You can rename later a disk, changing the NAME directly +in the configuration file, and then run a 'sync' command. +In the rename case, the association is done using the stored +UUID of the disks.

    7.6 nohidden

    @@ -1445,7 +1519,7 @@ smartctl DISK/PARITY OPTIONS... Defines a custom smartctl command to obtain the SMART attributes for each disk. This may be required for RAID controllers and for -some USB disk that cannot be autodetected. +some USB disk that cannot be auto-detected.

    DISK is the same disk name specified in the "disk" option. PARITY is one of the parity name as "parity,[1,2,3,4,5,6,z]-parity". @@ -1472,9 +1546,9 @@ An example of a typical configuration for Unix is: parity /mnt/diskp/snapraid.parity content /mnt/diskp/snapraid.content content /var/snapraid/snapraid.content -disk d1 /mnt/disk1/ -disk d2 /mnt/disk2/ -disk d3 /mnt/disk3/ +data d1 /mnt/disk1/ +data d2 /mnt/disk2/ +data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ smartctl d1 -d sat %s @@ -1491,9 +1565,9 @@ An example of a typical configuration for Windows is: parity E:\snapraid.parity content E:\snapraid.content content C:\snapraid\snapraid.content -disk d1 G:\array\ -disk d2 H:\array\ -disk d3 I:\array\ +data d1 G:\array\ +data d2 H:\array\ +data d3 I:\array\ exclude Thumbs.db exclude \$RECYCLE.BIN exclude \System Volume Information @@ -1515,7 +1589,7 @@ There are four different types of patterns: FILE Selects any file named as FILE. You can use any globbing -character like * and ?. +character like * and ?, and char classes like [a-z]. This pattern is applied only to files and not to directories. @@ -1550,13 +1624,19 @@ This pattern is applied only to directories and not to files.

    Note that when you specify an absolute path starting with /, it's -applied at the array root dir and not at the local filesystem root dir. +applied at the array root dir and not at the local file-system root dir.

    In Windows you can use the backslash \ instead of the forward slash /. Note that Windows system directories, junctions, mount points, and any other Windows special directory are treated just as files, meaning that to exclude them you must use a file rule, and not a directory one.

    +If the file name you want to use really contains a '*', '?', '[', +or ']' char, you have to escape it to avoid to have interpreted as a +globbing character. In Unix the escape char is '\' in Windows it's '^'. +Note that when the pattern is on the command line, you have to double the +escape character to avoid to have it interpreted by the command shell. +

    In the configuration file, you can use different strategies to filter the files to process. The simplest one is to use only "exclude" rules to remove all the @@ -1620,10 +1700,10 @@ quote them. Otherwise the shell will try to expand them.

    9 Content

    -SnapRAID stores the list and checksums of your files in the content file. +SnapRAID stores the list and check-sums of your files in the content file.

    It's a binary file, listing all the files present in your disk array, -with all the checksums to verify their integrity. +with all the check-sums to verify their integrity.

    This file is read and written by the "sync" and "scrub" commands, and read by "fix", "check" and "status". @@ -1642,9 +1722,9 @@ only read by "scrub" and "check". Encoding SnapRAID in Unix ignores any encoding. It reads and stores the -file names with the same encoding used by the filesystem. +file names with the same encoding used by the file-system.

    -In Windows all the names read from the filesystem are converted and +In Windows all the names read from the file-system are converted and processed in the UTF-8 format.

    To have the file names printed correctly you have to set the Windows