### SnapRAID Configuration - Linux Example Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Example configuration for SnapRAID on a Linux system, specifying parity file location, content file locations on different disks, and data disk mappings. ```config parity /mnt/diskp/snapraid.parity content /var/snapraid/snapraid.content content /mnt/disk1/snapraid.content content /mnt/disk2/snapraid.content data d1 /mnt/disk1/ data d2 /mnt/disk2/ data d3 /mnt/disk3/ ``` -------------------------------- ### SnapRAID Configuration - Windows Example Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Example configuration for SnapRAID on a Windows system, using Windows path formats with drive letters and backslashes for parity, content, and data disk definitions. ```config parity E:\snapraid.parity content C:\snapraid\snapraid.content content F:\array\snapraid.content content G:\array\snapraid.content data d1 F:\array\ data d2 G:\array\ data d3 H:\array\ ``` -------------------------------- ### Typical Unix SnapRAID Configuration Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt An example of a typical SnapRAID configuration file for Unix-like systems, including parity, content, data, exclude paths, and smartctl directives. ```config parity /mnt/diskp/snapraid.parity content /mnt/diskp/snapraid.content content /var/snapraid/snapraid.content data d1 /mnt/disk1/ data d2 /mnt/disk2/ data d3 /mnt/disk3/ exclude /lost+found/ exclude /tmp/ smartctl d1 -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/sg0 smartctl 2-parity -d areca,2/1 /dev/sg0 ``` -------------------------------- ### Typical Windows SnapRAID Configuration Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt An example of a typical SnapRAID configuration file for Windows, including parity, content, data, exclude paths, and smartctl directives for Windows environments. ```config parity E:\snapraid.parity content E:\snapraid.content content C:\snapraid\snapraid.content data d1 G:\array\ data d2 H:\array\ data d3 I:\array\ exclude Thumbs.db exclude $RECYCLE.BIN exclude \System Volume Information smartctl d1 -d sat %s smartctl d2 -d usbjmicron %s smartctl parity -d areca,1/1 /dev/arcmsr0 smartctl 2-parity -d areca,2/1 /dev/arcmsr0 ``` -------------------------------- ### Setup mhddfs Pool on Linux Source: https://github.com/amadvance/snapraid/wiki/pooling Creates mount points, mounts individual drives, and then pools them using mhddfs. Files are placed on the drive with the most free space. ```bash sudo mkdir A00,A01,A02,pool sudo mount /dev/sda1 A00 sudo mount /dev/sdb1 A01 sudo mount /dev/sdc1 A02 mhddfs mhddfs A00,A01,A02 Pool -o allow_other ``` -------------------------------- ### SnapRAID Log Output Example Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid_log.txt This command demonstrates how to direct SnapRAID's structured log output to standard error. ```bash snapraid status --log ">&2" ``` -------------------------------- ### Setup AUFS Pool on Linux Source: https://github.com/amadvance/snapraid/wiki/pooling Creates mount points, mounts individual drives, and then pools them using AUFS. This method offers more control but is prone to issues with whiteout files on newer kernels. ```bash sudo mkdir A00,A01,A02,pool sudo mount /dev/sda1 A00 sudo mount /dev/sdb1 A01 sudo mount /dev/sdc1 A02 mount -t aufs -o br=A00=rw:A01=rw:A02=rw -o create=mfs none pool ``` -------------------------------- ### Samba Configuration for SnapRAID Pool Share Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Example Samba configuration settings to enable sharing of the SnapRAID pool directory over the network, allowing access from Windows or Unix machines. ```ini # In the global section of smb.conf unix extensions = no # In the share section of smb.conf [pool] comment = Pool path = /pool read only = yes guest ok = yes wide links = yes follow symlinks = yes ``` -------------------------------- ### Install AUFS tools on Linux Source: https://github.com/amadvance/snapraid/wiki/pooling Installs the AUFS (Another Unified File System) tools, a FUSE-based filesystem for pooling drives, on Debian-based Linux systems. Note: AUFS is not recommended for kernels 3.6 and above. ```bash apt-get install aufs-tools ``` -------------------------------- ### Calculate RAM Usage for SnapRAID Hashes Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Illustrates the formula and example calculations for estimating RAM requirements based on total disk size, block size, and hash size. Adjusting hash size and block size can reduce memory consumption. ```text RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB ``` -------------------------------- ### Install mhddfs on Linux Source: https://github.com/amadvance/snapraid/wiki/pooling Installs the mhddfs utility, a FUSE-based filesystem for pooling drives, on Debian-based Linux systems. ```bash sudo apt-get install mhddfs ``` -------------------------------- ### SnapRAID Scrub Command Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Starts the SnapRAID scrubbing process to check data and parity for errors. By default, it checks approximately 8% of the array, excluding recently scrubbed blocks. ```bash snapraid scrub ``` -------------------------------- ### SnapRAID Basic Commands Overview Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Overview of essential SnapRAID commands for managing the array, including status, disk control, backup, scrubbing, and fixing. ```bash status ``` ```bash smart ``` ```bash probe ``` ```bash up ``` ```bash down ``` ```bash sync ``` ```bash scrub ``` ```bash fix ``` -------------------------------- ### SnapRAID Command-Line Synopsis Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt This lists the available command-line options and subcommands for SnapRAID. Use these to configure and manage your backup and recovery operations. ```bash snapraid [-c, --conf CONFIG] [-f, --filter PATTERN] [-d, --filter-disk NAME] [-m, --filter-missing] [-e, --filter-error] [-a, --audit-only] [-h, --pre-hash] [-i, --import DIR] [-p, --plan PERC|bad|new|full] [-o, --older-than DAYS] [-l, --log FILE] [-s, --spin-down-on-error] [-w, --bw-limit RATE] [-t, --tail] [-Z, --force-zero] [-E, --force-empty] [-U, --force-uuid] [-D, --force-device] [-N, --force-nocopy] [-F, --force-full] [-R, --force-realloc] [-W, --force-realloc-tail] [-S, --start BLKSTART] [-B, --count BLKCOUNT] [-L, --error-limit NUMBER] [-A, --stats] [-v, --verbose] [-q, --quiet] status|smart|probe|up|down|diff|sync|scrub|fix|check |list|dup|pool|devices|touch|rehash|locate snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT] ``` -------------------------------- ### SnapRAID Sync Command Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid.txt Initiates the SnapRAID synchronization process to build or update parity information. This command may take a long time on the first run. ```bash snapraid sync ``` -------------------------------- ### SnapRAID Operating Without Configuration Tag Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid_log.txt This tag is output when SnapRAID is run without a configuration file. ```log conf:missing: ``` -------------------------------- ### SnapRAID Parity Disk Filesystem Info Tag Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid_log.txt This tag provides filesystem information for a parity disk, including size and free space. For split parity, it's the sum of all splits. ```log fsinfo_parity::: ``` -------------------------------- ### SnapRAID Parity Split Filesystem Info Tag Source: https://github.com/amadvance/snapraid/blob/master/doc/snapraid_log.txt This tag provides detailed filesystem information for a parity split, including type and label. ```log fsinfo_parity_split:[/]::::