diff --git a/authors.html b/authors.html new file mode 100644 index 00000000..05960205 --- /dev/null +++ b/authors.html @@ -0,0 +1,109 @@ + + + + + + + + + + + + + +SnapRAID + + + + + + + + + + + + +
+ + + +

+The author of SnapRAID is Andrea Mazzoleni. +

+

+I'm an Italian Software Engineer living in Bergamo, Italy. +My hobbies are road cycling, +mountain bike, +reading and +programming. +

+

+You can contact me by email using the address +email. +

+

+Please don't send support request at this address, but use the Support. +

+ +

+

+ +
+ + + + + + + diff --git a/active.png b/beta/active.png similarity index 100% rename from active.png rename to beta/active.png diff --git a/beta/android-chrome-192x192.png b/beta/android-chrome-192x192.png new file mode 100644 index 00000000..91e55c48 Binary files /dev/null and b/beta/android-chrome-192x192.png differ diff --git a/beta/android-chrome-512x512.png b/beta/android-chrome-512x512.png new file mode 100644 index 00000000..d47aa48d Binary files /dev/null and b/beta/android-chrome-512x512.png differ diff --git a/beta/apple-touch-icon.png b/beta/apple-touch-icon.png new file mode 100644 index 00000000..0849f486 Binary files /dev/null and b/beta/apple-touch-icon.png differ diff --git a/beta/compare.html b/beta/compare.html new file mode 100644 index 00000000..3053f34a --- /dev/null +++ b/beta/compare.html @@ -0,0 +1,439 @@ + + + + + + + + Compare SnapRAID + + + + + + + + + + + + + + + + + +
+ +
+ + +
+

Comparison

+ +
+

+ SnapRAID is one of many RAID-like solutions available for disk arrays. +

+ +

Some well-known alternatives include:

+ + + +
+ +
+

Key Takeaways

+
+
+

Real-time vs Snapshot

+

+ +The primary factor for categorizing storage solutions is when redundancy information is updated. This timing determines whether the system acts as a live mirror or a point-in-time recovery tool. +In real-time solutions, parity is updated immediately during every write operation without user action. While this ensures the array is constantly protected against hardware failure, it does not allow for the restoration of an earlier state, meaning accidental deletions are propagated instantly. +In snapshot solutions, parity is updated only upon an explicit request, similar to a backup. This creates a fixed point in time that allows to recover files that were accidentally deleted or modified since the last sync. +

+
+
+

Integrity & Bitrot

+

+Silent data corruption, or bitrot, is a major threat where storage devices return corrupted data without reporting hardware errors. Unlike traditional disk failures, this bit-level degradation remains invisible until the data is accessed or an array reconstruction is attempted. +A primary factor in categorizing storage solutions is their support for integrity checksums to detect and repair this corruption. Advanced systems use hashing to verify data blocks, allowing them to identify silent changes even if timestamps remain unaltered and use parity data to reconstruct the original, uncorrupted information. +

+
+
+
+ + +
+

Features comparison

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FeatureSnapRAIDUnraidZFSBtrfsStorage Spaces
+ Redundancy Model +
Real-time computes parity in real-time like RAID; snapshot computes parity on request, like backups.
+
SnapshotReal-timeReal-time
Snapshot
Real-time
Snapshot
Real-time
+ Integrity +
Whether data is validated with a checksum, and the default checksum type.
+
Yes
SpookyHash
128-bit
+ No +
+ + +
+
Yes
Fletcher4
256-bit
Yes
CRC32C
32-bit
+ No +
+ + +
+
+ Fix Silent Errors +
Whether silent errors are detected and fixed before propagating to parity.
+
Yes + No +
+ + +
+
+ Yes +
+ + +
+
+ Yes +
+ + +
+
No
Number of Failures +
How many disk failures are supported? 1 for RAID5, 2 for RAID6.
+
1-61-2 + 1-3 +
+ + +
+
1-21-2
+ More disk failures +
If more disks fail than the supported redundancy model, can data on non-failed disks be recovered?
+
YesYesNoNoNo
+ Power/Noise +
How many disks spin when reading a single file?
+
OneOneAllAllAll
Filled Disks +
Can you start with disks that already contain data?
+
YesYesNoNoNo
Add Filled Disks +
Can data disks that already contain data be added later?
+
Yes + No +
+ + +
+
NoNoNo
Operating System +
Which operating systems are supported?
+
Linux, Win, macOS, BSDLinux + Linux, BSD, macOS +
+ + +
+
LinuxWindows
Stable Since +
Year of the first official release supporting at least RAID5 redundancy.
+
201120052005 + Unstable +
+ + +
+
2012
License / Price +
Software license and cost.
+
GPL3 / FreeProprietary / SubscriptionCDDL / FreeGPL2 / FreeProprietary / Windows
Interface +
Which interface is provided? GUI or command line?
+
CLI / GUI / APIGUI / CLI / API + CLI / GUI +
+ + +
+
+ CLI / GUI +
+ + +
+
GUI
+
+ +
+ + +
+
+
+
+
+ + + + + + + diff --git a/beta/design.html b/beta/design.html new file mode 100644 index 00000000..06ce4019 --- /dev/null +++ b/beta/design.html @@ -0,0 +1,195 @@ + + + + + + + + SnapRAID Design + + + + + + + + + + + + + + + + + +
+ +
+ + +
+
+

Design Philosophy

+
+ Simplicity is prerequisite for reliability +
+ + Edsger W. Dijkstra + +
+ + +
+

+ SnapRAID was created following the Unix philosophy: + Write programs that do one thing and do it well. +

+
+ +
+ +
+

Reliability

+

+ The first design principle was reliability. + The result is a simple architecture and an easy to understand implementation. +

+

+ Extensive and automated tests with the runtime checker Valgrind + and with the Google Sanitizers + are done to ensure the correctness of the final application. + The test has a code coverage of over 90%, measured with lcov. +

+

+ SnapRAID is also verified with Coverity Scan for both the + CLI and the Daemon. + and clang static analyzers, + and with the American Fuzzy Lop fuzzy tester. +

+
+ + +
+

Robustness

+

+ The second design principle was robustness. + It supports any kind of problem. Even on kernel panics, power-downs + or any other hard failure at runtime, your redundancy data is in safe hands. +

+

+ It uses all the possible storage techniques to ensure to always keep consistent + redundancy even after critical interruptions. +

+
+ + +
+

Efficiency

+

+ The third design principle was efficiency. + It's a native C application highly optimized to ensure maximum throughput of your disk array. +

+

+ Integrity checks use the highly efficient murmur3 + and SpookyHash hashes at 128 bits. +

+

+ Redundancy computations use a custom RAID library + (based on Linux Kernel RAID) supporting up to six parity levels. + Internal structures use TommyDS. +

+
+
+ +
+ +
+

Use of Artificial Intelligence

+

+ This project is not "vibe-coded". + Artificial intelligence is used strictly as a + precision tool and a pair programmer, never as a substitute for engineering judgment. All architecture + decisions, core logic, and safety guarantees remain under direct human control and review. +

+

+ AI was used selectively to accelerate front-end scaffolding, component layout, and alignment with modern UI + standards. All functional behavior, state management, API integration, and system logic were implemented and + manually validated. +

+

+ Development follows a human-led, AI-assisted workflow. The developer defines the architecture and writes + the core implementations. AI contributes by exploring design alternatives, surfacing edge cases, suggesting + optimizations, and helping refine documentation. Any generated output is reviewed, revised where necessary, + and hardened before integration. +

+

+ This approach improves development efficiency while preserving strict engineering oversight and reliability. +

+
+
+ +
+ + + + + + + diff --git a/beta/desk-dashboard-light.png b/beta/desk-dashboard-light.png new file mode 100644 index 00000000..a94d57cd Binary files /dev/null and b/beta/desk-dashboard-light.png differ diff --git a/beta/desk-dashboard.png b/beta/desk-dashboard.png new file mode 100644 index 00000000..d035c317 Binary files /dev/null and b/beta/desk-dashboard.png differ diff --git a/beta/desk-differences-light.png b/beta/desk-differences-light.png new file mode 100644 index 00000000..008b26b1 Binary files /dev/null and b/beta/desk-differences-light.png differ diff --git a/beta/desk-differences.png b/beta/desk-differences.png new file mode 100644 index 00000000..5adc3e5a Binary files /dev/null and b/beta/desk-differences.png differ diff --git a/beta/desk-disks-light.png b/beta/desk-disks-light.png new file mode 100644 index 00000000..53ee58ff Binary files /dev/null and b/beta/desk-disks-light.png differ diff --git a/beta/desk-disks.png b/beta/desk-disks.png new file mode 100644 index 00000000..11e0caff Binary files /dev/null and b/beta/desk-disks.png differ diff --git a/beta/desk-recovery-light.png b/beta/desk-recovery-light.png new file mode 100644 index 00000000..463aa37e Binary files /dev/null and b/beta/desk-recovery-light.png differ diff --git a/beta/desk-recovery.png b/beta/desk-recovery.png new file mode 100644 index 00000000..6c711d40 Binary files /dev/null and b/beta/desk-recovery.png differ diff --git a/beta/desk-settings-light.png b/beta/desk-settings-light.png new file mode 100644 index 00000000..a7573eef Binary files /dev/null and b/beta/desk-settings-light.png differ diff --git a/beta/desk-settings.png b/beta/desk-settings.png new file mode 100644 index 00000000..1ae4709b Binary files /dev/null and b/beta/desk-settings.png differ diff --git a/beta/desk-smart-light.png b/beta/desk-smart-light.png new file mode 100644 index 00000000..dec35de9 Binary files /dev/null and b/beta/desk-smart-light.png differ diff --git a/beta/desk-smart.png b/beta/desk-smart.png new file mode 100644 index 00000000..bb2c39fa Binary files /dev/null and b/beta/desk-smart.png differ diff --git a/beta/desk-tasks-light.png b/beta/desk-tasks-light.png new file mode 100644 index 00000000..cd01e285 Binary files /dev/null and b/beta/desk-tasks-light.png differ diff --git a/beta/desk-tasks.png b/beta/desk-tasks.png new file mode 100644 index 00000000..34567e2e Binary files /dev/null and b/beta/desk-tasks.png differ diff --git a/beta/download.html b/beta/download.html new file mode 100644 index 00000000..28b4910f --- /dev/null +++ b/beta/download.html @@ -0,0 +1,266 @@ + + + + + + + + Download SnapRAID + + + + + + + + + + + + + + + + + +
+ +
+ + +
+

Download SnapRAID

+ +
+ +

+ SnapRAID CLI v14.0rc3h (Released March 2026). +

+ +

+ SnapRAID Daemon v1.0beta3h (Released March 2026). +

+ +

+ SnapRAID is a Free Software + application released with the GPLv3 license. +

+
+ +
+ +
+

SnapRAID CLI (Command Line Interface)

+

+ The classic command line tool. + See the ChangeLog for the detailed list of changes, + and CheckSums for the SHA256 checksums. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformVersionDescriptionDownload
Windows14.0rc3hPortable executable for Windowssnapraid-14.0rc3h-windows-x64.zip
DEB14.0rc3hPackage for Ubuntu/Debiansnapraid_14.0rc3h-1_amd64.deb
RPM14.0rc3hPackage for RedHat/Fedorasnapraid-14.0rc3h-1.x86_64.rpm
PKG14.0rc3hPackage for Archsnapraid-14.0rc3h-1-x86_64.pkg.tar.zst
TXZ14.0rc3hPackage for Slackwaresnapraid-14.0rc3h-x86_64-1_am.txz
Source Code14.0rc3hC source code compatible with all Linux distributions and macOSsnapraid-14.0rc3h.tar.gz
+

+ Old versions are available on GitHub. +

+
+ + +
+

SnapRAID Daemon (Automation, Web UI, REST API)

+ +
+ + Warning:The SnapRAID Daemon for Linux requires SnapRAID CLI 14.0+ to be already installed and configured. In contrast, the Windows installer contains both the SnapRAID CLI and the SnapRAID Daemon. On Windows, if you are already using SnapRAID, ensure you install the daemon in the same directory. +
+ +
+ + Warning:SnapRAID Daemon is currently available only for Linux and Windows. If you are a Mac developer interested in volunteering your expertise to bring the daemon to macOS as an open-source collaborator, we would love to hear from you! +
+ +

+ Includes background service and Web UI. + See the ChangeLog for the detailed list of changes, + and CheckSums for the SHA256 checksums. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformVersionDescriptionDownload
EXE1.0beta3hWindows Installer (If the SmartScreen "Blue Box" appears, select "More Info" and then "Run anyway")snapraid-daemon-1.0beta3h.exe
DEB1.0beta3hPackage for Ubuntu/Debiansnapraid-daemon_1.0beta3h-1_amd64.deb
RPM1.0beta3hPackage for RedHat/Fedorasnapraid-daemon-1.0beta3h-1.x86_64.rpm
PKG1.0beta3hPackage for Archsnapraid-daemon-1.0beta3h-1-x86_64.pkg.tar.zst
TXZ1.0beta3hPackage for Slackwaresnapraid-daemon-1.0beta3h-x86_64-1_am.txz
Source Code1.0beta3hC source code compatible with all Linux distributionssnapraid-1.0beta3h.tar.gz
+

+ Old versions are available on GitHub. +

+
+ + +
+

+ + Support the Project + +

+

+ If you want to show your appreciation, + you can donate with Paypal, + or you can star SnapRAID CLI and star SnapRAID Daemon on GitHub. +

+

+ Donations are used to support SnapRAID development, covering costs such as new hardware, internet services, and AI subscriptions +

+ Donate via PayPal +
+
+
+ + + + + + + diff --git a/beta/faq.html b/beta/faq.html new file mode 100644 index 00000000..0431c435 --- /dev/null +++ b/beta/faq.html @@ -0,0 +1,1941 @@ + + + + + + + + SnapRAID FAQ + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+

Frequently Asked Questions

+

Common questions about configuration, recovery, and usage.

+ + + + + +
+
+

+General +

+
+

+What is SnapRAID? +

+
+

+SnapRAID is an application that creates a partial backup of your disk array. +If some disks in your array fail, even if they are completely broken, you can recover their contents. +It provides only a partial backup because it does not allow recovery from a failure of the entire array, +but only if the number of failed disks is below a predefined limit. +

+
+
+
+

+How is it different from RAID? +

+
+

+RAID solutions mirror data and propagate changes immediately to the parity data. +In this sense, RAID systems are not backups because they do not allow restoration of an earlier state of the array. +

+

+SnapRAID, however, is more akin to a backup solution, allowing you to restore the state of the last backup. +For example, with SnapRAID, if you accidentally delete a file, you can easily recover it. +

+

+Other advantages over traditional RAID5/6 solutions include: +

+
    +
  • +All your data is hashed to ensure data integrity and prevent silent corruption. +
  • +
  • +If too many disks fail to allow recovery, you lose data only on the failed disks; data on other disks remains safe. +
  • +
  • +If you accidentally delete files on a disk, you can recover them. +
  • +
  • +You can start with already filled disks. +
  • +
  • +Disks can have different sizes. +
  • +
  • +You can add disks at any time. +
  • +
  • +It does not lock in your data. You can stop using SnapRAID at any time without needing to reformat or move data. +
  • +
  • +To access a file, only a single disk needs to spin, saving power and reducing noise. +
  • +
  • +You can have up to six parity levels, compared to one for RAID5 and two for RAID6. +
  • +
+

+RAID has advantages, such as better speed due to data striping. +The best choice depends on your specific use case. +

+
+
+
+

+How is it different from ZFS/Btrfs snapshots and NTFS Shadow Copy? +

+
+

+SnapRAID creates a file-system snapshot conceptually similar to other snapshot solutions. +However, its primary purpose is to recover a disk to its saved state after a complete disk failure. +

+

+SnapRAID is more akin to the RAID-Z/RAID functionality of ZFS/Btrfs. +Compared to them, SnapRAID offers the following advantages: +

+
    +
  • +If too many disks fail to allow recovery, you lose data only on the failed disks; data on other disks remains safe. +
  • +
  • +You can start with already filled disks. +
  • +
  • +You can add disks at any time (not possible with ZFS, but possible with Btrfs). +
  • +
  • +It does not lock in your data. You can stop using SnapRAID at any time without needing to reformat or move data. +
  • +
  • +To access a file, only a single disk needs to spin, saving power and reducing noise. +
  • +
  • +You can have up to six parity levels, compared to three for ZFS RAID-Z and two for Btrfs RAID-5/6. +
  • +
+

+ZFS and Btrfs have advantages, such as being real-time solutions. +The best choice depends on your specific use case. +

+
+
+
+

+How is it different from other backup solutions? +

+
+

+With a typical backup solution, you need as much space as the entire disk array for the backup. +With SnapRAID, you need only one additional parity disk to recover from the most common case of a single disk failure. +Adding more parity disks allows recovery from additional disk failures. +

+

+Note that only a full backup allows recovery from a complete failure of the disk array, +making it the preferred solution if you can afford it. +SnapRAID is a good option when a full backup is not feasible. +

+
+
+
+

+What are the advantages of SnapRAID compared to similar solutions like unRAID, and Windows Storage Spaces? +

+
+

+Visit the + +Compare + +page to see a comparison with other similar solutions. +

+

+A key advantage of SnapRAID is its + +integrity and silent error management + +, which is at the same level as (or better than) +ZFS and Btrfs file systems. In contrast, unRAID and Windows Storage Spaces lack integrity checks. +

+
+
+
+

+How much does it cost? +

+
+

+Nothing. SnapRAID is a + +free software + +application released under the GPLv3 license. +

+
+
+
+

+How can I get support? +

+
+

+Visit the + +Support + +page. +

+
+
+
+

+Does SnapRAID have a GUI? +

+
+

+Yes, SnapRAID Daemon includes a web GUI. +There is also an external GUI called + +Elucidate + +, +and a plugin for + +OpenMediaVault + +. +

+
+
+
+

+Does SnapRAID provide encryption or virtual views/storage pooling? +

+
+

+SnapRAID provides a basic virtual views/storage pooling solution but is also compatible with other pooling solutions. +

+

+For encryption and data recovery, you can use other tools. +Here are some suggestions: +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+ +Linux + +Windows + +Mac OS X +
+Encryption + + + dm-crypt/LUKS + +
+( + + tutorial + +) +
+ + VeraCrypt + + +
+Virtual views/storage pooling + + + mergerfs + +( + + tutorial + +), + + Greyhole + + + + DrivePool ($) + + +
+Data recovery + + + ddrescue + +, + + safecopy + +, + + dd_rescue + + + +
+
+
+
+

+Is SnapRAID suitable for backing up the home/My Documents directory? +

+
+

+No. If you have a limited amount of data that can be easily saved to an external USB drive +or an online backup service, using SnapRAID is unnecessary. +SnapRAID is best suited for backing up a + +very large + +amount of data, +such as many terabytes, where a full backup copy is not feasible. +

+
+
+
+

+Is SnapRAID suitable for backing up the boot OS disk? +

+
+

+No. For the disk used to boot your machine and containing the OS files, +it’s better to use another solution, such as RAID1 or a mirror copy. +SnapRAID requires an operating system to run and cannot recover the OS if it is missing. +

+
+
+
+

+Can SnapRAID hash files without parity computation? +

+
+

+No, SnapRAID cannot be used solely to hash files. Its hashing is designed to work in combination with parity computation +and is not optimized for hashing alone. +

+

+For a list of file verification tools, see: + +Wikipedia: Comparison of file verification software + +. +

+

+For a setup example in Ubuntu 14.04, see + +Zack's SnapRAID tutorial + +. +

+
+
+
+
+

+Setup +

+
+

+Do I need one or more parity disks? +

+
+

+As a rule of thumb, use one parity disk (RAID5) for up to four data disks, +and then add one parity disk for each group of seven data disks, as shown in the table: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Parities + +Data disks +
+1/Single Parity/RAID5 + +2–4 +
+2/Double Parity/RAID6 + +5–14 +
+3/Triple Parity + +15–21 +
+4/Quad Parity + +22–28 +
+5/Penta Parity + +29–35 +
+6/Hexa Parity + +36–42 +
+

+This table accounts for the fact that more parity levels help recover from an unsynced array +and that disk failures may be correlated if all disks are in the same environment. +

+

+Multiple failures can occur. The worst case reported in SnapRAID’s history +is a + +four-disk failure, successfully recovered using four parities + +. +

+

+For more information on parity levels and disk failure rates, see: + +Why RAID 5 stops working in 2009 + +, + +Why RAID 6 stops working in 2019 + +, + +Does RAID 6 stop working in 2019? + +, + +Triple-Parity RAID and Beyond + +, + +How long do disk drives last? + +. +

+
+
+
+

+Which file system is recommended for SnapRAID? +

+
+

+For data disks, consider these suggestions: +

+ + + + + + + + + + + + + + + + + + + + + + + + + +
+Data + +Result +
+Any + +OK. You can generally use any file system you prefer, with some exceptions noted below. +
+Btrfs + +OK. Ensure SnapRAID is built with the libblkid library for UUID support. +You will be warned at each run if this is not the case. +Note that multiple Btrfs snapshots are not supported. +
+ZFS + +Partial. UUID support is unavailable, but core SnapRAID functionalities remain usable. +Note that multiple ZFS snapshots are not supported. +
+FAT + +Uncertain. There are + + reports + +of duplicate inode cases. NTFS is significantly faster and recommended instead. +
+ReFS + +No. ReFS uses + + 128-bit inodes + +, +which SnapRAID does not yet support. +
+

+For parity disks, consider these suggestions: +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Parity + +Result +
+ext4 + +OK if disks are not larger than 16 TB. The parity is stored in a single large file, and ext4 has a 16 TB file size limit. +
+XFS + +OK +
+Btrfs + +OK. Ensure SnapRAID is built with the libblkid library for UUID support. +You will be warned at each run if this is not the case. +
+JFS + +No. It does not support the + + fallocate() + +command needed to allocate parity files. +It also does not optimally implement the + + posix_fadvise() + +command. +
+NTFS + +OK in Windows. Not supported in Linux, as it does not support the + + fallocate() + +command needed to allocate parity files. +You can use it if the parity disk contains only the parity file. +
+FAT + +No. Files larger than 4 GB cannot be stored. It is also not journaled. Use NTFS instead. +
+HFS+ + +OK +
+

+In Linux, to maximize space for the parity file system, format it with the + +-m 0 -T largefile4 + +options, like: +

+
mkfs.ext4 -m 0 -T largefile4 DEVICE
+

+On an 8 TB disk, this can save about 400 GB. It is also expected to be as fast as, or faster than, the default. +

+
+
+
+

+Which hardware configuration is recommended? +

+
+

+For optimal performance, connect all disks via SATA, not USB. +

+

+See + +Raj's Prototype Builds + +for examples of hardware setups. +

+

+For choosing hard drives, refer to + +Backblaze's What Hard Drive Should I Buy? + +and + +Backblaze's Enterprise Drives: Fact or Fiction? + +. +

+
+
+
+

+Is a multi-core CPU recommended? +

+
+

+No. SnapRAID is typically not CPU-bound; the limiting factor is disk read performance. +A single-core CPU is usually sufficient. +

+

+For example, in my system, I achieve a combined read speed of 600 MiB/s, +but SnapRAID can hash at 12,000 MiB/s on a single core. +

+
+
+
+

+Is a 64-bit operating system recommended? +

+
+

+Yes. SnapRAID performs better on a 64-bit operating system, as it can access more than 4 GiB of memory +and use faster hashing and parity algorithms. +However, for less than 30 TB of data, it performs well on a 32-bit operating system too. +

+
+
+
+

+How much memory does SnapRAID require to run? +

+
+

+Approximately, SnapRAID requires 1 GiB of memory for every 16 TB of data. +

+

+If you have insufficient memory, the recommended solution is to install more memory. +

+

+Alternatively, increase the blocksize option in the configuration file. +Memory usage is inversely proportional to the selected block size. +For example, using "blocksize 512" instead of the default 256 halves memory usage. +However, a larger block size increases wasted space in parity files. +

+

+Running with memory swapped to disk is not recommended, as it significantly slows performance. +

+
+
+
+

+Should I check the SMART attributes of my disks? +

+
+

+Yes. Approximately 20% of disks fail within four years, as +reported by + +Backblaze's How long do disk drives last? + +. +Monitoring SMART attributes can help anticipate failures and prevent data loss. +

+

+If any of the SMART attributes + +Reallocated_Sector_Ct (5) + +, + +Reported_Uncorrect (187) + +, + +Command_Timeout (188) + +, + +Current_Pending_Sector (197) + +, +or + +Offline_Uncorrectable (198) + +are non-zero, replace the disk, as recommended by + +Backblaze's Hard Drive SMART Stats + +. +

+

+See also + +Google's Failure trends in a large disk drive population + +, +which found: +

+
After the first reallocation, drives are
+over 14 times more likely to fail within
+60 days than drives without reallocation
+counts.
+
After the first probational event, drives
+are 16 times more likely to fail within
+60 days than drives with zero probational
+counts.
+
After the first offline reallocation, drives have over
+21 times higher chances of failure within 60 days than
+drives without offline reallocations.
+

+These findings recommend replacing a disk after the first error in the SMART attributes + +Reallocated_Sector_Ct (5) + +, + +Current_Pending_Sector (197) + +, or + +Offline_Uncorrectable (198) + +. +

+
+
+
+

+Is it possible to use SnapRAID in a dual-boot configuration, such as Windows and Linux? +

+
+

+Yes, SnapRAID can be used in a dual-boot configuration, regardless of the OS combination. +

+

+It is recommended to run SnapRAID from only one OS. +While it may work if run from both OSes, this scenario is not thoroughly tested and risks issues +due to different SnapRAID versions, configurations, or content files. +

+
+
+
+
+

+Configuration +

+
+

+What is the SnapRAID 'content' file? +

+
+

+The content file stores the list of all files in your array, including their checksums, timestamps, and other necessary information. +

+

+This file will be approximately a few GiB in size, depending on the array’s size. +For 10 TB of data, the content file will be about 500 MiB. +

+
+
+
+

+What are the SnapRAID 'parity' and 'N-parity' files? +

+
+

+These files store the parity data used for recovery. +

+

+Their size grows to match the largest amount of data stored on any single disk in the array. +

+
+
+
+

+How do I configure SAMBA to share the pool directory? +

+
+

+To configure SAMBA to share the pool directory (e.g., /pool), add the following options to +your /etc/samba/smb.conf: +

+
+# 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
+
+
+
+
+

+How can I use more disks than available drive letters in Windows? +

+
+

+Use + +Volume Mount Points + +to mount a disk in a directory without +using a drive letter, similar to Linux. +

+
+
+
+
+

+Use +

+
+

+What are the most important steps to prevent data loss? +

+
+

+To minimize the risk of data loss, follow these steps: +

+
    +
  • +Before running the first "sync", test your RAM with a program +like + +MemTest86 + +. +Faulty RAM is the most common cause of data loss with SnapRAID. +
  • +
  • +Run the "sync" command frequently, from once a day to once a week. +
  • +
  • +Run the "scrub" command weekly. +
  • +
  • +Use + +smartmontools + +or a similar utility +to monitor SMART attributes. +Replace a disk at the first sign of + +Reallocated_Sector_Ct + +, + +Current_Pending_Sector + +, or + +Offline_Uncorrectable + +, +even if it still functions. +
  • +
+
+
+
+

+How can I add a data disk to an existing array? +

+
+

+To add a new data disk to the array, add the new "disk" option in the configuration file, +then run a "sync" command: +

+
+snapraid sync
+
+

+If the disk is empty, the "sync" command will complete immediately. +

+
+
+
+

+How can I remove a data disk from an existing array? +

+
+

+To remove a data disk from the array, follow these steps: +

+
    +
  • +Change the related "disk" option in the configuration file to point to an empty directory. +
  • +
  • +Remove any "content" option pointing to that disk from the configuration file. +
  • +
  • +Run a "sync" command with the "-E, --force-empty" option: +
    +snapraid sync -E
    +
    +The "-E" option allows SnapRAID to proceed even when detecting an empty disk. +
  • +
  • +After the "sync" command completes, remove the "disk" option from the configuration file. +
  • +
+

+The array will then have no reference to the removed disk. +

+
+
+
+

+How can I add or remove a parity disk in an existing array? +

+
+

+To add a new parity level, add the appropriate "N-parity" option in the configuration file, then run the "sync" command +with the "-F, --force-full" option: +

+
+snapraid -F sync
+
+

+The "-F" option instructs SnapRAID to recompute the full parity. +

+

+During this process, your existing parity remains unmodified, ensuring continued protection +(note that this applies only from version 11.0). +

+

+To remove a parity level, remove the highest "N-parity" option from the configuration file and delete the parity file. +

+

+Note that after removing a parity file, it cannot be reused, as it becomes outdated after the next "sync" command. +

+
+
+
+

+How can I verify a single data disk? +

+
+

+The "scrub" command verifies the entire array and cannot be limited to a single data disk. +To verify only one data disk, use the "check" audit command with the disk specified: +

+
+snapraid check -a -d DISK_NAME
+
+

+This command verifies the checksums of all files on the specified disk. +Other data and parity disks are not read or verified. +

+
+
+
+

+How can I replace a data disk? +

+
+

+If the disk is lost, refer to the recovery section in the manual. +Otherwise, copy all files to the new disk, maintaining the same directory structure and names. +

+

+In Linux, use the command: +

+
+cp -av /from_dir/. /to_dir
+
+

+WARNING: If using 'rsync' or 'mc' commands, ensure they are recent versions. +'rsync' must be at least version 3.1.0 (2013), and 'mc' at least version 4.8.19 (2017). +Older versions may not copy sub-second timestamps. +

+

+In Windows, use the command: +

+
+robocopy F:\from_dir T:\to_dir /e /copyall
+
+

+Update the SnapRAID configuration to point to the new mount point, then run a "diff" command to ensure everything is correct: +

+
+snapraid diff
+
+

+If "diff" reports "added" or "removed" files, you may have copied files with a different directory structure. +Correct this until "diff" reports only "equal", "restored", or "copied" files. +

+

+To verify that files were copied correctly, run a "check" audit command on the replaced disk to verify checksums: +

+
+snapraid check -a -d DISK_NAME
+
+

+Finally, run "sync" to update the SnapRAID state. This command will complete almost immediately: +

+
+snapraid sync
+
+
+
+
+

+How can I replace a parity disk? +

+
+

+If the disk is still accessible, ensure the array is synced by running: +

+
+snapraid sync
+
+

+Copy the parity file to the new disk and update the parity location in the configuration file. +

+

+Run "sync" again to make SnapRAID recognize the new disk. This command will complete almost immediately: +

+
+snapraid sync
+
+

+In Linux, a good copy command is + +ddrescue + +. For example: +

+
+ddrescue /OLD_DISK/parity /NEW_DISK/parity /tmp/copy.log
+
+

+This copies the parity file from the old to the new location, continuing despite errors. +To retry problematic sections, repeat the same command. +

+

+A partial parity file is still useful, as it allows recovery using the valid parts. +

+

+If the parity file is partially damaged or lost, use the "fix" command with the -d option to recreate it, targeting only the affected parity: +

+
+snapraid fix -d PARITY_NAME
+
+
+
+
+

+How can I safely move files from one disk to another? +

+
+

+To safely move files between data disks in the array, follow these steps: +

+
    +
  • +Copy the files to the new location. +
  • +
  • +Run a 'diff' command to verify that the copied files are identified as 'copy'. +
  • +
  • +Run a 'sync' command. +
  • +
  • +Delete the files from the original location. +
  • +
  • +Run another 'sync' command. +
  • +
+

+This process ensures that, even if disks fail during the sync process, +you can recover all data. It also verifies that the hashes of moved files match the originals. +

+
+
+
+

+Can I defragment data and parity disks? +

+
+

+Yes, defragmentation does not affect SnapRAID. +

+
+
+
+

+How can I make SnapRAID less resource-intensive for other processes? +

+
+

+In Linux, use the + +ionice + +command with idle priority, like: +

+
+ionice -c 3 snapraid sync
+
+
+
+
+

+How can I upgrade to a newer version of SnapRAID? +

+
+

+To upgrade, replace the old SnapRAID executable with the new one. +The new version will use your existing configuration, content, and parity files. +

+

+Occasionally, the content file format changes, but newer SnapRAID versions can read all older formats. +The content file is updated to the new format the next time it is written, if necessary. +

+

+Downgrading to an older SnapRAID version is generally not possible. +If the old version cannot read the new content file, you will receive an appropriate message. +

+
+
+
+
+

+Recover +

+
+

+How can I undelete a recently deleted file? +

+
+

+Run the "fix" command with a filter for the specified file, like: +

+
+snapraid fix -f my_just_deleted_file
+
+

+To undelete a directory, use: +

+
+snapraid fix -f my_just_deleted_dir/
+
+

+To undelete all missing files, use: +

+
+snapraid fix -m
+
+
+
+
+

+What happens if I add files and a disk fails before updating parity with "sync"? +

+
+

+Files added to the failed disk after the last "sync" command are lost. +All other data is safe and can be recovered. +

+
+
+
+

+What happens if I delete files and a disk fails before updating parity with "sync"? +

+
+

+In the worst case, files deleted or modified on non-failed disks may prevent recovery of an equivalent amount of data on the failed disk. +For example, deleting 10 GB of data may prevent recovery of 10 GB from the failed disk. +The exact data loss depends on how much the deleted and failed data overlap in the parity. +

+

+Using two parity disks significantly improves recovery chances. +

+

+To ensure safety, avoid deleting files directly. Instead, move them to another directory on the same disk, +outside the SnapRAID-checked directory tree. Run the "sync" command, then delete the files. +If a disk fails during the "sync", run the "fix" command, specifying the location of the deleted files: +

+
+snapraid fix -i dir_of_deleted_files
+
+
+
+
+

+What happens if a disk fails during a "sync"? +

+
+

+You can still recover data. In the worst case, you can recover as much data as if the disk failed before the "sync". +If the "sync" process has progressed, SnapRAID uses the partially synced data to recover more. +Using the "autosave" configuration option saves intermediate content files during the sync process, improving recovery. +

+
+
+
+

+What are "data errors" in "sync", and how do I fix them? +

+
+
+Syncing...
+309505: Data error for file d4/data/index.db at position 40960
+WARNING! Unexpected data error in a data disk! The block is now marked as bad!
+Try with 'snapraid -e fix' to recover!
+
+

+Data errors occur when SnapRAID detects that a file’s content has changed without an updated write timestamp. +This should not happen and may indicate a silent disk error or a file system issue, such as an improper shutdown. +

+

+If a data error is found, the "sync" process continues, marking erroneous blocks as bad. +These can be fixed with the "-e fix" command, which typically takes only a few seconds: +

+
+snapraid -e fix
+
+

+If errors occur in multiple files, check for hardware issues. +Test your PC’s memory with a tool like + +MemTest86 + +. +Also, check disk cabling and CPU temperature. +

+

+Another possibility is that a program modified files without updating their timestamps. +In Linux, this is rare, except for memory-mapped files not yet closed. +In Windows, timestamps are guaranteed to update only after closing a file. +See + +MSDN WriteFile() + +: +

+
+When writing to a file, the last write time is not fully updated until
+all handles used for writing have been closed. Therefore, to ensure an
+accurate last write time, close the file handle immediately after writing
+to the file.
+
+

+For memory-mapped files in Windows, the program must manually update the timestamp, +as Windows does not do so automatically. +See + +MSDN CreateFileMapping() + +: +

+
+When modifying a file through a mapped view, the last modification timestamp
+may not be updated automatically. If required, the caller should use SetFileTime
+to set the timestamp.
+
+

+To avoid these issues in Windows, run "sync" when no programs are accessing files in the array. +

+
+
+
+

+How can I store all messages from a check or fix command in a file? +

+
+

+Use the "-l" option to generate a log file: +

+
+snapraid check -l mylog.log
+
+

+These log files can be large, potentially several GB. If too large for your editor, +use + +HxD + +. +

+
+
+
+

+How can I recover the snapraid.conf file? +

+
+

+Use the "-C, --gen-conf" command to generate a template configuration file +compatible with your content file. +Manual adjustments are needed to set disk mount points, but comments in the file provide guidance: +

+
+snapraid -C snapraid.content > snapraid.conf.new
+
+
+
+
+
+

+Tech +

+
+

+If the SnapRAID "check" command reports everything is OK, is it really OK? +

+
+

+Yes. SnapRAID verifies all files with a 128-bit checksum. +If it reports they are correct, they are. +

+
+
+
+

+What integrity checksum does SnapRAID use? +

+
+

+SnapRAID uses + +Murmur3 + +and + +SpookyHash + +128-bit hashes. +Murmur3 is the default on 32-bit platforms, and SpookyHash is the default on 64-bit platforms. +

+
+
+
+

+Why are integrity checksums important? +

+
+

+Integrity checksums detect silent errors when a hard drive returns corrupt data without reporting an error. +

+

+For an introduction to this issue, see: + +Data corruption is worse than you know + +. +

+

+For a detailed analysis, see: + +An Analysis of Data Corruption in the Storage Stack + +: +

+
+A significant number (8% on average) of corruptions
+are detected during RAID reconstruction, creating the
+possibility of data loss. In this case, protection against
+double disk failures is necessary to prevent data loss.
+
+
+
+
+

+How can SnapRAID recover if a disk fails during a 'sync'? +

+
+

+Before starting a sync, SnapRAID saves a special content file describing both the pre- and post-sync states. +This allows SnapRAID to attempt two recovery strategies. +

+

+For each block to recover, it first assumes the parity was correctly computed, as if the "sync" completed successfully. +If this fails, it assumes the parity was not yet updated, ignoring any new files added to the array. +

+

+Using double parity improves recovery when there are overlapping changes in the array. +

+
+
+
+

+Can I access data disks during a 'sync'? +

+
+

+Yes, you can safely read from data disks during a 'sync'. +

+

+You can also write, and if this interferes with the 'sync', +the process continues, skipping the written part. +

+

+This may affect potential recovery, but it is equivalent to writing just after the 'sync' completes. +

+
+
+
+

+Does SnapRAID retry reads or writes if a disk fails? +

+
+

+No, SnapRAID does not retry disk operations. It reports errors and attempts to continue. +After 100 errors, it stops execution. +

+

+In such cases, it’s better to allow manual data recovery before the disk fails completely. +Automatic retries could further damage the disk. +To retry, repeat the command manually. +

+

+You can adjust the 100-error limit using the "-L, --error-limit" option. +

+

+For "fix" and "check" commands, you can resume from the point of interruption using the "-s, --start" option, specifying the block number that caused the error. +

+

+For the "sync" command, the latest state is saved before termination, so restarting it will continue from where it stopped. +

+
+
+
+

+What is the snapraid.content.lock file? +

+
+

+This file is used by SnapRAID to check if another instance is running. +It is created where the first content file is stored. +

+
+
+
+

+What does the notice about zero sub-second timestamps mean? +

+
+

+In the 'status' command, you may see: +

+
+You have XXXXX files with zero sub-second timestamp.
+Run the 'touch' command to set it to a non-zero value.
+
+

+This indicates that some files have timestamps rounded to the nearest second, +even though your file system supports sub-second precision. +

+

+While not a problem, this may limit SnapRAID’s ability to detect moved or copied files between disks. +

+

+You can set sub-second timestamps to a random value using the 'touch' command, which does not modify the second part of the timestamp. +

+
+
+
+
+

+Performance +

+
+

+What is the optimal hardware configuration for the best performance? +

+
+

+The most critical factor is using (E)SATA connections for all disks to avoid controller slowdowns. +Avoid USB disks. +

+

+The second factor is using disks with similar performance, as the array’s read/write speed is limited by the slowest disk. +After a sync, SnapRAID displays statistics with wait times for each disk, helping identify bottlenecks. +

+

+Finally, a fast CPU can improve performance with many disks. +Check CPU usage during sync operations to determine if it’s a limiting factor. +

+
+
+
+

+What is the optimal block size for the best performance? +

+
+

+The default block size is typically optimal. +

+

+Increasing it may not improve performance and could reduce it in some cases. +

+
+
+
+

+What is the optimal Linux read-ahead size for the best performance? +

+
+

+The default Linux read-ahead size of 128 KiB is optimal for SnapRAID’s default block size of 256 KiB. +If using a larger block size, set the read-ahead size to at least half the SnapRAID block size. +

+

+For example, with a SnapRAID block size of 512 KiB, configure a read-ahead size of 256 KiB for sdX using: +

+
+echo 256 > /sys/block/sdX/queue/read_ahead_kb
+
+

+For a SnapRAID block size smaller than 256 KiB, use the default read-ahead size. +

+
+
+ +
+

+Why are SnapRAID sync and scrub faster than fix and check? +

+
+

+Yes, fix and check are typically slower than sync and scrub in SnapRAID. +

+

+The main reason is how each command accesses and processes the disks. +sync and scrub use a multithreaded implementation, with one thread per data disk (plus handling for parity). +This allows SnapRAID to read from multiple disks in parallel and squeeze out the maximum possible performance from your array. +

+

+Something similar could be done for fix and check, but SnapRAID deliberately takes a more conservative approach here. +When you run fix, you're usually in a recovery situation (bad blocks, missing data, failed disk, silent corruption detected during scrub/sync, etc.). +

+

+Pushing the system (and potentially marginal/failing drives) to maximum I/O limits during an active repair isn't ideal. +It could increase the risk of additional timeouts, errors, or stressing hardware that's already showing issues. +Reliability and safe recovery take priority over raw speed. +

+

+That said, there is still some parallelism in fix and check anyway: SnapRAID provides the operating system with the necessary hints (like read-ahead requests) to allow efficient prefetching of disk data, helping the OS optimize sequential reads where possible. +

+

+In short: sync and scrub are optimized for speed while staying safe. +fix and check are intentionally more cautious to protect your data when it matters most. +

+
+
+ +
+

+How fast are the hash and parity computations? +

+
+

+Murmur3 hash is very fast on 32-bit systems, and SpookyHash is even faster on 64-bit systems. +Parity computation is efficient up to double parity, even without SSE support. +Beyond double parity, a CPU with SSSE3 support is recommended. +For low-end CPUs without SSE, a special, incompatible triple-parity option is available. +See 'z-parity' in the manual for details. +

+

+The following results are from a Intel Core i7-10700 CPU @ 2.90GHz. +Check your values with the -T option: +

+
+root@redstar:/root# snapraid -T
+snapraid v14.0 by Andrea Mazzoleni, https://www.snapraid.it
+Compiler gcc 11.2.0
+CPU GenuineIntel, family 6, model 165, flags sse2 ssse3 crc32 avx2
+Memory is little-endian 64-bit
+Support nanosecond timestamps with futimens()
+
+Speed test using 8 data buffers of 262144 bytes, for a total of 2048 KiB.
+Memory blocks have a displacement of 1792 bytes to improve cache performance.
+The reported values are the aggregate bandwidth of all data blocks in MB/s,
+not counting parity blocks.
+
+Memory write speed using the C memset() function:
+  memset   61338
+
+CRC used to check the content file integrity:
+   table    1665
+   intel   12488
+
+Hash used to check the data blocks integrity:
+            best murmur3 spooky2   metro museair
+    hash spooky2    6172   18024   20752   29206
+
+RAID functions used for computing the parity with 'sync':
+            best    int8   int32   int64    sse2   sse2e   ssse3  ssse3e    avx2   avx2e
+    gen1    avx2           19147   34378   62743                           78638
+    gen2    avx2            5303    9850   26288   26926                   45010
+    genz   avx2e            3086    4950   14319   13838                           25299
+    gen3   avx2e    1278                                   13042   14120           27155
+    gen4   avx2e     960                                    9895   11008           21764
+    gen5   avx2e     784                                    7960    8713           17174
+    gen6   avx2e     652                                    6502    7502           14638
+
+RAID functions used for recovering with 'fix':
+            best    int8   ssse3    avx2
+    rec1    avx2    1602    3942    4301
+    rec2    avx2     698    1731    2224
+    rec3    avx2     166     908    1391
+    rec4    avx2     108     607     973
+    rec5    avx2      76     421     694
+    rec6    avx2      57     313     532
+
+
+
+
+
+

+Known Problems +

+
+

+Why does my machine reboot or crash while SnapRAID is running? +

+
+

+SnapRAID pushes the system to extreme conditions, which may expose latent hardware or driver issues, +resulting in a system crash or reboot. +

+

+Although the issue occurs only when SnapRAID is running, it is undoubtedly a hardware or driver problem, +as SnapRAID is a standard user application that cannot crash or reboot the system. +

+

+Check the following: +

    +
  • +Test system memory with + + MemTest86 + +. +
  • +
  • +Verify hard drive cabling. +
  • +
  • +Ensure the power supply can support all hard drives spinning simultaneously. +
  • +
  • +Check that the system temperature is not too high. +
  • +
  • +Update storage-related system drivers. +
  • +
  • +Review system logs or Event Viewer for clues about the issue. +
  • +
+

+
+
+
+

+Why does SnapRAID abort without an error message in Linux? +

+
+

+This is likely due to insufficient free memory, causing the Linux out-of-memory (OOM) killer +to terminate SnapRAID for using too much memory. +Check available memory with: +

+
+free -m
+
+

+If memory is low, install more memory in the machine. +

+
+
+
+

+Why do I get the error 'Failed to grow parity file 'xxx' to size xxx due to lack of space' during 'sync'? +

+
+

+This error indicates that SnapRAID needs to expand the parity file to a size that exceeds the available space on the parity disk. +

+

+Ensure no other data is stored on the parity disk, reserving it exclusively for the parity file. +Alternatively, move files mentioned in the output to another data disk to reduce the required parity size. +

+

+In Linux, you can reformat the parity disk to increase available space using: +

+
+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

+The '-T largefile4' and '-m 0' options provide more space for the parity file. +

+
+
+
+

+Why do I get the error 'Internal inode xxx inconsistency...'? +

+
+

+This error occurs when SnapRAID detects two different files using the same inode, +a condition that should theoretically never happen but can occur in specific cases. +

+

+Ensure the mentioned files were not modified while SnapRAID was running. +Renaming, deleting, or recreating files during SnapRAID operation can cause inode reuse, triggering this error. +

+

+If using a FAT file system in Windows, convert to NTFS. +Although inodes (FileIndex) are theoretically + +unique in FAT + +, +this issue has been observed in practice. +

+
+
+
+

+Why do I get the error 'Data change at file...' with .xls files? +

+
+

+Excel modifies .xls files upon opening, even without saving, to store the name of the last user who accessed the file. +This allows it to warn if another user tries to open the file simultaneously. +Excel restores the original timestamp, but SnapRAID detects the modification, reporting a data error: +

+
+Data change at file '/xxx/xxx.xls' at position '0'
+WARNING! Unexpected data modification of a file without parity!
+
+

+To work around this, see + +How to prevent Excel from modifying the file on exit? + +, +or switch to the .xlsx format. +

+
+
+
+

+Why are VeraCrypt containers never saved? +

+
+

+VeraCrypt (a fork of TrueCrypt) has a default option, + +Preserve modification timestamp of file containers + +, +that prevents SnapRAID and other backup programs from detecting changes to file containers. +Disable this option in VeraCrypt. +

+
+
+
+
+ + +
+
+ + + + + + + diff --git a/beta/favicon-16x16.png b/beta/favicon-16x16.png new file mode 100644 index 00000000..afc73828 Binary files /dev/null and b/beta/favicon-16x16.png differ diff --git a/beta/favicon-32x32.png b/beta/favicon-32x32.png new file mode 100644 index 00000000..b55064e9 Binary files /dev/null and b/beta/favicon-32x32.png differ diff --git a/beta/favicon.ico b/beta/favicon.ico new file mode 100644 index 00000000..138eae11 Binary files /dev/null and b/beta/favicon.ico differ diff --git a/howitworks.html b/beta/howitworks.html similarity index 100% rename from howitworks.html rename to beta/howitworks.html diff --git a/beta/index.html b/beta/index.html new file mode 100644 index 00000000..b26e03f9 --- /dev/null +++ b/beta/index.html @@ -0,0 +1,340 @@ + + + + + + + + SnapRAID + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

Intelligent Redundancy
for Your Disk Array

+

+ SnapRAID combines the safety of RAID with the convenience of backups. + Now with real-time health monitoring and automation via the new SnapRAID Daemon. +

+ +
+
+ + +
+
+
+
+

What is SnapRAID?

+

+ SnapRAID is a powerful backup and redundancy program designed for disk arrays. It stores parity information (a special type of mathematical backup) that allows you to fully recover your data even if you experience up to six simultaneous disk failures. +

+

+ It is primarily intended for home media centers and large storage arrays containing files that don't change frequently (like movies, music, and photo archives). It offers the high-end protection of a professional server but with the simplicity and flexibility of a home computer. +

+
+ +
+
+
+
+
+
+
+
$ snapraid sync
+
Loading state from /db/snapraid.content...
+
Scanning...
+
Initializing...
+
Resizing...
+
Syncing...
+
+
+
+
+
+ + + +
+
+

Why Choose SnapRAID?

+

+ SnapRAID provides a unique approach to data protection that prioritizes safety, flexibility, and energy efficiency. + It is designed to sit on top of your files as a safety net, ensuring your data is protected without requiring complex + changes to your hardware or operating system. +

+ +
+ +
+

The "Safety Net" Philosophy

+

SnapRAID acts as a transparent layer of security that protects your data without ever + taking it hostage. It treats your array as a collection of individual assets, providing a + safety net that is both powerful and precise.

+ +
    +
  • +
    + +
    +
    + Disaster-Proof Recovery +

    The primary goal is total data reconstruction. Should a hard drive fail, SnapRAID uses its parity data to rebuild the entire contents of the lost disk onto a new one. Because it can handle up to six simultaneous failures, it provides a level of resilience that scales with your needs, ensuring that a hardware crash doesn't mean a data catastrophe.

    +
    +
  • +
  • +
    + +
    +
    + Defense Against the Invisible +

    Physical disk failure isn't the only threat; "bit-rot" or silent errors can corrupt files without warning. SnapRAID proactively defends your archive by hashing every file. It doesn't just wait for a disk to die; it constantly verifies that your data is exactly as you left it, identifying and repairing invisible corruption before it can spread.

    +
    +
  • +
+ +
+ + +
+

Maximum Freedom, Minimum Risk

+

SnapRAID is designed for the "real world" of home hardware. Most users don't buy ten identical 20TB drives at once.

+ +
    +
  • +
    + +
    +
    + Grow as you go +

    You can mix a 4TB drive with a 12TB drive and add a new one whenever you find a sale.

    +
    +
  • +
  • +
    + +
    +
    + No Reformatting +

    You can start protecting disks that are already full of your movies and photos without moving them.

    +
    +
  • +
  • +
    + +
    +
    + Zero Lock-in +

    Your data is never trapped. If you decide to stop using SnapRAID, your disks remain standard drives that can be read by any computer.

    +
    +
  • +
+
+
+
+
+ + + + +
+
+
+
+

INTRODUCING THE DAEMON

+

Real-Time Monitoring & Web API

+

+ The new SnapRAID Daemon bridges the gap between raw parity and proactive protection. + Move from a manual terminal workflow to an "always-on" background intelligence. +

+
    +
  • + + Background scrubbing and health checks +
  • +
  • + + Modern Web UI for dashboard and tasks +
  • +
  • + + REST API for 3rd party integration +
  • +
+ See Daemon Features → +
+ +
+ SnapRAID Daemon Dashboard +
+
+
+
+ + +
+
+

Feature Spotlight

+ + +
+

Resilient Recovery

+
+ +
+

Full Recovery

+

Total data reconstruction

+

If your hard disks die, SnapRAID can fully recover all the data from the failed drives, up to the number of parity disks you have assigned (protecting you from up to 6 simultaneous failures).

+
+ +
+

Silent Corruption Protection

+

Total data integrity

+

All your data is hashed to ensure integrity and prevent "bit-rot." If a file suffers from silent corruption, SnapRAID detects it and repairs it using your parity information.

+
+
+
+ +
+

Surgical Recovery

+

Undelete and restore

+

If you accidentally delete files on a disk, recovery is possible. SnapRAID can reconstruct missing data and even undelete specific folders without affecting the rest of the array.

+
+ +
+

Fault Isolation

+

Confined data loss

+

When the number of failed disks exceeds the parity count, data loss is confined only to the affected disks. Data on all other healthy disks remains fully accessible and untouched.

+
+
+
+ + +
+

Hardware Freedom

+
+ +
+

Maximum Flexibility

+

Mix, match, and grow

+

Disks can have different sizes and different brands. You can add new disks to the array at any time as your storage needs grow, without the need for complex migrations.

+
+ +
+

Eco-Friendly Efficiency

+

Power-saving by design

+

To access a file, only a single disk needs to spin. This reduces noise, saves power, and extends the lifespan of your hardware compared to traditional RAID systems that spin every disk for every read.

+
+
+
+ + +
+

Data Sovereignty

+
+ +
+

Non-Locking Integration

+

Access your data, your way

+

You can utilize disks already filled with files without the need to reformat them. Access your files as usual, even without the program running. SnapRAID doesn't lock in your data; you can stop using it anytime without moving a single byte.

+
+ +
+

Open Source & Free

+

Transparent, Community-Driven, and Cost-Free

+

SnapRAID is released under the GPLv3 license, ensuring the code remains open for inspection and improvement. There are no licensing fees, no subscriptions, and no hidden "Pro" tiers. You have full ownership of your data protection engine.

+
+
+
+ +
+
+ + + + + + + diff --git a/manual-daemon.html b/beta/manual-daemon.html similarity index 100% rename from manual-daemon.html rename to beta/manual-daemon.html diff --git a/beta/manual-de.html b/beta/manual-de.html new file mode 100644 index 00000000..0864582a --- /dev/null +++ b/beta/manual-de.html @@ -0,0 +1,2204 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID ist ein Sicherungsprogramm, das für Festplatten-Arrays +entwickelt wurde und Paritätsinformationen zur Datenwiederherstellung +bei Ausfall von bis zu sechs Festplatten speichert. +

SnapRAID ist hauptsächlich für Home-Media-Center mit großen, +selten geänderten Dateien konzipiert und bietet folgende Funktionen: +

    +
  • +Sie können bereits mit Dateien gefüllte Festplatten verwenden, +ohne sie neu formatieren zu müssen, und wie gewohnt darauf zugreifen. +
  • +
  • +Alle Ihre Daten werden gehasht, um die Datenintegrität zu +gewährleisten und stille Beschädigung (silent corruption) zu verhindern. +
  • +
  • +Wenn die Anzahl der ausgefallenen Festplatten die Paritätsanzahl +überschreitet, beschränkt sich der Datenverlust auf die betroffenen +Festplatten; Daten auf anderen Festplatten bleiben zugänglich. +
  • +
  • +Wenn Sie versehentlich Dateien auf einer Festplatte löschen, +ist eine Wiederherstellung möglich. +
  • +
  • +Festplatten können unterschiedliche Größen haben. +
  • +
  • +Sie können jederzeit Festplatten hinzufügen. +
  • +
  • +SnapRAID sperrt Ihre Daten nicht ein; Sie können die Verwendung +jederzeit beenden, ohne neu formatieren oder Daten verschieben zu müssen. +
  • +
  • +Um auf eine Datei zuzugreifen, muss nur eine einzige Festplatte +drehen (spinnen), was Strom spart und Geräusche reduziert. +
  • +
+

Für weitere Informationen besuchen Sie bitte die offizielle SnapRAID-Website: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID ist ein Hybrid aus einem RAID- und einem Sicherungsprogramm, +das darauf abzielt, die besten Vorteile beider zu kombinieren. +Es hat jedoch einige Einschränkungen, die Sie vor der Verwendung +berücksichtigen sollten. +

Die Haupteinschränkung besteht darin, dass wenn eine Festplatte +ausfällt und Sie in letzter Zeit keine Synchronisierung durchgeführt haben, +Sie möglicherweise nicht vollständig wiederherstellen können. +Genauer gesagt können Sie möglicherweise nicht bis zur Größe der +geänderten oder gelöschten Dateien seit der letzten sync-Operation +wiederherstellen. Dies tritt auch dann auf, wenn die geänderten oder +gelöschten Dateien sich nicht auf der ausgefallenen Festplatte befinden. +Aus diesem Grund ist SnapRAID besser für Daten geeignet, die sich +selten ändern. +

Andererseits verhindern neu hinzugefügte Dateien die Wiederherstellung +von bereits vorhandenen Dateien nicht. Sie verlieren nur die +kürzlich hinzugefügten Dateien, wenn diese sich auf der ausgefallenen +Festplatte befinden. +

Weitere Einschränkungen von SnapRAID sind: +

    +
  • +Mit SnapRAID haben Sie immer noch separate Dateisysteme für jede +Festplatte. Mit RAID erhalten Sie ein einziges großes Dateisystem. +
  • +
  • +SnapRAID streift (stripes) keine Daten. +Mit RAID erhalten Sie einen Geschwindigkeitsvorteil durch Striping. +
  • +
  • +SnapRAID unterstützt keine Echtzeit-Wiederherstellung. +Mit RAID müssen Sie die Arbeit nicht unterbrechen, wenn eine +Festplatte ausfällt. +
  • +
  • +SnapRAID kann Daten nur von einer begrenzten Anzahl von Festplattenausfällen +wiederherstellen. Mit einer Sicherung können Sie von einem +vollständigen Ausfall des gesamten Festplatten-Arrays wiederherstellen. +
  • +
  • +Nur Dateinamen, Zeitstempel, symbolische Links (symlinks) und +Hardlinks werden gespeichert. Berechtigungen, Eigentümerschaft +und erweiterte Attribute werden nicht gespeichert. +
  • +
+
+
+

+Getting Started +

+

Um SnapRAID zu verwenden, müssen Sie zuerst eine Festplatte in Ihrem +Festplatten-Array auswählen, die für parity-Informationen +reserviert wird. Mit einer Festplatte für Parität können Sie von +einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5. +

Wenn Sie von mehr Festplattenausfällen wiederherstellen möchten, +ähnlich wie bei RAID6, müssen Sie zusätzliche Festplatten für Parität +reservieren. Jede zusätzliche Paritätsfestplatte ermöglicht die +Wiederherstellung von einem weiteren Festplattenausfall. +

Als Paritätsfestplatten müssen Sie die größten Festplatten im Array +auswählen, da die Paritätsinformationen auf die Größe der größten +Datenfestplatte im Array anwachsen können. +

Diese Festplatten werden zum Speichern der parity-Dateien +reserviert. Sie sollten Ihre Daten nicht darauf speichern. +

Anschließend müssen Sie die data-Festplatten definieren, die Sie +mit SnapRAID schützen möchten. Der Schutz ist effektiver, wenn diese +Festplatten Daten enthalten, die sich selten ändern. Aus diesem Grund +ist es besser, die Windows C:\-Festplatte oder die Unix-Verzeichnisse +/home, /var und /tmp NICHT einzuschließen. +

Die Liste der Dateien wird in den content-Dateien gespeichert, +die normalerweise auf den Daten-, Paritäts- oder Boot-Festplatten +gespeichert werden. Diese Datei enthält die Details Ihrer Sicherung, +einschließlich aller Prüfsummen zur Überprüfung ihrer Integrität. +Die content-Datei wird in mehreren Kopien gespeichert, und jede Kopie +muss sich auf einer anderen Festplatte befinden, um sicherzustellen, +dass selbst bei mehreren Festplattenausfällen mindestens eine Kopie +verfügbar ist. +

Angenommen, Sie sind nur an einer Paritätsstufe des Schutzes interessiert +und Ihre Festplatten befinden sich unter: +

+/mnt/diskp <- ausgewählte Festplatte für Parität
+/mnt/disk1 <- erste zu schützende Festplatte
+/mnt/disk2 <- zweite zu schützende Festplatte
+/mnt/disk3 <- dritte zu schützende Festplatte
+
+

Sie müssen die Konfigurationsdatei /etc/snapraid.conf mit den +folgenden Optionen erstellen: +

+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/
+
+

Wenn Sie Windows verwenden, sollten Sie das Windows-Pfadformat mit +Laufwerksbuchstaben und Backslashes anstelle von Slashes verwenden. +

+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\
+
+

Wenn Sie viele Festplatten haben und keine Laufwerksbuchstaben mehr +verfügbar sind, können Sie Festplatten direkt in Unterordnern +einhängen (mounten). Siehe: +

+https://www.google.com/search?q=Windows+mount+point
+
+

Zu diesem Zeitpunkt sind Sie bereit, den Befehl sync auszuführen, +um die Paritätsinformationen zu erstellen. +

+snapraid sync
+
+

Dieser Vorgang kann beim ersten Mal mehrere Stunden dauern, abhängig +von der Größe der bereits auf den Festplatten vorhandenen Daten. +Wenn die Festplatten leer sind, ist der Vorgang sofort abgeschlossen. +

Sie können ihn jederzeit durch Drücken von Strg+C anhalten, und beim +nächsten Lauf wird er dort fortgesetzt, wo er unterbrochen wurde. +

Wenn dieser Befehl abgeschlossen ist, sind Ihre Daten SICHER. +

Jetzt können Sie Ihr Array nach Belieben verwenden und die Paritätsinformationen +regelmäßig durch Ausführen des sync-Befehls aktualisieren. +

+

+Scrubbing +

+

Um die Daten und die Parität regelmäßig auf Fehler zu überprüfen, +können Sie den Befehl scrub ausführen. +

+snapraid scrub
+
+

Dieser Befehl vergleicht die Daten in Ihrem Array mit dem Hash, +der während des sync-Befehls berechnet wurde, um die Integrität +zu überprüfen. +

Jeder Lauf des Befehls überprüft ungefähr 8% des Arrays, +ausgenommen Daten, die bereits in den letzten 10 Tagen gescrubbed wurden. +Sie können die Option -p, --plan verwenden, um eine andere Menge +anzugeben, und die Option -o, --older-than, um ein anderes Alter +in Tagen anzugeben. Zum Beispiel, um 5% des Arrays auf Blöcke zu +überprüfen, die älter als 20 Tage sind, verwenden Sie: +

+snapraid -p 5 -o 20 scrub
+
+

Wenn während des Vorgangs stille oder Eingabe-/Ausgabefehler +gefunden werden, werden die entsprechenden Blöcke in der +content-Datei als fehlerhaft (bad) markiert und im Befehl +status aufgelistet. +

+snapraid status
+
+

Um sie zu beheben, können Sie den Befehl fix verwenden und dabei +nach fehlerhaften Blöcken mit der Option -e, --filter-error +filtern: +

+snapraid -e fix
+
+

Beim nächsten scrub verschwinden die Fehler aus dem status-Bericht, +wenn sie tatsächlich behoben sind. Um es schneller zu machen, +können Sie -p bad verwenden, um nur als fehlerhaft markierte Blöcke +zu scrubben. +

+snapraid -p bad scrub
+
+

Das Ausführen von scrub auf einem nicht synchronisierten Array +kann Fehler melden, die durch entfernte oder geänderte Dateien +verursacht wurden. Diese Fehler werden in der scrub-Ausgabe +gemeldet, aber die zugehörigen Blöcke werden nicht als fehlerhaft +markiert. +

+
+

+Pooling +

+

Hinweis: Die unten beschriebene Pooling-Funktion wurde durch das +Tool mergerfs ersetzt, das jetzt die empfohlene Option für Linux-Benutzer +in der SnapRAID-Community ist. Mergefs bietet eine flexiblere +und effizientere Möglichkeit, mehrere Laufwerke zu einem einzigen, +vereinheitlichten Einhängepunkt (Mount Point) zusammenzufassen, +was einen nahtlosen Zugriff auf Dateien über Ihr gesamtes Array +hinweg ermöglicht, ohne auf symbolische Links angewiesen zu sein. +Es lässt sich gut mit SnapRAID zum Paritätsschutz integrieren und +wird häufig in Setups wie OpenMediaVault (OMV) oder benutzerdefinierten +NAS-Konfigurationen verwendet. +

Um alle Dateien in Ihrem Array im selben Verzeichnisbaum anzuzeigen, +können Sie die pooling-Funktion aktivieren. Sie erstellt eine +schreibgeschützte virtuelle Ansicht aller Dateien in Ihrem Array +mithilfe symbolischer Links. +

Sie können das pooling-Verzeichnis in der Konfigurationsdatei +mit folgender Option konfigurieren: +

+pool /pool
+
+

oder, wenn Sie Windows verwenden, mit: +

+pool C:\pool
+
+

und anschließend den Befehl pool ausführen, um die virtuelle +Ansicht zu erstellen oder zu aktualisieren. +

+snapraid pool
+
+

Wenn Sie eine Unix-Plattform verwenden und dieses Verzeichnis über +das Netzwerk für Windows- oder Unix-Maschinen freigeben möchten, +sollten Sie die folgenden Optionen zu Ihrer /etc/samba/smb.conf +hinzufügen: +

+# Im globalen Abschnitt von smb.conf
+unix extensions = no
+
+
+# Im Freigabe-Abschnitt von smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

In Windows erfordert die Freigabe symbolischer Links über ein Netzwerk, +dass Clients diese remote auflösen. Um dies zu ermöglichen, +müssen Sie neben der Freigabe des Pool-Verzeichnisses auch alle +Festplatten unabhängig freigeben, indem Sie die in der Konfigurationsdatei +definierten Festplattennamen als Freigabepunkte verwenden. +Sie müssen auch in der Option share der Konfigurationsdatei +den Windows UNC-Pfad angeben, den Remote-Clients benötigen, um +auf diese freigegebenen Festplatten zuzugreifen. +

Zum Beispiel, wenn Sie von einem Server namens darkstar aus +arbeiten, können Sie die Optionen verwenden: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

und die folgenden Verzeichnisse über das Netzwerk freigeben: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

um Remote-Clients den Zugriff auf alle Dateien unter \\darkstar\pool +zu ermöglichen. +

Möglicherweise müssen Sie auch Remote-Clients konfigurieren, um +den Zugriff auf Remote-Symlinks mit dem Befehl zu aktivieren: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID funktioniert eher wie ein Sicherungsprogramm als ein RAID-System +und kann verwendet werden, um Dateien in ihren vorherigen Zustand +wiederherzustellen oder das Löschen rückgängig zu machen, indem die +Option -f, --filter verwendet wird: +

+snapraid fix -f DATEI
+
+

oder für ein Verzeichnis: +

+snapraid fix -f VERZEICHNIS/
+
+

Sie können es auch verwenden, um nur versehentlich gelöschte Dateien +innerhalb eines Verzeichnisses wiederherzustellen, indem Sie die +Option -m, --filter-missing verwenden, die nur fehlende Dateien +wiederherstellt und alle anderen unberührt lässt. +

+snapraid fix -m -f VERZEICHNIS/
+
+

Oder um alle gelöschten Dateien auf allen Laufwerken wiederherzustellen mit: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

Das Schlimmste ist passiert, und Sie haben eine oder mehrere Festplatten +verloren! +

KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen! +

Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem +Festplatten-Array zu vermeiden. Deaktivieren Sie alle Remote-Verbindungen +dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID-nächtlicher +sync- oder scrub-Läufe. +

Fahren Sie dann mit den folgenden Schritten fort. +

+

+STEP 1 -> Reconfigure +

+

Sie benötigen etwas Platz zur Wiederherstellung, idealerweise auf +zusätzlichen Ersatzfestplatten, aber eine externe USB-Festplatte oder +eine Remote-Festplatte ist ausreichend. +

Ändern Sie die SnapRAID-Konfigurationsdatei so, dass die data- +oder parity-Option der ausgefallenen Festplatte auf einen Ort mit +genügend leerem Speicherplatz zur Wiederherstellung der Dateien zeigt. +

Wenn zum Beispiel die Festplatte d1 ausgefallen ist, ändern Sie von: +

+data d1 /mnt/disk1/
+
+

zu: +

+data d1 /mnt/new_spare_disk/
+
+

Wenn die wiederherzustellende Festplatte eine Paritätsfestplatte ist, +aktualisieren Sie die entsprechende parity-Option. +Wenn Sie mehrere ausgefallene Festplatten haben, aktualisieren Sie +alle ihre Konfigurationsoptionen. +

+
+

+STEP 2 -> Fix +

+

Führen Sie den fix-Befehl aus und speichern Sie das Protokoll +in einer externen Datei mit: +

+snapraid -d NAME -l fix.log fix
+
+

Wobei NAME der Name der Festplatte ist, wie z.B. d1 in unserem +vorherigen Beispiel. Wenn die wiederherzustellende Festplatte eine +Paritätsfestplatte ist, verwenden Sie die Namen parity, 2-parity, +usw. Wenn Sie mehrere ausgefallene Festplatten haben, verwenden Sie +mehrere -d-Optionen, um alle anzugeben. +

Dieser Befehl wird lange dauern. +

Stellen Sie sicher, dass Sie einige Gigabyte frei haben, um die +Datei fix.log zu speichern. Führen Sie ihn von einer Festplatte +mit ausreichend freiem Speicherplatz aus. +

Jetzt haben Sie alles wiederhergestellt, was wiederherstellbar ist. +Wenn einige Dateien teilweise oder vollständig nicht wiederherstellbar +sind, werden sie umbenannt, indem die Erweiterung .unrecoverable +hinzugefügt wird. +

Sie finden eine detaillierte Liste aller nicht wiederherstellbaren +Blöcke in der Datei fix.log, indem Sie alle Zeilen überprüfen, +die mit unrecoverable: beginnen. +

Wenn Sie mit der Wiederherstellung nicht zufrieden sind, können Sie +sie so oft wie gewünscht wiederholen. +

Wenn Sie zum Beispiel Dateien nach dem letzten sync aus dem Array +entfernt haben, kann dies dazu führen, dass einige Dateien nicht +wiederhergestellt werden. In diesem Fall können Sie den fix +mithilfe der Option -i, --import wiederholen, wobei Sie angeben, +wo sich diese Dateien jetzt befinden, um sie erneut in den +Wiederherstellungsprozess einzubeziehen. +

Wenn Sie mit der Wiederherstellung zufrieden sind, können Sie +fortfahren, aber beachten Sie, dass Sie nach der Synchronisierung +den fix-Befehl nicht mehr wiederholen können! +

+
+

+STEP 3 -> Check +

+

Als vorsichtige Überprüfung können Sie jetzt einen check-Befehl +ausführen, um sicherzustellen, dass auf der wiederhergestellten +Festplatte alles korrekt ist. +

+snapraid -d NAME -a check
+
+

Wobei NAME der Name der Festplatte ist, wie z.B. d1 in unserem +vorherigen Beispiel. +

Die Optionen -d und -a weisen SnapRAID an, nur die angegebene +Festplatte zu überprüfen und alle Paritätsdaten zu ignorieren. +

Dieser Befehl wird lange dauern, aber wenn Sie nicht übermäßig +vorsichtig sind, können Sie ihn überspringen. +

+
+

+STEP 4 -> Sync +

+

Führen Sie den sync-Befehl aus, um das Array mit der neuen +Festplatte zu resynchronisieren. +

+snapraid sync
+
+

Wenn alles wiederhergestellt ist, ist dieser Befehl sofort. +

+
+
+
+

+Commands +

+

SnapRAID bietet einige einfache Befehle, mit denen Sie: +

    +
  • +Den Status des Arrays ausgeben -> status +
  • +
  • +Die Festplatten steuern -> smart, probe, up, down +
  • +
  • +Eine Sicherung/einen Snapshot erstellen -> sync +
  • +
  • +Daten regelmäßig überprüfen -> scrub +
  • +
  • +Die letzte Sicherung/den letzten Snapshot wiederherstellen -> fix. +
  • +
+

Befehle müssen in Kleinbuchstaben geschrieben werden. +

+

+status +

+

Gibt eine Zusammenfassung des Zustands des Festplatten-Arrays aus. +

Es enthält Informationen zur Paritätsfragmentierung, wie alt +die Blöcke sind, ohne Überprüfung, und alle aufgezeichneten +stillen Fehler, die beim Scrubbing aufgetreten sind. +

Die präsentierten Informationen beziehen sich auf den letzten Zeitpunkt, +zu dem Sie sync ausgeführt haben. Spätere Änderungen werden +nicht berücksichtigt. +

Wenn fehlerhafte Blöcke erkannt wurden, werden deren Blocknummern +aufgelistet. Um sie zu beheben, können Sie den Befehl fix -e +verwenden. +

Es zeigt auch ein Diagramm an, das den letzten Zeitpunkt darstellt, +zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbed +Blöcke werden mit *, Blöcke, die synchronisiert, aber noch nicht +gescrubbed wurden, mit o angezeigt. +

Es wird nichts geändert. +

+
+

+smart +

+

Gibt einen SMART-Bericht aller Festplatten im System aus. +

Es enthält eine Schätzung der Ausfallwahrscheinlichkeit im nächsten +Jahr, sodass Sie die Wartungsersetzung von Festplatten planen können, +die verdächtige Attribute aufweisen. +

Diese Wahrscheinlichkeitsschätzung wird durch Korrelation der SMART-Attribute +der Festplatten mit den Backblaze-Daten erhalten, die unter +folgender Adresse verfügbar sind: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Wenn SMART meldet, dass eine Festplatte ausfällt, wird FAIL +oder PREFAIL für diese Festplatte gedruckt, und SnapRAID +endet mit einem Fehler. In diesem Fall wird ein sofortiger +Austausch der Festplatte dringend empfohlen. +

Weitere mögliche Statuszeichenfolgen sind: +

+
+
+logfail +
+In der Vergangenheit lagen einige Attribute unter +dem Schwellenwert. +
+
+
+
+logerr +
+Das Gerätefehlerprotokoll enthält Fehler. +
+
+
+
+selferr +
+Das Geräte-Selbsttestprotokoll enthält Fehler. +
+
+
+

Wenn die Option -v, --verbose angegeben ist, wird eine tiefere +statistische Analyse bereitgestellt. Diese Analyse kann Ihnen bei +der Entscheidung helfen, ob Sie mehr oder weniger Parität benötigen. +

Dieser Befehl verwendet das smartctl-Tool und entspricht dem +Ausführen von smartctl -a auf allen Geräten. +

Wenn Ihre Geräte nicht korrekt automatisch erkannt werden, können Sie +einen benutzerdefinierten Befehl mithilfe der smartctl-Option +in der Konfigurationsdatei angeben. +

Es wird nichts geändert. +

+
+

+probe +

+

Gibt den POWER-Zustand aller Festplatten im System aus. +

Standby bedeutet, dass die Festplatte nicht dreht. Active +bedeutet, dass die Festplatte dreht. +

Dieser Befehl verwendet das smartctl-Tool und entspricht dem +Ausführen von smartctl -n standby -i auf allen Geräten. +

Wenn Ihre Geräte nicht korrekt automatisch erkannt werden, können Sie +einen benutzerdefinierten Befehl mithilfe der smartctl-Option +in der Konfigurationsdatei angeben. +

Es wird nichts geändert. +

+
+

+up +

+

Dreht alle Festplatten des Arrays hoch (spins up). +

Sie können nur bestimmte Festplatten mithilfe der Option -d, --filter-disk +hochdrehen. +

Das gleichzeitige Hochdrehen aller Festplatten erfordert viel Strom. +Stellen Sie sicher, dass Ihr Netzteil dies aushalten kann. +

Es wird nichts geändert. +

+
+

+down +

+

Dreht alle Festplatten des Arrays herunter (spins down). +

Dieser Befehl verwendet das smartctl-Tool und entspricht dem +Ausführen von smartctl -s standby,now auf allen Geräten. +

Sie können nur bestimmte Festplatten mithilfe der Option -d, --filter-disk +herunterdrehen. +

Um automatisch bei einem Fehler herunterzufahren, können Sie die Option +-s, --spin-down-on-error mit jedem anderen Befehl verwenden, was dem +manuellen Ausführen von down bei Auftreten eines Fehlers +entspricht. +

Es wird nichts geändert. +

+
+

+diff +

+

Listet alle Dateien auf, die seit dem letzten sync geändert wurden +und deren Paritätsdaten neu berechnet werden müssen. +

Dieser Befehl überprüft nicht die Dateidaten, sondern nur den +Dateizeitstempel, die Größe und die Inode. +

Nach dem Auflisten aller geänderten Dateien wird eine Zusammenfassung +der Änderungen präsentiert, gruppiert nach: +

+
+
+equal +
+Dateien, die sich seitdem nicht geändert haben. +
+
+
+
+added +
+Neu hinzugefügte Dateien, die vorher nicht vorhanden waren. +
+
+
+
+removed +
+Entfernte Dateien. +
+
+
+
+updated +
+Dateien mit einer anderen Größe oder einem anderen +Zeitstempel, was bedeutet, dass sie geändert wurden. +
+
+
+
+moved +
+Auf derselben Festplatte in ein anderes Verzeichnis +verschobene Dateien. Sie werden durch denselben Namen, +dieselbe Größe, denselben Zeitstempel und dieselbe Inode, +aber ein anderes Verzeichnis identifiziert. +
+
+
+
+copied +
+Dateien, die auf dieselbe oder eine andere Festplatte +kopiert wurden, wobei die Originaldatei noch vorhanden ist. +Sie werden dadurch identifiziert, dass sie denselben Namen, +dieselbe Größe und denselben Zeitstempel haben. +Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige +Pfad übereinstimmen, um identifiziert zu werden, nicht nur +der Name. +
+
+
+
+relocated +
+Dateien, die auf dieselbe oder eine andere Festplatte +verschoben wurden, wobei das Original verschwunden ist. +Sie werden dadurch identifiziert, dass sie denselben Namen, +dieselbe Größe und denselben Zeitstempel haben. +Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige +Pfad übereinstimmen, um identifiziert zu werden. +Im Gegensatz zu 'moved' Dateien auf derselben Festplatte haben +verschobene Dateien einen anderen Inode. +
+
+
+
+restored +
+Dateien mit einem anderen Inode, aber passendem +Verzeichnis, Namen, Größe und Zeitstempel. +Dies sind in der Regel Dateien, die nach dem Löschen +wiederhergestellt wurden. +
+
+
+

Wenn ein sync erforderlich ist, ist der Rückgabecode des Prozesses 2 +anstelle des Standardwerts 0. Der Rückgabecode 1 wird für eine +allgemeine Fehlerbedingung verwendet. +

Es wird nichts geändert. +

+
+

+sync +

+

Aktualisiert die Paritätsinformationen. Alle geänderten Dateien +im Festplatten-Array werden gelesen, und die entsprechenden +Paritätsdaten werden aktualisiert. +

Sie können diesen Vorgang jederzeit durch Drücken von Strg+C +anhalten, ohne die bereits geleistete Arbeit zu verlieren. +Beim nächsten Lauf wird der sync-Vorgang dort fortgesetzt, +wo er unterbrochen wurde. +

Wenn während des Vorgangs stille oder Eingabe-/Ausgabefehler +gefunden werden, werden die entsprechenden Blöcke als fehlerhaft +markiert. +

Dateien werden durch Pfad und/oder Inode identifiziert und anhand +von Größe und Zeitstempel überprüft. +Wenn die Dateigröße oder der Zeitstempel abweicht, werden die Paritätsdaten +für die gesamte Datei neu berechnet. +Wenn die Datei auf derselben Festplatte verschoben oder umbenannt +wird und dieselbe Inode beibehält, wird die Parität nicht neu +berechnet. +Wenn die Datei auf eine andere Festplatte verschoben wird, wird die +Parität neu berechnet, aber die zuvor berechneten Hash-Informationen +werden beibehalten. +

Die content- und parity-Dateien werden bei Bedarf geändert. +Die Dateien im Array werden NICHT geändert. +

+
+

+scrub +

+

Scrubbt das Array und überprüft auf stille oder Eingabe-/Ausgabefehler +auf Daten- und Paritätsfestplatten. +

Jede Ausführung überprüft ungefähr 8% des Arrays, ausgenommen Daten, +die bereits in den letzten 10 Tagen gescrubbed wurden. +Dies bedeutet, dass Scrubbing einmal pro Woche sicherstellt, dass +jedes Bit an Daten mindestens einmal alle drei Monate überprüft wird. +

Sie können einen anderen Scrub-Plan oder eine andere Menge mithilfe +der Option -p, --plan definieren, die Folgendes akzeptiert: +bad - Scrubbt als fehlerhaft markierte Blöcke. +new - Scrubbt gerade synchronisierte Blöcke, die noch nicht gescrubbed +

wurden. +

+
+
+full +
+Scrubbt alles. +
+
+
+
+0-100 +
+Scrubbt den angegebenen Prozentsatz der Blöcke. +
+
+
+

Wenn Sie einen Prozentsatz angeben, können Sie auch die Option +-o, --older-than verwenden, um festzulegen, wie alt der Block sein +soll. Die ältesten Blöcke werden zuerst gescrubbed, um eine optimale +Überprüfung zu gewährleisten. Wenn Sie nur die gerade synchronisierten +Blöcke scrubben möchten, die noch nicht gescrubbed wurden, +verwenden Sie die Option -p new. +

Um Details zum Scrub-Status zu erhalten, verwenden Sie den Befehl +status. +

Für jeden gefundenen stillen oder Eingabe-/Ausgabefehler werden die +entsprechenden Blöcke in der content-Datei als fehlerhaft (bad) +markiert. Diese fehlerhaften Blöcke werden in status aufgelistet +und können mit fix -e behoben werden. Nach der Behebung werden +sie beim nächsten Scrub erneut überprüft, und wenn sie als korrigiert +befunden werden, wird die fehlerhafte Markierung entfernt. +Um nur die fehlerhaften Blöcke zu scrubben, können Sie den Befehl +scrub -p bad verwenden. +

Es wird empfohlen, scrub nur auf einem synchronisierten Array +auszuführen, um gemeldete Fehler zu vermeiden, die durch nicht +synchronisierte Daten verursacht werden. Diese Fehler werden als +keine stillen Fehler erkannt, und die Blöcke werden nicht als fehlerhaft +markiert, aber solche Fehler werden in der Ausgabe des Befehls +gemeldet. +

Die content-Datei wird geändert, um die Zeit der letzten +Überprüfung für jeden Block zu aktualisieren und fehlerhafte +Blöcke zu markieren. +Die parity-Dateien werden NICHT geändert. +Die Dateien im Array werden NICHT geändert. +

+
+

+fix +

+

Behebt alle Dateien und die Paritätsdaten. +

Alle Dateien und Paritätsdaten werden mit dem Snapshot-Zustand +verglichen, der beim letzten sync gespeichert wurde. +Wenn eine Abweichung gefunden wird, wird sie auf den gespeicherten +Snapshot zurückgesetzt. +

WARNUNG! Der Befehl fix unterscheidet nicht zwischen Fehlern und +beabsichtigten Änderungen. Er setzt den Dateizustand bedingungslos +auf den letzten sync zurück. +

Wenn keine andere Option angegeben ist, wird das gesamte Array verarbeitet. +Verwenden Sie die Filteroptionen, um eine Teilmenge von Dateien +oder Festplatten für die Operation auszuwählen. +

Um nur die Blöcke zu beheben, die während sync und scrub als +fehlerhaft markiert wurden, verwenden Sie die Option -e, --filter-error. +Im Gegensatz zu anderen Filteroptionen wendet diese Behebungen nur +auf Dateien an, die seit dem letzten sync unverändert sind. +

SnapRAID benennt alle Dateien, die nicht behoben werden können, +durch Hinzufügen der Erweiterung .unrecoverable um. +

Vor dem Beheben wird das gesamte Array gescannt, um alle Dateien +zu finden, die seit der letzten sync-Operation verschoben wurden. +Diese Dateien werden anhand ihres Zeitstempels identifiziert, wobei +Name und Verzeichnis ignoriert werden, und werden bei Bedarf im +Wiederherstellungsprozess verwendet. Wenn Sie einige davon außerhalb +des Arrays verschoben haben, können Sie die Option -i, --import +verwenden, um zusätzliche Verzeichnisse zum Scannen anzugeben. +

Dateien werden nur anhand des Pfads identifiziert, nicht anhand +der Inode. +

Die content-Datei wird NICHT geändert. +Die parity-Dateien werden bei Bedarf geändert. +Die Dateien im Array werden bei Bedarf geändert. +

+
+

+check +

+

Überprüft alle Dateien und die Paritätsdaten. +

Es funktioniert wie fix, simuliert jedoch nur eine Wiederherstellung, +und es werden keine Änderungen in das Array geschrieben. +

Dieser Befehl ist primär für manuelle Überprüfung gedacht, wie z.B. +nach einem Wiederherstellungsprozess oder unter anderen speziellen +Bedingungen. Für regelmäßige und geplante Überprüfungen verwenden +Sie scrub. +

Wenn Sie die Option -a, --audit-only verwenden, wird nur der Hash +der Dateien überprüft, und die Paritätsdaten werden für einen +schnelleren Lauf ignoriert. +

Dateien werden nur anhand des Pfads identifiziert, nicht anhand +der Inode. +

Es wird nichts geändert. +

+
+

+list +

+

Listet alle Dateien auf, die sich zum Zeitpunkt des letzten sync +im Array befanden. +

Mit -v oder --verbose wird auch die Untersekundenzeit angezeigt. +

Es wird nichts geändert. +

+
+

+dup +

+

Listet alle doppelten Dateien auf. Zwei Dateien gelten als gleich, +wenn ihre Hashes übereinstimmen. Die Dateidaten werden nicht gelesen; +es werden nur die vorab berechneten Hashes verwendet. +

Es wird nichts geändert. +

+
+

+pool +

+

Erstellt oder aktualisiert eine virtuelle Ansicht aller +Dateien in Ihrem Festplatten-Array im pooling-Verzeichnis. +

Die Dateien werden nicht kopiert, sondern mithilfe symbolischer +Links verknüpft. +

Beim Aktualisieren werden alle vorhandenen symbolischen Links und +leeren Unterverzeichnisse gelöscht und durch die neue Ansicht des +Arrays ersetzt. Alle anderen regulären Dateien bleiben erhalten. +

Außerhalb des Pool-Verzeichnisses wird nichts geändert. +

+
+

+devices +

+

Gibt die Low-Level-Geräte aus, die vom Array verwendet werden. +

Dieser Befehl zeigt die Gerätezuordnungen im Array an und ist +hauptsächlich als Skriptschnittstelle gedacht. +

Die ersten beiden Spalten sind die Low-Level-Geräte-ID und der Pfad. +Die nächsten beiden Spalten sind die High-Level-Geräte-ID und der Pfad. +Die letzte Spalte ist der Festplattenname im Array. +

In den meisten Fällen haben Sie ein Low-Level-Gerät für jede +Festplatte im Array, aber in einigen komplexeren Konfigurationen +können mehrere Low-Level-Geräte von einer einzigen Festplatte +im Array verwendet werden. +

Es wird nichts geändert. +

+
+

+touch +

+

Setzt einen beliebigen Untersekunden-Zeitstempel für alle Dateien, +deren Untersekunden-Zeitstempel auf Null gesetzt ist. +

Dies verbessert die Fähigkeit von SnapRAID, verschobene und +kopierte Dateien zu erkennen, da es den Zeitstempel fast +eindeutig macht und mögliche Duplikate reduziert. +

Genauer gesagt, wenn der Untersekunden-Zeitstempel nicht Null ist, +wird eine verschobene oder kopierte Datei als solche identifiziert, +wenn sie mit Name, Größe und Zeitstempel übereinstimmt. Wenn der +Untersekunden-Zeitstempel Null ist, wird sie nur als Kopie betrachtet, +wenn der vollständige Pfad, die Größe und der Zeitstempel alle +übereinstimmen. +

Der Zeitstempel mit Sekundenpräzision wird nicht geändert, +sodass alle Daten und Zeiten Ihrer Dateien erhalten bleiben. +

+
+

+rehash +

+

Plant eine Neu-Hash-Berechnung (rehash) des gesamten Arrays. +

Dieser Befehl ändert die verwendete Hash-Art, typischerweise beim +Upgrade von einem 32-Bit-System auf ein 64-Bit-System, um von +MurmurHash3 auf den schnelleren SpookyHash umzuschalten. +

Wenn Sie bereits den optimalen Hash verwenden, tut dieser Befehl +nichts und informiert Sie darüber, dass keine Aktion erforderlich ist. +

Die Neu-Hash-Berechnung wird nicht sofort durchgeführt, sondern +findet schrittweise während sync und scrub statt. +

Sie können den Neu-Hash-Zustand mithilfe von status überprüfen. +

Während der Neu-Hash-Berechnung behält SnapRAID die volle +Funktionalität bei, mit der einzigen Ausnahme, dass dup keine +doppelten Dateien mit einem anderen Hash erkennen kann. +

+
+

+locate +

+

Lokalisiert Dateien, die auf den Paritätsfestplatten gespeichert sind. Für jede +übereinstimmende Datei wird deren Position innerhalb der Paritätsdatei und die Anzahl +der belegten Fragmente ausgegeben. +

Sie können die Option -t, --tail verwenden, um den Vorgang auf Dateien zu beschränken, +die den angegebenen Endbereich (Tail) der Parität belegen. +

Wenn Sie diese Dateien neu zuweisen möchten, können Sie die Option +-W, --force-realloc-tail verwenden. +Beachten Sie, dass solche Dateien während des Neuzuweisungsprozesses +nicht durch die Parität geschützt sind. +

+
+
+

+Options +

+

SnapRAID bietet die folgenden Optionen: +

+
+
+-c, --conf CONFIG +
+Wählt die zu verwendende Konfigurationsdatei aus. Wenn nicht +angegeben, wird unter Unix die Datei /usr/local/etc/snapraid.conf +verwendet, falls sie existiert, andernfalls /etc/snapraid.conf. +Unter Windows wird die Datei snapraid.conf im selben +Verzeichnis wie snapraid.exe verwendet. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtert die zu verarbeitenden Dateien in check und fix. +Nur die Dateien, die dem angegebenen Muster entsprechen, werden +verarbeitet. Diese Option kann mehrmals verwendet werden. +Weitere Details zu Musterspezifikationen finden Sie im +Abschnitt PATTERN. Unter Unix stellen Sie sicher, dass Globbing-Zeichen +in Anführungszeichen gesetzt werden, wenn sie verwendet werden. +Diese Option kann nur mit check und fix verwendet werden. +Sie kann nicht mit sync und scrub verwendet werden, da +diese immer das gesamte Array verarbeiten. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtert die zu verarbeitenden Festplatten in check, fix, up +und down. Sie müssen einen Festplattennamen angeben, wie +in der Konfigurationsdatei definiert. Sie können auch Paritätsfestplatten +mit den Namen parity, 2-parity, 3-parity, usw. angeben, +um Vorgänge auf eine bestimmte Paritätsfestplatte zu beschränken. +Wenn Sie mehrere --filter, --filter-disk und --filter-missing +Optionen kombinieren, werden nur Dateien ausgewählt, die allen +Filtern entsprechen. Diese Option kann mehrmals verwendet werden. +Diese Option kann nur mit check, fix, up und down verwendet +werden. Sie kann nicht mit sync und scrub verwendet werden, +da diese immer das gesamte Array verarbeiten. +
+
+
+
+
+
+-m, --filter-missing +
+Filtert die zu verarbeitenden Dateien in check und fix. +Nur die Dateien, die im Array fehlen oder gelöscht wurden, werden +verarbeitet. Bei Verwendung mit fix fungiert dies als +undelete-Befehl (Wiederherstellung von Gelöschtem). +Wenn Sie mehrere --filter, --filter-disk und --filter-missing +Optionen kombinieren, werden nur Dateien ausgewählt, die allen +Filtern entsprechen. Diese Option kann nur mit check und fix +verwendet werden. Sie kann nicht mit sync und scrub +verwendet werden, da diese immer das gesamte Array verarbeiten. +
+
+
+
+
+
+-e, --filter-error +
+Verarbeitet die Dateien mit Fehlern in check und fix. +Es verarbeitet nur Dateien, deren Blöcke während sync +und scrub als mit stillen oder Eingabe-/Ausgabefehlern +markiert wurden, wie in status aufgelistet. +Diese Option kann nur mit check und fix verwendet werden. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Wählt den Scrub-Plan aus. Wenn PERC ein numerischer Wert +von 0 bis 100 ist, wird er als Prozentsatz der zu scrubbenden +Blöcke interpretiert. Anstelle eines Prozentsatzes können Sie +einen Plan angeben: bad scrubbt fehlerhafte Blöcke, +new scrubbt Blöcke, die noch nicht gescrubbed wurden, +und full scrubbt alles. +Diese Option kann nur mit scrub verwendet werden. +
+
+
+
+
+
+-o, --older-than DAYS +
+Wählt den ältesten Teil des Arrays aus, der in scrub +verarbeitet werden soll. DAYS ist das Mindestalter in Tagen, +damit ein Block gescrubbed werden kann; der Standardwert +ist 10. Blöcke, die als fehlerhaft markiert sind, werden +immer gescrubbed, unabhängig von dieser Option. +Diese Option kann nur mit scrub verwendet werden. +
+
+
+
+
+
+-a, --audit-only +
+Überprüft in check den Hash der Dateien, ohne die Paritätsdaten +zu überprüfen. Wenn Sie nur an der Überprüfung der Dateidaten +interessiert sind, kann diese Option den Überprüfungsprozess +erheblich beschleunigen. +Diese Option kann nur mit check verwendet werden. +
+
+
+
+
+
+-h, --pre-hash +
+Führt in sync eine vorläufige Hash-Phase aller neuen Daten +zur zusätzlichen Überprüfung vor der Paritätsberechnung durch. +Normalerweise wird in sync keine vorläufige Hash-Berechnung +durchgeführt, und die neuen Daten werden unmittelbar vor der +Paritätsberechnung gehasht, wenn sie zum ersten Mal gelesen werden. +Dieser Vorgang tritt auf, wenn das System unter starker Last +steht, wobei alle Festplatten drehen und eine ausgelastete CPU +vorliegt. Dies ist ein Extremzustand für die Maschine, und wenn +sie ein latentes Hardwareproblem hat, können stille Fehler +unentdeckt bleiben, da die Daten noch nicht gehasht sind. +Um dieses Risiko zu vermeiden, können Sie den pre-hash-Modus +aktivieren, um alle Daten zweimal lesen zu lassen und so ihre +Integrität sicherzustellen. Diese Option überprüft auch im Array +verschobene Dateien, um sicherzustellen, dass die Verschiebeoperation +erfolgreich war, und ermöglicht es Ihnen, bei Bedarf eine +fix-Operation durchzuführen, bevor Sie fortfahren. +Diese Option kann nur mit sync verwendet werden. +
+
+
+
+
+
+-i, --import DIR +
+Importiert aus dem angegebenen Verzeichnis alle Dateien, die +nach dem letzten sync aus dem Array gelöscht wurden. +Wenn Sie solche Dateien noch haben, können sie von check und +fix verwendet werden, um den Wiederherstellungsprozess zu +verbessern. Die Dateien werden gelesen, auch in Unterverzeichnissen, +und unabhängig von ihrem Namen identifiziert. +Diese Option kann nur mit check und fix verwendet werden. +
+
+
+
+
+
+-s, --spin-down-on-error +
+Dreht bei jedem Fehler alle verwalteten Festplatten herunter, +bevor mit einem von Null verschiedenen Statuscode beendet wird. +Dies verhindert, dass die Laufwerke nach einem abgebrochenen +Vorgang aktiv bleiben und drehen, was unnötige Hitzeentwicklung +und Stromverbrauch vermeiden hilft. Verwenden Sie diese Option, +um sicherzustellen, dass die Festplatten auch bei einem +Befehlsfehler sicher gestoppt werden. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Wendet eine globale Bandbreitenbegrenzung für alle Festplatten +an. RATE ist die Anzahl der Bytes pro Sekunde. Sie können +einen Multiplikator wie K, M oder G angeben (z.B. --bw-limit 1G). +
+
+
+
+
+
+-t, --tail GRÖSSE +
+Beschränkt die Dateiliste auf diejenigen, die nicht mehr als die +angegebene Tail-Größe der Paritätsfestplatten belegen. +Sie können Multiplikatoren wie K, M, G oder T verwenden (z. B. --tail 1G). +Diese Option ist nur in Verbindung mit dem Befehl +locate gültig. +
+
+
+
+
+
+-A, --stats +
+Aktiviert eine erweiterte Statusansicht, die zusätzliche +Informationen anzeigt. Der Bildschirm zeigt zwei Diagramme an: +Das erste Diagramm zeigt die Anzahl der gepufferten Stripes für jede +Festplatte sowie den Dateipfad der Datei, auf die derzeit auf dieser +Festplatte zugegriffen wird. Typischerweise hat die langsamste Festplatte +keinen verfügbaren Puffer, was die maximal erreichbare Bandbreite bestimmt. +Das zweite Diagramm zeigt den Prozentsatz der Wartezeit über die +letzten 100 Sekunden. Es wird erwartet, dass die langsamste Festplatte +die meiste Wartezeit verursacht, während andere Festplatten wenig +oder keine Wartezeit haben sollten, da sie ihre gepufferten Stripes +verwenden können. Dieses Diagramm zeigt auch die Zeit an, die +mit Warten auf Hash-Berechnungen und RAID-Berechnungen verbracht +wurde. Alle Berechnungen laufen parallel zu den Festplattenoperationen. +Solange für mindestens eine Festplatte eine messbare Wartezeit +vorhanden ist, deutet dies daher darauf hin, dass die CPU schnell +genug ist, um mit der Arbeitslast Schritt zu halten. +
+
+
+
+
+
+-Z, --force-zero +
+Erzwingt den unsicheren Vorgang der Synchronisierung einer Datei +mit Nullgröße, die zuvor nicht Null war. Wenn SnapRAID eine +solche Bedingung erkennt, stoppt es den Vorgang, es sei denn, +Sie geben diese Option an. Dies ermöglicht es Ihnen, leicht zu +erkennen, wann nach einem Systemabsturz einige zugegriffene Dateien +abgeschnitten (truncated) wurden. Dies ist eine mögliche Bedingung +unter Linux mit den ext3/ext4-Dateisystemen. +Diese Option kann nur mit sync verwendet werden. +
+
+
+
+
+
+-E, --force-empty +
+Erzwingt den unsicheren Vorgang der Synchronisierung einer +Festplatte, bei der alle ursprünglichen Dateien fehlen. +Wenn SnapRAID erkennt, dass alle ursprünglich auf der Festplatte +vorhandenen Dateien fehlen oder überschrieben wurden, stoppt es +den Vorgang, es sei denn, Sie geben diese Option an. +Dies ermöglicht es Ihnen, leicht zu erkennen, wann ein Daten-Dateisystem +nicht gemountet (eingehängt) ist. +Diese Option kann nur mit sync verwendet werden. +
+
+
+
+
+
+-U, --force-uuid +
+Erzwingt den unsicheren Vorgang der Synchronisierung, Überprüfung +und Behebung mit Festplatten, deren UUID geändert wurde. +Wenn SnapRAID erkennt, dass einige Festplatten ihre UUID +geändert haben, stoppt es den Vorgang, es sei denn, Sie geben +diese Option an. Dies ermöglicht es Ihnen, zu erkennen, wann +Ihre Festplatten an den falschen Einhängepunkten gemountet sind. +Es ist jedoch erlaubt, eine einzelne UUID-Änderung mit einfacher +Parität zu haben und mehr mit mehrfacher Parität, da dies +der normale Fall beim Austausch von Festplatten nach einer +Wiederherstellung ist. +Diese Option kann nur mit sync, check oder fix verwendet +werden. +
+
+
+
+
+
+-D, --force-device +
+Erzwingt den unsicheren Vorgang der Behebung mit unzugänglichen +Festplatten oder mit Festplatten auf demselben physischen Gerät. +Wenn Sie beispielsweise zwei Datenfestplatten verloren haben und +eine Ersatzfestplatte haben, um nur die erste wiederherzustellen, +können Sie die zweite unzugängliche Festplatte ignorieren. +Oder wenn Sie eine Festplatte in dem auf einer bereits +verwendeten Festplatte verbleibenden freien Speicherplatz +wiederherstellen möchten, wobei sie dasselbe physische Gerät +gemeinsam nutzen. +Diese Option kann nur mit fix verwendet werden. +
+
+
+
+
+
+-N, --force-nocopy +
+Deaktiviert in sync, check und fix die Kopiererkennungsheuristik. +Ohne diese Option geht SnapRAID davon aus, dass Dateien mit den +gleichen Attributen, wie Name, Größe und Zeitstempel, Kopien mit +denselben Daten sind. Dies ermöglicht die Identifizierung von +kopierten oder von einer Festplatte auf eine andere verschobenen +Dateien und die Wiederverwendung der bereits berechneten Hash-Informationen, +um stille Fehler zu erkennen oder fehlende Dateien wiederherzustellen. +In einigen seltenen Fällen kann dieses Verhalten zu falsch positiven +Ergebnissen oder einem langsamen Vorgang aufgrund vieler Hash-Überprüfungen +führen, und diese Option ermöglicht es Ihnen, solche Probleme +zu beheben. +Diese Option kann nur mit sync, check und fix verwendet +werden. +
+
+
+
+
+
+-F, --force-full +
+Erzwingt in sync eine vollständige Neuberechnung der Parität. +Diese Option kann verwendet werden, wenn Sie eine neue Paritätsstufe +hinzufügen oder wenn Sie zu einer alten Content-Datei mit +neueren Paritätsdaten zurückgekehrt sind. Anstatt die Parität +von Grund auf neu zu erstellen, ermöglicht dies die Wiederverwendung +der in der Content-Datei vorhandenen Hashes zur Validierung +von Daten und zur Aufrechterhaltung des Datenschutzes während +des sync-Vorgangs unter Verwendung der vorhandenen Paritätsdaten. +Diese Option kann nur mit sync verwendet werden. +
+
+
+
+
+
+-R, --force-realloc +
+Erzwingt in sync eine vollständige Neuallokation von Dateien +und eine Wiederherstellung der Parität. +Diese Option kann verwendet werden, um alle Dateien vollständig +neu zuzuweisen und die Fragmentierung zu entfernen, während +die in der Content-Datei vorhandenen Hashes zur Validierung +von Daten wiederverwendet werden. +Diese Option kann nur mit sync verwendet werden. +WARNUNG! Diese Option ist nur für Experten gedacht, und es wird +dringend empfohlen, sie nicht zu verwenden. +Sie haben während der sync-Operation KEINEN Datenschutz. +
+
+
+
+
+
+-W, --force-realloc-tail GRÖSSE +
+Funktioniert wie -R, --force-realloc, ist jedoch auf den angegebenen +Endbereich (die letzten GRÖSSE Bytes) jeder Paritätsdatei beschränkt. +Erzwingt die Neuzuweisung (Verschiebung) aller Dateifragmente/-blöcke, die +derzeit in diesem Endabschnitt gespeichert sind, sodass sie an beliebiger Stelle +in den Paritätsdateien platziert werden können, wo freier Speicherplatz +verfügbar ist (einschließlich vorhandener Lücken). +Der Hauptzweck dieser Option besteht darin, die Größe der Paritätsdatei +auf der Festplatte zu verringern. +Wenn die Neuzuweisung den gesamten Endabschnitt erfolgreich leert +(keine Blöcke verbleiben dort), wird die Paritätsdatei gekürzt, +wodurch der ungenutzte Endbereich freigegeben wird. +Sie können Multiplikatoren wie K, M, G oder T verwenden (z. B. +--force-realloc-tail 1G). +Sie können locate -t, --tail verwenden, um die betroffenen Dateien +im Voraus zu ermitteln. +WARNUNG! +Diese Option ist nur für Experten gedacht und es wird dringend +empfohlen, sie nicht zu verwenden. +Während des sync-Vorgangs besteht für die betroffenen Dateien +KEIN Datenschutz. +
+
+
+
+
+
+-l, --log FILE +
+Schreibt ein detailliertes Protokoll in die angegebene Datei. +Wenn diese Option nicht angegeben ist, werden unerwartete Fehler +auf dem Bildschirm ausgegeben, was bei vielen Fehlern möglicherweise +zu einer übermäßigen Ausgabe führt. Wenn -l, --log angegeben +ist, werden nur schwerwiegende Fehler, die SnapRAID zum Stoppen +bringen, auf dem Bildschirm ausgegeben. +Wenn der Pfad mit >> beginnt, wird die Datei im Anhängemodus +(append mode) geöffnet. Vorkommen von %D und %T im Namen +werden durch Datum und Uhrzeit im Format YYYYMMDD bzw. HHMMSS +ersetzt. In Windows-Batch-Dateien müssen Sie das %-Zeichen +verdoppeln, z.B. result-%%D.log. Um >> zu verwenden, müssen +Sie den Namen in Anführungszeichen setzen, z.B. ">>result.log". +Um das Protokoll an die Standardausgabe oder den Standardfehler +auszugeben, können Sie ">&1" bzw. ">&2" verwenden. +Beschreibungen der Protokoll-Tags finden Sie in der Datei +snapraid_log.txt oder in der Manpage. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Legt ein neues Fehlerlimit fest, bevor die Ausführung gestoppt +wird. Standardmäßig stoppt SnapRAID, wenn es mehr als 100 +Eingabe-/Ausgabefehler feststellt, was darauf hindeutet, dass +eine Festplatte wahrscheinlich ausfällt. Diese Option wirkt sich +auf sync und scrub aus, denen es gestattet ist, nach dem +ersten Satz von Festplattenfehlern fortzufahren, um ihre Vorgänge +abzuschließen. check und fix stoppen jedoch immer beim +ersten Fehler. +
+
+
+
+
+
+-S, --start BLKSTART +
+Startet die Verarbeitung ab der angegebenen Blocknummer. +Dies kann nützlich sein, um die Überprüfung oder Behebung +spezifischer Blöcke im Falle einer beschädigten Festplatte +zu wiederholen. Diese Option ist hauptsächlich für die erweiterte +manuelle Wiederherstellung gedacht. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Verarbeitet nur die angegebene Anzahl von Blöcken. +Diese Option ist hauptsächlich für die erweiterte manuelle +Wiederherstellung gedacht. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Generiert eine Dummy-Konfigurationsdatei aus einer vorhandenen +Content-Datei. Die Konfigurationsdatei wird in die Standardausgabe +geschrieben und überschreibt keine vorhandene. +Diese Konfigurationsdatei enthält auch die Informationen, +die zur Rekonstruktion der Festplatten-Einhängepunkte erforderlich +sind, falls Sie das gesamte System verlieren. +
+
+
+
+
+
+-v, --verbose +
+Gibt mehr Informationen auf dem Bildschirm aus. +Wenn einmal angegeben, werden ausgeschlossene Dateien +und zusätzliche Statistiken gedruckt. +Diese Option hat keine Auswirkung auf die Protokolldateien. +
+
+
+
+
+
+-q, --quiet +
+Gibt weniger Informationen auf dem Bildschirm aus. +Wenn einmal angegeben, wird die Fortschrittsleiste entfernt; +zweimal, die laufenden Operationen; dreimal, die Info-Meldungen; +viermal, die Statusmeldungen. +Schwerwiegende Fehler werden immer auf dem Bildschirm ausgegeben. +Diese Option hat keine Auswirkung auf die Protokolldateien. +
+
+
+
+
+
+-H, --help +
+Gibt eine kurze Hilfeanzeige aus. +
+
+
+
+
+
+-V, --version +
+Gibt die Programmversion aus. +
+
+
+
+
+

+Configuration +

+

SnapRAID benötigt eine Konfigurationsdatei, um zu wissen, wo sich +Ihr Festplatten-Array befindet und wo die Paritätsinformationen +gespeichert werden sollen. +

Unter Unix wird die Datei /usr/local/etc/snapraid.conf verwendet, +falls sie existiert, andernfalls /etc/snapraid.conf. +Unter Windows wird die Datei snapraid.conf im selben +Verzeichnis wie snapraid.exe verwendet. +

Sie muss die folgenden Optionen (Groß- und Kleinschreibung beachten) +enthalten: +

+

+parity FILE [,FILE] ... +

+

Definiert die Dateien, die zum Speichern der Paritätsinformationen +verwendet werden sollen. Die Parität ermöglicht den Schutz +vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5. +

Sie können mehrere Dateien angeben, die sich auf unterschiedlichen +Festplatten befinden müssen. Wenn eine Datei nicht mehr wachsen +kann, wird die nächste verwendet. Der gesamte verfügbare Platz +muss mindestens so groß sein wie die größte Datenfestplatte im +Array. +

Sie können später zusätzliche Paritätsdateien hinzufügen, aber Sie +können sie nicht neu anordnen oder entfernen. +

Das Reservieren der Paritätsfestplatten für Parität stellt sicher, +dass sie nicht fragmentiert werden, was die Leistung verbessert. +

Unter Windows werden 256 MB auf jeder Festplatte ungenutzt gelassen, +um die Warnung vor vollen Festplatten zu vermeiden. +

Diese Option ist obligatorisch und kann nur einmal verwendet werden. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen +verwendet werden sollen. +

Für jede angegebene Paritätsstufe wird eine zusätzliche Schutzstufe +aktiviert: +

    +
  • +2-parity aktiviert RAID6 Dual-Parität. +
  • +
  • +3-parity aktiviert Triple-Parität. +
  • +
  • +4-parity aktiviert Quad- (vierfache) Parität. +
  • +
  • +5-parity aktiviert Penta- (fünffache) Parität. +
  • +
  • +6-parity aktiviert Hexa- (sechsfache) Parität. +
  • +
+

Jede Paritätsstufe erfordert die Anwesenheit aller vorherigen +Paritätsstufen. +

Die gleichen Überlegungen wie bei der Option parity gelten. +

Diese Optionen sind optional und können nur einmal verwendet werden. +

+
+

+z-parity FILE [,FILE] ... +

+

Definiert eine alternative Datei und ein alternatives Format zum +Speichern von Triple-Parität. +

Diese Option ist eine Alternative zu 3-parity, die primär für +Low-End-CPUs wie ARM oder AMD Phenom, Athlon und Opteron gedacht +ist, die den SSSE3-Befehlssatz nicht unterstützen. In solchen Fällen +bietet sie eine bessere Leistung. +

Dieses Format ähnelt dem von ZFS RAIDZ3, ist aber schneller. +Wie ZFS funktioniert es nicht jenseits der Triple-Parität. +

Bei Verwendung von 3-parity werden Sie gewarnt, wenn das +z-parity-Format zur Leistungsverbesserung empfohlen wird. +

Es ist möglich, von einem Format in ein anderes zu konvertieren, +indem die Konfigurationsdatei mit der gewünschten z-parity- oder +3-parity-Datei angepasst und fix zur Neuerstellung verwendet wird. +

+
+

+content FILE +

+

Definiert die Datei, die zum Speichern der Liste und Prüfsummen +aller im Festplatten-Array vorhandenen Dateien verwendet werden soll. +

Sie kann auf einer für Daten, Parität oder einer anderen +verfügbaren Festplatte platziert werden. +Wenn Sie eine Datenfestplatte verwenden, wird diese Datei automatisch +vom sync-Vorgang ausgeschlossen. +

Diese Option ist obligatorisch und kann mehrmals verwendet werden, +um mehrere Kopien derselben Datei zu speichern. +

Sie müssen mindestens eine Kopie für jede verwendete Paritätsfestplatte +plus eine speichern. Die Verwendung zusätzlicher Kopien schadet nicht. +

+
+

+data NAME DIR +

+

Definiert den Namen und den Einhängepunkt (Mount Point) der +Datenfestplatten im Array. NAME wird zur Identifizierung der +Festplatte verwendet und muss eindeutig sein. DIR ist der +Einhängepunkt der Festplatte im Dateisystem. +

Sie können den Einhängepunkt nach Bedarf ändern, solange Sie +den NAME unverändert lassen. +

Sie sollten eine Option für jede Datenfestplatte im Array verwenden. +

Sie können eine Festplatte später umbenennen, indem Sie den NAME +direkt in der Konfigurationsdatei ändern und dann einen sync-Befehl +ausführen. Im Falle einer Umbenennung erfolgt die Zuordnung +mithilfe der gespeicherten UUID der Festplatten. +

+
+

+extra NAME DIR +

+

Definiert den Namen und Einhängepunkt zusätzlicher Festplatten, die mit den +Befehlen smart und probe überwacht werden sollen. +

Dies ist nützlich für die Überwachung von Festplatten, die nicht Teil des +Arrays sind, aber für das Funktionieren des Systems erforderlich sind, wie +z. B. die Boot-Festplatte. +

Beachten Sie, dass solche Festplatten nicht von den Befehlen up und down +betroffen sind, da von ihnen erwartet wird, dass sie sich immer drehen. +

+
+

+nohidden +

+

Schließt alle versteckten Dateien und Verzeichnisse aus. +Unter Unix sind versteckte Dateien solche, die mit . beginnen. +Unter Windows sind es solche mit dem versteckten Attribut. +

+
+

+exclude/include PATTERN +

+

Definiert die Datei- oder Verzeichnismuster, die im sync-Vorgang +ausgeschlossen oder eingeschlossen werden sollen. +Alle Muster werden in der angegebenen Reihenfolge verarbeitet. +

Wenn das erste übereinstimmende Muster ein exclude-Muster ist, +wird die Datei ausgeschlossen. Wenn es ein include-Muster ist, +wird die Datei eingeschlossen. Wenn kein Muster übereinstimmt, +wird die Datei ausgeschlossen, wenn das zuletzt angegebene Muster +ein include ist, oder eingeschlossen, wenn das zuletzt angegebene +Muster ein exclude ist. +

Weitere Details zu Musterspezifikationen finden Sie im Abschnitt +PATTERN. +

Diese Option kann mehrmals verwendet werden. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Definiert die grundlegende Blockgröße in Kibibytes für die Parität. +Ein Kibibyte entspricht 1024 Bytes. +

Die Standard-Blockgröße ist 256, was für die meisten Fälle +ausreichen sollte. +

WARNUNG! Diese Option ist nur für Experten gedacht, und es wird +dringend empfohlen, diesen Wert nicht zu ändern. Um diesen Wert +zukünftig zu ändern, müssen Sie die gesamte Parität neu erstellen! +

Ein Grund für die Verwendung einer anderen Blockgröße ist, wenn Sie +viele kleine Dateien in der Größenordnung von Millionen haben. +

Für jede Datei, auch wenn sie nur wenige Bytes groß ist, wird ein +ganzer Block Parität zugewiesen, und bei vielen Dateien kann dies +zu erheblichem ungenutztem Paritätsplatz führen. Wenn Sie die +Paritätsfestplatte vollständig füllen, dürfen Sie keine weiteren +Dateien zu den Datenfestplatten hinzufügen. +Der verschwendete Paritätsplatz akkumuliert sich jedoch nicht über +die Datenfestplatten hinweg. Verschwendeter Platz, der durch eine +hohe Anzahl von Dateien auf einer Datenfestplatte entsteht, begrenzt +nur die Datenmenge auf dieser Datenfestplatte, nicht auf anderen. +

Als Annäherung können Sie davon ausgehen, dass die Hälfte der +Blockgröße für jede Datei verschwendet wird. Mit beispielsweise +100.000 Dateien und einer Blockgröße von 256 KiB verschwenden +Sie 12,8 GB Parität, was zu 12,8 GB weniger verfügbarem Speicherplatz +auf der Datenfestplatte führen kann. +

Sie können die Menge des verschwendeten Platzes auf jeder Festplatte +mithilfe von status überprüfen. Dies ist die Menge an Platz, die Sie +auf den Datenfestplatten freilassen oder für Dateien verwenden müssen, +die nicht im Array enthalten sind. Wenn dieser Wert negativ ist, +bedeutet dies, dass Sie kurz davor sind, die Parität zu füllen, +und er stellt den Platz dar, den Sie noch verschwenden können. +

Um dieses Problem zu vermeiden, können Sie eine größere Partition +für die Parität verwenden. Wenn die Paritätspartition beispielsweise +12,8 GB größer ist als die Datenfestplatten, haben Sie genügend +zusätzlichen Platz, um bis zu 100.000 Dateien auf jeder Datenfestplatte +ohne verschwendeten Platz zu verarbeiten. +

Ein Trick, um eine größere Paritätspartition unter Linux zu erhalten, +ist die Formatierung mit dem Befehl: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Dies führt zu etwa 1,5% zusätzlichem Speicherplatz, ungefähr 60 GB +für eine 4 TB Festplatte, was etwa 460.000 Dateien auf jeder +Datenfestplatte ohne verschwendeten Platz ermöglicht. +

+
+

+hashsize SIZE_IN_BYTES +

+

Definiert die Hash-Größe in Bytes für die gespeicherten Blöcke. +

Die Standard-Hash-Größe beträgt 16 Bytes (128 Bit), was für die +meisten Fälle ausreichen sollte. +

WARNUNG! Diese Option ist nur für Experten gedacht, und es wird +dringend empfohlen, diesen Wert nicht zu ändern. Um diesen Wert +zukünftig zu ändern, müssen Sie die gesamte Parität neu erstellen! +

Ein Grund für die Verwendung einer anderen Hash-Größe ist, wenn Ihr +System über begrenzten Speicher verfügt. Als Faustregel benötigt +SnapRAID typischerweise 1 GiB RAM für jede 16 TB Daten im Array. +

Genauer gesagt benötigt SnapRAID zum Speichern der Hashes der Daten +ungefähr TS*(1+HS)/BS Bytes RAM, +wobei TS die Gesamtgröße in Bytes Ihres Festplatten-Arrays ist, +BS die Blockgröße in Bytes und HS die Hash-Größe in Bytes. +

Mit beispielsweise 8 Festplatten à 4 TB, einer Blockgröße von 256 KiB +(1 KiB = 1024 Bytes) und einer Hash-Größe von 16 erhalten Sie: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
+
+

Bei einem Wechsel zu einer Hash-Größe von 8 erhalten Sie: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
+
+

Bei einem Wechsel zu einer Blockgröße von 512 erhalten Sie: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
+
+

Bei einem Wechsel zu einer Hash-Größe von 8 und einer Blockgröße +von 512 erhalten Sie: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Speichert den Zustand beim Synchronisieren oder Scrubben automatisch +nach der angegebenen Menge an verarbeiteten GB. +Diese Option ist nützlich, um zu vermeiden, dass lange sync-Befehle +von vorne gestartet werden müssen, wenn sie durch einen Maschinenabsturz +oder ein anderes Ereignis unterbrochen werden. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Legt die maximal zulässige Festplattentemperatur in Celsius fest. +Wenn angegeben, überprüft SnapRAID regelmäßig die Temperatur aller +Festplatten mithilfe des smartctl-Tools. Die aktuellen Festplattentemperaturen +werden während des Betriebs von SnapRAID angezeigt. Wenn eine Festplatte +diesen Grenzwert überschreitet, werden alle Vorgänge gestoppt, und +die Festplatten werden für die durch die Option temp_sleep definierte +Dauer heruntergefahren (in den Standby-Modus versetzt). Nach der +Schlafperiode werden die Vorgänge fortgesetzt und möglicherweise +erneut pausiert, wenn der Temperaturgrenzwert erneut erreicht wird. +

Während des Betriebs analysiert SnapRAID auch die Heizkurve jeder +Festplatte und schätzt die langfristige stationäre Temperatur, die +erwartet wird, wenn die Aktivität fortgesetzt wird. Die Schätzung +wird nur durchgeführt, nachdem die Festplattentemperatur viermal +angestiegen ist, um sicherzustellen, dass genügend Datenpunkte +zur Verfügung stehen, um einen zuverlässigen Trend festzustellen. +Diese vorhergesagte stationäre Temperatur wird in Klammern neben +dem aktuellen Wert angezeigt und hilft bei der Beurteilung, ob die +Kühlung des Systems ausreichend ist. Diese geschätzte Temperatur +dient nur zu Informationszwecken und hat keine Auswirkung auf das +Verhalten von SnapRAID. Die Aktionen des Programms basieren +ausschließlich auf den tatsächlich gemessenen Festplattentemperaturen. +

Um diese Analyse durchzuführen, benötigt SnapRAID eine Referenz für +die Systemtemperatur. Es versucht zunächst, diese von verfügbaren +Hardwaresensoren zu lesen. Wenn kein Systemsensor zugänglich ist, +wird die niedrigste zu Beginn des Laufs gemessene Festplattentemperatur +als Fallback-Referenz verwendet. +

Normalerweise zeigt SnapRAID nur die Temperatur der heißesten +Festplatte an. Um die Temperatur aller Festplatten anzuzeigen, +verwenden Sie die Option -A oder --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Legt die Standby-Zeit in Minuten fest, wenn der Temperaturgrenzwert +erreicht wird. Während dieser Zeit bleiben die Festplatten heruntergefahren. +Der Standardwert ist 5 Minuten. +

+
+

+pool DIR +

+

Definiert das Pooling-Verzeichnis, in dem die virtuelle Ansicht des +Festplatten-Arrays mithilfe des Befehls pool erstellt wird. +

Das Verzeichnis muss bereits existieren. +

+
+

+share UNC_DIR +

+

Definiert den Windows UNC-Pfad, der für den Remote-Zugriff auf die +Festplatten erforderlich ist. +

Wenn diese Option angegeben ist, verwenden die im Pool-Verzeichnis +erstellten symbolischen Links diesen UNC-Pfad, um auf die Festplatten +zuzugreifen. Ohne diese Option verwenden die generierten symbolischen +Links nur lokale Pfade, was die Freigabe des Pool-Verzeichnisses +über das Netzwerk nicht ermöglicht. +

Die symbolischen Links werden unter Verwendung des angegebenen UNC-Pfads +gebildet, wobei der in der data-Option angegebene Festplattenname +und schließlich das Dateiverzeichnis und der Name hinzugefügt werden. +

Diese Option ist nur für Windows erforderlich. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Definiert benutzerdefinierte smartctl-Optionen, um die SMART-Attribute +für jede Festplatte abzurufen. Dies kann für RAID-Controller und einige +USB-Festplatten erforderlich sein, die nicht automatisch erkannt +werden können. Der Platzhalter %s wird durch den Gerätenamen ersetzt, +ist aber für feste Geräte wie RAID-Controller optional. +

DISK ist derselbe Festplattenname, der in der data-Option angegeben +ist. PARITY ist einer der Paritätsnamen: parity, 2-parity, +3-parity, 4-parity, 5-parity, 6-parity oder z-parity. +

In den angegebenen OPTIONS wird die Zeichenfolge %s durch den +Gerätenamen ersetzt. Bei RAID-Controllern ist das Gerät +wahrscheinlich fest, und Sie müssen %s möglicherweise nicht verwenden. +

Weitere mögliche Optionen finden Sie in der smartmontools-Dokumentation: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Zum Beispiel: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignoriert das angegebene SMART-Attribut bei der Berechnung der +Wahrscheinlichkeit eines Festplattenausfalls. Diese Option ist +nützlich, wenn eine Festplatte ungewöhnliche oder irreführende +Werte für ein bestimmtes Attribut meldet. +

DISK ist derselbe Festplattenname, der in der data-Option angegeben +ist. PARITY ist einer der Paritätsnamen: parity, 2-parity, +3-parity, 4-parity, 5-parity, 6-parity oder z-parity. +Der Sonderwert * kann verwendet werden, um das Attribut auf allen +Festplatten zu ignorieren. +

Um beispielsweise das Attribut Current Pending Sector Count auf allen +Festplatten zu ignorieren: +

+smartignore * 197
+
+

Um es nur auf der ersten Paritätsfestplatte zu ignorieren: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Ein Beispiel für eine typische Konfiguration für Unix ist: +

+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
+
+

Ein Beispiel für eine typische Konfiguration für Windows ist: +

+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
+
+
+
+
+

+Pattern +

+

Muster bieten eine flexible Möglichkeit, Dateien für die Einbeziehung oder +den Ausschluss zu filtern. Durch die Verwendung von Globbing-Zeichen können Sie Regeln definieren, +die mit bestimmten Dateinamen oder ganzen Verzeichnisstrukturen übereinstimmen, ohne +jeden Pfad manuell auflisten zu müssen. +

Das Fragezeichen ? entspricht einem beliebigen einzelnen Zeichen außer dem +Verzeichnistrennzeichen. Dies macht es nützlich für den Abgleich von Dateinamen mit variablen +Zeichen, während das Muster auf eine einzelne Verzeichnisebene beschränkt bleibt. +

Der einfache Stern * entspricht einer beliebigen Folge von Zeichen, aber wie das +Fragezeichen überschreitet er niemals Verzeichnisgrenzen. Er stoppt beim +Schrägstrich, was ihn für den Abgleich innerhalb einer einzelnen Pfadkomponente +geeignet macht. Dies ist das Standardverhalten von Wildcards, das vom Shell- +Globbing bekannt ist. +

Der Doppelstern ** ist mächtiger; er entspricht jeder Folge von +Zeichen einschließlich Verzeichnistrennzeichen. Dies ermöglicht es Mustern, über +mehrere Verzeichnisebenen hinweg übereinzustimmen. Wenn ** direkt in +ein Muster eingebettet ist, kann es null oder mehr Zeichen einschließlich Schrägstrichen zwischen +dem umgebenden wörtlichen Text entsprechen. +

Die wichtigste Verwendung von ** ist in der speziellen Form /**/. Dies entspricht +null oder mehr vollständigen Verzeichnisebenen, was es möglich macht, Dateien +in jeder Tiefe eines Verzeichnisbaums abzugleichen, ohne die genaue Pfadstruktur zu kennen. +Zum Beispiel entspricht das Muster src/**/main.js dem Pfad src/main.js (Überspringen +von null Verzeichnissen), src/ui/main.js (Überspringen eines Verzeichnisses) und +src/ui/components/main.js (Überspringen von zwei Verzeichnissen). +

Zeichenklassen mit eckigen Klammern [] entsprechen einem einzelnen Zeichen aus einer +bestimmten Menge oder einem Bereich. Wie die anderen Einzelzeichenmuster +entsprechen sie nicht den Verzeichnistrennzeichen. Klassen unterstützen Bereiche und Negierung durch +ein Ausrufezeichen. +

Der grundlegende Unterschied, den man sich merken sollte, ist, dass *, ? und Zeichenklassen +alle Verzeichnisgrenzen respektieren und nur innerhalb einer einzelnen Pfadkomponente +übereinstimmen, während ** das einzige Muster ist, das über Verzeichnistrennzeichen +hinweg übereinstimmen kann. +

Es gibt vier verschiedene Arten von Mustern: +

+
+
+FILE +
+Wählt jede Datei mit dem Namen FILE aus. +Dieses Muster gilt nur für Dateien, nicht für Verzeichnisse. +
+
+
+
+
+
+DIR/ +
+Wählt jedes Verzeichnis mit dem Namen DIR und alles darin aus. +Dieses Muster gilt nur für Verzeichnisse, nicht für Dateien. +
+
+
+
+
+
+/PATH/FILE +
+Wählt den exakt angegebenen Dateipfad aus. Dieses Muster gilt +nur für Dateien, nicht für Verzeichnisse. +
+
+
+
+
+
+/PATH/DIR/ +
+Wählt den exakt angegebenen Verzeichnispfad und alles darin aus. +Dieses Muster gilt nur für Verzeichnisse, nicht für Dateien. +
+
+
+

Wenn Sie einen absoluten Pfad angeben, der mit / beginnt, wird er +auf das Array-Stammverzeichnis angewendet, nicht auf das lokale +Dateisystem-Stammverzeichnis. +

Unter Windows können Sie den Backslash \ anstelle des Forward-Slash / +verwenden. Windows-Systemverzeichnisse, Junctions, Einhängepunkte +(Mount Points) und andere spezielle Windows-Verzeichnisse werden +als Dateien behandelt, was bedeutet, dass Sie zum Ausschließen +eine Dateiregel verwenden müssen, nicht eine Verzeichnisregel. +

Wenn der Dateiname ein Zeichen *, ?, [, oder ] enthält, +müssen Sie es escapen, um zu vermeiden, dass es als Globbing-Zeichen +interpretiert wird. Unter Unix ist das Escape-Zeichen \; unter +Windows ist es ^. Wenn sich das Muster in der Befehlszeile befindet, +müssen Sie das Escape-Zeichen verdoppeln, um zu vermeiden, dass es +von der Befehlsshell interpretiert wird. +

In der Konfigurationsdatei können Sie verschiedene Strategien zum +Filtern der zu verarbeitenden Dateien verwenden. +Der einfachste Ansatz besteht darin, nur exclude-Regeln zu verwenden, +um alle Dateien und Verzeichnisse zu entfernen, die Sie nicht +verarbeiten möchten. Zum Beispiel: +

+# Schließt jede Datei namens *.unrecoverable aus
+exclude *.unrecoverable
+# Schließt das Stammverzeichnis /lost+found aus
+exclude /lost+found/
+# Schließt jedes Unterverzeichnis namens tmp aus
+exclude tmp/
+
+

Der gegenteilige Ansatz besteht darin, nur die Dateien zu definieren, +die Sie verarbeiten möchten, indem Sie nur include-Regeln verwenden. +Zum Beispiel: +

+# Schließt nur einige Verzeichnisse ein
+include /movies/
+include /musics/
+include /pictures/
+
+

Der letzte Ansatz besteht darin, exclude- und include-Regeln +zu mischen. In diesem Fall ist die Reihenfolge der Regeln wichtig. +Frühere Regeln haben Vorrang vor späteren. +Zur Vereinfachung können Sie zuerst alle exclude-Regeln und +dann alle include-Regeln auflisten. Zum Beispiel: +

+# Schließt jede Datei namens *.unrecoverable aus
+exclude *.unrecoverable
+# Schließt jedes Unterverzeichnis namens tmp aus
+exclude tmp/
+# Schließt nur einige Verzeichnisse ein
+include /movies/
+include /musics/
+include /pictures/
+
+

In der Befehlszeile können Sie mit der Option -f nur include-Muster +verwenden. Zum Beispiel: +

+# Überprüft nur die .mp3-Dateien.
+# Unter Unix Anführungszeichen verwenden, um die Globbing-Erweiterung durch die Shell zu vermeiden.
+snapraid -f "*.mp3" check
+
+

Unter Unix müssen Sie Globbing-Zeichen in der Befehlszeile in +Anführungszeichen setzen, um zu verhindern, dass die Shell sie erweitert. +

+
+

+Dateien Ignorieren +

+

Zusätzlich zu den globalen Regeln in der Konfigurationsdatei können Sie +.snapraidignore-Dateien in jedem Verzeichnis innerhalb des Arrays platzieren, +um dezentrale Ausschlussregeln zu definieren. +

Regeln, die in .snapraidignore definiert sind, werden nach den Regeln in der +Konfigurationsdatei angewendet. Dies bedeutet, dass sie eine höhere Priorität haben +und verwendet werden können, um Dateien auszuschließen, die zuvor durch die globale +Konfiguration eingeschlossen wurden. Effektiv wird eine Datei ausgeschlossen, wenn +eine lokale Regel zutrifft, unabhängig von den globalen Include-Einstellungen. +

Die Musterlogik in .snapraidignore spiegelt die globale Konfiguration wider, +verankert die Muster jedoch an dem Verzeichnis, in dem sich die Datei befindet: +

+
+
+FILE +
+Wählt jede Datei namens FILE in diesem Verzeichnis oder darunter aus. +Dies folgt denselben Globbing-Regeln wie das globale Muster. +
+
+
+
+
+
+DIR/ +
+Wählt jedes Verzeichnis namens DIR und alles darin aus, das sich +in diesem Verzeichnis oder darunter befindet. +
+
+
+
+
+
+/PATH/FILE +
+Wählt die exakt angegebene Datei relativ zum Speicherort +der .snapraidignore-Datei aus. +
+
+
+
+
+
+/PATH/DIR/ +
+Wählt das exakt angegebene Verzeichnis und alles darin aus, +relativ zum Speicherort der .snapraidignore-Datei. +
+
+
+

Im Gegensatz zur globalen Konfiguration unterstützen .snapraidignore-Dateien nur +Ausschlussregeln; Sie können keine include-Muster oder Negationen (!) verwenden. +

Wenn Sie beispielsweise eine .snapraidignore in /mnt/disk1/projects/ haben: +

+# Schließt NUR /mnt/disk1/projects/output.bin aus
+/output.bin
+# Schließt jedes Verzeichnis namens build innerhalb von projects/ aus
+build/
+# Schließt jede .tmp-Datei innerhalb von projects/ oder deren Unterordnern aus
+*.tmp
+
+
+
+

+Content +

+

SnapRAID speichert die Liste und Prüfsummen Ihrer Dateien in der +Content-Datei. +

Es ist eine Binärdatei, die alle im Festplatten-Array vorhandenen +Dateien auflistet, zusammen mit allen Prüfsummen zur Überprüfung +ihrer Integrität. +

Diese Datei wird von den Befehlen sync und scrub gelesen und +geschrieben und von den Befehlen fix, check und status gelesen. +

+
+

+Parity +

+

SnapRAID speichert die Paritätsinformationen Ihres Arrays in den +Paritätsdateien. +

Dies sind Binärdateien, die die berechnete Parität aller in der +content-Datei definierten Blöcke enthalten. +

Diese Dateien werden von den Befehlen sync und fix gelesen +und geschrieben und nur von den Befehlen scrub und check gelesen. +

+
+

+Encoding +

+

SnapRAID ignoriert unter Unix jede Kodierung. Es liest und speichert +die Dateinamen mit derselben Kodierung, die vom Dateisystem +verwendet wird. +

Unter Windows werden alle vom Dateisystem gelesenen Namen konvertiert +und im UTF-8-Format verarbeitet. +

Um Dateinamen korrekt auszugeben, müssen Sie die Windows-Konsole +mit dem Befehl chcp 65001 auf den UTF-8-Modus einstellen und +eine TrueType-Schriftart wie Lucida Console als Konsolenschriftart +verwenden. Dies betrifft nur die gedruckten Dateinamen; wenn Sie +die Konsolenausgabe in eine Datei umleiten, ist die resultierende +Datei immer im UTF-8-Format. +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-es.html b/beta/manual-es.html new file mode 100644 index 00000000..9775c337 --- /dev/null +++ b/beta/manual-es.html @@ -0,0 +1,2149 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID es un programa de copia de seguridad diseñado para arrays +de discos, que almacena información de paridad para la recuperación +de datos en caso de hasta seis fallos de disco. +

Destinado principalmente a centros de medios domésticos con archivos +grandes y que cambian con poca frecuencia, SnapRAID ofrece varias +características: +

    +
  • +Puede utilizar discos ya llenos de archivos sin la necesidad de +reformatearlos, accediendo a ellos como de costumbre. +
  • +
  • +Todos sus datos son hasheados para asegurar la integridad de los datos +y prevenir la corrupción silenciosa. +
  • +
  • +Cuando el número de discos fallidos excede el recuento de paridad, +la pérdida de datos se limita a los discos afectados; los datos en +otros discos siguen siendo accesibles. +
  • +
  • +Si elimina archivos accidentalmente en un disco, la recuperación es +posible. +
  • +
  • +Los discos pueden tener diferentes tamaños. +
  • +
  • +Puede agregar discos en cualquier momento. +
  • +
  • +SnapRAID no bloquea sus datos; puede dejar de usarlo +en cualquier momento sin reformatear ni mover datos. +
  • +
  • +Para acceder a un archivo, solo un único disco necesita girar, +ahorrando energía y reduciendo el ruido. +
  • +
+

Para más información, visite el sitio oficial de SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID es un híbrido entre un programa RAID y un programa de copia +de seguridad, con el objetivo de combinar los mejores beneficios de +ambos. Sin embargo, tiene algunas limitaciones que debe considerar +antes de usarlo. +

La principal limitación es que si un disco falla y no ha sincronizado +recientemente, es posible que no pueda recuperarse por completo. +Más específicamente, es posible que no pueda recuperar hasta el tamaño +de los archivos cambiados o eliminados desde la última operación de +sincronización. Esto ocurre incluso si los archivos cambiados o +eliminados no están en el disco fallido. Esta es la razón por la que +SnapRAID es más adecuado para datos que rara vez cambian. +

Por otro lado, los archivos recién agregados no impiden la recuperación +de los archivos ya existentes. Solo perderá los archivos recién +agregados si están en el disco fallido. +

Otras limitaciones de SnapRAID son: +

    +
  • +Con SnapRAID, aún tiene sistemas de archivos separados para cada disco. +Con RAID, obtiene un único sistema de archivos grande. +
  • +
  • +SnapRAID no distribuye (stripe) los datos. +Con RAID, obtiene un aumento de velocidad con la distribución. +
  • +
  • +SnapRAID no admite la recuperación en tiempo real. +Con RAID, no tiene que dejar de trabajar cuando falla un disco. +
  • +
  • +SnapRAID puede recuperar datos solo de un número limitado de fallos de disco. +Con una copia de seguridad, puede recuperarse de un fallo completo +de todo el array de discos. +
  • +
  • +Solo se guardan nombres de archivo, marcas de tiempo, enlaces simbólicos +y enlaces duros. Los permisos, la propiedad y los atributos +extendidos no se guardan. +
  • +
+
+
+

+Getting Started +

+

Para usar SnapRAID, primero debe seleccionar un disco en su array de +discos para dedicarlo a la información de parity (paridad). Con un +disco para paridad, podrá recuperarse de un solo fallo de disco, +similar a RAID5. +

Si desea recuperarse de más fallos de disco, similar a RAID6, +debe reservar discos adicionales para la paridad. Cada disco de +paridad adicional permite la recuperación de un fallo de disco más. +

Como discos de paridad, debe elegir los discos más grandes del array, +ya que la información de paridad puede crecer hasta el tamaño del +disco de datos más grande del array. +

Estos discos estarán dedicados a almacenar los archivos de parity. +No debe almacenar sus datos en ellos. +

Luego, debe definir los discos de data (datos) que desea proteger +con SnapRAID. La protección es más efectiva si estos discos +contienen datos que rara vez cambian. Por esta razón, es mejor +NO incluir el disco C:\ de Windows o los directorios /home, /var y +/tmp de Unix. +

La lista de archivos se guarda en los archivos de content (contenido), +generalmente almacenados en los discos de datos, paridad o de arranque. +Este archivo contiene los detalles de su copia de seguridad, +incluyendo todas las sumas de comprobación para verificar su integridad. +El archivo de content se almacena en múltiples copias, y cada copia +debe estar en un disco diferente para asegurar que, incluso en caso +de múltiples fallos de disco, al menos una copia esté disponible. +

Por ejemplo, suponga que solo está interesado en un nivel de paridad +de protección, y sus discos están ubicados en: +

+/mnt/diskp <- disco seleccionado para paridad
+/mnt/disk1 <- primer disco a proteger
+/mnt/disk2 <- segundo disco a proteger
+/mnt/disk3 <- tercer disco a proteger
+
+

Debe crear el archivo de configuración /etc/snapraid.conf con +las siguientes opciones: +

+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/
+
+

Si está en Windows, debe usar el formato de ruta de Windows, con +letras de unidad y barras invertidas en lugar de barras. +

+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\
+
+

Si tiene muchos discos y se queda sin letras de unidad, puede montar +discos directamente en subcarpetas. Consulte: +

+https://www.google.com/search?q=Windows+mount+point
+
+

En este punto, está listo para ejecutar el comando sync (sincronizar) +para construir la información de paridad. +

+snapraid sync
+
+

Este proceso puede llevar varias horas la primera vez, dependiendo +del tamaño de los datos ya presentes en los discos. Si los discos +están vacíos, el proceso es inmediato. +

Puede detenerlo en cualquier momento presionando Ctrl+C, y en la +siguiente ejecución, se reanudará donde se interrumpió. +

Cuando este comando se complete, sus datos estarán SEGUROS. +

Ahora puede comenzar a usar su array como desee y periódicamente +actualizar la información de paridad ejecutando el comando sync. +

+

+Scrubbing +

+

Para verificar periódicamente los datos y la paridad en busca de +errores, puede ejecutar el comando scrub (fregar/limpiar). +

+snapraid scrub
+
+

Este comando compara los datos de su array con el hash calculado +durante el comando sync para verificar la integridad. +

Cada ejecución del comando verifica aproximadamente el 8% del array, +excluyendo los datos ya fregados en los 10 días anteriores. +Puede usar la opción -p, --plan para especificar una cantidad +diferente y la opción -o, --older-than para especificar una edad +diferente en días. Por ejemplo, para verificar el 5% del array en +busca de bloques con más de 20 días, use: +

+snapraid -p 5 -o 20 scrub
+
+

Si se encuentran errores silenciosos o de entrada/salida durante el +proceso, los bloques correspondientes se marcan como defectuosos en +el archivo de content y se listan en el comando status. +

+snapraid status
+
+

Para corregirlos, puede usar el comando fix (arreglar), filtrando +por bloques defectuosos con la opción -e, --filter-error: +

+snapraid -e fix
+
+

En el siguiente scrub, los errores desaparecerán del informe de +status si realmente se han corregido. Para hacerlo más rápido, +puede usar -p bad para fregar solo los bloques marcados como defectuosos. +

+snapraid -p bad scrub
+
+

Ejecutar scrub en un array no sincronizado puede reportar errores +causados por archivos eliminados o modificados. Estos errores se +informan en la salida de scrub, pero los bloques relacionados no +se marcan como defectuosos. +

+
+

+Pooling +

+

Nota: La función de pooling descrita a continuación ha sido +sustituida por la herramienta mergerfs, que ahora es la opción +recomendada para los usuarios de Linux en la comunidad SnapRAID. +Mergefs proporciona una forma más flexible y eficiente de agrupar +múltiples unidades en un único punto de montaje unificado, +permitiendo un acceso sin problemas a los archivos en todo su array +sin depender de enlaces simbólicos. Se integra bien con SnapRAID +para la protección de paridad y se usa comúnmente en configuraciones +como OpenMediaVault (OMV) o configuraciones NAS personalizadas. +

Para que todos los archivos de su array se muestren en el mismo árbol +de directorios, puede habilitar la función de pooling (agrupación). +Crea una vista virtual de solo lectura de todos los archivos de su +array utilizando enlaces simbólicos. +

Puede configurar el directorio de pooling en el archivo de +configuración con: +

+pool /pool
+
+

o, si está en Windows, con: +

+pool C:\pool
+
+

y luego ejecute el comando pool para crear o actualizar la vista virtual. +

+snapraid pool
+
+

Si está utilizando una plataforma Unix y desea compartir este +directorio a través de la red con máquinas Windows o Unix, debe +agregar las siguientes opciones a su /etc/samba/smb.conf: +

+# En la sección global de smb.conf
+unix extensions = no
+
+
+# En la sección de compartir de smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

En Windows, compartir enlaces simbólicos a través de una red requiere +que los clientes los resuelvan de forma remota. Para habilitar esto, +además de compartir el directorio pool, también debe compartir todos +los discos de forma independiente, utilizando los nombres de disco +definidos en el archivo de configuración como puntos de recurso +compartido. También debe especificar en la opción share del archivo +de configuración la ruta UNC de Windows que los clientes remotos +necesitan usar para acceder a estos discos compartidos. +

Por ejemplo, operando desde un servidor llamado darkstar, puede usar +las opciones: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

y compartir los siguientes directorios a través de la red: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

para permitir que los clientes remotos accedan a todos los archivos +en \\darkstar\pool. +

También puede que deba configurar los clientes remotos para habilitar +el acceso a enlaces simbólicos remotos con el comando: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID funciona más como un programa de copia de seguridad que como +un sistema RAID, y se puede usar para restaurar o recuperar archivos +a su estado anterior usando la opción -f, --filter: +

+snapraid fix -f FILE
+
+

o para un directorio: +

+snapraid fix -f DIR/
+
+

También puede usarlo para recuperar solo archivos eliminados +accidentalmente dentro de un directorio usando la opción -m, +--filter-missing, que restaura solo archivos faltantes, dejando +todos los demás intactos. +

+snapraid fix -m -f DIR/
+
+

O para recuperar todos los archivos eliminados en todas las unidades con: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

Ha sucedido lo peor, ¡y ha perdido uno o más discos! +

¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos! +

Lo primero que debe hacer es evitar más cambios en su array de discos. +Deshabilite cualquier conexión remota a él y cualquier proceso +programado, incluida cualquier sincronización o fregado nocturno +programado de SnapRAID. +

Luego, proceda con los siguientes pasos. +

+

+STEP 1 -> Reconfigure +

+

Necesita algo de espacio para recuperarse, idealmente en discos de +repuesto adicionales, pero un disco USB externo o un disco remoto +serán suficientes. +

Modifique el archivo de configuración de SnapRAID para hacer que la +opción data o parity del disco fallido apunte a una ubicación +con suficiente espacio vacío para recuperar los archivos. +

Por ejemplo, si el disco d1 ha fallado, cambie de: +

+data d1 /mnt/disk1/
+
+

a: +

+data d1 /mnt/new_spare_disk/
+
+

Si el disco a recuperar es un disco de paridad, actualice la opción +parity apropiada. +Si tiene varios discos fallidos, actualice todas sus opciones de +configuración. +

+
+

+STEP 2 -> Fix +

+

Ejecute el comando fix, almacenando el registro en un archivo externo con: +

+snapraid -d NAME -l fix.log fix
+
+

Donde NAME es el nombre del disco, como d1 en nuestro ejemplo anterior. +Si el disco a recuperar es un disco de paridad, use los nombres parity, +2-parity, etc. +Si tiene varios discos fallidos, use varias opciones -d para +especificarlos todos. +

Este comando tardará mucho tiempo. +

Asegúrese de tener unos pocos gigabytes libres para almacenar el archivo +fix.log. Ejecútelo desde un disco con suficiente espacio libre. +

Ahora ha recuperado todo lo que es recuperable. Si algunos archivos son +parcial o totalmente irrecuperables, se les cambiará el nombre agregando +la extensión .unrecoverable. +

Puede encontrar una lista detallada de todos los bloques irrecuperables +en el archivo fix.log buscando todas las líneas que comienzan con unrecoverable:. +

Si no está satisfecho con la recuperación, puede volver a intentarlo +tantas veces como desee. +

Por ejemplo, si ha eliminado archivos del array después de la última +sync, esto puede resultar en que algunos archivos no se recuperen. +En este caso, puede volver a intentar el fix usando la opción -i, +--import, especificando dónde están esos archivos ahora para incluirlos +nuevamente en el proceso de recuperación. +

Si está satisfecho con la recuperación, puede continuar, +¡pero tenga en cuenta que después de sincronizar, no puede volver +a intentar el comando fix! +

+
+

+STEP 3 -> Check +

+

Como verificación cautelosa, ahora puede ejecutar un comando check +(comprobar) para asegurarse de que todo esté correcto en el disco +recuperado. +

+snapraid -d NAME -a check
+
+

Donde NAME es el nombre del disco, como d1 en nuestro ejemplo anterior. +

Las opciones -d y -a le dicen a SnapRAID que compruebe solo el disco +especificado e ignore todos los datos de paridad. +

Este comando tardará mucho tiempo, pero si no es demasiado cauteloso, +puede omitirlo. +

+
+

+STEP 4 -> Sync +

+

Ejecute el comando sync para resincronizar el array con el nuevo disco. +

+snapraid sync
+
+

Si todo se recupera, este comando es inmediato. +

+
+
+
+

+Commands +

+

SnapRAID proporciona algunos comandos simples que le permiten: +

    +
  • +Imprimir el estado del array -> status +
  • +
  • +Controlar los discos -> smart, probe, up, down +
  • +
  • +Hacer una copia de seguridad/instantánea -> sync +
  • +
  • +Comprobar periódicamente los datos -> scrub +
  • +
  • +Restaurar la última copia de seguridad/instantánea -> fix. +
  • +
+

Los comandos deben escribirse en minúsculas. +

+

+status +

+

Imprime un resumen del estado del array de discos. +

Incluye información sobre la fragmentación de la paridad, la antigüedad +de los bloques sin verificar y todos los errores silenciosos +registrados encontrados durante el fregado. +

La información presentada se refiere a la última vez que ejecutó +sync. Las modificaciones posteriores no se tienen en cuenta. +

Si se detectaron bloques defectuosos, se enumeran sus números de bloque. +Para corregirlos, puede usar el comando fix -e. +

También muestra un gráfico que representa la última vez que cada +bloque fue fregado o sincronizado. Los bloques fregados se muestran +con *, los bloques sincronizados pero aún no fregados con o. +

Nada se modifica. +

+
+

+smart +

+

Imprime un informe SMART de todos los discos del sistema. +

Incluye una estimación de la probabilidad de fallo en el próximo +año, lo que le permite planificar reemplazos de mantenimiento de +discos que muestren atributos sospechosos. +

Esta estimación de probabilidad se obtiene correlacionando los +atributos SMART de los discos con los datos de Backblaze disponibles en: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Si SMART informa que un disco está fallando, se imprime FAIL o +PREFAIL para ese disco, y SnapRAID regresa con un error. +En este caso, se recomienda encarecidamente el reemplazo inmediato +del disco. +

Otras posibles cadenas de estado son: +

+
+
+logfail +
+En el pasado, algunos atributos estaban por debajo del +umbral. +
+
+
+
+logerr +
+El registro de errores del dispositivo contiene errores. +
+
+
+
+selferr +
+El registro de autoprueba del dispositivo contiene errores. +
+
+
+

Si se especifica la opción -v, --verbose, se proporciona un análisis +estadístico más profundo. Este análisis puede ayudarle a decidir si +necesita más o menos paridad. +

Este comando utiliza la herramienta smartctl y es equivalente a +ejecutar smartctl -a en todos los dispositivos. +

Si sus dispositivos no se detectan automáticamente correctamente, puede +especificar un comando personalizado utilizando la opción smartctl +en el archivo de configuración. +

Nada se modifica. +

+
+

+probe +

+

Imprime el estado de ENERGÍA de todos los discos del sistema. +

Standby significa que el disco no está girando. Active significa +que el disco está girando. +

Este comando utiliza la herramienta smartctl y es equivalente a +ejecutar smartctl -n standby -i en todos los dispositivos. +

Si sus dispositivos no se detectan automáticamente correctamente, puede +especificar un comando personalizado utilizando la opción smartctl +en el archivo de configuración. +

Nada se modifica. +

+
+

+up +

+

Pone en marcha (gira) todos los discos del array. +

Puede poner en marcha solo discos específicos usando la opción -d, +--filter-disk. +

Poner en marcha todos los discos al mismo tiempo requiere mucha energía. +Asegúrese de que su fuente de alimentación pueda soportarlo. +

Nada se modifica. +

+
+

+down +

+

Detiene (deja de girar) todos los discos del array. +

Este comando utiliza la herramienta smartctl y es equivalente a +ejecutar smartctl -s standby,now en todos los dispositivos. +

Puede detener solo discos específicos usando la opción -d, +--filter-disk. +

Para detener automáticamente en caso de error, puede usar la opción -s, +--spin-down-on-error con cualquier otro comando, lo cual es +equivalente a ejecutar down manualmente cuando ocurre un error. +

Nada se modifica. +

+
+

+diff +

+

Enumera todos los archivos modificados desde el último sync que +necesitan que se vuelva a calcular su información de paridad. +

Este comando no verifica los datos del archivo, sino solo la marca +de tiempo, el tamaño y el inodo del archivo. +

Después de enumerar todos los archivos cambiados, se presenta un +resumen de los cambios, agrupados por: +

+
+
+equal +
+Archivos sin cambios desde antes. +
+
+
+
+added +
+Archivos agregados que no estaban presentes antes. +
+
+
+
+removed +
+Archivos eliminados. +
+
+
+
+updated +
+Archivos con un tamaño o marca de tiempo diferente, +lo que significa que fueron modificados. +
+
+
+
+moved +
+Archivos movidos a un directorio diferente en el mismo +disco. Se identifican por tener el mismo nombre, tamaño, +marca de tiempo e inodo, pero un directorio diferente. +
+
+
+
+copied +
+Archivos copiados en el mismo disco o en uno diferente +donde el archivo original todavía existe. +Se identifican por tener el mismo nombre, tamaño y +marca de tiempo. +Si la marca de tiempo de subsegundo es cero, la ruta +completa debe coincidir para ser identificado, no solo el nombre. +
+
+
+
+relocated +
+Archivos movidos en el mismo disco o en uno +diferente donde el original ha desaparecido. +Se identifican por tener el mismo nombre, tamaño y +marca de tiempo. +Si la marca de tiempo de subsegundo es cero, la ruta +completa debe coincidir para ser identificado. +A diferencia de los archivos moved en el mismo disco, +los archivos reubicados tienen un inodo diferente. +
+
+
+
+restored +
+Archivos con un inodo diferente pero con directorio, +nombre, tamaño y marca de tiempo coincidentes. +Estos son usualmente archivos restaurados después de +haber sido eliminados. +
+
+
+

Si se requiere un sync, el código de retorno del proceso es 2, en +lugar del valor predeterminado 0. El código de retorno 1 se utiliza +para una condición de error genérico. +

Nada se modifica. +

+
+

+sync +

+

Actualiza la información de paridad. Todos los archivos modificados +en el array de discos se leen y la información de paridad +correspondiente se actualiza. +

Puede detener este proceso en cualquier momento presionando Ctrl+C, +sin perder el trabajo ya realizado. +En la siguiente ejecución, el proceso sync se reanudará donde +se interrumpió. +

Si se encuentran errores silenciosos o de entrada/salida durante el +proceso, los bloques correspondientes se marcan como defectuosos. +

Los archivos se identifican por ruta y/o inodo y se verifican por +tamaño y marca de tiempo. +Si el tamaño o la marca de tiempo del archivo difieren, la información +de paridad se vuelve a calcular para todo el archivo. +Si el archivo se mueve o se renombra en el mismo disco, manteniendo el +mismo inodo, la paridad no se vuelve a calcular. +Si el archivo se mueve a otro disco, la paridad se vuelve a calcular, +pero la información de hash calculada previamente se mantiene. +

Los archivos content y parity se modifican si es necesario. +Los archivos en el array NO se modifican. +

+
+

+scrub +

+

Frota (scrubs) el array, buscando errores silenciosos o de +entrada/salida en los discos de datos y paridad. +

Cada invocación verifica aproximadamente el 8% del array, excluyendo +los datos ya fregados en los últimos 10 días. +Esto significa que fregar una vez a la semana asegura que cada bit de +datos se verifique al menos una vez cada tres meses. +

Puede definir un plan de fregado o una cantidad diferente utilizando +la opción -p, --plan, que acepta: +bad - Fregar bloques marcados como defectuosos. +new - Fregar bloques recién sincronizados que aún no han sido fregados. +full - Fregar todo. +0-100 - Fregar el porcentaje especificado de bloques. +

Si especifica un valor de porcentaje, también puede usar la opción -o, +--older-than para definir la antigüedad del bloque. +Los bloques más antiguos se friegan primero, asegurando una verificación +óptima. +Si desea fregar solo los bloques recién sincronizados que aún no han +sido fregados, use la opción -p new. +

Para obtener detalles del estado del fregado, use el comando status. +

Para cualquier error silencioso o de entrada/salida encontrado, los +bloques correspondientes se marcan como defectuosos en el archivo +content. +Estos bloques defectuosos se enumeran en status y se pueden +corregir con fix -e. +Después de la corrección, en el siguiente fregado, se volverán a +verificar y, si se encuentran corregidos, se eliminará la marca de defectuoso. +Para fregar solo los bloques defectuosos, puede usar el comando +scrub -p bad. +

Se recomienda ejecutar scrub solo en un array sincronizado para evitar +errores reportados causados por datos no sincronizados. Estos errores +se reconocen como no siendo errores silenciosos y los bloques no se +marcan como defectuosos, pero tales errores se informan en la salida +del comando. +

El archivo content se modifica para actualizar el tiempo de la última +verificación de cada bloque y para marcar bloques defectuosos. +Los archivos parity NO se modifican. +Los archivos en el array NO se modifican. +

+
+

+fix +

+

Corrige todos los archivos y la información de paridad. +

Todos los archivos y la información de paridad se comparan con el +estado de instantánea guardado en el último sync. +Si se encuentra una diferencia, se revierte a la instantánea almacenada. +

¡ADVERTENCIA! El comando fix no diferencia entre errores y +modificaciones intencionales. Revierte incondicionalmente el estado +del archivo al último sync. +

Si no se especifica otra opción, se procesa todo el array. +Utilice las opciones de filtro para seleccionar un subconjunto de +archivos o discos para operar. +

Para corregir solo los bloques marcados como defectuosos durante sync +y scrub, use la opción -e, --filter-error. +A diferencia de otras opciones de filtro, esta aplica correcciones solo +a archivos que no han cambiado desde el último sync. +

SnapRAID cambia el nombre de todos los archivos que no se pueden corregir +agregando la extensión .unrecoverable. +

Antes de corregir, se escanea todo el array para encontrar cualquier +archivo movido desde la última operación de sync. +Estos archivos se identifican por su marca de tiempo, ignorando su +nombre y directorio, y se utilizan en el proceso de recuperación si +es necesario. +Si movió algunos de ellos fuera del array, puede usar la opción -i, +--import para especificar directorios adicionales para escanear. +

Los archivos se identifican solo por ruta, no por inodo. +

El archivo content NO se modifica. +Los archivos parity se modifican si es necesario. +Los archivos en el array se modifican si es necesario. +

+
+

+check +

+

Verifica todos los archivos y la información de paridad. +

Funciona como fix, pero solo simula una recuperación y no se +escriben cambios en el array. +

Este comando está destinado principalmente a la verificación manual, +como después de un proceso de recuperación o en otras condiciones +especiales. Para comprobaciones periódicas y programadas, use scrub. +

Si usa la opción -a, --audit-only, solo se verifican los datos del +archivo y se ignora la información de paridad para una ejecución más +rápida. +

Los archivos se identifican solo por ruta, no por inodo. +

Nada se modifica. +

+
+

+list +

+

Enumera todos los archivos contenidos en el array en el momento del +último sync. +

Con -v o --verbose, también se muestra el tiempo de subsegundo. +

Nada se modifica. +

+
+

+dup +

+

Enumera todos los archivos duplicados. Se supone que dos archivos son +iguales si sus hashes coinciden. Los datos del archivo no se leen; +solo se utilizan los hashes precalculados. +

Nada se modifica. +

+
+

+pool +

+

Crea o actualiza una vista virtual de todos +los archivos de su array de discos en el directorio de pooling. +

Los archivos no se copian sino que se enlazan usando +enlaces simbólicos. +

Al actualizar, todos los enlaces simbólicos existentes y los +subdirectorios vacíos se eliminan y se reemplazan con la nueva +vista del array. Cualquier otro archivo regular se deja en su lugar. +

Nada se modifica fuera del directorio pool. +

+
+

+devices +

+

Imprime los dispositivos de bajo nivel utilizados por el array. +

Este comando muestra las asociaciones de dispositivos en el array +y está destinado principalmente como una interfaz de script. +

Las primeras dos columnas son el ID y la ruta del dispositivo de bajo +nivel. Las siguientes dos columnas son el ID y la ruta del dispositivo +de alto nivel. La última columna es el nombre del disco en el array. +

En la mayoría de los casos, tiene un dispositivo de bajo nivel para +cada disco en el array, pero en algunas configuraciones más complejas, +puede tener múltiples dispositivos de bajo nivel utilizados por un +solo disco en el array. +

Nada se modifica. +

+
+

+touch +

+

Establece una marca de tiempo de subsegundo arbitraria para todos los +archivos que la tienen establecida en cero. +

Esto mejora la capacidad de SnapRAID para reconocer archivos movidos +y copiados, ya que hace que la marca de tiempo sea casi única, +reduciendo posibles duplicados. +

Más específicamente, si la marca de tiempo de subsegundo no es cero, +un archivo movido o copiado se identifica como tal si coincide con +el nombre, el tamaño y la marca de tiempo. Si la marca de tiempo de +subsegundo es cero, se considera una copia solo si la ruta completa, +el tamaño y la marca de tiempo coinciden. +

La marca de tiempo de precisión de segundo no se modifica, +por lo que se conservarán todas las fechas y horas de sus archivos. +

+
+

+rehash +

+

Programa un nuevo cálculo de hash (rehash) de todo el array. +

Este comando cambia el tipo de hash utilizado, típicamente al +actualizar de un sistema de 32 bits a uno de 64 bits, para cambiar +de MurmurHash3 al más rápido SpookyHash. +

Si ya está utilizando el hash óptimo, este comando +no hace nada y le informa que no se necesita ninguna acción. +

El nuevo cálculo de hash no se realiza inmediatamente, sino que +tiene lugar progresivamente durante sync y scrub. +

Puede verificar el estado del nuevo cálculo de hash usando status. +

Durante el nuevo cálculo de hash, SnapRAID mantiene la funcionalidad +completa, con la única excepción de que dup no puede detectar +archivos duplicados utilizando un hash diferente. +

+
+

+locate +

+

Localiza archivos almacenados en los discos de paridad. Para cada archivo coincidente, +imprime su ubicación dentro del archivo de paridad y el número de fragmentos +que ocupa. +

Puede usar la opción -t, --tail para restringir la operación a los archivos +que ocupan la porción final especificada de la paridad. +

Si desea reasignar estos archivos, puede usar la opción +-W, --force-realloc-tail. +Tenga en cuenta que dichos archivos no estarán protegidos por la paridad durante +el proceso de reasignación. +

+
+
+

+Options +

+

SnapRAID proporciona las siguientes opciones: +

+
+
+-c, --conf CONFIG +
+Selecciona el archivo de configuración a usar. Si no se +especifica, en Unix utiliza el archivo /usr/local/etc/snapraid.conf +si existe, de lo contrario /etc/snapraid.conf. +En Windows, utiliza el archivo snapraid.conf en el mismo +directorio que snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtra los archivos a procesar en check y fix. +Solo se procesan los archivos que coinciden con el patrón +especificado. Esta opción se puede usar varias veces. +Consulte la sección PATTERN para obtener más detalles sobre +las especificaciones de patrones. +En Unix, asegúrese de que los caracteres globbing estén +entre comillas si se usan. +Esta opción solo se puede usar con check y fix. +No se puede usar con sync y scrub, ya que siempre +procesan todo el array. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtra los discos a procesar en check, fix, up y down. +Debe especificar un nombre de disco como se define en el archivo +de configuración. +También puede especificar discos de paridad con los nombres: +parity, 2-parity, 3-parity, etc., para limitar las +operaciones a un disco de paridad específico. +Si combina múltiples opciones --filter, --filter-disk y +--filter-missing, solo se seleccionan los archivos que +coinciden con todos los filtros. +Esta opción se puede usar varias veces. +Esta opción solo se puede usar con check, fix, up y down. +No se puede usar con sync y scrub, ya que siempre +procesan todo el array. +
+
+
+
+
+
+-m, --filter-missing +
+Filtra los archivos a procesar en check y fix. +Solo se procesan los archivos faltantes o eliminados del array. +Cuando se usa con fix, esto actúa como un comando de undelete +(recuperación). +Si combina múltiples opciones --filter, --filter-disk y +--filter-missing, solo se seleccionan los archivos que +coinciden con todos los filtros. +Esta opción solo se puede usar con check y fix. +No se puede usar con sync y scrub, ya que siempre +procesan todo el array. +
+
+
+
+
+
+-e, --filter-error +
+Procesa los archivos con errores en check y fix. +Solo procesa archivos que tienen bloques marcados con errores +silenciosos o de entrada/salida durante sync y scrub, +según se enumeran en status. +Esta opción solo se puede usar con check y fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Selecciona el plan de fregado (scrub). Si PERC es un valor +numérico de 0 a 100, se interpreta como el porcentaje de +bloques a fregar. +En lugar de un porcentaje, puede especificar un plan: +bad friega bloques defectuosos, new friega bloques aún +no fregados, y full friega todo. +Esta opción solo se puede usar con scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Selecciona la parte más antigua del array para procesar en scrub. +DAYS es la edad mínima en días para que un bloque sea fregado; +el valor predeterminado es 10. +Los bloques marcados como defectuosos siempre se friegan +independientemente de esta opción. +Esta opción solo se puede usar con scrub. +
+
+
+
+
+
+-a, --audit-only +
+En check, verifica el hash de los archivos sin +verificar la información de paridad. +Si solo está interesado en verificar los datos del archivo, +esta opción puede acelerar significativamente el proceso de +verificación. +Esta opción solo se puede usar con check. +
+
+
+
+
+
+-h, --pre-hash +
+En sync, ejecuta una fase de hash preliminar de todos los +datos nuevos para una verificación adicional antes del +cálculo de paridad. +Normalmente, en sync, no se realiza un hash preliminar, +y los nuevos datos se hashean justo antes del cálculo de +paridad cuando se leen por primera vez. +Este proceso ocurre cuando el sistema está bajo +una gran carga, con todos los discos girando y una CPU ocupada. +Esta es una condición extrema para la máquina, y si tiene un +problema de hardware latente, los errores silenciosos pueden +pasar desapercibidos porque los datos aún no están hasheados. +Para evitar este riesgo, puede habilitar el modo pre-hash +para que todos los datos se lean dos veces para garantizar +su integridad. +Esta opción también verifica los archivos movidos dentro del +array para asegurar que la operación de movimiento fue exitosa +y, si es necesario, le permite ejecutar una operación de corrección +antes de continuar. +Esta opción solo se puede usar con sync. +
+
+
+
+
+
+-i, --import DIR +
+Importa desde el directorio especificado cualquier archivo +eliminado del array después del último sync. +Si aún tiene dichos archivos, check y fix pueden usarlos +para mejorar el proceso de recuperación. +Los archivos se leen, incluso en subdirectorios, y se +identifican independientemente de su nombre. +Esta opción solo se puede usar con check y fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+En cualquier error, detiene todos los discos gestionados antes +de salir con un código de estado distinto de cero. Esto evita +que las unidades permanezcan activas y girando después de una +operación abortada, lo que ayuda a evitar la acumulación de calor +innecesaria y el consumo de energía. Use esta opción para +asegurarse de que los discos se detengan de forma segura incluso +cuando un comando falla. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Aplica un límite de ancho de banda global para todos los discos. +RATE es el número de bytes por segundo. Puede especificar un +multiplicador como K, M o G (por ejemplo, --bw-limit 1G). +
+
+
+
+
+
+-t, --tail TAMAÑO +
+Limita la lista de archivos a aquellos que no usan más del +tamaño de cola especificado de los discos de paridad. +Puede usar multiplicadores como K, M, G o T (por ejemplo, --tail 1G). +Esta opción solo es válida cuando se usa junto con el comando +locate. +
+
+
+
+
+
+-A, --stats +
+Habilita una vista de estado extendida que muestra información +adicional. La pantalla muestra dos gráficos: +El primer gráfico muestra el número de franjas (stripes) +almacenadas en búfer para cada disco, junto con la ruta del +archivo al que se está accediendo actualmente en ese disco. +Normalmente, el disco más lento no tendrá búfer disponible, +lo que determina el ancho de banda máximo alcanzable. +El segundo gráfico muestra el porcentaje de tiempo +dedicado a esperar durante los últimos 100 segundos. Se espera +que el disco más lento cause la mayor parte del tiempo de +espera, mientras que otros discos deberían tener poco o ningún +tiempo de espera porque pueden usar sus franjas almacenadas +en búfer. Este gráfico también muestra el tiempo dedicado a +esperar los cálculos de hash y los cálculos RAID. +Todos los cálculos se ejecutan en paralelo con las +operaciones de disco. Por lo tanto, mientras haya un tiempo +de espera medible para al menos un disco, indica que la CPU +es lo suficientemente rápida para mantenerse al día con la +carga de trabajo. +
+
+
+
+
+
+-Z, --force-zero +
+Fuerza la operación insegura de sincronizar un archivo con +tamaño cero que antes no era cero. +Si SnapRAID detecta tal condición, detiene el procedimiento +a menos que especifique esta opción. +Esto le permite detectar fácilmente cuando, después de un +fallo del sistema, algunos archivos accedidos fueron truncados. +Esta es una posible condición en Linux con los sistemas de +archivos ext3/ext4. +Esta opción solo se puede usar con sync. +
+
+
+
+
+
+-E, --force-empty +
+Fuerza la operación insegura de sincronizar un disco con todos +los archivos originales faltantes. +Si SnapRAID detecta que todos los archivos originalmente +presentes en el disco faltan o han sido reescritos, detiene +el procedimiento a menos que especifique esta opción. +Esto le permite detectar fácilmente cuando un sistema de archivos +de datos no está montado. +Sin embargo, se permite tener un solo cambio de UUID con +paridad simple, y más con paridad múltiple, porque este es +el caso normal al reemplazar discos después de una recuperación. +Esta opción solo se puede usar con sync. +
+
+
+
+
+
+-U, --force-uuid +
+Fuerza la operación insegura de sincronizar, verificar y +corregir con discos que han cambiado su UUID. +Si SnapRAID detecta que algunos discos han cambiado el UUID, +detiene el procedimiento a menos que especifique esta opción. +Esto le permite detectar cuando sus discos están montados en +los puntos de montaje incorrectos. +Esta opción solo se puede usar con sync, check o fix. +
+
+
+
+
+
+-D, --force-device +
+Fuerza la operación insegura de corregir con discos inaccesibles +o con discos en el mismo dispositivo físico. +Por ejemplo, si perdió dos discos de datos y tiene un disco de +repuesto para recuperar solo el primero, puede ignorar el +segundo disco inaccesible. +O, si desea recuperar un disco en el espacio libre que queda +en un disco ya usado, compartiendo el mismo dispositivo físico. +Esta opción solo se puede usar con fix. +
+
+
+
+
+
+-N, --force-nocopy +
+En sync, check y fix, deshabilita la heurística de +detección de copias. Sin esta opción, SnapRAID asume que +los archivos con los mismos atributos, como nombre, tamaño y +marca de tiempo, son copias con los mismos datos. +Esto permite la identificación de archivos copiados o movidos +de un disco a otro y reutiliza la información de hash ya +calculada para detectar errores silenciosos o recuperar archivos +faltantes. +En algunos casos raros, este comportamiento puede dar lugar a +falsos positivos o a un proceso lento debido a muchas +verificaciones de hash, y esta opción le permite resolver +tales problemas. +Esta opción solo se puede usar con sync, check y fix. +
+
+
+
+
+
+-F, --force-full +
+En sync, fuerza un recálculo completo de la paridad. +Esta opción se puede usar cuando agrega un nuevo nivel de +paridad o si revirtió a un archivo de contenido antiguo +utilizando datos de paridad más recientes. +En lugar de recrear la paridad desde cero, esto le permite +reutilizar los hashes presentes en el archivo de contenido +para validar los datos y mantener la protección de datos durante +el proceso sync utilizando los datos de paridad existentes. +Esta opción solo se puede usar con sync. +
+
+
+
+
+
+-R, --force-realloc +
+En sync, fuerza una reasignación completa de archivos y +la reconstrucción de la paridad. +Esta opción se puede usar para reasignar completamente todos +los archivos, eliminando la fragmentación, mientras se reutilizan +los hashes presentes en el archivo de contenido para validar los datos. +Esta opción solo se puede usar con sync. +¡ADVERTENCIA! Esta opción es solo para expertos y se +recomienda encarecidamente no usarla. +NO tiene protección de datos durante la operación sync. +
+
+
+
+
+
+-W, --force-realloc-tail TAMAÑO +
+Funciona como -R, --force-realloc, pero limitado a la porción final +especificada (últimos TAMAÑO bytes) de cada archivo de paridad. +Fuerza la reasignación (movimiento) de cualquier fragmento/bloque de archivo +actualmente almacenado en esa sección final, permitiendo que se coloquen +en cualquier lugar de los archivos de paridad donde haya espacio libre +disponible (incluyendo huecos existentes). +El propósito principal de esta opción es reducir el tamaño en disco +del archivo de paridad. +Si la reasignación vacía con éxito toda la sección final +(no quedan bloques usándola), el archivo de paridad se trunca, +recuperando el espacio final no utilizado. +Puede usar multiplicadores como K, M, G o T (por ejemplo, +--force-realloc-tail 1G). +Puede usar locate -t, --tail para conocer de antemano +los archivos afectados. +¡ADVERTENCIA! +Esta opción es solo para expertos y se recomienda +encarecidamente no usarla. +Usted NO tiene protección de datos durante la operación sync +para los archivos afectados. +
+
+
+
+
+
+-l, --log FILE +
+Escribe un registro detallado en el archivo especificado. +Si no se especifica esta opción, los errores inesperados se +imprimen en la pantalla, lo que puede resultar en una salida +excesiva en caso de muchos errores. Cuando se especifica -l, +--log, solo los errores fatales que hacen que SnapRAID se +detenga se imprimen en la pantalla. +Si la ruta comienza con >>, el archivo se abre +en modo de anexar. Las ocurrencias de %D y %T en el nombre +se reemplazan con la fecha y hora en el formato AAAA MM DD y HH MM SS. +En archivos por lotes de Windows, debe duplicar el +carácter %, por ejemplo, resultado-%%D.log. Para usar >>, +debe encerrar el nombre entre comillas, por ejemplo, ">>resultado.log". +Para enviar el registro a la salida estándar o al error +estándar, puede usar ">&1" y ">&2", respectivamente. +Consulte el archivo snapraid_log.txt o la página del manual +para obtener descripciones de las etiquetas de registro. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Establece un nuevo límite de error antes de detener la ejecución. +De forma predeterminada, SnapRAID se detiene si encuentra más +de 100 errores de entrada/salida, lo que indica que es probable +que un disco esté fallando. +Esta opción afecta a sync y scrub, a los que se les +permite continuar después del primer conjunto de errores de +disco para intentar completar sus operaciones. +Sin embargo, check y fix siempre se detienen en el primer error. +
+
+
+
+
+
+-S, --start BLKSTART +
+Comienza a procesar desde el número de bloque especificado. +Esto puede ser útil para reintentar verificar o corregir +bloques específicos en caso de un disco dañado. +Esta opción es principalmente para recuperación manual avanzada. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Procesa solo el número de bloques especificado. +Esta opción es principalmente para recuperación manual avanzada. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Genera un archivo de configuración ficticio a partir de un +archivo de contenido existente. +El archivo de configuración se escribe en la salida estándar +y no sobrescribe uno existente. +Este archivo de configuración también contiene la información +necesaria para reconstruir los puntos de montaje del disco en +caso de que pierda todo el sistema. +
+
+
+
+
+
+-v, --verbose +
+Imprime más información en la pantalla. +Si se especifica una vez, imprime archivos excluidos +y estadísticas adicionales. +Esta opción no tiene efecto en los archivos de registro. +
+
+
+
+
+
+-q, --quiet +
+Imprime menos información en la pantalla. +Si se especifica una vez, elimina la barra de progreso; +dos veces, las operaciones en ejecución; tres veces, los +mensajes de información; cuatro veces, los mensajes de estado. +Los errores fatales siempre se imprimen en la pantalla. +Esta opción no tiene efecto en los archivos de registro. +
+
+
+
+
+
+-H, --help +
+Imprime una pantalla de ayuda corta. +
+
+
+
+
+
+-V, --version +
+Imprime la versión del programa. +
+
+
+
+
+

+Configuration +

+

SnapRAID requiere un archivo de configuración para saber dónde se +encuentra su array de discos y dónde almacenar la información de paridad. +

En Unix, utiliza el archivo /usr/local/etc/snapraid.conf si existe, +de lo contrario /etc/snapraid.conf. +En Windows, utiliza el archivo snapraid.conf en el mismo +directorio que snapraid.exe. +

Debe contener las siguientes opciones (distingue entre mayúsculas y minúsculas): +

+

+parity FILE [,FILE] ... +

+

Define los archivos a usar para almacenar la información de paridad. +La paridad permite la protección contra un solo fallo de disco, +similar a RAID5. +

Puede especificar varios archivos, que deben estar en discos diferentes. +Cuando un archivo no puede crecer más, se utiliza el siguiente. +El espacio total disponible debe ser al menos tan grande como el +disco de datos más grande del array. +

Puede agregar archivos de paridad adicionales más tarde, pero no +puede reordenarlos ni eliminarlos. +

Mantener los discos de paridad reservados para la paridad asegura +que no se fragmenten, mejorando el rendimiento. +

En Windows, se dejan 256 MB sin usar en cada disco para evitar la +advertencia sobre discos llenos. +

Esta opción es obligatoria y solo se puede usar una vez. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Define los archivos a usar para almacenar información de paridad +adicional. +

Para cada nivel de paridad especificado, se habilita un nivel +adicional de protección: +

    +
  • +2-parity habilita la paridad dual RAID6. +
  • +
  • +3-parity habilita la paridad triple. +
  • +
  • +4-parity habilita la paridad cuádruple. +
  • +
  • +5-parity habilita la paridad quíntuple. +
  • +
  • +6-parity habilita la paridad séxtuple. +
  • +
+

Cada nivel de paridad requiere la presencia de todos los niveles +de paridad anteriores. +

Se aplican las mismas consideraciones que para la opción parity. +

Estas opciones son opcionales y solo se pueden usar una vez. +

+
+

+z-parity FILE [,FILE] ... +

+

Define un archivo y un formato alternativos para almacenar paridad triple. +

Esta opción es una alternativa a 3-parity, destinada principalmente +a CPU de gama baja como ARM o AMD Phenom, Athlon y Opteron que no +admiten el conjunto de instrucciones SSSE3. En tales casos, +proporciona un mejor rendimiento. +

Este formato es similar pero más rápido que el utilizado por ZFS RAIDZ3. +Al igual que ZFS, no funciona más allá de la paridad triple. +

Al usar 3-parity, se le advertirá si se recomienda usar +el formato z-parity para mejorar el rendimiento. +

Es posible convertir de un formato a otro ajustando +el archivo de configuración con el archivo z-parity o 3-parity +deseado y usando fix para recrearlo. +

+
+

+content FILE +

+

Define el archivo a usar para almacenar la lista y las sumas de +comprobación de todos los archivos presentes en su array de discos. +

Se puede colocar en un disco utilizado para datos, paridad o +cualquier otro disco disponible. +Si usa un disco de datos, este archivo se excluye automáticamente +del proceso sync. +

Esta opción es obligatoria y se puede usar varias veces para guardar +múltiples copias del mismo archivo. +

Debe almacenar al menos una copia por cada disco de paridad utilizado +más uno. Usar copias adicionales no perjudica. +

+
+

+data NAME DIR +

+

Define el nombre y el punto de montaje de los discos de datos en +el array. NAME se usa para identificar el disco y debe +ser único. DIR es el punto de montaje del disco en el +sistema de archivos. +

Puede cambiar el punto de montaje según sea necesario, siempre que +mantenga el NAME fijo. +

Debe usar una opción para cada disco de datos en el array. +

Puede cambiar el nombre de un disco más tarde cambiando el NAME +directamente en el archivo de configuración y luego ejecutando un +comando sync. En el caso de cambiar el nombre, la asociación se +realiza utilizando el UUID almacenado de los discos. +

+
+

+extra NAME DIR +

+

Define el nombre y el punto de montaje de discos adicionales para monitorear +con los comandos smart y probe. +

Esto es útil para monitorear discos que no forman parte de la +matriz pero que son necesarios para que el sistema funcione, como +el disco de arranque. +

Tenga en cuenta que dichos discos no se ven afectados por los comandos up y down +porque se espera que estén siempre girando. +

+
+

+nohidden +

+

Excluye todos los archivos y directorios ocultos. +En Unix, los archivos ocultos son los que comienzan con .. +En Windows, son los que tienen el atributo oculto. +

+
+

+exclude/include PATTERN +

+

Define los patrones de archivo o directorio a excluir o incluir +en el proceso de sincronización. +Todos los patrones se procesan en el orden especificado. +

Si el primer patrón que coincide es un exclude, el archivo +se excluye. Si es un include, el archivo se incluye. +Si ningún patrón coincide, el archivo se excluye si el último +patrón especificado es un include, o se incluye si el último +patrón especificado es un exclude. +

Consulte la sección PATTERN para obtener más detalles sobre +las especificaciones de patrones. +

Esta opción se puede usar varias veces. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Define el tamaño de bloque básico en kibibytes para la paridad. +Un kibibyte es 1024 bytes. +

El tamaño de bloque predeterminado es 256, que debería funcionar +para la mayoría de los casos. +

¡ADVERTENCIA! Esta opción es solo para expertos y se +recomienda encarecidamente no cambiar este valor. Para cambiar +este valor en el futuro, ¡tendrá que recrear toda la paridad! +

Una razón para usar un tamaño de bloque diferente es si tiene +muchos archivos pequeños, del orden de millones. +

Para cada archivo, incluso si solo son unos pocos bytes, se asigna +un bloque completo de paridad, y con muchos archivos, esto puede +resultar en un espacio de paridad no utilizado significativo. +Cuando llena completamente el disco de paridad, no se le permite +agregar más archivos a los discos de datos. +Sin embargo, la paridad desperdiciada no se acumula en los discos +de datos. El espacio desperdiciado resultante de un alto número de +archivos en un disco de datos limita solo la cantidad de datos en +ese disco de datos, no en otros. +

Como aproximación, puede suponer que se desperdicia la mitad del +tamaño del bloque para cada archivo. Por ejemplo, con 100,000 archivos +y un tamaño de bloque de 256 KiB, desperdiciará 12.8 GB de paridad, +lo que puede resultar en 12.8 GB menos de espacio disponible en el +disco de datos. +

Puede verificar la cantidad de espacio desperdiciado en cada disco +usando status. Este es el espacio que debe dejar libre en los +discos de datos o usar para archivos no incluidos en el array. +Si este valor es negativo, significa que está cerca de llenar +la paridad, y representa el espacio que aún puede desperdiciar. +

Para evitar este problema, puede usar una partición más grande para +la paridad. Por ejemplo, si la partición de paridad es 12.8 GB +más grande que los discos de datos, tiene suficiente espacio extra +para manejar hasta 100,000 archivos en cada disco de datos sin +ningún espacio desperdiciado. +

Un truco para obtener una partición de paridad más grande en Linux +es formatearla con el comando: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Esto resulta en aproximadamente un 1.5% de espacio extra, +aproximadamente 60 GB para un disco de 4 TB, lo que permite +alrededor de 460,000 archivos en cada disco de datos sin ningún +espacio desperdiciado. +

+
+

+hashsize SIZE_IN_BYTES +

+

Define el tamaño del hash en bytes para los bloques guardados. +

El tamaño de hash predeterminado es de 16 bytes (128 bits), +que debería funcionar para la mayoría de los casos. +

¡ADVERTENCIA! Esta opción es solo para expertos y se +recomienda encarecidamente no cambiar este valor. Para cambiar +este valor en el futuro, ¡tendrá que recrear toda la paridad! +

Una razón para usar un tamaño de hash diferente es si su sistema +tiene memoria limitada. Como regla general, SnapRAID +típicamente requiere 1 GiB de RAM por cada 16 TB de datos en el array. +

Específicamente, para almacenar los hashes de los datos, SnapRAID +requiere aproximadamente TS*(1+HS)/BS bytes de RAM, +donde TS es el tamaño total en bytes de su array de discos, BS es el +tamaño de bloque en bytes, y HS es el tamaño de hash en bytes. +

Por ejemplo, con 8 discos de 4 TB, un tamaño de bloque de 256 KiB +(1 KiB = 1024 bytes) y un tamaño de hash de 16, obtiene: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
+
+

Cambiando a un tamaño de hash de 8, obtiene: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
+
+

Cambiando a un tamaño de bloque de 512, obtiene: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
+
+

Cambiando tanto a un tamaño de hash de 8 como a un tamaño de bloque de 512, +obtiene: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Guarda automáticamente el estado al sincronizar o fregar después de +la cantidad especificada de GB procesados. +Esta opción es útil para evitar reiniciar comandos sync largos +desde cero si son interrumpidos por un fallo de la máquina o +cualquier otro evento. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Establece la temperatura máxima permitida del disco en Celsius. +Cuando se especifica, SnapRAID verifica periódicamente la temperatura +de todos los discos utilizando la herramienta smartctl. Las +temperaturas actuales del disco se muestran mientras SnapRAID está +operando. Si algún disco excede este límite, todas las operaciones +se detienen y los discos se detienen (se ponen en espera) durante +la duración definida por la opción temp_sleep. Después del +período de espera, las operaciones se reanudan, pausándose +potencialmente de nuevo si se alcanza el límite de temperatura +una vez más. +

Durante la operación, SnapRAID también analiza la curva de +calentamiento de cada disco y estima la temperatura constante a +largo plazo que se espera que alcancen si la actividad continúa. +La estimación se realiza solo después de que la temperatura del +disco haya aumentado cuatro veces, asegurando que haya suficientes +puntos de datos disponibles para establecer una tendencia confiable. +Esta temperatura constante predicha se muestra entre paréntesis junto +al valor actual y ayuda a evaluar si la refrigeración del sistema es +adecuada. Esta temperatura estimada es solo para fines informativos +y no tiene ningún efecto en el comportamiento de SnapRAID. Las +acciones del programa se basan únicamente en las temperaturas reales +medidas del disco. +

Para realizar este análisis, SnapRAID necesita una referencia para la +temperatura del sistema. Primero intenta leerla de los sensores de +hardware disponibles. Si no se puede acceder a ningún sensor del +sistema, utiliza la temperatura del disco más baja medida al +comienzo de la ejecución como referencia de respaldo. +

Normalmente, SnapRAID solo muestra la temperatura del disco más +caliente. Para mostrar la temperatura de todos los discos, use +la opción -A o --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Establece el tiempo de espera, en minutos, cuando se alcanza el +límite de temperatura. Durante este período, los discos permanecen +detenidos. El valor predeterminado es de 5 minutos. +

+
+

+pool DIR +

+

Define el directorio de agrupación (pooling) donde se crea la vista +virtual del array de discos utilizando el comando pool. +

El directorio ya debe existir. +

+
+

+share UNC_DIR +

+

Define la ruta UNC de Windows requerida para acceder a los discos +de forma remota. +

Si se especifica esta opción, los enlaces simbólicos creados en el +directorio pool utilizan esta ruta UNC para acceder a los discos. +Sin esta opción, los enlaces simbólicos generados utilizan solo +rutas locales, lo que no permite compartir el directorio pool a +través de la red. +

Los enlaces simbólicos se forman utilizando la ruta UNC especificada, +agregando el nombre del disco como se especifica en la opción data, +y finalmente agregando el directorio y el nombre del archivo. +

Esta opción solo es necesaria para Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Define opciones personalizadas de smartctl para obtener los atributos +SMART de cada disco. Esto puede ser necesario para controladores +RAID y algunos discos USB que no se pueden detectar automáticamente. +El marcador de posición %s se reemplaza por el nombre del dispositivo, +pero es opcional para dispositivos fijos como controladores RAID. +

DISK es el mismo nombre de disco especificado en la opción data. +PARITY es uno de los nombres de paridad: parity, 2-parity, +3-parity, 4-parity, 5-parity, 6-parity o z-parity. +

En las OPCIONES especificadas, la cadena %s se reemplaza por +el nombre del dispositivo. Para los controladores RAID, el dispositivo +es probable que sea fijo y es posible que no necesite usar %s. +

Consulte la documentación de smartmontools para conocer las posibles +opciones: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Por ejemplo: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignora el atributo SMART especificado al calcular la probabilidad +de fallo del disco. Esta opción es útil si un disco informa valores +inusuales o engañosos para un atributo en particular. +

DISK es el mismo nombre de disco especificado en la opción data. +PARITY es uno de los nombres de paridad: parity, 2-parity, +3-parity, 4-parity, 5-parity, 6-parity o z-parity. +El valor especial * se puede usar para ignorar el atributo en todos +los discos. +

Por ejemplo, para ignorar el atributo Current Pending Sector Count +en todos los discos: +

+smartignore * 197
+
+

Para ignorarlo solo en el primer disco de paridad: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Un ejemplo de una configuración típica para Unix es: +

+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
+
+

Un ejemplo de una configuración típica para Windows es: +

+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
+
+
+
+
+

+Pattern +

+

Los patrones proporcionan una forma flexible de filtrar archivos para su inclusión o +exclusión. Al usar caracteres de globbing, puede definir reglas que coincidan con +nombres de archivos específicos o estructuras de directorios completas sin +enumerar cada ruta manualmente. +

El signo de interrogación ? coincide con cualquier carácter individual excepto el +separador de directorios. Esto lo hace útil para hacer coincidir nombres de archivos con +caracteres variables manteniendo el patrón limitado a un solo nivel de directorio. +

El asterisco simple * coincide con cualquier secuencia de caracteres, pero al igual que el +signo de interrogación, nunca cruza los límites de los directorios. Se detiene en la +barra diagonal, lo que lo hace adecuado para buscar coincidencias dentro de un solo +componente de ruta. Este es el comportamiento estándar de los comodines familiar +del globbing de la shell. +

el doble asterisco ** es más potente, coincide con cualquier secuencia de +caracteres, incluidos los separadores de directorios. Esto permite que los patrones coincidan +a través de múltiples niveles de directorio. Cuando ** aparece incrustado directamente en +un patrón, puede coincidir con cero o más caracteres, incluidas las barras diagonales entre +el texto literal circundante. +

El uso más importante de ** es en la forma especial /**/. Esta coincide con +cero o más niveles de directorio completos, lo que permite que los archivos coincidan +a cualquier profundidad en un árbol de directorios sin conocer la estructura exacta de la ruta. +Por ejemplo, el patrón src/**/main.js coincide con src/main.js (saltando +cero directorios), src/ui/main.js (saltando un directorio) y +src/ui/components/main.js (saltando dos directorios). +

Las clases de caracteres que utilizan corchetes [] coinciden con un solo carácter de un +conjunto o rango especificado. Al igual que los otros patrones de un solo carácter, +no coinciden con los separadores de directorios. Las clases admiten rangos y negación mediante +un signo de exclamación. +

La distinción fundamental que debe recordar es que *, ? y las clases de caracteres +respetan los límites de los directorios y solo coinciden dentro de un único +componente de ruta, mientras que ** es el único patrón que puede coincidir a través de +los separadores de directorios. +

Hay cuatro tipos diferentes de patrones: +

+
+
+FILE +
+Selecciona cualquier archivo llamado FILE. +Este patrón se aplica solo a archivos, no a directorios. +
+
+
+
+
+
+DIR/ +
+Selecciona cualquier directorio llamado DIR y todo lo que hay dentro. +Este patrón se aplica solo a directorios, no a archivos. +
+
+
+
+
+
+/PATH/FILE +
+Selecciona la ruta exacta del archivo especificado. Este patrón se aplica +solo a archivos, no a directorios. +
+
+
+
+
+
+/PATH/DIR/ +
+Selecciona la ruta exacta del directorio especificado y todo lo que hay +dentro. Este patrón se aplica solo a directorios, no a archivos. +
+
+
+

Cuando especifica una ruta absoluta que comienza con /, se aplica +en el directorio raíz del array, no en el directorio raíz del +sistema de archivos local. +

En Windows, puede usar la barra invertida \ en lugar de la barra /. +Los directorios del sistema de Windows, las uniones, los puntos de +montaje y otros directorios especiales de Windows se tratan como +archivos, lo que significa que para excluirlos, debe usar una regla +de archivo, no una de directorio. +

Si el nombre del archivo contiene un carácter *, ?, [, +o ], debe escaparlo para evitar que se interprete como un +carácter globbing. En Unix, el carácter de escape es \; +en Windows, es ^. Cuando el patrón está en la línea de comandos, +debe duplicar el carácter de escape para evitar que sea +interpretado por el shell de comandos. +

En el archivo de configuración, puede usar diferentes estrategias +para filtrar los archivos a procesar. +El enfoque más simple es usar solo reglas exclude para +eliminar todos los archivos y directorios que no desea procesar. +Por ejemplo: +

+# Excluye cualquier archivo llamado *.unrecoverable
+exclude *.unrecoverable
+# Excluye el directorio raíz /lost+found
+exclude /lost+found/
+# Excluye cualquier subdirectorio llamado tmp
+exclude tmp/
+
+

El enfoque opuesto es definir solo los archivos que desea procesar, +utilizando solo reglas include. Por ejemplo: +

+# Incluye solo algunos directorios
+include /movies/
+include /musics/
+include /pictures/
+
+

El enfoque final es mezclar reglas exclude e include. En este +caso, el orden de las reglas es importante. Las reglas anteriores +tienen precedencia sobre las posteriores. +Para simplificar, puede enumerar todas las reglas exclude primero +y luego todas las reglas include. Por ejemplo: +

+# Excluye cualquier archivo llamado *.unrecoverable
+exclude *.unrecoverable
+# Excluye cualquier subdirectorio llamado tmp
+exclude tmp/
+# Incluye solo algunos directorios
+include /movies/
+include /musics/
+include /pictures/
+
+

En la línea de comandos, usando la opción -f, solo puede usar +patrones include. Por ejemplo: +

+# Verifica solo los archivos .mp3.
+# En Unix, use comillas para evitar la expansión globbing por el shell.
+snapraid -f "*.mp3" check
+
+

En Unix, al usar caracteres globbing en la línea de comandos, debe +ponerlos entre comillas para evitar que el shell los expanda. +

+
+

+Ignorar Archivos +

+

Además de las reglas globales en el archivo de configuración, puedes +colocar archivos .snapraidignore en cualquier directorio dentro del array +para definir reglas de exclusión descentralizadas. +

Las reglas definidas en .snapraidignore se aplican después de las reglas del +archivo de configuración. Esto significa que tienen una prioridad más alta y pueden +usarse para excluir archivos que fueron incluidos previamente por la configuración +global. Efectivamente, si una regla local coincide, el archivo se excluye +independientemente de los ajustes de inclusión globales. +

La lógica de patrones en .snapraidignore refleja la configuración global +pero ancla los patrones al directorio donde se encuentra el archivo: +

+
+
+FILE +
+Selecciona cualquier archivo llamado FILE en este directorio o por debajo. +Esto sigue las mismas reglas de globbing que el patrón global. +
+
+
+
+
+
+DIR/ +
+Selecciona cualquier directorio llamado DIR y todo su contenido, +ubicado en este directorio o por debajo. +
+
+
+
+
+
+/PATH/FILE +
+Selecciona el archivo exacto especificado relativo a la ubicación +del archivo .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Selecciona el directorio exacto especificado y todo su contenido, +relativo a la ubicación del archivo .snapraidignore. +
+
+
+

A diferencia de la configuración global, los archivos .snapraidignore solo admiten +reglas de exclusión; no se pueden usar patrones include o negación (!). +

Por ejemplo, si tienes un .snapraidignore en /mnt/disk1/projects/: +

+# Excluye SOLO /mnt/disk1/projects/output.bin
+/output.bin
+# Excluye cualquier directorio llamado build dentro de projects/
+build/
+# Excluye cualquier archivo .tmp dentro de projects/ o sus subcarpetas
+*.tmp
+
+
+
+

+Content +

+

SnapRAID almacena la lista y las sumas de comprobación de sus +archivos en el archivo de contenido. +

Es un archivo binario que enumera todos los archivos presentes en +su array de discos, junto con todas las sumas de comprobación para +verificar su integridad. +

Este archivo es leído y escrito por los comandos sync y scrub +y leído por los comandos fix, check y status. +

+
+

+Parity +

+

SnapRAID almacena la información de paridad de su array en los +archivos de paridad. +

Estos son archivos binarios que contienen la paridad calculada +de todos los bloques definidos en el archivo content. +

Estos archivos son leídos y escritos por los comandos sync y fix +y solo leídos por los comandos scrub y check. +

+
+

+Encoding +

+

SnapRAID en Unix ignora cualquier codificación. Lee y almacena los +nombres de archivo con la misma codificación utilizada por el sistema +de archivos. +

En Windows, todos los nombres leídos del sistema de archivos se +convierten y procesan en formato UTF-8. +

Para que los nombres de archivo se impriman correctamente, debe +configurar la consola de Windows en modo UTF-8 con el comando +chcp 65001 y usar una fuente TrueType como Lucida Console +como fuente de la consola. Esto afecta solo a los nombres de +archivo impresos; si redirige la salida de la consola a un archivo, +el archivo resultante siempre está en formato UTF-8. +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-fr.html b/beta/manual-fr.html new file mode 100644 index 00000000..60c72485 --- /dev/null +++ b/beta/manual-fr.html @@ -0,0 +1,2201 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+snapraid [-c, --conf CONFIG]
+    [-f, --filter MOTIF] [-d, --filter-disk NOM]
+    [-m, --filter-missing] [-e, --filter-error]
+    [-a, --audit-only] [-h, --pre-hash] [-i, --import DOSSIER]
+    [-p, --plan PERC|mauvais|nouveau|complet]
+    [-o, --older-than JOURS] [-l, --log FICHIER]
+    [-s, --spin-down-on-error] [-w, --bw-limit DÉBIT]
+    [-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 NOMBRE]
+    [-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 CONTENU]
+
+
+
+

+Description +

+

SnapRAID est un programme de sauvegarde conçu pour les baies de disques, +stockant les informations de parité pour la récupération des données en cas +de défaillance de six disques maximum. +

Principalement destiné aux centres multimédia domestiques avec des fichiers +volumineux et peu souvent modifiés, SnapRAID offre plusieurs fonctionnalités : +

    +
  • +Vous pouvez utiliser des disques déjà remplis de fichiers sans avoir besoin +de les reformater, en y accédant comme d'habitude. +
  • +
  • +Toutes vos données sont hachées pour garantir l'intégrité des données +et prévenir la corruption silencieuse. +
  • +
  • +Lorsque le nombre de disques défaillants dépasse le nombre de parités, +la perte de données est limitée aux disques affectés ; les données +sur les autres disques restent accessibles. +
  • +
  • +Si vous supprimez accidentellement des fichiers sur un disque, +la récupération est possible. +
  • +
  • +Les disques peuvent avoir des tailles différentes. +
  • +
  • +Vous pouvez ajouter des disques à tout moment. +
  • +
  • +SnapRAID ne verrouille pas vos données ; vous pouvez arrêter de l'utiliser +à tout moment sans reformater ni déplacer de données. +
  • +
  • +Pour accéder à un fichier, un seul disque doit tourner, ce qui +économise de l'énergie et réduit le bruit. +
  • +
+

Pour plus d'informations, veuillez visiter le site officiel de SnapRAID : +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID est un hybride entre un programme RAID et un programme de sauvegarde, +visant à combiner les meilleurs avantages des deux. Cependant, il a quelques +limitations que vous devriez considérer avant de l'utiliser. +

La principale limitation est que si un disque tombe en panne et que vous +n'avez pas synchronisé récemment, vous pourriez ne pas être en mesure de +récupérer complètement. +Plus précisément, vous pourriez ne pas être en mesure de récupérer jusqu'à +la taille des fichiers modifiés ou supprimés depuis la dernière opération +de synchronisation. +Cela se produit même si les fichiers modifiés ou supprimés ne se trouvent +pas sur le disque défaillant. C'est pourquoi SnapRAID est mieux adapté +aux données qui changent rarement. +

D'un autre côté, les fichiers nouvellement ajoutés n'empêchent pas +la récupération des fichiers déjà existants. Vous ne perdrez que les +fichiers récemment ajoutés s'ils se trouvent sur le disque défaillant. +

Les autres limitations de SnapRAID sont : +

    +
  • +Avec SnapRAID, vous avez toujours des systèmes de fichiers séparés +pour chaque disque. Avec le RAID, vous obtenez un seul grand +système de fichiers. +
  • +
  • +SnapRAID ne fait pas de striping (entrelacement) des données. +Avec le RAID, vous obtenez un gain de vitesse avec le striping. +
  • +
  • +SnapRAID ne prend pas en charge la récupération en temps réel. +Avec le RAID, vous n'avez pas à arrêter de travailler lorsqu'un +disque tombe en panne. +
  • +
  • +SnapRAID ne peut récupérer des données que pour un nombre limité +de défaillances de disques. Avec une sauvegarde, vous pouvez +récupérer d'une défaillance complète de toute la baie de disques. +
  • +
  • +Seuls les noms de fichiers, les horodatages, les liens symboliques +et les liens matériels sont sauvegardés. Les permissions, la +propriété et les attributs étendus ne sont pas sauvegardés. +
  • +
+
+
+

+Démarrer +

+

Pour utiliser SnapRAID, vous devez d'abord sélectionner un disque +dans votre baie de disques pour le dédier aux informations de parité. +Avec un disque pour la parité, vous pourrez récupérer d'une +seule défaillance de disque, similaire au RAID5. +

Si vous souhaitez récupérer de plus de défaillances de disques, +similaire au RAID6, vous devez réserver des disques supplémentaires +pour la parité. Chaque disque de parité supplémentaire permet la +récupération d'une défaillance de disque de plus. +

Comme disques de parité, vous devez choisir les plus grands disques +de la baie, car les informations de parité peuvent atteindre la +taille du plus grand disque de données de la baie. +

Ces disques seront dédiés au stockage des fichiers de parité. +Vous ne devriez pas y stocker vos données. +

Ensuite, vous devez définir les disques de données que vous souhaitez +protéger avec SnapRAID. La protection est plus efficace si ces disques +contiennent des données qui changent rarement. Pour cette raison, il est +préférable de NE PAS inclure le disque C:\ de Windows ou les répertoires +/home, /var et /tmp d'Unix. +

La liste des fichiers est enregistrée dans les fichiers content (contenu), +généralement stockés sur les disques de données, de parité ou de démarrage. +Ce fichier contient les détails de votre sauvegarde, y compris toutes les +sommes de contrôle pour vérifier son intégrité. +Le fichier content est stocké en plusieurs copies, et chaque copie +doit se trouver sur un disque différent pour garantir qu'au moins une +copie soit disponible, même en cas de défaillances de disques multiples. +

Par exemple, supposons que vous ne soyez intéressé que par un seul +niveau de protection de parité, et que vos disques se trouvent à : +

+/mnt/diskp <- disque sélectionné pour la parité
+/mnt/disk1 <- premier disque à protéger
+/mnt/disk2 <- deuxième disque à protéger
+/mnt/disk3 <- troisième disque à protéger
+
+

Vous devez créer le fichier de configuration /etc/snapraid.conf +avec les options suivantes : +

+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/
+
+

Si vous êtes sous Windows, vous devez utiliser le format de chemin +Windows, avec des lettres de lecteur et des barres obliques inverses +au lieu de barres obliques. +

+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\
+
+

Si vous avez de nombreux disques et manquez de lettres de lecteur, +vous pouvez monter les disques directement dans des sous-dossiers. Voir : +

+https://www.google.com/search?q=Windows+mount+point
+
+

À ce stade, vous êtes prêt à exécuter la commande sync (synchroniser) +pour construire les informations de parité. +

+snapraid sync
+
+

Ce processus peut prendre plusieurs heures la première fois, en fonction +de la taille des données déjà présentes sur les disques. Si les disques +sont vides, le processus est immédiat. +

Vous pouvez l'arrêter à tout moment en appuyant sur Ctrl+C, et lors de +la prochaine exécution, il reprendra là où il a été interrompu. +

Lorsque cette commande est terminée, vos données sont EN SÉCURITÉ. +

Vous pouvez maintenant commencer à utiliser votre baie comme vous le souhaitez +et mettre à jour périodiquement les informations de parité en exécutant +la commande sync. +

+

+Nettoyage (Scrubbing) +

+

Pour vérifier périodiquement les données et la parité à la recherche +d'erreurs, vous pouvez exécuter la commande scrub. +

+snapraid scrub
+
+

Cette commande compare les données de votre baie avec le hachage calculé +lors de la commande sync pour vérifier l'intégrité. +

Chaque exécution de la commande vérifie environ 8 % de la baie, en +excluant les données déjà nettoyées au cours des 10 jours précédents. +Vous pouvez utiliser l'option -p, --plan pour spécifier une quantité +différente et l'option -o, --older-than pour spécifier un âge +différent en jours. Par exemple, pour vérifier 5 % de la baie +pour les blocs de plus de 20 jours, utilisez : +

+snapraid -p 5 -o 20 scrub
+
+

Si des erreurs silencieuses ou d'entrée/sortie sont trouvées pendant +le processus, les blocs correspondants sont marqués comme mauvais +dans le fichier content et listés dans la commande status. +

+snapraid status
+
+

Pour les corriger, vous pouvez utiliser la commande fix, en filtrant +les mauvais blocs avec l'option -e, --filter-error : +

+snapraid -e fix
+
+

Lors du prochain scrub, les erreurs disparaîtront du rapport +status si elles sont réellement corrigées. Pour accélérer, +vous pouvez utiliser -p mauvais pour nettoyer uniquement les blocs +marqués comme mauvais. +

+snapraid -p bad scrub
+
+

L'exécution de scrub sur une baie non synchronisée peut signaler +des erreurs causées par des fichiers supprimés ou modifiés. Ces erreurs +sont signalées dans la sortie de scrub, mais les blocs associés +ne sont pas marqués comme mauvais. +

+
+

+Mise en commun (Pooling) +

+

Note : La fonctionnalité de mise en commun décrite ci-dessous a été +remplacée par l'outil mergerfs, qui est désormais l'option recommandée +pour les utilisateurs Linux de la communauté SnapRAID. Mergefs offre +un moyen plus flexible et efficace de regrouper plusieurs disques +dans un seul point de montage unifié, permettant un accès transparent +aux fichiers sur toute votre baie sans dépendre de liens symboliques. +Il s'intègre bien avec SnapRAID pour la protection par parité et est +couramment utilisé dans des configurations comme OpenMediaVault (OMV) +ou des configurations NAS personnalisées. +

Pour que tous les fichiers de votre baie apparaissent dans la même +arborescence de répertoires, vous pouvez activer la fonctionnalité +de pooling. Elle crée une vue virtuelle en lecture seule de tous +les fichiers de votre baie à l'aide de liens symboliques. +

Vous pouvez configurer le répertoire de pooling dans le fichier +de configuration avec : +

+pool /pool
+
+

ou, si vous êtes sous Windows, avec : +

+pool C:\pool
+
+

puis exécutez la commande pool pour créer ou mettre à jour +la vue virtuelle. +

+snapraid pool
+
+

Si vous utilisez une plateforme Unix et souhaitez partager ce +répertoire sur le réseau avec des machines Windows ou Unix, +vous devez ajouter les options suivantes à votre +/etc/samba/smb.conf : +

+# Dans la section globale de smb.conf
+unix extensions = no
+
+
+# Dans la section de partage de smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

Sous Windows, le partage de liens symboliques sur un réseau +nécessite que les clients les résolvent à distance. Pour +activer cela, en plus de partager le répertoire du pool, +vous devez également partager tous les disques indépendamment, +en utilisant les noms de disques définis dans le fichier de +configuration comme points de partage. Vous devez également +spécifier dans l'option share du fichier de configuration +le chemin UNC Windows que les clients distants doivent +utiliser pour accéder à ces disques partagés. +

Par exemple, en opérant à partir d'un serveur nommé darkstar, +vous pouvez utiliser les options : +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

et partager les répertoires suivants sur le réseau : +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

pour permettre aux clients distants d'accéder à tous les fichiers +à \\darkstar\pool. +

Vous pourriez également avoir besoin de configurer les clients +distants pour activer l'accès aux liens symboliques distants avec +la commande : +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Restauration (Undeleting) +

+

SnapRAID fonctionne davantage comme un programme de sauvegarde +qu'un système RAID, et il peut être utilisé pour restaurer +ou récupérer des fichiers dans leur état précédent à l'aide +de l'option -f, --filter : +

+snapraid fix -f FICHIER
+
+

ou pour un répertoire : +

+snapraid fix -f DOSSIER/
+
+

Vous pouvez également l'utiliser pour récupérer uniquement les +fichiers accidentellement supprimés à l'intérieur d'un +répertoire en utilisant l'option -m, --filter-missing, +qui ne restaure que les fichiers manquants, laissant tous +les autres intacts. +

+snapraid fix -m -f DOSSIER/
+
+

Ou pour récupérer tous les fichiers supprimés sur tous les +lecteurs avec : +

+snapraid fix -m
+
+
+
+

+Récupération +

+

Le pire est arrivé, et vous avez perdu un ou plusieurs disques ! +

NE PANIQUEZ PAS ! Vous pourrez les récupérer ! +

La première chose à faire est d'éviter d'autres modifications +sur votre baie de disques. Désactivez toute connexion à distance +et tout processus planifié, y compris toute synchronisation ou +nettoyage SnapRAID nocturne planifié. +

Procédez ensuite aux étapes suivantes. +

+

+ÉTAPE 1 -> Reconfigurer +

+

Vous avez besoin d'espace pour récupérer, idéalement sur des disques +de rechange supplémentaires, mais un disque USB externe ou un disque +distant suffira. +

Modifiez le fichier de configuration SnapRAID pour que l'option +data ou parity du disque défaillant pointe vers un emplacement +avec suffisamment d'espace vide pour récupérer les fichiers. +

Par exemple, si le disque d1 a échoué, passez de : +

+data d1 /mnt/disk1/
+
+

à : +

+data d1 /mnt/new_spare_disk/
+
+

Si le disque à récupérer est un disque de parité, mettez à jour +l'option parity appropriée. +Si vous avez plusieurs disques défaillants, mettez à jour toutes +leurs options de configuration. +

+
+

+ÉTAPE 2 -> Corriger (Fix) +

+

Exécutez la commande fix, en stockant le journal dans un fichier +externe avec : +

+snapraid -d NOM -l fix.log fix
+
+

Où NOM est le nom du disque, tel que d1 dans notre exemple précédent. +Si le disque à récupérer est un disque de parité, utilisez les noms +parity, 2-parity, etc. +Si vous avez plusieurs disques défaillants, utilisez plusieurs +options -d pour les spécifier tous. +

Cette commande prendra beaucoup de temps. +

Assurez-vous d'avoir quelques gigaoctets libres pour stocker le fichier fix.log. +Exécutez-la à partir d'un disque avec suffisamment d'espace libre. +

Vous avez maintenant récupéré tout ce qui est récupérable. Si certains +fichiers sont partiellement ou totalement irrécupérables, ils seront +renommés en ajoutant l'extension .unrecoverable. +

Vous pouvez trouver une liste détaillée de tous les blocs irrécupérables +dans le fichier fix.log en vérifiant toutes les lignes commençant par +unrecoverable:. +

Si la récupération ne vous satisfait pas, vous pouvez réessayer autant +de fois que vous le souhaitez. +

Par exemple, si vous avez supprimé des fichiers de la baie après le dernier +sync, cela peut entraîner la non-récupération de certains fichiers. +Dans ce cas, vous pouvez réessayer le fix en utilisant l'option +-i, --import, en spécifiant où se trouvent maintenant ces fichiers +pour les inclure à nouveau dans le processus de récupération. +

Si vous êtes satisfait de la récupération, vous pouvez continuer, +mais notez qu'après la synchronisation, vous ne pouvez plus réessayer +la commande fix ! +

+
+

+ÉTAPE 3 -> Vérifier (Check) +

+

Par précaution, vous pouvez maintenant exécuter une commande check +pour vous assurer que tout est correct sur le disque récupéré. +

+snapraid -d NOM -a check
+
+

Où NOM est le nom du disque, tel que d1 dans notre exemple précédent. +

Les options -d et -a indiquent à SnapRAID de vérifier uniquement le +disque spécifié et d'ignorer toutes les données de parité. +

Cette commande prendra beaucoup de temps, mais si vous n'êtes pas +trop prudent, vous pouvez la sauter. +

+
+

+ÉTAPE 4 -> Synchroniser (Sync) +

+

Exécutez la commande sync pour resynchroniser la baie avec le nouveau +disque. +

+snapraid sync
+
+

Si tout est récupéré, cette commande est immédiate. +

+
+
+
+

+Commandes +

+

SnapRAID fournit quelques commandes simples qui vous permettent de : +

    +
  • +Afficher l'état de la baie de disques -> status +
  • +
  • +Contrôler les disques -> smart, probe, up, down +
  • +
  • +Faire une sauvegarde/instantané -> sync +
  • +
  • +Vérifier périodiquement les données -> scrub +
  • +
  • +Restaurer la dernière sauvegarde/instantané -> fix. +
  • +
+

Les commandes doivent être écrites en minuscules. +

+

+status +

+

Affiche un résumé de l'état de la baie de disques. +

Il comprend des informations sur la fragmentation de la parité, l'âge +des blocs sans vérification, et toutes les erreurs silencieuses +enregistrées rencontrées lors du nettoyage. +

Les informations présentées se réfèrent au dernier moment où vous avez +exécuté sync. Les modifications ultérieures ne sont pas prises en compte. +

Si des mauvais blocs ont été détectés, leurs numéros de blocs sont listés. +Pour les corriger, vous pouvez utiliser la commande fix -e. +

Il montre également un graphique représentant la dernière fois que chaque +bloc a été nettoyé ou synchronisé. Les blocs nettoyés sont affichés +avec *, les blocs synchronisés mais pas encore nettoyés avec o. +

Rien n'est modifié. +

+
+

+smart +

+

Affiche un rapport SMART de tous les disques du système. +

Il comprend une estimation de la probabilité de défaillance au cours +de la prochaine année, vous permettant de planifier les remplacements +de maintenance des disques qui présentent des attributs suspects. +

Cette estimation de probabilité est obtenue en corrélant les attributs +SMART des disques avec les données Backblaze disponibles à : +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Si SMART signale qu'un disque est en panne, FAIL ou PREFAIL est +affiché pour ce disque, et SnapRAID retourne une erreur. +Dans ce cas, le remplacement immédiat du disque est fortement +recommandé. +

Les autres chaînes d'état possibles sont : +

+
+
+logfail +
+Dans le passé, certains attributs étaient inférieurs +au seuil. +
+
+
+
+logerr +
+Le journal d'erreurs du périphérique contient des erreurs. +
+
+
+
+selferr +
+Le journal d'auto-test du périphérique contient des erreurs. +
+
+
+

Si l'option -v, --verbose est spécifiée, une analyse statistique +plus approfondie est fournie. Cette analyse peut vous aider à +décider si vous avez besoin de plus ou moins de parité. +

Cette commande utilise l'outil smartctl et équivaut à exécuter +smartctl -a sur tous les périphériques. +

Si vos périphériques ne sont pas détectés automatiquement correctement, +vous pouvez spécifier une commande personnalisée en utilisant l'option +smartctl dans le fichier de configuration. +

Rien n'est modifié. +

+
+

+probe +

+

Affiche l'état d'ALIMENTATION de tous les disques du système. +

Standby signifie que le disque ne tourne pas. Active signifie +que le disque tourne. +

Cette commande utilise l'outil smartctl et équivaut à exécuter +smartctl -n standby -i sur tous les périphériques. +

Si vos périphériques ne sont pas détectés automatiquement correctement, +vous pouvez spécifier une commande personnalisée en utilisant l'option +smartctl dans le fichier de configuration. +

Rien n'est modifié. +

+
+

+up +

+

Fait tourner (spin up) tous les disques de la baie. +

Vous pouvez faire tourner uniquement des disques spécifiques +en utilisant l'option -d, --filter-disk. +

Faire tourner tous les disques en même temps nécessite beaucoup +d'énergie. Assurez-vous que votre alimentation peut le supporter. +

Rien n'est modifié. +

+
+

+down +

+

Arrête (spin down) tous les disques de la baie. +

Cette commande utilise l'outil smartctl et équivaut à exécuter +smartctl -s standby,now sur tous les périphériques. +

Vous pouvez arrêter uniquement des disques spécifiques +en utilisant l'option -d, --filter-disk. +

Pour arrêter automatiquement en cas d'erreur, vous pouvez utiliser +l'option -s, --spin-down-on-error avec toute autre commande, +ce qui équivaut à exécuter down manuellement lorsqu'une +erreur se produit. +

Rien n'est modifié. +

+
+

+diff +

+

Liste tous les fichiers modifiés depuis le dernier sync qui +nécessitent la recomputation de leurs données de parité. +

Cette commande ne vérifie pas les données des fichiers, +mais uniquement l'horodatage, la taille et l'inode du fichier. +

Après avoir listé tous les fichiers modifiés, un résumé des +modifications est présenté, regroupé par : +

+
+
+equal +
+Fichiers inchangés par rapport à avant. +
+
+
+
+added +
+Fichiers ajoutés qui n'étaient pas présents auparavant. +
+
+
+
+removed +
+Fichiers supprimés. +
+
+
+
+updated +
+Fichiers avec une taille ou un horodatage différent, +signifiant qu'ils ont été modifiés. +
+
+
+
+moved +
+Fichiers déplacés vers un répertoire différent sur le +même disque. Ils sont identifiés par le même nom, la +même taille, le même horodatage et le même inode, mais +un répertoire différent. +
+
+
+
+copied +
+Fichiers copiés sur le même disque ou sur un disque +différent où le fichier original existe toujours. +Ils sont identifiés par le fait qu'ils ont le même nom, la même +taille et le même horodatage. +Si l'horodatage à la sous-seconde est nul, le chemin complet +doit correspondre pour être identifié, pas seulement le nom. +
+
+
+
+relocated +
+Fichiers déplacés sur le même disque ou sur un disque +différent où l'original a disparu. +Ils sont identifiés par le fait qu'ils ont le même nom, la même +taille et le même horodatage. +Si l'horodatage à la sous-seconde est nul, le chemin complet +doit correspondre pour être identifié. +Contrairement aux fichiers 'moved' sur le même disque, les +fichiers relocalisés ont un inode différent. +
+
+
+
+restored +
+Fichiers avec un inode différent mais dont le +répertoire, le nom, la taille et l'horodatage correspondent. +Il s'agit généralement de fichiers restaurés après avoir été +supprimés. +
+
+
+

Si un sync est requis, le code de retour du processus est 2, +au lieu du 0 par défaut. Le code de retour 1 est utilisé pour +une condition d'erreur générique. +

Rien n'est modifié. +

+
+

+sync +

+

Met à jour les informations de parité. Tous les fichiers modifiés +dans la baie de disques sont lus, et les données de parité +correspondantes sont mises à jour. +

Vous pouvez arrêter ce processus à tout moment en appuyant sur Ctrl+C, +sans perdre le travail déjà effectué. +Lors de la prochaine exécution, le processus sync reprendra +là où il a été interrompu. +

Si des erreurs silencieuses ou d'entrée/sortie sont trouvées +pendant le processus, les blocs correspondants sont marqués comme mauvais. +

Les fichiers sont identifiés par chemin et/ou inode et vérifiés +par taille et horodatage. +Si la taille ou l'horodatage du fichier diffère, les données de +parité sont recomptées pour l'ensemble du fichier. +Si le fichier est déplacé ou renommé sur le même disque, en gardant +le même inode, la parité n'est pas recomptée. +Si le fichier est déplacé vers un autre disque, la parité est +recomptée, mais les informations de hachage précédemment calculées +sont conservées. +

Les fichiers content et parity sont modifiés si nécessaire. +Les fichiers dans la baie NE SONT PAS modifiés. +

+
+

+scrub +

+

Nettoie la baie, vérifiant les erreurs silencieuses ou d'entrée/sortie +dans les disques de données et de parité. +

Chaque invocation vérifie environ 8 % de la baie, en excluant +les données déjà nettoyées au cours des 10 derniers jours. +Cela signifie qu'un nettoyage une fois par semaine garantit que +chaque bit de données est vérifié au moins une fois tous les trois mois. +

Vous pouvez définir un plan de nettoyage ou une quantité différente +en utilisant l'option -p, --plan, qui accepte : +bad - Nettoyer les blocs marqués mauvais. +new - Nettoyer les blocs juste synchronisés qui n'ont pas encore été nettoyés. +full - Nettoyer tout. +0-100 - Nettoyer le pourcentage spécifié de blocs. +

Si vous spécifiez un pourcentage, vous pouvez également utiliser +l'option -o, --older-than pour définir l'âge que le bloc +doit avoir. +Les blocs les plus anciens sont nettoyés en premier, assurant +une vérification optimale. +Si vous souhaitez nettoyer uniquement les blocs juste synchronisés +qui n'ont pas encore été nettoyés, utilisez l'option -p new. +

Pour obtenir des détails sur l'état du nettoyage, utilisez la commande +status. +

Pour toute erreur silencieuse ou d'entrée/sortie trouvée, les blocs +correspondants sont marqués comme mauvais dans le fichier content. +Ces mauvais blocs sont listés dans status et peuvent être corrigés +avec fix -e. +Après la correction, lors du prochain nettoyage, ils seront revérifiés, +et s'ils sont jugés corrigés, la marque "mauvais" sera supprimée. +Pour nettoyer uniquement les mauvais blocs, vous pouvez utiliser la +commande scrub -p bad. +

Il est recommandé d'exécuter scrub uniquement sur une baie +synchronisée pour éviter les erreurs signalées causées par des données +non synchronisées. Ces erreurs sont reconnues comme n'étant pas +des erreurs silencieuses, et les blocs ne sont pas marqués comme mauvais, +mais de telles erreurs sont signalées dans la sortie de la commande. +

Le fichier content est modifié pour mettre à jour l'heure de la dernière +vérification de chaque bloc et pour marquer les mauvais blocs. +Les fichiers parity NE SONT PAS modifiés. +Les fichiers dans la baie NE SONT PAS modifiés. +

+
+

+fix +

+

Corrige tous les fichiers et les données de parité. +

Tous les fichiers et les données de parité sont comparés à l'état +de l'instantané enregistré lors du dernier sync. +Si une différence est trouvée, elle est rétablie à l'instantané stocké. +

AVERTISSEMENT ! La commande fix ne fait pas de distinction entre +les erreurs et les modifications intentionnelles. Elle rétablit +inconditionnellement l'état du fichier au dernier sync. +

Si aucune autre option n'est spécifiée, l'intégralité de la baie est traitée. +Utilisez les options de filtre pour sélectionner un sous-ensemble de +fichiers ou de disques sur lesquels opérer. +

Pour corriger uniquement les blocs marqués mauvais pendant sync et scrub, +utilisez l'option -e, --filter-error. +Contrairement aux autres options de filtre, celle-ci applique des corrections +uniquement aux fichiers qui sont inchangés depuis le dernier sync. +

SnapRAID renomme tous les fichiers qui ne peuvent pas être corrigés +en ajoutant l'extension .unrecoverable. +

Avant de corriger, l'intégralité de la baie est scannée pour trouver +tout fichier déplacé depuis la dernière opération sync. +Ces fichiers sont identifiés par leur horodatage, ignorant leur nom +et leur répertoire, et sont utilisés dans le processus de récupération +si nécessaire. +Si vous en avez déplacé certains en dehors de la baie, vous pouvez +utiliser l'option -i, --import pour spécifier des répertoires +supplémentaires à scanner. +

Les fichiers sont identifiés uniquement par chemin, pas par inode. +

Le fichier content N'EST PAS modifié. +Les fichiers parity sont modifiés si nécessaire. +Les fichiers dans la baie sont modifiés si nécessaire. +

+
+

+check +

+

Vérifie tous les fichiers et les données de parité. +

Il fonctionne comme fix, mais il simule seulement une récupération +et aucune modification n'est écrite sur la baie. +

Cette commande est principalement destinée à la vérification manuelle, +comme après un processus de récupération ou dans d'autres conditions +spéciales. Pour les vérifications périodiques et planifiées, utilisez +scrub. +

Si vous utilisez l'option -a, --audit-only, seules les données +des fichiers sont vérifiées, et les données de parité sont ignorées +pour une exécution plus rapide. +

Les fichiers sont identifiés uniquement par chemin, pas par inode. +

Rien n'est modifié. +

+
+

+list +

+

Liste tous les fichiers contenus dans la baie au moment du dernier +sync. +

Avec -v ou --verbose, l'heure en sous-seconde est également affichée. +

Rien n'est modifié. +

+
+

+dup +

+

Liste tous les fichiers en double. Deux fichiers sont considérés +comme égaux si leurs hachages correspondent. Les données des fichiers +ne sont pas lues ; seuls les hachages précalculés sont utilisés. +

Rien n'est modifié. +

+
+

+pool +

+

Crée ou met à jour une vue virtuelle de tous +les fichiers de votre baie de disques dans le répertoire pooling. +

Les fichiers ne sont pas copiés mais liés à l'aide de +liens symboliques. +

Lors de la mise à jour, tous les liens symboliques et les +sous-répertoires vides existants sont supprimés et remplacés par +la nouvelle vue de la baie. Tout autre fichier ordinaire est laissé +en place. +

Rien n'est modifié en dehors du répertoire du pool. +

+
+

+devices +

+

Affiche les périphériques de bas niveau utilisés par la baie. +

Cette commande affiche les associations de périphériques dans la baie +et est principalement destinée à être une interface de script. +

Les deux premières colonnes sont l'ID et le chemin du périphérique +de bas niveau. Les deux colonnes suivantes sont l'ID et le chemin +du périphérique de haut niveau. La dernière colonne est le nom du +disque dans la baie. +

Dans la plupart des cas, vous avez un périphérique de bas niveau +pour chaque disque de la baie, mais dans certaines configurations +plus complexes, vous pouvez avoir plusieurs périphériques de bas +niveau utilisés par un seul disque de la baie. +

Rien n'est modifié. +

+
+

+touch +

+

Définit un horodatage arbitraire en sous-seconde pour tous les fichiers +qui l'ont défini à zéro. +

Cela améliore la capacité de SnapRAID à reconnaître les fichiers +déplacés et copiés, car cela rend l'horodatage presque unique, +réduisant les doublons possibles. +

Plus précisément, si l'horodatage en sous-seconde n'est pas zéro, +un fichier déplacé ou copié est identifié comme tel s'il correspond +au nom, à la taille et à l'horodatage. Si l'horodatage en sous-seconde +est zéro, il est considéré comme une copie uniquement si le chemin +complet, la taille et l'horodatage correspondent tous. +

L'horodatage à la seconde près n'est pas modifié, +de sorte que toutes les dates et heures de vos fichiers seront +préservées. +

+
+

+rehash +

+

Planifie un nouveau hachage de toute la baie. +

Cette commande change le type de hachage utilisé, généralement lors +de la mise à niveau d'un système 32 bits vers un système 64 bits, +pour passer de MurmurHash3 au plus rapide SpookyHash. +

Si vous utilisez déjà le hachage optimal, cette commande +ne fait rien et vous informe qu'aucune action n'est nécessaire. +

Le nouveau hachage n'est pas effectué immédiatement, mais a lieu +progressivement pendant sync et scrub. +

Vous pouvez vérifier l'état du nouveau hachage en utilisant status. +

Pendant le nouveau hachage, SnapRAID conserve toutes ses +fonctionnalités, à la seule exception que dup ne peut pas +détecter les fichiers en double utilisant un hachage différent. +

+
+

+locate +

+

Localise les fichiers stockés sur les disques de parité. Pour chaque fichier +correspondant, il affiche son emplacement dans le fichier de parité et le nombre +de fragments qu'il occupe. +

Vous pouvez utiliser l'option -t, --tail pour restreindre l'opération aux fichiers +occupant la partie terminale spécifiée de la parité. +

Si vous souhaitez réallouer ces fichiers, vous pouvez alors utiliser l'option +-W, --force-realloc-tail. +Sachez que ces fichiers ne seront pas protégés par la parité pendant le processus +de réallocation. +

+
+
+

+Options +

+

SnapRAID fournit les options suivantes : +

+
+
+-c, --conf CONFIG +
+Sélectionne le fichier de configuration à utiliser. S'il n'est pas +spécifié, sous Unix, il utilise le fichier /usr/local/etc/snapraid.conf +s'il existe, sinon /etc/snapraid.conf. +Sous Windows, il utilise le fichier snapraid.conf dans le même +répertoire que snapraid.exe. +
+
+
+
+
+
+-f, --filter MOTIF +
+Filtre les fichiers à traiter dans check et fix. +Seuls les fichiers correspondant au motif spécifié sont traités. +Cette option peut être utilisée plusieurs fois. +Voir la section MOTIF pour plus de détails sur les +spécifications de motifs. +Sous Unix, assurez-vous que les caractères de globbing sont +entre guillemets s'ils sont utilisés. +Cette option ne peut être utilisée qu'avec check et fix. +Elle ne peut pas être utilisée avec sync et scrub, car ils +traitent toujours l'intégralité de la baie. +
+
+
+
+
+
+-d, --filter-disk NOM +
+Filtre les disques à traiter dans check, fix, up et down. +Vous devez spécifier un nom de disque tel que défini dans le fichier +de configuration. +Vous pouvez également spécifier des disques de parité avec les noms : +parity, 2-parity, 3-parity, etc., pour limiter les opérations +à un disque de parité spécifique. +Si vous combinez plusieurs options --filter, --filter-disk et +--filter-missing, seuls les fichiers correspondant à tous les filtres +sont sélectionnés. +Cette option peut être utilisée plusieurs fois. +Cette option ne peut être utilisée qu'avec check, fix, up +et down. +Elle ne peut pas être utilisée avec sync et scrub, car ils +traitent toujours l'intégralité de la baie. +
+
+
+
+
+
+-m, --filter-missing +
+Filtre les fichiers à traiter dans check et fix. +Seuls les fichiers manquants ou supprimés de la baie sont traités. +Lorsqu'elle est utilisée avec fix, cela agit comme une commande +undelete (restaurer). +Si vous combinez plusieurs options --filter, --filter-disk et +--filter-missing, seuls les fichiers correspondant à tous les filtres +sont sélectionnés. +Cette option ne peut être utilisée qu'avec check et fix. +Elle ne peut pas être utilisée avec sync et scrub, car ils +traitent toujours l'intégralité de la baie. +
+
+
+
+
+
+-e, --filter-error +
+Traite les fichiers avec des erreurs dans check et fix. +Il ne traite que les fichiers qui ont des blocs marqués avec des erreurs +silencieuses ou d'entrée/sortie pendant sync et scrub, tels +que listés dans status. +Cette option ne peut être utilisée qu'avec check et fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Sélectionne le plan de nettoyage. Si PERC est une valeur numérique +de 0 à 100, elle est interprétée comme le pourcentage de blocs à +nettoyer. +Au lieu d'un pourcentage, vous pouvez spécifier un plan : +bad nettoie les mauvais blocs, new nettoie les blocs +qui n'ont pas encore été nettoyés, et full nettoie tout. +Cette option ne peut être utilisée qu'avec scrub. +
+
+
+
+
+
+-o, --older-than JOURS +
+Sélectionne la partie la plus ancienne de la baie à traiter dans scrub. +JOURS est l'âge minimum en jours pour qu'un bloc soit nettoyé ; +la valeur par défaut est 10. +Les blocs marqués comme mauvais sont toujours nettoyés, +quelle que soit cette option. +Cette option ne peut être utilisée qu'avec scrub. +
+
+
+
+
+
+-a, --audit-only +
+Dans check, vérifie le hachage des fichiers sans +vérifier les données de parité. +Si vous êtes intéressé uniquement par la vérification des données +des fichiers, cette option peut accélérer considérablement le +processus de vérification. +Cette option ne peut être utilisée qu'avec check. +
+
+
+
+
+
+-h, --pre-hash +
+Dans sync, exécute une phase de hachage préliminaire de toutes +les nouvelles données pour une vérification supplémentaire avant +le calcul de la parité. +Habituellement, dans sync, aucun hachage préliminaire n'est +effectué, et les nouvelles données sont hachées juste avant +le calcul de la parité lorsqu'elles sont lues pour la première fois. +Ce processus se produit lorsque le système est soumis à +une lourde charge, avec tous les disques en rotation et un +processeur occupé. +Il s'agit d'une condition extrême pour la machine, et si elle +présente un problème matériel latent, des erreurs silencieuses +peuvent passer inaperçues car les données ne sont pas encore +hachées. +Pour éviter ce risque, vous pouvez activer le mode pre-hash +pour que toutes les données soient lues deux fois afin de +garantir leur intégrité. +Cette option vérifie également les fichiers déplacés au sein +de la baie pour s'assurer que l'opération de déplacement a +réussi et, si nécessaire, vous permet d'exécuter une +opération fix avant de continuer. +Cette option ne peut être utilisée qu'avec sync. +
+
+
+
+
+
+-i, --import DOSSIER +
+Importe à partir du répertoire spécifié tous les fichiers supprimés +de la baie après le dernier sync. +Si vous avez toujours de tels fichiers, ils peuvent être utilisés +par check et fix pour améliorer le processus de récupération. +Les fichiers sont lus, y compris dans les sous-répertoires, et sont +identifiés quel que soit leur nom. +Cette option ne peut être utilisée qu'avec check et fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+En cas d'erreur, arrête (spin down) tous les disques gérés avant +de quitter avec un code d'état non nul. Cela empêche les +lecteurs de rester actifs et en rotation après une opération +interrompue, aidant à éviter une accumulation inutile de chaleur +et une consommation d'énergie. Utilisez cette option pour vous +assurer que les disques sont arrêtés en toute sécurité +même lorsqu'une commande échoue. +
+
+
+
+
+
+-w, --bw-limit DÉBIT +
+Applique une limite de bande passante globale pour tous les disques. +Le DÉBIT est le nombre d'octets par seconde. Vous pouvez spécifier +un multiplicateur tel que K, M ou G (par exemple, --bw-limit 1G). +
+
+
+
+
+
+-t, --tail TAILLE +
+Limite la liste des fichiers à ceux n'utilisant pas plus que la +taille de queue spécifiée des disques de parité. +Vous pouvez utiliser des multiplicateurs tels que K, M, G ou T (ex: --tail 1G). +Cette option n'est valide que lorsqu'elle est utilisée avec la +commande locate. +
+
+
+
+
+
+-A, --stats +
+Active une vue d'état étendue qui affiche des informations +supplémentaires. +L'écran affiche deux graphiques : +Le premier graphique montre le nombre de bandes mises en mémoire +tampon pour chaque disque, ainsi que le chemin d'accès au fichier +en cours d'accès sur ce disque. Généralement, le disque le plus +lent n'aura pas de tampon disponible, ce qui détermine la +bande passante maximale réalisable. +Le deuxième graphique montre le pourcentage de temps passé en attente +au cours des 100 dernières secondes. Le disque le plus lent est +censé causer la majeure partie du temps d'attente, tandis que les +autres disques devraient avoir peu ou pas de temps d'attente car +ils peuvent utiliser leurs bandes mises en mémoire tampon. +Ce graphique montre également le temps passé en attente pour les +calculs de hachage et les calculs RAID. +Tous les calculs s'exécutent en parallèle avec les opérations de disque. +Par conséquent, tant qu'il y a un temps d'attente mesurable pour +au moins un disque, cela indique que le processeur est suffisamment +rapide pour suivre la charge de travail. +
+
+
+
+
+
+-Z, --force-zero +
+Force l'opération non sécurisée de synchronisation d'un fichier +de taille zéro qui était auparavant non nul. +Si SnapRAID détecte une telle condition, il arrête de +procéder à moins que vous ne spécifiiez cette option. +Cela vous permet de détecter facilement quand, après un +plantage du système, certains fichiers accédés ont été tronqués. +C'est une condition possible sous Linux avec les systèmes +de fichiers ext3/ext4. +Cette option ne peut être utilisée qu'avec sync. +
+
+
+
+
+
+-E, --force-empty +
+Force l'opération non sécurisée de synchronisation d'un disque +avec tous les fichiers originaux manquants. +Si SnapRAID détecte que tous les fichiers initialement présents +sur le disque sont manquants ou réécrits, il arrête de +procéder à moins que vous ne spécifiiez cette option. +Cela vous permet de détecter facilement lorsqu'un système de +fichiers de données n'est pas monté. +Cette option ne peut être utilisée qu'avec sync. +
+
+
+
+
+
+-U, --force-uuid +
+Force l'opération non sécurisée de synchronisation, vérification +et correction avec des disques qui ont changé leur UUID. +Si SnapRAID détecte que certains disques ont changé d'UUID, +il arrête de procéder à moins que vous ne spécifiiez cette option. +Cela vous permet de détecter lorsque vos disques sont montés +aux mauvais points de montage. +Il est cependant autorisé d'avoir un seul changement d'UUID +avec une seule parité, et plus avec une parité multiple, +car c'est le cas normal lors du remplacement des disques après +une récupération. +Cette option ne peut être utilisée qu'avec sync, check ou +fix. +
+
+
+
+
+
+-D, --force-device +
+Force l'opération non sécurisée de correction avec des disques +inaccessibles ou avec des disques sur le même périphérique physique. +Par exemple, si vous avez perdu deux disques de données et que +vous avez un disque de rechange pour ne récupérer que le premier, +vous pouvez ignorer le deuxième disque inaccessible. +Ou, si vous souhaitez récupérer un disque dans l'espace libre +restant sur un disque déjà utilisé, partageant le même +périphérique physique. +Cette option ne peut être utilisée qu'avec fix. +
+
+
+
+
+
+-N, --force-nocopy +
+Dans sync, check et fix, désactive l'heuristique de détection +de copie. +Sans cette option, SnapRAID suppose que les fichiers ayant les mêmes +attributs, tels que le nom, la taille et l'horodatage, sont des copies +avec les mêmes données. +Cela permet d'identifier les fichiers copiés ou déplacés d'un disque +à un autre et réutilise les informations de hachage déjà calculées +pour détecter les erreurs silencieuses ou pour récupérer les fichiers +manquants. +Dans de rares cas, ce comportement peut entraîner des faux positifs +ou un processus lent en raison de nombreuses vérifications de hachage, +et cette option vous permet de résoudre de tels problèmes. +Cette option ne peut être utilisée qu'avec sync, check et fix. +
+
+
+
+
+
+-F, --force-full +
+Dans sync, force un recomptage complet de la parité. +Cette option peut être utilisée lorsque vous ajoutez un nouveau +niveau de parité ou si vous êtes revenu à un ancien fichier +de contenu utilisant des données de parité plus récentes. +Au lieu de recréer la parité à partir de zéro, cela vous permet +de réutiliser les hachages présents dans le fichier de contenu +pour valider les données et maintenir la protection des données +pendant le processus sync en utilisant les données de parité +existantes. +Cette option ne peut être utilisée qu'avec sync. +
+
+
+
+
+
+-R, --force-realloc +
+Dans sync, force une réallocation complète des fichiers et +une reconstruction de la parité. +Cette option peut être utilisée pour réallouer complètement +tous les fichiers, en supprimant la fragmentation, tout en +réutilisant les hachages présents dans le fichier de contenu +pour valider les données. +Cette option ne peut être utilisée qu'avec sync. +AVERTISSEMENT ! Cette option est réservée aux experts, et il est +fortement recommandé de ne pas l'utiliser. +Vous N'AVEZ AUCUNE protection des données pendant l'opération sync. +
+
+
+
+
+
+-W, --force-realloc-tail TAILLE +
+Fonctionne comme -R, --force-realloc, maar limité à la partie terminale +spécifiée (les derniers TAILLE octets) de chaque fichier de parité. +Force la réallocation (déplacement) de tout fragment/bloc de fichier +actuellement stocké dans cette section terminale, leur permettant d'être +placés n'importe où dans le(s) fichier(s) de parité où de l'espace libre +est disponible (y compris les trous existants). +Le but principal de cette option est de réduire la taille sur disque +du fichier de parité. +Si la réallocation réussit à vider toute la section terminale +(plus aucun bloc ne l'utilise), le fichier de parité est tronqué, +récupérant l'espace terminal inutilisé. +Vous pouvez utiliser des multiplicateurs tels que K, M, G ou T (ex: +--force-realloc-tail 1G). +Vous pouvez utiliser locate -t, --tail pour connaître à l'avance +les fichiers affectés. +AVERTISSEMENT ! +Cette option est réservée aux experts et il est fortement +recommandé de ne pas l'utiliser. +Vous n'avez PAS de protection des données pendant l'opération sync +pour les fichiers affectés. +
+
+
+
+
+
+-l, --log FICHIER +
+Écrit un journal détaillé dans le fichier spécifié. +Si cette option n'est pas spécifiée, les erreurs inattendues +sont imprimées à l'écran, ce qui peut entraîner une sortie +excessive en cas de nombreuses erreurs. Lorsque -l, --log est +spécifié, seules les erreurs fatales qui entraînent l'arrêt +de SnapRAID sont imprimées à l'écran. +Si le chemin commence par >>, le fichier est ouvert +en mode ajout. Les occurrences de %D et %T dans le nom sont +remplacées par la date et l'heure au format YYYYMMDD et +HHMMSS. Dans les fichiers batch Windows, vous devez doubler +le caractère %, par exemple, result-%%D.log. Pour utiliser +>>, vous devez encadrer le nom de guillemets, par exemple, +">>result.log". +Pour sortir le journal sur la sortie standard ou l'erreur +standard, vous pouvez utiliser ">&1" et ">&2", +respectivement. +Consultez le fichier ou la page de manuel snapraid_log.txt +pour les descriptions des balises de journal. +
+
+
+
+
+
+-L, --error-limit NOMBRE +
+Définit une nouvelle limite d'erreurs avant d'arrêter l'exécution. +Par défaut, SnapRAID s'arrête s'il rencontre plus de 100 +erreurs d'entrée/sortie, indiquant qu'un disque est +probablement en panne. +Cette option affecte sync et scrub, qui sont autorisés +à continuer après le premier ensemble d'erreurs de disque +pour essayer de terminer leurs opérations. +Cependant, check et fix s'arrêtent toujours à la première erreur. +
+
+
+
+
+
+-S, --start BLKSTART +
+Commence le traitement à partir du numéro de bloc spécifié. +Cela peut être utile pour réessayer de vérifier ou de corriger +des blocs spécifiques en cas de disque endommagé. +Cette option est principalement destinée à la récupération manuelle avancée. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Ne traite que le nombre de blocs spécifié. +Cette option est principalement destinée à la récupération manuelle avancée. +
+
+
+
+
+
+-C, --gen-conf CONTENU +
+Génère un fichier de configuration factice à partir d'un +fichier de contenu existant. +Le fichier de configuration est écrit sur la sortie standard +et n'écrase pas un fichier existant. +Ce fichier de configuration contient également les informations +nécessaires pour reconstruire les points de montage du disque au +cas où vous perdriez l'intégralité du système. +
+
+
+
+
+
+-v, --verbose +
+Affiche plus d'informations à l'écran. +S'il est spécifié une fois, il affiche les fichiers exclus +et des statistiques supplémentaires. +Cette option n'a aucun effet sur les fichiers journaux. +
+
+
+
+
+
+-q, --quiet +
+Affiche moins d'informations à l'écran. +S'il est spécifié une fois, il supprime la barre de progression ; +deux fois, les opérations en cours ; trois fois, les messages +d'information ; quatre fois, les messages d'état. +Les erreurs fatales sont toujours imprimées à l'écran. +Cette option n'a aucun effet sur les fichiers journaux. +
+
+
+
+
+
+-H, --help +
+Affiche un écran d'aide court. +
+
+
+
+
+
+-V, --version +
+Affiche la version du programme. +
+
+
+
+
+

+Configuration +

+

SnapRAID nécessite un fichier de configuration pour savoir où se trouve +votre baie de disques et où stocker les informations de parité. +

Sous Unix, il utilise le fichier /usr/local/etc/snapraid.conf s'il existe, +sinon /etc/snapraid.conf. +Sous Windows, il utilise le fichier snapraid.conf dans le même +répertoire que snapraid.exe. +

Il doit contenir les options suivantes (sensibles à la casse) : +

+

+parity FICHIER [,FICHIER] ... +

+

Définit les fichiers à utiliser pour stocker les informations de parité. +La parité permet une protection contre une seule défaillance +de disque, similaire au RAID5. +

Vous pouvez spécifier plusieurs fichiers, qui doivent se trouver +sur des disques différents. +Lorsqu'un fichier ne peut plus grandir, le suivant est utilisé. +L'espace total disponible doit être au moins aussi grand que le +plus grand disque de données de la baie. +

Vous pouvez ajouter des fichiers de parité supplémentaires plus tard, +mais vous ne pouvez pas les réorganiser ni les supprimer. +

Garder les disques de parité réservés à la parité garantit qu'ils +ne deviennent pas fragmentés, améliorant les performances. +

Sous Windows, 256 Mo sont laissés inutilisés sur chaque disque pour +éviter l'avertissement concernant les disques pleins. +

Cette option est obligatoire et ne peut être utilisée qu'une seule fois. +

+
+

+(2,3,4,5,6)-parity FICHIER [,FICHIER] ... +

+

Définit les fichiers à utiliser pour stocker les informations de parité +supplémentaires. +

Pour chaque niveau de parité spécifié, un niveau de protection +supplémentaire est activé : +

    +
  • +2-parity active la double parité RAID6. +
  • +
  • +3-parity active la triple parité. +
  • +
  • +4-parity active la quadruple (quatre) parité. +
  • +
  • +5-parity active la penta (cinq) parité. +
  • +
  • +6-parity active l'hexa (six) parité. +
  • +
+

Chaque niveau de parité nécessite la présence de tous les niveaux +de parité précédents. +

Les mêmes considérations que pour l'option parity s'appliquent. +

Ces options sont facultatives et ne peuvent être utilisées qu'une seule fois. +

+
+

+z-parity FICHIER [,FICHIER] ... +

+

Définit un fichier et un format alternatifs pour stocker la triple parité. +

Cette option est une alternative à 3-parity, principalement destinée +aux processeurs bas de gamme comme ARM ou AMD Phenom, Athlon et Opteron +qui ne prennent pas en charge l'ensemble d'instructions SSSE3. Dans de +tels cas, elle offre de meilleures performances. +

Ce format est similaire mais plus rapide que celui utilisé par ZFS RAIDZ3. +Comme ZFS, il ne fonctionne pas au-delà de la triple parité. +

Lors de l'utilisation de 3-parity, vous serez averti s'il est +recommandé d'utiliser le format z-parity pour une amélioration des +performances. +

Il est possible de convertir d'un format à l'autre en ajustant +le fichier de configuration avec le fichier z-parity ou 3-parity souhaité +et en utilisant fix pour le recréer. +

+
+

+content FICHIER +

+

Définit le fichier à utiliser pour stocker la liste et les sommes de +contrôle de tous les fichiers présents dans votre baie de disques. +

Il peut être placé sur un disque utilisé pour les données, la parité, +ou tout autre disque disponible. +Si vous utilisez un disque de données, ce fichier est automatiquement +exclu du processus sync. +

Cette option est obligatoire et peut être utilisée plusieurs fois pour +enregistrer plusieurs copies du même fichier. +

Vous devez stocker au moins une copie pour chaque disque de parité +utilisé plus un. L'utilisation de copies supplémentaires ne nuit pas. +

+
+

+data NOM DOSSIER +

+

Définit le nom et le point de montage des disques de données dans +la baie. NOM est utilisé pour identifier le disque et doit +être unique. DOSSIER est le point de montage du disque dans le +système de fichiers. +

Vous pouvez modifier le point de montage au besoin, tant que +vous gardez le NOM fixe. +

Vous devriez utiliser une option pour chaque disque de données +de la baie. +

Vous pouvez renommer un disque plus tard en changeant le NOM directement +dans le fichier de configuration, puis en exécutant une commande sync. +Dans le cas d'un renommage, l'association est faite en utilisant l'UUID +stocké des disques. +

+
+

+extra NAME DIR +

+

Définit le nom et le point de montage de disques supplémentaires à +surveiller avec les commandes smart et probe. +

Ceci est utile pour surveiller des disques qui ne font pas partie de +la grappe mais qui sont nécessaires au fonctionnement du système, +comme le disque de démarrage. +

Notez que ces disques ne sont pas affectés par les commandes up et +down car ils sont censés toujours être en rotation. +

+
+

+nohidden +

+

Exclut tous les fichiers et répertoires cachés. +Sous Unix, les fichiers cachés sont ceux commençant par .. +Sous Windows, ce sont ceux avec l'attribut caché. +

+
+

+exclude/include MOTIF +

+

Définit les motifs de fichiers ou de répertoires à exclure ou à inclure +dans le processus de synchronisation. +Tous les motifs sont traités dans l'ordre spécifié. +

Si le premier motif qui correspond est un exclude (exclure), le fichier +est exclu. S'il s'agit d'un include (inclure), le fichier est inclus. +Si aucun motif ne correspond, le fichier est exclu si le dernier motif +spécifié est un include, ou inclus si le dernier motif +spécifié est un exclude. +

Voir la section MOTIF pour plus de détails sur les +spécifications de motifs. +

Cette option peut être utilisée plusieurs fois. +

+
+

+blocksize TAILLE_EN_KIBIOCTETS +

+

Définit la taille de bloc de base en kibioctets pour la parité. +Un kibioctet est de 1024 octets. +

La taille de bloc par défaut est de 256, ce qui devrait fonctionner +dans la plupart des cas. +

AVERTISSEMENT ! Cette option est réservée aux experts, et il est +fortement recommandé de ne pas modifier cette valeur. Pour modifier +cette valeur à l'avenir, vous devrez recréer l'intégralité de la parité ! +

Une raison d'utiliser une taille de bloc différente est si vous avez +beaucoup de petits fichiers, de l'ordre de millions. +

Pour chaque fichier, même s'il ne contient que quelques octets, un bloc +entier de parité est alloué, et avec de nombreux fichiers, cela peut +entraîner un espace de parité inutilisé important. +Lorsque vous remplissez complètement le disque de parité, vous n'êtes +pas autorisé à ajouter plus de fichiers aux disques de données. +Cependant, la parité gaspillée ne s'accumule pas sur les disques de +données. L'espace gaspillé résultant d'un grand nombre de fichiers +sur un disque de données limite uniquement la quantité de données +sur ce disque de données, pas les autres. +

À titre d'approximation, vous pouvez supposer que la moitié de la +taille de bloc est gaspillée pour chaque fichier. Par exemple, avec +100 000 fichiers et une taille de bloc de 256 Kio, vous gaspillerez +12,8 Go de parité, ce qui peut entraîner 12,8 Go d'espace en moins +disponible sur le disque de données. +

Vous pouvez vérifier la quantité d'espace gaspillé sur chaque disque +en utilisant status. +C'est la quantité d'espace que vous devez laisser libre sur les disques +de données ou utiliser pour les fichiers non inclus dans la baie. +Si cette valeur est négative, cela signifie que vous êtes près de +remplir la parité, et cela représente l'espace que vous pouvez encore +gaspiller. +

Pour éviter ce problème, vous pouvez utiliser une partition plus grande +pour la parité. Par exemple, si la partition de parité est 12,8 Go plus +grande que les disques de données, vous avez suffisamment d'espace +supplémentaire pour gérer jusqu'à 100 000 fichiers sur chaque disque +de données sans aucun espace gaspillé. +

Une astuce pour obtenir une partition de parité plus grande sous Linux +est de la formater avec la commande : +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Cela se traduit par environ 1,5 % d'espace supplémentaire, environ 60 Go +pour un disque de 4 To, ce qui permet environ 460 000 fichiers sur +chaque disque de données sans aucun espace gaspillé. +

+
+

+hashsize TAILLE_EN_OCTETS +

+

Définit la taille du hachage en octets pour les blocs enregistrés. +

La taille de hachage par défaut est de 16 octets (128 bits), +ce qui devrait fonctionner dans la plupart des cas. +

AVERTISSEMENT ! Cette option est réservée aux experts, et il est +fortement recommandé de ne pas modifier cette valeur. Pour modifier +cette valeur à l'avenir, vous devrez recréer l'intégralité de la parité ! +

Une raison d'utiliser une taille de hachage différente est si votre +système a une mémoire limitée. En règle générale, SnapRAID nécessite +généralement 1 Gio de RAM pour chaque 16 To de données dans la baie. +

Plus précisément, pour stocker les hachages des données, SnapRAID +nécessite environ TS*(1+HS)/BS octets de RAM, +où TS est la taille totale en octets de votre baie de disques, BS est la +taille de bloc en octets, et HS est la taille de hachage en octets. +

Par exemple, avec 8 disques de 4 To, une taille de bloc de 256 Kio +(1 Kio = 1024 octets) et une taille de hachage de 16, vous obtenez : +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1,93 Gio
+
+

En passant à une taille de hachage de 8, vous obtenez : +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1,02 Gio
+
+

En passant à une taille de bloc de 512, vous obtenez : +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0,96 Gio
+
+

En passant à la fois à une taille de hachage de 8 et à une taille de +bloc de 512, vous obtenez : +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 Gio
+
+
+
+

+autosave TAILLE_EN_GIGAOCTETS +

+

Enregistre automatiquement l'état lors de la synchronisation ou du +nettoyage après la quantité spécifiée de Go traités. +Cette option est utile pour éviter de redémarrer de longues commandes +sync à partir de zéro si elles sont interrompues par un plantage +de la machine ou tout autre événement. +

+
+

+temp_limit TEMPÉRATURE_CELSIUS +

+

Définit la température maximale autorisée du disque en Celsius. +Lorsqu'elle est spécifiée, SnapRAID vérifie périodiquement la +température de tous les disques à l'aide de l'outil smartctl. +Les températures actuelles des disques sont affichées pendant que +SnapRAID fonctionne. Si un disque dépasse cette limite, toutes les +opérations s'arrêtent et les disques sont arrêtés (mis en veille) +pendant la durée définie par l'option temp_sleep. Après la période +de veille, les opérations reprennent, pouvant s'arrêter à nouveau si +la limite de température est de nouveau atteinte. +

Pendant le fonctionnement, SnapRAID analyse également la courbe de +chauffe de chaque disque et estime la température stable à long terme +qu'ils sont censés atteindre si l'activité continue. L'estimation +n'est effectuée qu'après que la température du disque a augmenté +quatre fois, garantissant que suffisamment de points de données sont +disponibles pour établir une tendance fiable. +Cette température stable prédite est affichée entre parenthèses à +côté de la valeur actuelle et aide à évaluer si le refroidissement +du système est adéquat. Cette température estimée est uniquement à +titre informatif et n'a aucun effet sur le comportement de SnapRAID. +Les actions du programme sont basées uniquement sur les températures +réelles mesurées des disques. +

Pour effectuer cette analyse, SnapRAID a besoin d'une référence pour +la température du système. Il tente d'abord de la lire à partir des +capteurs matériels disponibles. Si aucun capteur système n'est +accessible, il utilise la température de disque la plus basse mesurée +au début de l'exécution comme référence de secours. +

Normalement, SnapRAID n'affiche que la température du disque le plus chaud. +Pour afficher la température de tous les disques, utilisez l'option +-A ou --stats. +

+
+

+temp_sleep TEMPS_EN_MINUTES +

+

Définit le temps de veille, en minutes, lorsque la limite de température +est atteinte. Pendant cette période, les disques restent arrêtés. +La valeur par défaut est de 5 minutes. +

+
+

+pool DOSSIER +

+

Définit le répertoire de mise en commun où la vue virtuelle de la +baie de disques est créée à l'aide de la commande pool. +

Le répertoire doit déjà exister. +

+
+

+share CHEMIN_UNC +

+

Définit le chemin UNC Windows requis pour accéder aux disques à distance. +

Si cette option est spécifiée, les liens symboliques créés dans le +répertoire du pool utilisent ce chemin UNC pour accéder aux disques. +Sans cette option, les liens symboliques générés utilisent uniquement +des chemins locaux, ce qui ne permet pas de partager le répertoire +du pool sur le réseau. +

Les liens symboliques sont formés en utilisant le chemin UNC spécifié, +en ajoutant le nom du disque tel que spécifié dans l'option data, +et en ajoutant enfin le répertoire et le nom du fichier. +

Cette option est requise uniquement pour Windows. +

+
+

+smartctl DISQUE/PARITÉ OPTIONS... +

+

Définit les options smartctl personnalisées pour obtenir les attributs +SMART de chaque disque. Cela peut être nécessaire pour les contrôleurs +RAID et certains disques USB qui ne peuvent pas être détectés +automatiquement. Le placeholder %s est remplacé par le nom du +périphérique, mais il est facultatif pour les périphériques fixes +comme les contrôleurs RAID. +

DISQUE est le même nom de disque spécifié dans l'option data. +PARITÉ est l'un des noms de parité : parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity ou z-parity. +

Dans les OPTIONS spécifiées, la chaîne %s est remplacée par le +nom du périphérique. Pour les contrôleurs RAID, le périphérique est +probablement fixe, et vous n'aurez peut-être pas besoin d'utiliser %s. +

Consultez la documentation smartmontools pour les options possibles : +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Par exemple : +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISQUE/PARITÉ ATTR [ATTR...] +

+

Ignore l'attribut SMART spécifié lors du calcul de la probabilité +de défaillance du disque. Cette option est utile si un disque signale +des valeurs inhabituelles ou trompeuses pour un attribut particulier. +

DISQUE est le même nom de disque spécifié dans l'option data. +PARITÉ est l'un des noms de parité : parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity ou z-parity. +La valeur spéciale * peut être utilisée pour ignorer l'attribut +sur tous les disques. +

Par exemple, pour ignorer l'attribut Current Pending Sector Count +sur tous les disques : +

+smartignore * 197
+
+

Pour l'ignorer uniquement sur le premier disque de parité : +

+smartignore parity 197
+
+
+
+

+Exemples +

+

Un exemple de configuration typique pour Unix est : +

+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
+
+

Un exemple de configuration typique pour Windows est : +

+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
+
+
+
+
+

+Motif (Pattern) +

+

Les motifs offrent un moyen flexible de filtrer les fichiers à inclure ou +à exclure. En utilisant des caractères de "globbing", vous pouvez définir des règles qui +correspondent à des noms de fichiers spécifiques ou à des structures de répertoires entières sans +lister chaque chemin manuellement. +

Le point d'interrogation ? correspond à n'importe quel caractère unique, sauf le +séparateur de répertoire. Cela le rend utile pour faire correspondre des noms de fichiers avec des +caractères variables tout en limitant le motif à un seul niveau de répertoire. +

L'étoile simple * correspond à n'importe quelle séquence de caractères, mais comme le +point d'interrogation, elle ne traverse jamais les frontières des répertoires. Elle s'arrête à la +barre oblique, ce qui la rend adaptée à la recherche de correspondances au sein d'un seul +composant de chemin. Il s'agit du comportement standard des jokers familier du +"globbing" shell. +

La double étoile ** est plus puissante, elle correspond à n'importe quelle séquence de +caractères, y compris les séparateurs de répertoires. Cela permet aux motifs de correspondre +sur plusieurs niveaux de répertoires. Lorsque ** apparaît directement intégré dans +un motif, il peut correspondre à zéro ou plusieurs caractères, y compris les barres obliques entre +le texte littéral environnant. +

L'utilisation la plus importante de ** est sous la forme spéciale /**/. Celle-ci correspond à +zéro ou plusieurs niveaux de répertoires complets, ce qui permet de faire correspondre des fichiers +à n'importe quelle profondeur dans une arborescence de répertoires sans connaître la structure exacte du chemin. +Par exemple, le motif src/**/main.js correspond à src/main.js (saut de +zéro répertoire), src/ui/main.js (saut d'un répertoire), et +src/ui/components/main.js (saut de deux répertoires). +

Les classes de caractères utilisant des crochets [] correspondent à un seul caractère d'un +ensemble ou d'une plage spécifiés. Comme les autres motifs à caractère unique, elles +ne correspondent pas aux séparateurs de répertoires. Les classes supportent les plages et la négation à l'aide +d'un point d'exclamation. +

La distinction fondamentale à retenir est que *, ? et les classes de caractères +respectent tous les limites des répertoires et ne correspondent qu'au sein d'un seul +composant de chemin, alors que ** est le seul motif qui peut correspondre à travers +les séparateurs de répertoires. +

Il existe quatre types de motifs différents : +

+
+
+FILE +
+Sélectionne n'importe quel fichier nommé FILE. +Ce motif s'applique uniquement aux fichiers, pas aux répertoires. +
+
+
+
+
+
+DIR/ +
+Sélectionne n'importe quel répertoire nommé DIR et tout son contenu. +Ce motif s'applique uniquement aux répertoires, pas aux fichiers. +
+
+
+
+
+
+/PATH/FILE +
+Sélectionne le chemin exact du fichier spécifié. Ce motif s'applique +uniquement aux fichiers, pas aux répertoires. +
+
+
+
+
+
+/PATH/DIR/ +
+Sélectionne le chemin exact du répertoire spécifié et tout son contenu. +Ce motif s'applique uniquement aux répertoires, pas aux fichiers. +
+
+
+

Lorsque vous spécifiez un chemin absolu commençant par /, il est +appliqué à la racine de la baie, et non à la racine du système +de fichiers local. +

Sous Windows, vous pouvez utiliser la barre oblique inverse \ au lieu +de la barre oblique /. +Les répertoires système Windows, les jonctions, les points de montage +et les autres répertoires spéciaux Windows sont traités comme des fichiers, +ce qui signifie que pour les exclure, vous devez utiliser une règle +de fichier, pas une règle de répertoire. +

Si le nom de fichier contient un caractère *, ?, [, +ou ], vous devez l'échapper pour éviter qu'il ne soit interprété +comme un caractère de globbing. Sous Unix, le caractère d'échappement +est \ ; sous Windows, c'est ^. +Lorsque le motif est sur la ligne de commande, vous devez doubler +le caractère d'échappement pour éviter qu'il ne soit interprété +par le shell de commande. +

Dans le fichier de configuration, vous pouvez utiliser différentes +stratégies pour filtrer les fichiers à traiter. +L'approche la plus simple consiste à n'utiliser que des règles +exclude pour supprimer tous les fichiers et répertoires que vous +ne voulez pas traiter. Par exemple : +

+# Exclut tout fichier nommé *.unrecoverable
+exclude *.unrecoverable
+# Exclut le répertoire racine /lost+found
+exclude /lost+found/
+# Exclut tout sous-répertoire nommé tmp
+exclude tmp/
+
+

L'approche opposée consiste à ne définir que les fichiers que vous +souhaitez traiter, en n'utilisant que des règles include. Par exemple : +

+# Inclut uniquement certains répertoires
+include /movies/
+include /musics/
+include /pictures/
+
+

L'approche finale consiste à mélanger les règles exclude et include. +Dans ce cas, l'ordre des règles est important. Les règles antérieures +ont préséance sur les règles ultérieures. +Pour simplifier, vous pouvez lister toutes les règles exclude +d'abord, puis toutes les règles include. Par exemple : +

+# Exclut tout fichier nommé *.unrecoverable
+exclude *.unrecoverable
+# Exclut tout sous-répertoire nommé tmp
+exclude tmp/
+# Inclut uniquement certains répertoires
+include /movies/
+include /musics/
+include /pictures/
+
+

Sur la ligne de commande, en utilisant l'option -f, vous ne pouvez +utiliser que des motifs include. Par exemple : +

+# Vérifie uniquement les fichiers .mp3.
+# Sous Unix, utilisez des guillemets pour éviter l'expansion
+# du globbing par le shell.
+snapraid -f "*.mp3" check
+
+

Sous Unix, lorsque vous utilisez des caractères de globbing sur la +ligne de commande, vous devez les mettre entre guillemets pour empêcher +le shell de les développer. +

+
+

+Ignorer des Fichiers (Ignore Files) +

+

En plus des règles globales du fichier de configuration, vous pouvez +placer des fichiers .snapraidignore dans n'importe quel répertoire de la grappe +pour définir des règles d'exclusion décentralisées. +

Les règles définies dans .snapraidignore sont appliquées après les règles du +fichier de configuration. Cela signifie qu'elles ont une priorité plus élevée et peuvent +être utilisées pour exclure des fichiers qui étaient précédemment inclus par la +configuration globale. En pratique, si une règle locale correspond, le fichier est +exclu quels que soient les paramètres d'inclusion globaux. +

La logique des motifs dans .snapraidignore reflète la configuration globale +mais ancre les motifs au répertoire où se trouve le fichier : +

+
+
+FILE +
+Sélectionne n'importe quel fichier nommé FILE dans ce répertoire ou en dessous. +Cela suit les mêmes règles de globbing que le motif global. +
+
+
+
+
+
+DIR/ +
+Sélectionne n'importe quel répertoire nommé DIR et tout son contenu, +résidant dans ce répertoire ou en dessous. +
+
+
+
+
+
+/PATH/FILE +
+Sélectionne le fichier exact spécifié par rapport à l'emplacement +du fichier .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Sélectionne le répertoire exact spécifié et tout son contenu, +par rapport à l'emplacement du fichier .snapraidignore. +
+
+
+

Contrairement à la configuration globale, les fichiers .snapraidignore ne prennent +en charge que les règles d'exclusion ; vous ne pouvez pas utiliser de motifs include ou de négation (!). +

Par exemple, si vous avez un .snapraidignore dans /mnt/disk1/projects/ : +

+# Exclut UNIQUEMENT /mnt/disk1/projects/output.bin
+/output.bin
+# Exclut tout répertoire nommé build dans projects/
+build/
+# Exclut tout fichier .tmp dans projects/ ou ses sous-dossiers
+*.tmp
+
+
+
+

+Contenu (Content) +

+

SnapRAID stocke la liste et les sommes de contrôle de vos fichiers +dans le fichier de contenu. +

Il s'agit d'un fichier binaire qui répertorie tous les fichiers +présents dans votre baie de disques, ainsi que toutes les sommes +de contrôle pour vérifier leur intégrité. +

Ce fichier est lu et écrit par les commandes sync et scrub et +lu par les commandes fix, check et status. +

+
+

+Parité (Parity) +

+

SnapRAID stocke les informations de parité de votre baie dans +les fichiers de parité. +

Ce sont des fichiers binaires contenant la parité calculée de tous les +blocs définis dans le fichier content. +

Ces fichiers sont lus et écrits par les commandes sync et fix et +lus uniquement par les commandes scrub et check. +

+
+

+Encodage +

+

SnapRAID sous Unix ignore tout encodage. Il lit et stocke les +noms de fichiers avec le même encodage utilisé par le système +de fichiers. +

Sous Windows, tous les noms lus à partir du système de fichiers sont +convertis et traités au format UTF-8. +

Pour que les noms de fichiers soient imprimés correctement, vous devez +définir la console Windows en mode UTF-8 avec la commande chcp 65001 +et utiliser une police TrueType comme Lucida Console comme police +de console. +Cela n'affecte que les noms de fichiers imprimés ; si vous +redirigez la sortie de la console vers un fichier, le fichier +résultant est toujours au format UTF-8. +

+
+

+Droits d'auteur (Copyright) +

+

Ce fichier est Copyright (C) 2025 Andrea Mazzoleni +

+
+

+Voir aussi (See Also) +

+

snapraid_log(1), snapraidd(1) +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-it.html b/beta/manual-it.html new file mode 100644 index 00000000..05043e5f --- /dev/null +++ b/beta/manual-it.html @@ -0,0 +1,2182 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Sinossi +

+
+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]
+
+
+
+

+Descrizione +

+

SnapRAID è un programma di backup progettato per array di dischi, che +memorizza informazioni di parità per il recupero dati in caso di guasto +fino a sei dischi. +

Destinato principalmente a centri multimediali domestici con file grandi +e che cambiano raramente, SnapRAID offre diverse funzionalità: +

    +
  • +È possibile utilizzare dischi già pieni di file senza la necessità +di riformattarli, accedendovi come al solito. +
  • +
  • +Tutti i dati sono sottoposti ad hashing per garantire l'integrità dei +dati e prevenire la corruzione silente. +
  • +
  • +Quando il numero di dischi guasti supera il conteggio di parità, +la perdita di dati è confinata ai dischi interessati; i dati sugli +altri dischi rimangono accessibili. +
  • +
  • +Se si eliminano accidentalmente dei file su un disco, il recupero +è possibile. +
  • +
  • +I dischi possono avere dimensioni diverse. +
  • +
  • +È possibile aggiungere dischi in qualsiasi momento. +
  • +
  • +SnapRAID non blocca i dati; è possibile smettere di usarlo in qualsiasi +momento senza riformattare o spostare i dati. +
  • +
  • +Per accedere a un file, è necessario far girare solo un singolo disco, +risparmiando energia e riducendo il rumore. +
  • +
+

Per maggiori informazioni, si prega di visitare il sito ufficiale SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Limitazioni +

+

SnapRAID è un ibrido tra un programma RAID e un programma di backup, +che mira a combinare i migliori vantaggi di entrambi. Tuttavia, ha +alcune limitazioni che si dovrebbero considerare prima di usarlo. +

La limitazione principale è che se un disco si guasta e non si è +effettuato un sync di recente, potrebbe non essere possibile recuperare +completamente. +Più specificamente, potrebbe non essere possibile recuperare fino alla +dimensione dei file modificati o eliminati dall'ultima operazione di sync. +Ciò accade anche se i file modificati o eliminati non si trovano sul +disco guasto. Questo è il motivo per cui SnapRAID è più adatto per dati +che cambiano raramente. +

D'altra parte, i file appena aggiunti non impediscono il recupero dei +file già esistenti. Si perderanno solo i file aggiunti di recente se si +trovano sul disco guasto. +

Altre limitazioni di SnapRAID sono: +

    +
  • +Con SnapRAID, si hanno ancora file system separati per ogni disco. +Con RAID, si ottiene un unico grande file system. +
  • +
  • +SnapRAID non esegue lo striping dei dati. +Con RAID, si ottiene un aumento di velocità con lo striping. +
  • +
  • +SnapRAID non supporta il recupero in tempo reale. +Con RAID, non si deve smettere di lavorare quando un disco si guasta. +
  • +
  • +SnapRAID può recuperare i dati solo da un numero limitato di guasti +del disco. +Con un backup, è possibile recuperare da un guasto completo +dell'intero array di dischi. +
  • +
  • +Vengono salvati solo nomi di file, timestamp, symlink e hardlink. +Permessi, proprietà e attributi estesi non vengono salvati. +
  • +
+
+
+

+Iniziare +

+

Per usare SnapRAID, è necessario prima selezionare un disco nell'array +di dischi da dedicare alle informazioni di parity (parità). Con un +disco per la parità, si sarà in grado di recuperare da un singolo guasto +del disco, in modo simile a RAID5. +

Se si desidera recuperare da più guasti del disco, in modo simile a RAID6, +è necessario riservare dischi aggiuntivi per la parità. Ogni disco di +parità aggiuntivo consente il recupero da un guasto in più del disco. +

Come dischi di parità, è necessario scegliere i dischi più grandi +dell'array, poiché le informazioni di parità possono crescere fino alle +dimensioni del più grande disco dati nell'array. +

Questi dischi saranno dedicati alla memorizzazione dei file di parity. +Non si dovrebbero memorizzare i propri dati su di essi. +

Quindi, è necessario definire i dischi data (dati) che si desidera +proteggere con SnapRAID. La protezione è più efficace se questi dischi +contengono dati che cambiano raramente. Per questo motivo, è meglio +NON includere il disco C:\ di Windows o le directory Unix /home, /var, +e /tmp. +

L'elenco dei file viene salvato nei file content (contenuto), di solito +memorizzati sui dischi dati, di parità o di avvio. +Questo file contiene i dettagli del backup, inclusi tutti i checksum +per verificarne l'integrità. +Il file content viene memorizzato in più copie e ogni copia deve +essere su un disco diverso per garantire che, anche in caso di guasti +multipli del disco, sia disponibile almeno una copia. +

Ad esempio, supponiamo di essere interessati a un solo livello di +protezione con parità e che i dischi si trovino in: +

+/mnt/diskp <- disco selezionato per la parità
+/mnt/disk1 <- primo disco da proteggere
+/mnt/disk2 <- secondo disco da proteggere
+/mnt/disk3 <- terzo disco da proteggere
+
+

È necessario creare il file di configurazione /etc/snapraid.conf con +le seguenti opzioni: +

+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/
+
+

Se si è su Windows, si dovrebbe usare il formato del percorso di Windows, +con lettere di unità e backslash invece di slash. +

+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\
+
+

Se si hanno molti dischi e si esauriscono le lettere di unità, è +possibile montare i dischi direttamente nelle sottocartelle. Vedi: +

+https://www.google.com/search?q=Windows+mount+point
+
+

A questo punto, si è pronti per eseguire il comando sync per costruire +le informazioni di parità. +

+snapraid sync
+
+

Questo processo può richiedere diverse ore la prima volta, a seconda +delle dimensioni dei dati già presenti sui dischi. Se i dischi sono +vuoti, il processo è immediato. +

È possibile interromperlo in qualsiasi momento premendo Ctrl+C e, alla +prossima esecuzione, riprenderà da dove è stato interrotto. +

Quando questo comando è completato, i dati sono SICURI. +

Ora è possibile iniziare a usare l'array come si desidera e aggiornare +periodicamente le informazioni di parità eseguendo il comando sync. +

+

+Scrubbing +

+

Per controllare periodicamente i dati e la parità per gli errori, è +possibile eseguire il comando scrub. +

+snapraid scrub
+
+

Questo comando confronta i dati nell'array con l'hash calcolato +durante il comando sync per verificarne l'integrità. +

Ogni esecuzione del comando controlla circa l'8% dell'array, escludendo +i dati già sottoposti a scrub nei 10 giorni precedenti. +È possibile utilizzare l'opzione -p, --plan per specificare un importo +diverso e l'opzione -o, --older-than per specificare un'età diversa +in giorni. +Ad esempio, per controllare il 5% dell'array per blocchi più vecchi di +20 giorni, usare: +

+snapraid -p 5 -o 20 scrub
+
+

Se vengono trovati errori silenti o di input/output durante il processo, +i blocchi corrispondenti vengono contrassegnati come bad (cattivi) nel +file content ed elencati nel comando status. +

+snapraid status
+
+

Per correggerli, è possibile utilizzare il comando fix, filtrando +i blocchi bad con l'opzione -e, --filter-error: +

+snapraid -e fix
+
+

Al prossimo scrub, gli errori scompariranno dal report status +se sono stati veramente corretti. Per renderlo più veloce, è possibile +utilizzare -p bad per eseguire lo scrub solo dei blocchi contrassegnati +come bad. +

+snapraid -p bad scrub
+
+

L'esecuzione di scrub su un array non sincronizzato può riportare +errori causati da file rimossi o modificati. Questi errori sono riportati +nell'output di scrub, ma i blocchi correlati non sono contrassegnati +come bad. +

+
+

+Pooling +

+

Nota: La funzionalità di pooling descritta di seguito è stata +sostituita dallo strumento mergerfs, che è ora l'opzione consigliata +per gli utenti Linux nella comunità SnapRAID. Mergefs fornisce un modo +più flessibile ed efficiente per raggruppare più unità in un singolo +punto di montaggio unificato, consentendo un accesso trasparente ai +file attraverso l'array senza fare affidamento sui collegamenti +simbolici. Si integra bene con SnapRAID per la protezione della parità +ed è comunemente usato in configurazioni come OpenMediaVault (OMV) o +NAS personalizzati. +

Per avere tutti i file nell'array mostrati nello stesso albero di +directory, è possibile abilitare la funzionalità di pooling. Crea +una vista virtuale di sola lettura di tutti i file nell'array +utilizzando collegamenti simbolici. +

È possibile configurare la directory di pooling nel file di +configurazione con: +

+pool /pool
+
+

o, se si è su Windows, con: +

+pool C:\pool
+
+

e quindi eseguire il comando pool per creare o aggiornare la +vista virtuale. +

+snapraid pool
+
+

Se si sta utilizzando una piattaforma Unix e si desidera condividere +questa directory sulla rete con macchine Windows o Unix, è necessario +aggiungere le seguenti opzioni al file /etc/samba/smb.conf: +

+# Nella sezione globale di smb.conf
+unix extensions = no
+
+
+# Nella sezione di condivisione di smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

In Windows, la condivisione di collegamenti simbolici su una rete +richiede che i client li risolvano da remoto. Per abilitare questo, oltre +a condividere la directory pool, è necessario condividere anche tutti i +dischi in modo indipendente, utilizzando i nomi dei dischi definiti nel +file di configurazione come punti di condivisione. È inoltre necessario +specificare nell'opzione share del file di configurazione il percorso +UNC di Windows che i client remoti devono utilizzare per accedere a +questi dischi condivisi. +

Ad esempio, operando da un server chiamato darkstar, è possibile +utilizzare le opzioni: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

e condividere le seguenti directory sulla rete: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

per consentire ai client remoti di accedere a tutti i file in +\\darkstar\pool. +

Potrebbe anche essere necessario configurare i client remoti per +abilitare l'accesso ai symlink remoti con il comando: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Annullamento Eliminazione +

+

SnapRAID funziona più come un programma di backup che come un sistema RAID +e può essere utilizzato per ripristinare o annullare l'eliminazione dei +file al loro stato precedente utilizzando l'opzione -f, --filter: +

+snapraid fix -f FILE
+
+

o per una directory: +

+snapraid fix -f DIR/
+
+

È anche possibile usarlo per recuperare solo i file eliminati +accidentalmente all'interno di una directory utilizzando l'opzione -m, +--filter-missing, che ripristina solo i file mancanti, lasciando tutti +gli altri intatti. +

+snapraid fix -m -f DIR/
+
+

O per recuperare tutti i file eliminati su tutte le unità con: +

+snapraid fix -m
+
+
+
+

+Recupero +

+

È successo il peggio e si è perso uno o più dischi! +

NON FARSI PRENDERE DAL PANICO! Sarà possibile recuperarli! +

La prima cosa da fare è evitare ulteriori modifiche all'array di dischi. +Disabilitare qualsiasi connessione remota ad esso e qualsiasi processo +pianificato, incluso qualsiasi sync o scrub notturno pianificato di SnapRAID. +

Quindi procedere con i seguenti passaggi. +

+

+PASSO 1 -> Riconfigurazione +

+

È necessario un po' di spazio per recuperare, idealmente su dischi di +riserva aggiuntivi, ma un disco USB esterno o un disco remoto saranno +sufficienti. +

Modificare il file di configurazione SnapRAID per far puntare l'opzione +data o parity del disco guasto a una posizione con spazio vuoto +sufficiente per recuperare i file. +

Ad esempio, se il disco d1 è guasto, cambiare da: +

+data d1 /mnt/disk1/
+
+

a: +

+data d1 /mnt/new_spare_disk/
+
+

Se il disco da recuperare è un disco di parità, aggiornare l'opzione +parity appropriata. +Se si hanno più dischi guasti, aggiornare tutte le loro opzioni di +configurazione. +

+
+

+PASSO 2 -> Correzione (Fix) +

+

Eseguire il comando fix, memorizzando il log in un file esterno con: +

+snapraid -d NAME -l fix.log fix
+
+

Dove NAME è il nome del disco, come d1 nel nostro esempio precedente. +Se il disco da recuperare è un disco di parità, usare i nomi parity, +2-parity, ecc. +Se si hanno più dischi guasti, usare più opzioni -d per specificarli tutti. +

Questo comando richiederà molto tempo. +

Assicurarsi di avere alcuni gigabyte liberi per memorizzare il file +fix.log. Eseguirlo da un disco con spazio libero sufficiente. +

Ora si è recuperato tutto ciò che è recuperabile. Se alcuni file sono +parzialmente o totalmente irrecuperabili, verranno rinominati aggiungendo +l'estensione .unrecoverable. +

È possibile trovare un elenco dettagliato di tutti i blocchi +irrecuperabili nel file fix.log controllando tutte le righe che iniziano +con unrecoverable:. +

Se non si è soddisfatti del recupero, è possibile riprovare tutte le +volte che si desidera. +

Ad esempio, se si sono rimossi file dall'array dopo l'ultimo sync, +questo può comportare che alcuni file non vengano recuperati. +In questo caso, è possibile riprovare il fix usando l'opzione -i, +--import, specificando dove si trovano ora questi file per includerli +di nuovo nel processo di recupero. +

Se si è soddisfatti del recupero, è possibile procedere oltre, +ma notare che dopo la sincronizzazione, non è più possibile riprovare +il comando fix! +

+
+

+PASSO 3 -> Controllo (Check) +

+

Come controllo cauto, è ora possibile eseguire un comando check per +assicurarsi che tutto sia corretto sul disco recuperato. +

+snapraid -d NAME -a check
+
+

Dove NAME è il nome del disco, come d1 nel nostro esempio precedente. +

Le opzioni -d e -a dicono a SnapRAID di controllare solo il disco +specificato e di ignorare tutti i dati di parità. +

Questo comando richiederà molto tempo, ma se non si è eccessivamente +cauti, è possibile saltarlo. +

+
+

+PASSO 4 -> Sincronizzazione (Sync) +

+

Eseguire il comando sync per risincronizzare l'array con il nuovo disco. +

+snapraid sync
+
+

Se tutto è recuperato, questo comando è immediato. +

+
+
+
+

+Comandi +

+

SnapRAID fornisce alcuni semplici comandi che consentono di: +

    +
  • +Stampare lo stato dell'array -> status +
  • +
  • +Controllare i dischi -> smart, probe, up, down +
  • +
  • +Effettuare un backup/snapshot -> sync +
  • +
  • +Controllare periodicamente i dati -> scrub +
  • +
  • +Ripristinare l'ultimo backup/snapshot -> fix. +
  • +
+

I comandi devono essere scritti in minuscolo. +

+

+status +

+

Stampa un riepilogo dello stato dell'array di dischi. +

Include informazioni sulla frammentazione della parità, quanto sono +vecchi i blocchi senza essere controllati e tutti gli errori silenti +registrati incontrati durante lo scrubbing. +

Le informazioni presentate si riferiscono all'ultima volta che si è +eseguito sync. Le modifiche successive non vengono prese in +considerazione. +

Se sono stati rilevati blocchi bad, vengono elencati i loro numeri +di blocco. Per correggerli, è possibile utilizzare il comando fix -e. +

Mostra anche un grafico che rappresenta l'ultima volta che ogni blocco +è stato sottoposto a scrub o sincronizzato. I blocchi sottoposti a scrub +sono mostrati con *, i blocchi sincronizzati ma non ancora sottoposti +a scrub con o. +

Nulla viene modificato. +

+
+

+smart +

+

Stampa un report SMART di tutti i dischi nel sistema. +

Include una stima della probabilità di guasto nel prossimo anno, +consentendo di pianificare sostituzioni di manutenzione di dischi +che mostrano attributi sospetti. +

Questa stima della probabilità è ottenuta correlando gli attributi +SMART dei dischi con i dati Backblaze disponibili all'indirizzo: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Se SMART segnala che un disco sta per guastarsi, viene stampato FAIL +o PREFAIL per quel disco e SnapRAID restituisce un errore. +In questo caso, si raccomanda vivamente la sostituzione immediata del +disco. +

Altre possibili stringhe di stato sono: +

+
+
+logfail +
+In passato, alcuni attributi erano inferiori alla +soglia. +
+
+
+
+logerr +
+Il log degli errori del dispositivo contiene errori. +
+
+
+
+selferr +
+Il log dell'autotest del dispositivo contiene errori. +
+
+
+

Se viene specificata l'opzione -v, --verbose, viene fornita un'analisi +statistica più approfondita. Questa analisi può aiutare a decidere se +è necessaria più o meno parità. +

Questo comando utilizza lo strumento smartctl ed è equivalente +all'esecuzione di smartctl -a su tutti i dispositivi. +

Se i dispositivi non vengono rilevati automaticamente correttamente, è +possibile specificare un comando personalizzato utilizzando l'opzione +smartctl nel file di configurazione. +

Nulla viene modificato. +

+
+

+probe +

+

Stampa lo stato POWER di tutti i dischi nel sistema. +

Standby significa che il disco non sta girando. Active significa +che il disco sta girando. +

Questo comando utilizza lo strumento smartctl ed è equivalente +all'esecuzione di smartctl -n standby -i su tutti i dispositivi. +

Se i dispositivi non vengono rilevati automaticamente correttamente, è +possibile specificare un comando personalizzato utilizzando l'opzione +smartctl nel file di configurazione. +

Nulla viene modificato. +

+
+

+up +

+

Fa girare tutti i dischi dell'array. +

È possibile far girare solo dischi specifici utilizzando l'opzione -d, +--filter-disk. +

Far girare tutti i dischi contemporaneamente richiede molta energia. +Assicurarsi che l'alimentatore possa sostenerlo. +

Nulla viene modificato. +

+
+

+down +

+

Ferma tutti i dischi dell'array. +

Questo comando utilizza lo strumento smartctl ed è equivalente +all'esecuzione di smartctl -s standby,now su tutti i dispositivi. +

È possibile fermare solo dischi specifici utilizzando l'opzione -d, +--filter-disk. +

Per fermare automaticamente in caso di errore, è possibile utilizzare +l'opzione -s, --spin-down-on-error con qualsiasi altro comando, +che è equivalente all'esecuzione manuale di down quando si verifica +un errore. +

Nulla viene modificato. +

+
+

+diff +

+

Elenca tutti i file modificati dall'ultimo sync che devono avere i +loro dati di parità ricalcolati. +

Questo comando non controlla i dati del file, ma solo il timestamp +del file, le dimensioni e l'inode. +

Dopo aver elencato tutti i file modificati, viene presentato un +riepilogo delle modifiche, raggruppate per: +

+
+
+equal +
+File invariati rispetto a prima. +
+
+
+
+added +
+File aggiunti che non erano presenti prima. +
+
+
+
+removed +
+File rimossi. +
+
+
+
+updated +
+File con dimensioni o timestamp diversi, il che +significa che sono stati modificati. +
+
+
+
+moved +
+File spostati in una directory diversa sullo stesso +disco. Sono identificati dall'avere lo stesso nome, +dimensioni, timestamp e inode, ma una directory diversa. +
+
+
+
+copied +
+File copiati sullo stesso disco o su un disco diverso dove il +file originale esiste ancora. +Sono identificati dall'avere lo stesso nome, dimensione e timestamp. +Se il timestamp al sottomultiplo del secondo è zero, +il percorso completo deve corrispondere per essere +identificato, non solo il nome. +
+
+
+
+relocated +
+File spostati sullo stesso disco o su un disco +diverso dove l'originale è scomparso. +Sono identificati dall' avere lo stesso nome, dimensione +e timestamp. +Se il timestamp al sottomultiplo del secondo è zero, +il percorso completo deve corrispondere per essere +identificato. +A differenza dei file moved sullo stesso disco, +i file ricollocati hanno un inode diverso. +
+
+
+
+restored +
+File con un inode diverso ma directory, +nome, dimensione e timestamp corrispondenti. +Questi sono solitamente file ripristinati dopo essere +stati eliminati. +
+
+
+

Se è richiesto un sync, il codice di ritorno del processo è 2, +invece del predefinito 0. Il codice di ritorno 1 è utilizzato per una +condizione di errore generica. +

Nulla viene modificato. +

+
+

+sync +

+

Aggiorna le informazioni di parità. Tutti i file modificati +nell'array di dischi vengono letti e i dati di parità +corrispondenti vengono aggiornati. +

È possibile interrompere questo processo in qualsiasi momento +premendo Ctrl+C, senza perdere il lavoro già svolto. +Alla prossima esecuzione, il processo sync riprenderà da dove +è stato interrotto. +

Se vengono trovati errori silenti o di input/output durante il processo, +i blocchi corrispondenti vengono contrassegnati come bad. +

I file sono identificati dal percorso e/o dall'inode e controllati +per dimensione e timestamp. +Se la dimensione o il timestamp del file differiscono, i dati di parità +vengono ricalcolati per l'intero file. +Se il file viene spostato o rinominato sullo stesso disco, +mantenendo lo stesso inode, la parità non viene ricalcolata. +Se il file viene spostato su un altro disco, la parità viene ricalcolata, +ma le informazioni di hash precedentemente calcolate vengono mantenute. +

I file content e parity vengono modificati se necessario. +I file nell'array NON vengono modificati. +

+
+

+scrub +

+

Esegue lo scrub dell'array, controllando la presenza di errori silenti +o di input/output nei dischi dati e di parità. +

Ogni invocazione controlla circa l'8% dell'array, escludendo +i dati già sottoposti a scrub negli ultimi 10 giorni. +Ciò significa che eseguire lo scrubbing una volta alla settimana +garantisce che ogni bit di dati venga controllato almeno una volta +ogni tre mesi. +

È possibile definire un piano o una quantità di scrub diversa +utilizzando l'opzione -p, --plan, che accetta: +bad - Esegue lo scrub dei blocchi contrassegnati come bad. +new - Esegue lo scrub dei blocchi appena sincronizzati non ancora +

sottoposti a scrub. +

+
+
+full +
+Esegue lo scrub di tutto. +
+
+
+
+0-100 +
+Esegue lo scrub della percentuale specificata di blocchi. +
+
+
+

Se si specifica una quantità percentuale, è anche possibile utilizzare +l'opzione -o, --older-than per definire quanto deve essere vecchio +il blocco. +I blocchi più vecchi vengono sottoposti a scrub per primi, +garantendo un controllo ottimale. +Se si desidera eseguire lo scrub solo dei blocchi appena sincronizzati +non ancora sottoposti a scrub, utilizzare l'opzione -p new. +

Per ottenere i dettagli dello stato dello scrub, utilizzare il comando +status. +

Per qualsiasi errore silente o di input/output trovato, i blocchi +corrispondenti vengono contrassegnati come bad nel file content. +Questi blocchi bad sono elencati in status e possono essere corretti +con fix -e. +Dopo la correzione, al prossimo scrub, verranno ricontrollati e, se +trovati corretti, il contrassegno bad verrà rimosso. +Per eseguire lo scrub solo dei blocchi bad, è possibile utilizzare +il comando scrub -p bad. +

Si consiglia di eseguire scrub solo su un array sincronizzato per +evitare errori segnalati causati da dati non sincronizzati. Questi +errori sono riconosciuti come non essendo errori silenti e i blocchi non +vengono contrassegnati come bad, ma tali errori sono riportati +nell'output del comando. +

Il file content viene modificato per aggiornare l'ora dell'ultimo +controllo per ogni blocco e per contrassegnare i blocchi bad. +I file parity NON vengono modificati. +I file nell'array NON vengono modificati. +

+
+

+fix +

+

Corregge tutti i file e i dati di parità. +

Tutti i file e i dati di parità vengono confrontati con lo stato +snapshot salvato nell'ultimo sync. +Se viene trovata una differenza, viene ripristinata allo snapshot +memorizzato. +

ATTENZIONE! Il comando fix non differenzia tra errori e modifiche +intenzionali. Ripristina incondizionatamente lo stato del file +all'ultimo sync. +

Se non viene specificata nessun'altra opzione, l'intero array viene +elaborato. Utilizzare le opzioni di filtro per selezionare un +sottoinsieme di file o dischi su cui operare. +

Per correggere solo i blocchi contrassegnati come bad durante sync +e scrub, utilizzare l'opzione -e, --filter-error. +A differenza di altre opzioni di filtro, questa applica correzioni solo +ai file che sono invariati dall'ultimo sync. +

SnapRAID rinomina tutti i file che non possono essere corretti aggiungendo +l'estensione .unrecoverable. +

Prima di correggere, l'intero array viene scansionato per trovare +eventuali file spostati dall'ultima operazione di sync. +Questi file sono identificati dal loro timestamp, ignorando il loro nome +e la directory, e vengono utilizzati nel processo di recupero se +necessario. +Se alcuni di essi sono stati spostati al di fuori dell'array, è possibile +utilizzare l'opzione -i, --import per specificare directory aggiuntive +da scansionare. +

I file sono identificati solo dal percorso, non dall'inode. +

Il file content NON viene modificato. +I file parity vengono modificati se necessario. +I file nell'array vengono modificati se necessario. +

+
+

+check +

+

Verifica tutti i file e i dati di parità. +

Funziona come fix, ma simula solo un recupero e nessuna modifica +viene scritta nell'array. +

Questo comando è destinato principalmente alla verifica manuale, +ad esempio dopo un processo di recupero o in altre condizioni speciali. +Per i controlli periodici e pianificati, utilizzare scrub. +

Se si utilizza l'opzione -a, --audit-only, viene controllato solo +l'hash dei file e i dati di parità vengono ignorati per un'esecuzione +più veloce. +

I file sono identificati solo dal percorso, non dall'inode. +

Nulla viene modificato. +

+
+

+list +

+

Elenca tutti i file contenuti nell'array al momento dell'ultimo +sync. +

Con -v o --verbose, viene mostrato anche il tempo sotto il secondo. +

Nulla viene modificato. +

+
+

+dup +

+

Elenca tutti i file duplicati. Due file sono considerati uguali se i +loro hash corrispondono. I dati del file non vengono letti; vengono +utilizzati solo gli hash precalcolati. +

Nulla viene modificato. +

+
+

+pool +

+

Crea o aggiorna una vista virtuale di tutti +i file nell'array di dischi nella directory di pooling. +

I file non vengono copiati ma collegati utilizzando +collegamenti simbolici. +

Durante l'aggiornamento, tutti i collegamenti simbolici esistenti +e le sottodirectory vuote vengono eliminati e sostituiti con la nuova +vista dell'array. Qualsiasi altro file regolare viene lasciato al suo posto. +

Nulla viene modificato al di fuori della directory pool. +

+
+

+devices +

+

Stampa i dispositivi di basso livello utilizzati dall'array. +

Questo comando visualizza le associazioni dei dispositivi nell'array +ed è principalmente destinato come interfaccia script. +

Le prime due colonne sono l'ID e il percorso del dispositivo di basso +livello. Le due colonne successive sono l'ID e il percorso del dispositivo +di alto livello. L'ultima colonna è il nome del disco nell'array. +

Nella maggior parte dei casi, si ha un dispositivo di basso livello per +ogni disco nell'array, ma in alcune configurazioni più complesse, si +potrebbe avere più dispositivi di basso livello utilizzati da un singolo +disco nell'array. +

Nulla viene modificato. +

+
+

+touch +

+

Imposta un timestamp arbitrario sotto il secondo per tutti i file +che lo hanno impostato a zero. +

Questo migliora la capacità di SnapRAID di riconoscere i file +spostati e copiati, poiché rende il timestamp quasi unico, +riducendo possibili duplicati. +

Più specificamente, se il timestamp sotto il secondo non è zero, +un file spostato o copiato viene identificato come tale se corrisponde +al nome, alle dimensioni e al timestamp. Se il timestamp sotto il secondo +è zero, è considerato una copia solo se il percorso completo, +le dimensioni e il timestamp corrispondono tutti. +

Il timestamp di precisione al secondo non viene modificato, +quindi tutte le date e gli orari dei file saranno conservati. +

+
+

+rehash +

+

Pianifica un rehash dell'intero array. +

Questo comando cambia il tipo di hash utilizzato, in genere quando +si esegue l'aggiornamento da un sistema a 32 bit a uno a 64 bit, per +passare da MurmurHash3 al più veloce SpookyHash. +

Se si sta già utilizzando l'hash ottimale, questo comando non fa +nulla e informa che non è necessaria alcuna azione. +

Il rehash non viene eseguito immediatamente ma avviene +progressivamente durante sync e scrub. +

È possibile controllare lo stato del rehash utilizzando status. +

Durante il rehash, SnapRAID mantiene la piena funzionalità, +con l'unica eccezione che dup non è in grado di rilevare file +duplicati utilizzando un hash diverso. +

+
+

+locate +

+

Individua i file memorizzati nei dischi di parità. Per ogni file corrispondente, +stampa la sua posizione all'interno del file di parità e il numero di frammenti +che occupa. +

È possibile utilizzare l'opzione -t, --tail per limitare l'operazione ai file +che occupano la porzione di coda specificata della parità. +Se si desidera riallocare questi file, è possibile utilizzare l'opzione +-W, --force-realloc-tail. +

Si tenga presente che tali file non saranno protetti dalla parità durante +il processo di riallocazione. +

+
+
+

+Opzioni +

+

SnapRAID fornisce le seguenti opzioni: +

+
+
+-c, --conf CONFIG +
+Seleziona il file di configurazione da utilizzare. Se non +specificato, in Unix utilizza il file /usr/local/etc/snapraid.conf +se esiste, altrimenti /etc/snapraid.conf. +In Windows, utilizza il file snapraid.conf nella stessa +directory di snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtra i file da elaborare in check e fix. +Vengono elaborati solo i file che corrispondono al modello +specificato. +Questa opzione può essere utilizzata più volte. +Vedere la sezione PATTERN per maggiori dettagli sulle +specifiche del modello. +In Unix, assicurarsi che i caratteri di globbing siano citati +se usati. +Questa opzione può essere utilizzata solo con check e fix. +Non può essere utilizzata con sync e scrub, poiché elaborano +sempre l'intero array. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtra i dischi da elaborare in check, fix, up e down. +È necessario specificare un nome di disco come definito nel file +di configurazione. +È anche possibile specificare i dischi di parità con i nomi: +parity, 2-parity, 3-parity, ecc., per limitare le operazioni +a un disco di parità specifico. +Se si combinano più opzioni --filter, --filter-disk e +--filter-missing, vengono selezionati solo i file che corrispondono +a tutti i filtri. +Questa opzione può essere utilizzata più volte. +Questa opzione può essere utilizzata solo con check, fix, +up e down. +Non può essere utilizzata con sync e scrub, poiché elaborano +sempre l'intero array. +
+
+
+
+
+
+-m, --filter-missing +
+Filtra i file da elaborare in check e fix. +Vengono elaborati solo i file mancanti o eliminati dall'array. +Quando usato con fix, questo agisce come un comando di +undelete (annullamento eliminazione). +Se si combinano più opzioni --filter, --filter-disk e +--filter-missing, vengono selezionati solo i file che corrispondono +a tutti i filtri. +Questa opzione può essere utilizzata solo con check e fix. +Non può essere utilizzata con sync e scrub, poiché elaborano +sempre l'intero array. +
+
+
+
+
+
+-e, --filter-error +
+Elabora i file con errori in check e fix. +Elabora solo i file che hanno blocchi contrassegnati con errori +silenti o di input/output durante sync e scrub, come +elencato in status. +Questa opzione può essere utilizzata solo con check e fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Seleziona il piano di scrub. Se PERC è un valore numerico da 0 a +100, viene interpretato come la percentuale di blocchi da +sottoporre a scrub. +Invece di una percentuale, è possibile specificare un piano: +bad esegue lo scrub dei blocchi bad, new esegue lo scrub +dei blocchi non ancora sottoposti a scrub, e full esegue lo +scrub di tutto. +Questa opzione può essere utilizzata solo con scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Seleziona la parte più vecchia dell'array da elaborare in scrub. +DAYS è l'età minima in giorni per un blocco da sottoporre a +scrub; il valore predefinito è 10. +I blocchi contrassegnati come bad vengono sempre sottoposti a scrub +indipendentemente da questa opzione. +Questa opzione può essere utilizzata solo con scrub. +
+
+
+
+
+
+-a, --audit-only +
+In check, verifica l'hash dei file senza +controllare i dati di parità. +Se si è interessati solo al controllo dei dati del file, questa +opzione può velocizzare significativamente il processo di controllo. +Questa opzione può essere utilizzata solo con check. +
+
+
+
+
+
+-h, --pre-hash +
+In sync, esegue una fase preliminare di hashing di tutti i nuovi +dati per una verifica aggiuntiva prima del calcolo della parità. +Di solito, in sync, non viene eseguito alcun hashing preliminare +e i nuovi dati vengono sottoposti a hash subito prima del calcolo +della parità quando vengono letti per la prima volta. +Questo processo si verifica quando il sistema è sotto +carico pesante, con tutti i dischi che girano e una CPU occupata. +Questa è una condizione estrema per la macchina e, se presenta un +problema hardware latente, gli errori silenti potrebbero non +essere rilevati perché i dati non sono ancora stati sottoposti a hash. +Per evitare questo rischio, è possibile abilitare la modalità +pre-hash per far leggere tutti i dati due volte per garantirne +l'integrità. +Questa opzione verifica anche i file spostati all'interno dell'array +per garantire che l'operazione di spostamento sia andata a buon fine +e, se necessario, consente di eseguire un'operazione di fix +prima di procedere. +Questa opzione può essere utilizzata solo con sync. +
+
+
+
+
+
+-i, --import DIR +
+Importa dalla directory specificata tutti i file eliminati +dall'array dopo l'ultimo sync. +Se si hanno ancora tali file, possono essere utilizzati da check +e fix per migliorare il processo di recupero. +I file vengono letti, anche nelle sottodirectory, e sono +identificati indipendentemente dal loro nome. +Questa opzione può essere utilizzata solo con check e fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+In caso di errore, ferma (spin down) tutti i dischi gestiti prima +di uscire con un codice di stato non zero. Ciò impedisce alle unità +di rimanere attive e in rotazione dopo un'operazione interrotta, +contribuendo a evitare inutili accumuli di calore e consumo di +energia. Utilizzare questa opzione per garantire che i dischi siano +arrestati in modo sicuro anche in caso di errore di un comando. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Applica un limite di larghezza di banda globale per tutti i dischi. +RATE è il numero di byte al secondo. È possibile specificare un +moltiplicatore come K, M, G o T (ad esempio, --bw-limit 1G). +
+
+
+
+
+
+-t, --tail DIMENSIONE +
+Limita l'elenco dei file a quelli che non utilizzano più della +dimensione di coda specificata dei dischi di parità. +È possibile utilizzare moltiplicatori come K, M, G o T (ad es. --tail 1G). +Questa opzione è valida solo se utilizzata insieme al comando +locate. +
+
+
+
+
+
+-A, --stats +
+Abilita una vista dello stato estesa che mostra informazioni +aggiuntive. La schermata visualizza due grafici: +Il primo grafico mostra il numero di stripe bufferizzate per +ciascun disco, insieme al percorso del file attualmente +acceduto su quel disco. In genere, il disco più lento non avrà +buffer disponibile, il che determina la larghezza di banda massima +raggiungibile. +Il secondo grafico mostra la percentuale di tempo trascorso in +attesa negli ultimi 100 secondi. Si prevede che il disco più +lento causi la maggior parte del tempo di attesa, mentre gli altri +dischi dovrebbero avere poco o nessun tempo di attesa perché possono +utilizzare le loro stripe bufferizzate. +Questo grafico mostra anche il tempo trascorso in attesa per +i calcoli di hash e i calcoli RAID. +Tutti i calcoli vengono eseguiti in parallelo con le operazioni +su disco. Pertanto, finché c'è un tempo di attesa misurabile per +almeno un disco, ciò indica che la CPU è abbastanza veloce da +tenere il passo con il carico di lavoro. +
+
+
+
+
+
+-Z, --force-zero +
+Forza l'operazione non sicura di sincronizzazione di un file con +dimensione zero che in precedenza era non zero. +Se SnapRAID rileva una tale condizione, interrompe la +prosecuzione a meno che non si specifichi questa opzione. +Ciò consente di rilevare facilmente quando, dopo un arresto +anomalo del sistema, alcuni file a cui si è acceduto sono stati +troncati. +Questa è una possibile condizione in Linux con i file system +ext3/ext4. +Questa opzione può essere utilizzata solo con sync. +
+
+
+
+
+
+-E, --force-empty +
+Forza l'operazione non sicura di sincronizzazione di un disco con +tutti i file originali mancanti. +Se SnapRAID rileva che tutti i file originariamente presenti +sul disco sono mancanti o riscritti, interrompe la prosecuzione +a meno che non si specifichi questa opzione. +Ciò consente di rilevare facilmente quando un file system di dati +non è montato. +Questa opzione può essere utilizzata solo con sync. +
+
+
+
+
+
+-U, --force-uuid +
+Forza l'operazione non sicura di sincronizzazione, controllo e +correzione con dischi che hanno cambiato il loro UUID. +Se SnapRAID rileva che alcuni dischi hanno cambiato UUID, +interrompe la prosecuzione a meno che non si specifichi questa +opzione. +Ciò consente di rilevare quando i dischi sono montati sui punti +di montaggio sbagliati. +Tuttavia, è consentito avere un singolo cambio di UUID con +parità singola e di più con parità multipla, perché questo è +il caso normale quando si sostituiscono i dischi dopo un recupero. +Questa opzione può essere utilizzata solo con sync, check +o fix. +
+
+
+
+
+
+-D, --force-device +
+Forza l'operazione non sicura di correzione con dischi inaccessibili +o con dischi sullo stesso dispositivo fisico. +Ad esempio, se si sono persi due dischi dati e si ha un disco di +riserva per recuperare solo il primo, è possibile ignorare il secondo +disco inaccessibile. +Oppure, se si desidera recuperare un disco nello spazio libero +rimasto su un disco già utilizzato, condividendo lo stesso dispositivo +fisico. +Questa opzione può essere utilizzata solo con fix. +
+
+
+
+
+
+-N, --force-nocopy +
+In sync, check e fix, disabilita l'euristica di rilevamento +della copia. +Senza questa opzione, SnapRAID presume che i file con gli stessi +attributi, come nome, dimensione e timestamp, siano copie con gli +stessi dati. +Ciò consente l'identificazione di file copiati o spostati da un +disco all'altro e riutilizza le informazioni di hash già calcolate +per rilevare errori silenti o per recuperare file mancanti. +In alcuni rari casi, questo comportamento può comportare falsi +positivi o un processo lento a causa di molte verifiche di hash, +e questa opzione consente di risolvere tali problemi. +Questa opzione può essere utilizzata solo con sync, check +e fix. +
+
+
+
+
+
+-F, --force-full +
+In sync, forza un ricalcolo completo della parità. +Questa opzione può essere utilizzata quando si aggiunge un nuovo +livello di parità o se si è tornati a un vecchio file di contenuto +utilizzando dati di parità più recenti. +Invece di ricreare la parità da zero, questo consente di riutilizzare +gli hash presenti nel file di contenuto per convalidare i dati e +mantenere la protezione dei dati durante il processo sync +utilizzando i dati di parità esistenti. +Questa opzione può essere utilizzata solo con sync. +
+
+
+
+
+
+-R, --force-realloc +
+In sync, forza una riallocazione completa dei file e la +ricostruzione della parità. +Questa opzione può essere utilizzata per riallocare completamente +tutti i file, rimuovendo la frammentazione, riutilizzando gli hash +presenti nel file di contenuto per convalidare i dati. +Questa opzione può essere utilizzata solo con sync. +ATTENZIONE! Questa opzione è solo per esperti ed è vivamente +sconsigliato utilizzarla. +NON si ha protezione dei dati durante l'operazione sync. +
+
+
+
+
+
+-W, --force-realloc-tail DIMENSIONE +
+Funziona come -R, --force-realloc, ma limitatamente alla porzione +di coda specificata (ultimi DIMENSIONE byte) di ogni file di parità. +Forza la riallocazione (spostamento) di qualsiasi frammento/blocco di file +attualmente memorizzato in quella sezione di coda, consentendo loro di essere +posizionati ovunque nei file di parità dove sia disponibile spazio libero +(inclusi i buchi esistenti). +Lo scopo principale di questa opzione è ridurre la dimensione su disco +del file di parità. +Se la riallocazione svuota con successo l'intera sezione di coda +(non rimangono blocchi che la utilizzano), il file di parità viene +troncato, recuperando lo spazio di coda inutilizzato. +È possibile utilizzare moltiplicatori come K, M, G o T (ad es. +--force-realloc-tail 1G). +È possibile utilizzare locate -t, --tail per conoscere in anticipo +i file interessati. +ATTENZIONE! +Questa opzione è solo per esperti ed è caldamente +raccomandato di non usarla. +NON si ha protezione dei dati durante l'operazione di sync +per i file interessati. +
+
+
+
+
+
+-l, --log FILE +
+Scrive un log dettagliato nel file specificato. +Se questa opzione non è specificata, gli errori imprevisti vengono +stampati sullo schermo, potenzialmente resulting in un output +eccessivo in caso di molti errori. Quando -l, --log è specificato, +vengono stampati sullo schermo solo gli errori fatali che +causano l'arresto di SnapRAID. +Se il percorso inizia con >>, il file viene aperto in modalità +append. Le occorrenze di %D e %T nel nome vengono sostituite +con la data e l'ora nel formato YYYYMMDD e HHMMSS. Nei file batch +di Windows, è necessario raddoppiare il carattere %, ad esempio +result-%%D.log. Per utilizzare >>, è necessario racchiudere +il nome tra virgolette, ad esempio ">>result.log". +Per indirizzare l'output del log all'output standard o all'errore +standard, è possibile utilizzare ">&1" e ">&2", +rispettivamente. +Vedere il file snapraid_log.txt o la pagina man per le descrizioni +dei tag di log. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Imposta un nuovo limite di errore prima di interrompere l'esecuzione. +Per impostazione predefinita, SnapRAID si interrompe se incontra +più di 100 errori di input/output, indicando che un disco +sta probabilmente fallendo. +Questa opzione influisce su sync e scrub, a cui è consentito +continuare dopo il primo set di errori del disco per cercare di +completare le loro operazioni. +Tuttavia, check e fix si interrompono sempre al primo errore. +
+
+
+
+
+
+-S, --start BLKSTART +
+Avvia l'elaborazione dal numero di blocco specificato. +Ciò può essere utile per riprovare a controllare o correggere +blocchi specifici in caso di disco danneggiato. +Questa opzione è principalmente per il recupero manuale avanzato. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Elabora solo il numero specificato di blocchi. +Questa opzione è principalmente per il recupero manuale avanzato. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Genera un file di configurazione fittizio da un file di contenuto +esistente. +Il file di configurazione viene scritto nell'output standard e non +sovrascrive uno esistente. +Questo file di configurazione contiene anche le informazioni +necessarie per ricostruire i punti di montaggio del disco nel caso +in cui si perda l'intero sistema. +
+
+
+
+
+
+-v, --verbose +
+Stampa più informazioni sullo schermo. +Se specificato una volta, stampa i file esclusi +e statistiche aggiuntive. +Questa opzione non ha effetto sui file di log. +
+
+
+
+
+
+-q, --quiet +
+Stampa meno informazioni sullo schermo. +Se specificato una volta, rimuove la barra di avanzamento; +due volte, le operazioni in corso; tre volte, i messaggi di +informazione; quattro volte, i messaggi di stato. +Gli errori fatali vengono sempre stampati sullo schermo. +Questa opzione non ha effetto sui file di log. +
+
+
+
+
+
+-H, --help +
+Stampa una breve schermata di aiuto. +
+
+
+
+
+
+-V, --version +
+Stampa la versione del programma. +
+
+
+
+
+

+Configurazione +

+

SnapRAID richiede un file di configurazione per sapere dove si trova +l'array di dischi e dove memorizzare le informazioni di parità. +

In Unix, utilizza il file /usr/local/etc/snapraid.conf se esiste, +altrimenti /etc/snapraid.conf. +In Windows, utilizza il file snapraid.conf nella stessa +directory di snapraid.exe. +

Deve contenere le seguenti opzioni (sensibili al maiuscolo/minuscolo): +

+

+parity FILE [,FILE] ... +

+

Definisce i file da utilizzare per memorizzare le informazioni di parità. +La parità consente la protezione da un singolo guasto del disco, +simile a RAID5. +

È possibile specificare più file, che devono essere su dischi diversi. +Quando un file non può più crescere, viene utilizzato il successivo. +Lo spazio totale disponibile deve essere almeno grande quanto il disco +dati più grande dell'array. +

È possibile aggiungere file di parità aggiuntivi in seguito, ma non è +possibile riordinarli o rimuoverli. +

Mantenere i dischi di parità riservati alla parità garantisce che non +diventino frammentati, migliorando le prestazioni. +

In Windows, 256 MB vengono lasciati inutilizzati su ogni disco per +evitare l'avviso sui dischi pieni. +

Questa opzione è obbligatoria e può essere utilizzata solo una volta. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Definisce i file da utilizzare per memorizzare informazioni di parità +extra. +

Per ogni livello di parità specificato, è abilitato un livello +aggiuntivo di protezione: +

    +
  • +2-parity abilita la doppia parità RAID6. +
  • +
  • +3-parity abilita la tripla parità. +
  • +
  • +4-parity abilita la parità quadrupla. +
  • +
  • +5-parity abilita la parità quintupla. +
  • +
  • +6-parity abilita la parità esapla. +
  • +
+

Ogni livello di parità richiede la presenza di tutti i livelli di parità +precedenti. +

Si applicano le stesse considerazioni dell'opzione parity. +

Queste opzioni sono facoltative e possono essere utilizzate solo una volta. +

+
+

+z-parity FILE [,FILE] ... +

+

Definisce un file e un formato alternativi per memorizzare la tripla +parità. +

Questa opzione è un'alternativa a 3-parity, destinata +principalmente a CPU di fascia bassa come ARM o AMD Phenom, Athlon +e Opteron che non supportano il set di istruzioni SSSE3. In tali +casi, fornisce prestazioni migliori. +

Questo formato è simile ma più veloce di quello utilizzato da ZFS RAIDZ3. +Come ZFS, non funziona oltre la tripla parità. +

Quando si utilizza 3-parity, si verrà avvisati se è consigliato +utilizzare il formato z-parity per un miglioramento delle prestazioni. +

È possibile convertire da un formato all'altro regolando il file +di configurazione con il file z-parity o 3-parity desiderato e +utilizzando fix per ricrearlo. +

+
+

+content FILE +

+

Definisce il file da utilizzare per memorizzare l'elenco e i checksum +di tutti i file presenti nell'array di dischi. +

Può essere posizionato su un disco utilizzato per dati, parità o +qualsiasi altro disco disponibile. +Se si utilizza un disco dati, questo file viene automaticamente +escluso dal processo sync. +

Questa opzione è obbligatoria e può essere utilizzata più volte +per salvare più copie dello stesso file. +

È necessario memorizzare almeno una copia per ogni disco di parità +utilizzato più uno. L'utilizzo di copie aggiuntive non è dannoso. +

+
+

+data NAME DIR +

+

Definisce il nome e il punto di montaggio dei dischi dati +nell'array. NAME viene utilizzato per identificare il disco e deve +essere unico. DIR è il punto di montaggio del disco nel file system. +

È possibile cambiare il punto di montaggio secondo necessità, +purché si mantenga fisso NAME. +

È necessario utilizzare un'opzione per ogni disco dati nell'array. +

È possibile rinominare un disco in seguito modificando NAME +direttamente nel file di configurazione e quindi eseguendo un +comando sync. +In caso di ridenominazione, l'associazione viene eseguita utilizzando +l'UUID memorizzato dei dischi. +

+
+

+extra NAME DIR +

+

Definisce il nome e il punto di montaggio di dischi aggiuntivi da monitorare +con i comandi smart e probe. +

Questo è utile per monitorare i dischi che non fanno parte dell' +array ma sono necessari per il funzionamento del sistema, come +il disco di avvio. +

Si noti che tali dischi non sono influenzati dai comandi up e down +perché si prevede che siano sempre in rotazione. +

+
+

+nohidden +

+

Esclude tutti i file e le directory nascosti. +In Unix, i file nascosti sono quelli che iniziano con .. +In Windows, sono quelli con l'attributo nascosto. +

+
+

+exclude/include PATTERN +

+

Definisce i modelli di file o directory da escludere o includere +nel processo di sync. +Tutti i modelli vengono elaborati nell'ordine specificato. +

Se il primo modello che corrisponde è un exclude, il file +viene escluso. Se è un include, il file viene incluso. +Se nessun modello corrisponde, il file viene escluso se l'ultimo +modello specificato è un include, o incluso se l'ultimo modello +specificato è un exclude. +

Vedere la sezione PATTERN per maggiori dettagli sulle specifiche +del modello. +

Questa opzione può essere utilizzata più volte. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Definisce la dimensione di blocco di base in kibibyte per la parità. +Un kibibyte è 1024 byte. +

La dimensione di blocco predefinita è 256, che dovrebbe funzionare +nella maggior parte dei casi. +

ATTENZIONE! Questa opzione è solo per esperti ed è vivamente +sconsigliato modificare questo valore. Per modificare questo valore in +futuro, sarà necessario ricreare l'intera parità! +

Un motivo per utilizzare una dimensione di blocco diversa è se si +hanno molti file piccoli, nell'ordine dei milioni. +

Per ogni file, anche se solo pochi byte, viene allocato un intero +blocco di parità e, con molti file, ciò può comportare uno spazio +di parità inutilizzato significativo. +Quando si riempie completamente il disco di parità, non è +consentito aggiungere altri file ai dischi dati. +Tuttavia, la parità sprecata non si accumula tra i dischi dati. +Lo spazio sprecato risultante da un numero elevato di file su un +disco dati limita solo la quantità di dati su quel disco dati, non +gli altri. +

Come approssimazione, si può presumere che metà della dimensione del +blocco sia sprecata per ogni file. Ad esempio, con 100.000 file e una +dimensione di blocco di 256 KiB, si sprecheranno 12,8 GB di parità, +il che può comportare 12,8 GB in meno di spazio disponibile sul disco +dati. +

È possibile controllare la quantità di spazio sprecato su ogni disco +utilizzando status. +Questa è la quantità di spazio che è necessario lasciare libero sui +dischi dati o utilizzare per i file non inclusi nell'array. +Se questo valore è negativo, significa che si è vicini a riempire +la parità e rappresenta lo spazio che è ancora possibile sprecare. +

Per evitare questo problema, è possibile utilizzare una partizione +più grande per la parità. +Ad esempio, se la partizione di parità è 12,8 GB più grande dei dischi +dati, si ha abbastanza spazio extra per gestire fino a 100.000 +file su ogni disco dati senza alcuno spreco di spazio. +

Un trucco per ottenere una partizione di parità più grande in Linux è +formattarla con il comando: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Ciò si traduce in circa l'1,5% di spazio extra, circa 60 GB per +un disco da 4 TB, che consente circa 460.000 file su ogni disco dati +senza alcuno spreco di spazio. +

+
+

+hashsize SIZE_IN_BYTES +

+

Definisce la dimensione dell'hash in byte per i blocchi salvati. +

La dimensione di hash predefinita è 16 byte (128 bit), che dovrebbe +funzionare nella maggior parte dei casi. +

ATTENZIONE! Questa opzione è solo per esperti ed è vivamente +sconsigliato modificare questo valore. Per modificare questo valore in +futuro, sarà necessario ricreare l'intera parità! +

Un motivo per utilizzare una dimensione di hash diversa è se il +sistema ha memoria limitata. Come regola generale, SnapRAID +tipicamente richiede 1 GiB di RAM per ogni 16 TB di dati nell'array. +

Nello specifico, per memorizzare gli hash dei dati, SnapRAID richiede +circa $TS*(1+HS)/BS$ byte di RAM, +dove $TS$ è la dimensione totale in byte dell'array di dischi, $BS$ è la +dimensione del blocco in byte e $HS$ è la dimensione dell'hash in byte. +

Ad esempio, con 8 dischi da 4 TB, una dimensione di blocco di 256 KiB +($1 \text{ KiB} = 1024 \text{ byte}$) e una dimensione di hash di 16, si ottiene: +

+RAM = $(8 * 4 * 10^{12}) * (1+16) / (256 * 2^{10}) = 1.93 \text{ GiB}$
+
+

Passando a una dimensione di hash di 8, si ottiene: +

+RAM = $(8 * 4 * 10^{12}) * (1+8) / (256 * 2^{10}) = 1.02 \text{ GiB}$
+
+

Passando a una dimensione di blocco di 512, si ottiene: +

+RAM = $(8 * 4 * 10^{12}) * (1+16) / (512 * 2^{10}) = 0.96 \text{ GiB}$
+
+

Passando sia a una dimensione di hash di 8 che a una dimensione di +blocco di 512, si ottiene: +

+RAM = $(8 * 4 * 10^{12}) * (1+8) / (512 * 2^{10}) = 0.51 \text{ GiB}$
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Salva automaticamente lo stato durante la sincronizzazione o lo scrubbing +dopo la quantità specificata di GB elaborati. +Questa opzione è utile per evitare di riavviare lunghi comandi sync +da zero se interrotti da un arresto anomalo della macchina o qualsiasi +altro evento. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Imposta la temperatura massima del disco consentita in Celsius. Se +specificato, SnapRAID controlla periodicamente la temperatura di tutti +i dischi utilizzando lo strumento smartctl. Le temperature attuali dei +dischi vengono visualizzate mentre SnapRAID è in funzione. Se un disco +supera questo limite, tutte le operazioni si interrompono e i dischi +vengono messi in stand-by (spin down) per la durata definita +dall'opzione temp_sleep. Dopo il periodo di sonno, le operazioni +riprendono, potenzialmente mettendosi in pausa di nuovo se il limite +di temperatura viene raggiunto ancora una volta. +

Durante il funzionamento, SnapRAID analizza anche la curva di riscaldamento +di ciascun disco e stima la temperatura costante a lungo termine che +dovrebbero raggiungere se l'attività continua. La stima viene eseguita +solo dopo che la temperatura del disco è aumentata quattro volte, +garantendo che siano disponibili abbastanza punti dati per stabilire +una tendenza affidabile. +Questa temperatura costante prevista è mostrata tra parentesi accanto +al valore attuale e aiuta a valutare se il raffreddamento del sistema +è adeguato. Questa temperatura stimata è solo a scopo informativo +e non ha alcun effetto sul comportamento di SnapRAID. Le azioni del +programma si basano esclusivamente sulle temperature effettive +misurate del disco. +

Per eseguire questa analisi, SnapRAID necessita di un riferimento +per la temperatura del sistema. Tenta prima di leggerla dai sensori +hardware disponibili. Se non è possibile accedere a nessun sensore di +sistema, utilizza la temperatura del disco più bassa misurata all'inizio +dell'esecuzione come riferimento di riserva. +

Normalmente, SnapRAID mostra solo la temperatura del disco più caldo. +Per visualizzare la temperatura di tutti i dischi, utilizzare l'opzione +-A o --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Imposta il tempo di stand-by, in minuti, quando il limite di temperatura +viene raggiunto. Durante questo periodo, i dischi rimangono fermi +(spin down). Il valore predefinito è 5 minuti. +

+
+

+pool DIR +

+

Definisce la directory di pooling in cui viene creata la vista virtuale +dell'array di dischi utilizzando il comando pool. +

La directory deve già esistere. +

+
+

+share UNC_DIR +

+

Definisce il percorso UNC di Windows necessario per accedere ai dischi +da remoto. +

Se questa opzione è specificata, i collegamenti simbolici creati nella +directory pool utilizzano questo percorso UNC per accedere ai dischi. +Senza questa opzione, i collegamenti simbolici generati utilizzano +solo percorsi locali, il che non consente la condivisione della +directory pool sulla rete. +

I collegamenti simbolici sono formati utilizzando il percorso UNC +specificato, aggiungendo il nome del disco come specificato nell'opzione +data e infine aggiungendo la directory e il nome del file. +

Questa opzione è richiesta solo per Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Definisce opzioni smartctl personalizzate per ottenere gli attributi +SMART per ogni disco. Ciò potrebbe essere richiesto per controller RAID +e alcuni dischi USB che non possono essere rilevati automaticamente. +Il segnaposto %s viene sostituito dal nome del dispositivo, ma è +facoltativo per dispositivi fissi come i controller RAID. +

DISK è lo stesso nome del disco specificato nell'opzione data. +PARITY è uno dei nomi di parità: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity o z-parity. +

Nelle OPTIONS specificate, la stringa %s viene sostituita dal +nome del dispositivo. Per i controller RAID, il dispositivo è +probabilmente fisso e potrebbe non essere necessario utilizzare %s. +

Fare riferimento alla documentazione di smartmontools per le possibili +opzioni: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Ad esempio: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignora l'attributo SMART specificato durante il calcolo della +probabilità di guasto del disco. Questa opzione è utile se un disco +segnala valori insoliti o fuorvianti per un particolare attributo. +

DISK è lo stesso nome del disco specificato nell'opzione data. +PARITY è uno dei nomi di parità: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity o z-parity. +Il valore speciale * può essere utilizzato per ignorare l'attributo +su tutti i dischi. +

Ad esempio, per ignorare l'attributo Current Pending Sector Count +su tutti i dischi: +

+smartignore * 197
+
+

Per ignorarlo solo sul primo disco di parità: +

+smartignore parity 197
+
+
+
+

+Esempi +

+

Un esempio di configurazione tipica per Unix è: +

+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
+
+

Un esempio di configurazione tipica per Windows è: +

+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
+
+
+
+
+

+Pattern +

+

I pattern offrono un modo flessibile per filtrare i file da includere o +escludere. Usando i caratteri globbing, è possibile definire regole che +corrispondano a nomi di file specifici o a intere strutture di directory senza +elencare manualmente ogni percorso. +

Il punto interrogativo ? corrisponde a qualsiasi carattere singolo eccetto il +separatore di directory. Questo lo rende utile per far corrispondere nomi di file +con caratteri variabili mantenendo il pattern confinato a un singolo livello di directory. +

L'asterisco singolo * corrisponde a qualsiasi sequenza di caratteri, ma come il +punto interrogativo, non attraversa mai i confini delle directory. Si ferma allo +slash in avanti, rendendolo adatto per la corrispondenza all'interno di un singolo +componente del percorso. Questo è il comportamento standard dei wildcard familiare +dal globbing della shell. +

Il doppio asterisco ** è più potente, corrisponde a qualsiasi sequenza di +caratteri inclusi i separatori di directory. Ciò consente ai pattern di corrispondere +attraverso più livelli di directory. Quando ** appare inserito direttamente in +un pattern, può corrispondere a zero o più caratteri inclusi gli slash tra +il testo letterale circostante. +

L'uso più importante di ** è nella forma speciale /**/. Questa corrisponde a +zero o più livelli di directory completi, rendendo possibile la corrispondenza di file +a qualsiasi profondità in un albero di directory senza conoscere l'esatta struttura del percorso. +Per esempio, il pattern src/**/main.js corrisponde a src/main.js (saltando +zero directory), src/ui/main.js (saltando una directory), e +src/ui/components/main.js (saltando due directory). +

Le classi di caratteri che usano le parentesi quadre [] corrispondono a un singolo carattere da un +set o intervallo specificato. Come gli altri pattern a carattere singolo, esse +non corrispondono ai separatori di directory. Le classi supportano intervalli e la negazione usando +un punto esclamativo. +

La distinzione fondamentale da ricordare è che *, ? e le classi di caratteri +rispettano tutti i confini delle directory e corrispondono solo all'interno di un singolo +componente del percorso, mentre ** è l'unico pattern che può corrispondere attraverso +i separatori di directory. +

Esistono quattro diversi tipi di pattern: +

+
+
+FILE +
+Seleziona qualsiasi file chiamato FILE. +Questo pattern si applica solo ai file, non alle directory. +
+
+
+
+
+
+DIR/ +
+Seleziona qualsiasi directory chiamata DIR e tutto ciò che contiene. +Questo pattern si applica solo alle directory, non ai file. +
+
+
+
+
+
+/PATH/FILE +
+Seleziona l'esatto percorso del file specificato. Questo pattern si applica +solo ai file, non alle directory. +
+
+
+
+
+
+/PATH/DIR/ +
+Seleziona l'esatto percorso della directory specificata e tutto ciò che +contiene. Questo pattern si applica solo alle directory, non ai file. +
+
+
+

Quando si specifica un percorso assoluto che inizia con /, viene +applicato alla directory radice dell'array, non alla directory radice +del file system locale. +

In Windows, è possibile utilizzare il backslash \ invece dello slash +in avanti /. Le directory di sistema di Windows, le junction, i punti +di montaggio e altre directory speciali di Windows sono trattati come +file, il che significa che per escluderli, è necessario utilizzare una +regola di file, non una di directory. +

Se il nome del file contiene un carattere *, ?, [ o ], +è necessario eseguirne l'escape per evitare che venga interpretato +come un carattere di globbing. In Unix, il carattere di escape è \; +in Windows, è ^. +Quando il pattern è sulla riga di comando, è necessario raddoppiare +il carattere di escape per evitare che venga interpretato dalla shell +dei comandi. +

Nel file di configurazione, è possibile utilizzare diverse strategie +per filtrare i file da elaborare. +L'approccio più semplice è utilizzare solo regole exclude per +rimuovere tutti i file e le directory che non si desidera elaborare. +Ad esempio: +

+# Esclude qualsiasi file denominato *.unrecoverable
+exclude *.unrecoverable
+# Esclude la directory radice /lost+found
+exclude /lost+found/
+# Esclude qualsiasi sottodirectory denominata tmp
+exclude tmp/
+
+

L'approccio opposto è definire solo i file che si desidera elaborare, +utilizzando solo regole include. Ad esempio: +

+# Include solo alcune directory
+include /movies/
+include /musics/
+include /pictures/
+
+

L'approccio finale è mescolare regole exclude e include. In questo +caso, l'ordine delle regole è importante. Le regole precedenti hanno +la precedenza su quelle successive. +Per semplificare, è possibile elencare prima tutte le regole exclude +e poi tutte le regole include. Ad esempio: +

+# Esclude qualsiasi file denominato *.unrecoverable
+exclude *.unrecoverable
+# Esclude qualsiasi sottodirectory denominata tmp
+exclude tmp/
+# Include solo alcune directory
+include /movies/
+include /musics/
+include /pictures/
+
+

Sulla riga di comando, utilizzando l'opzione -f, è possibile utilizzare +solo pattern include. Ad esempio: +

+# Controlla solo i file .mp3.
+# In Unix, utilizzare le virgolette per evitare l'espansione
+# del globbing da parte della shell.
+snapraid -f "*.mp3" check
+
+

In Unix, quando si utilizzano caratteri di globbing sulla riga di +comando, è necessario citarli per impedire alla shell di espanderli. +

+
+

+Ignore File +

+

In aggiunta alle regole globali nel file di configurazione, è possibile +inserire file .snapraidignore in qualsiasi directory all'interno dell'array +per definire regole di esclusione decentralizzate. +

Le regole definite in .snapraidignore vengono applicate dopo le regole nel +file di configurazione. Ciò significa che hanno una priorità più alta e possono +essere utilizzate per escludere file che erano stati precedentemente inclusi dalla +configurazione globale. In pratica, se una regola locale corrisponde, il file viene +escluso indipendentemente dalle impostazioni di inclusione globali. +

La logica dei pattern in .snapraidignore rispecchia la configurazione globale +ma ancora i pattern alla directory in cui si trova il file: +

+
+
+FILE +
+Seleziona qualsiasi file chiamato FILE in questa directory o sotto di essa. +Segue le stesse regole di globbing del pattern globale. +
+
+
+
+
+
+DIR/ +
+Seleziona qualsiasi directory chiamata DIR e tutto ciò che contiene, +che risieda in questa directory o sotto di essa. +
+
+
+
+
+
+/PATH/FILE +
+Seleziona l'esatto file specificato relativo alla posizione +del file .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Seleziona l'esatta directory specificata e tutto ciò che contiene, +relativa alla posizione del file .snapraidignore. +
+
+
+

A differenza della configurazione globale, i file .snapraidignore supportano +solo regole di esclusione; non è possibile utilizzare pattern include o negazioni (!). +

Ad esempio, se hai un .snapraidignore in /mnt/disk1/projects/: +

+# Esclude SOLO /mnt/disk1/projects/output.bin
+/output.bin
+# Esclude qualsiasi directory chiamata build all'interno di projects/
+build/
+# Esclude qualsiasi file .tmp all'interno di projects/ o delle sue sottocartelle
+*.tmp
+
+
+
+

+Content +

+

SnapRAID memorizza l'elenco e i checksum dei file nel file di contenuto. +

È un file binario che elenca tutti i file presenti nell'array di dischi, +insieme a tutti i checksum per verificarne l'integrità. +

Questo file viene letto e scritto dai comandi sync e scrub e +letto dai comandi fix, check e status. +

+
+

+Parity +

+

SnapRAID memorizza le informazioni di parità dell'array nei file di +parità. +

Questi sono file binari contenenti la parità calcolata di tutti i +blocchi definiti nel file content. +

Questi file vengono letti e scritti dai comandi sync e fix e +solo letti dai comandi scrub e check. +

+
+

+Codifica +

+

SnapRAID in Unix ignora qualsiasi codifica. Legge e memorizza i +nomi dei file con la stessa codifica utilizzata dal file system. +

In Windows, tutti i nomi letti dal file system vengono convertiti e +elaborati in formato UTF-8. +

Per avere i nomi dei file stampati correttamente, è necessario impostare +la console di Windows in modalità UTF-8 con il comando chcp 65001 e +utilizzare un carattere TrueType come Lucida Console come carattere +della console. +Questo influisce solo sui nomi dei file stampati; se si +reindirizza l'output della console a un file, il file risultante è +sempre in formato UTF-8. +

+
+

+Vedi Anche +

+

snapraid_log(1), snapraidd(1) +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-ja.html b/beta/manual-ja.html new file mode 100644 index 00000000..1113a5c0 --- /dev/null +++ b/beta/manual-ja.html @@ -0,0 +1,2016 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAIDは、ディスクアレイ用のバックアッププログラムで、最大6台のディスク障害が発生した場合の +データ復旧のためにパリティ情報を保存します。 +

主に大容量で、更新頻度の低いファイルを扱うホームメディアセンターを対象としており、 +SnapRAIDにはいくつかの機能があります。 +

    +
  • +ファイルが既に入っているディスクを、再フォーマットせずにそのまま利用でき、通常通り +アクセスできます。 +
  • +
  • +すべてのデータがハッシュ化され、データの整合性を確保し、サイレントな破損を防ぎます。 +
  • +
  • +障害が発生したディスクの数がパリティ数を超えた場合、データの損失は影響を受けたディスクに +限定され、他のディスクのデータは引き続きアクセス可能です。 +
  • +
  • +誤ってディスク上のファイルを削除した場合でも、復旧が可能です。 +
  • +
  • +ディスクは異なるサイズであっても構いません。 +
  • +
  • +いつでもディスクを追加できます。 +
  • +
  • +SnapRAIDはデータをロックしません。いつでも再フォーマットやデータ移動なしに利用を +停止できます。 +
  • +
  • +ファイルにアクセスするためにスピンさせる必要があるのは1台のディスクだけであり、 +省電力と騒音低減に役立ちます。 +
  • +
+

詳細については、SnapRAIDの公式サイトをご覧ください。 +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAIDはRAIDとバックアッププログラムのハイブリッドであり、両方の利点を組み合わせることを +目指しています。ただし、使用する前に考慮すべきいくつかの制限があります。 +

主な制限は、ディスクが故障し、最近 sync を実行していない場合、完全に復旧できない +可能性があることです。 +より具体的には、最後の sync 操作以降に変更または削除されたファイルのサイズまでのデータが +復旧できない可能性があります。 +これは、変更または削除されたファイルが故障したディスク上にない場合でも発生します。 +このため、SnapRAIDは**めったに変更されない**データに適しています。 +

一方で、新しく追加されたファイルは、既に存在するファイルの復旧を妨げません。 +新しく追加されたファイルが故障したディスク上にある場合にのみ、それらのファイルが失われます。 +

その他のSnapRAIDの制限は次のとおりです。 +

    +
  • +SnapRAIDでは、各ディスクに対して**個別のファイルシステム**が保持されます。 +RAIDでは、単一の大きなファイルシステムが得られます。 +
  • +
  • +SnapRAIDは**データをストライピングしません**。 +RAIDでは、ストライピングにより速度が向上します。 +
  • +
  • +SnapRAIDは**リアルタイムの復旧をサポートしません**。 +RAIDでは、ディスクが故障しても作業を停止する必要はありません。 +
  • +
  • +SnapRAIDは**限られた数のディスク障害**からのみデータを復旧できます。 +バックアップでは、ディスクアレイ全体の完全な障害から復旧できます。 +
  • +
  • +**ファイル名、タイムスタンプ、シンボリックリンク、およびハードリンク**のみが保存されます。 +アクセス許可、所有権、および拡張属性は保存されません。 +
  • +
+
+
+

+Getting Started +

+

SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを parity 情報専用に +選択する必要があります。パリティ用に1つのディスクを使用すると、RAID5と同様に、単一のディスク障害から +復旧できます。 +

RAID6と同様に、より多くのディスク障害から復旧したい場合は、パリティ用に追加のディスクを +確保する必要があります。パリティディスクを追加するたびに、復旧できるディスク障害が1つ増えます。 +

パリティ情報はアレイ内の**最大のデータディスク**のサイズにまで増える可能性があるため、 +パリティディスクとしては、アレイ内の**最大のディスク**を選択する必要があります。 +

これらのディスクは、parity ファイルの保存専用になります。 +**データを保存しないでください**。 +

次に、SnapRAIDで保護したい data ディスクを定義する必要があります。 +これらのディスクに含まれるデータがめったに変更されない場合に、保護が最も効果的です。 +このため、WindowsのC:\ディスクやUnixの/home、/var、/tmpディレクトリを含めない方が +良いでしょう。 +

ファイルの一覧は content ファイルに保存され、通常はデータ、パリティ、または +ブートディスクに保存されます。 +このファイルには、バックアップの詳細と、その整合性を検証するためのすべての +チェックサムが含まれています。 +content ファイルは**複数のコピー**で保存され、複数のディスク障害が発生した場合でも、 +少なくとも1つのコピーが利用可能であることを保証するために、**各コピーは異なるディスクに** +配置する必要があります。 +

たとえば、1レベルのパリティ保護のみに関心があり、ディスクが次の場所にあるとします。 +

+/mnt/diskp <- パリティ用に選択されたディスク
+/mnt/disk1 <- 保護する最初のディスク
+/mnt/disk2 <- 保護する2番目のディスク
+/mnt/disk3 <- 保護する3番目のディスク
+
+

構成ファイル /etc/snapraid.conf を次のオプションで作成する必要があります。 +

+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/
+
+

Windowsを使用している場合は、スラッシュではなくドライブ文字とバックスラッシュを +使用したWindowsのパス形式を使用する必要があります。 +

+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\
+
+

ディスクが多くてドライブ文字が不足する場合は、サブフォルダにディスクを +直接マウントできます。参照: +

+https://www.google.com/search?q=Windows+mount+point
+
+

この時点で、パリティ情報を構築するために sync コマンドを実行する準備が整いました。 +

+snapraid sync
+
+

このプロセスは、既にディスクに存在するデータのサイズに応じて、初回は数時間かかる +場合があります。ディスクが空の場合は、プロセスは即座に完了します。 +

Ctrl+Cを押すことでいつでも停止でき、次回の実行時には中断された場所から再開されます。 +

このコマンドが完了すると、データは**SAFE**になります。 +

これで、アレイを自由に使い始め、定期的に sync コマンドを実行してパリティ情報を +更新できます。 +

+

+Scrubbing +

+

データとパリティのエラーを定期的にチェックするには、scrub コマンドを +実行できます。 +

+snapraid scrub
+
+

このコマンドは、配列内のデータを sync コマンド中に計算されたハッシュと比較して、 +整合性を検証します。 +

このコマンドを1回実行すると、前回の10日間で既にスクラブされたデータを除いて、 +アレイの約8%がチェックされます。 +-p, --plan オプションを使用して異なる量を指定でき、 +-o, --older-than オプションを使用して異なる経過日数で +指定できます。 +たとえば、20日以上経過したブロックの5%をチェックするには、次のように使用します。 +

+snapraid -p 5 -o 20 scrub
+
+

プロセス中にサイレントエラーまたは入出力エラーが見つかった場合、 +対応するブロックは content ファイル内で不良としてマークされ、 +status コマンドで一覧表示されます。 +

+snapraid status
+
+

それらを修正するには、-e, --filter-error オプションで不良ブロックをフィルタリングして、 +fix コマンドを使用できます。 +

+snapraid -e fix
+
+

次回の scrub で、エラーが本当に修正されていれば、status レポートから +エラーは消えます。より高速にするために、-p bad を使用して不良としてマークされた +ブロックのみをスクラブできます。 +

+snapraid -p bad scrub
+
+

未同期のアレイで scrub を実行すると、削除または変更されたファイルによって +引き起こされたエラーが報告される場合があります。これらのエラーは scrub の +出力で報告されますが、関連するブロックは不良としてマークされません。 +

+
+

+Pooling +

+

注: ここで説明するプーリング機能は、**mergerfs** ツールに取って代わられました。 +mergerfs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。 +Mergefs は、複数のドライブを単一の統合されたマウントポイントにプールするための、 +より柔軟で効率的な方法を提供し、シンボリックリンクに頼ることなくアレイ全体の +ファイルにシームレスにアクセスできます。これは、パリティ保護のためにSnapRAIDと +うまく統合されており、OpenMediaVault (OMV) やカスタムNAS構成などのセットアップで +一般的に使用されています。 +

アレイ内のすべてのファイルを同じディレクトリツリーに表示させるには、 +pooling 機能を有効にできます。これは、シンボリックリンクを使用して、 +アレイ内のすべてのファイルの読み取り専用の仮想ビューを作成します。 +

構成ファイルで pooling ディレクトリを次のように構成できます。 +

+pool /pool
+
+

または、Windowsの場合は、次のようにします。 +

+pool C:\pool
+
+

そして、pool コマンドを実行して仮想ビューを作成または更新します。 +

+snapraid pool
+
+

Unixプラットフォームを使用しており、このディレクトリをWindowsまたはUnixマシンに +ネットワーク経由で共有したい場合は、/etc/samba/smb.conf に次のオプションを +追加する必要があります。 +

+# smb.conf の global セクションで
+unix extensions = no
+
+
+# smb.conf の share セクションで
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

Windowsでは、ネットワーク経由でシンボリックリンクを共有するには、クライアントが +それらをリモートで解決する必要があります。これを有効にするには、プールディレクトリを +共有することに加えて、構成ファイルで定義された**ディスク名**を共有ポイントとして +使用して、**すべてのディスクを個別に**共有する必要があります。また、リモートクライアントが +これらの共有ディスクにアクセスするために使用する必要があるWindows UNCパスを、 +構成ファイルの share オプションで指定する必要があります。 +

たとえば、darkstar という名前のサーバーで操作している場合、次のオプションを +使用できます。 +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

そして、次のディレクトリをネットワーク経由で共有します。 +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

これにより、リモートクライアントは \\darkstar\pool ですべてのファイルに +アクセスできるようになります。 +

また、リモートクライアントがリモートシンボリックリンクへのアクセスを有効にするために、 +次のコマンドで構成する必要がある場合もあります。 +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAIDはRAIDシステムよりもバックアッププログラムのように機能し、 +-f, --filter オプションを使用してファイルを以前の状態に復元または削除解除するために +使用できます。 +

+snapraid fix -f FILE
+
+

またはディレクトリの場合は: +

+snapraid fix -f DIR/
+
+

また、-m, --filter-missing オプションを使用して、ディレクトリ内の**誤って削除されたファイルのみ**を +復旧するために使用することもできます。これにより、不足しているファイルのみが復元され、 +他のファイルはすべてそのまま残されます。 +

+snapraid fix -m -f DIR/
+
+

または、すべてのドライブ上のすべての削除されたファイルを復旧するには: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

最悪の事態が発生し、1台以上のディスクを失いました! +

**パニックにならないでください!** 復旧できます! +

最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。 +リモート接続、およびスケジュールされたSnapRAIDの夜間 sync や scrub を含む、 +すべてのスケジュールされたプロセスを無効にしてください。 +

次に、次の手順に進みます。 +

+

+STEP 1 -> Reconfigure +

+

復旧のためにいくらかのスペースが必要です。理想的には追加の +予備ディスクですが、外部USBディスクやリモートディスクでも十分です。 +

SnapRAIDの構成ファイルを変更して、故障したディスクの data または parity +オプションを、ファイルを復旧するための十分な空き容量のある場所に +向けます。 +

たとえば、ディスク d1 が故障した場合、次のように変更します。 +

+data d1 /mnt/disk1/
+
+

から: +

+data d1 /mnt/new_spare_disk/
+
+

復旧するディスクがパリティディスクの場合は、適切な parity オプションを +更新します。 +複数のディスクが故障している場合は、すべての構成オプションを更新します。 +

+
+

+STEP 2 -> Fix +

+

ログを外部ファイルに保存して、fix コマンドを実行します。 +

+snapraid -d NAME -l fix.log fix
+
+

ここで NAME はディスクの名前であり、前の例では d1 のようなものです。 +復旧するディスクがパリティディスクの場合は、parity、2-parity などの +名前を使用します。 +複数のディスクが故障している場合は、複数の -d オプションを使用して +すべてを指定します。 +

このコマンドは時間がかかります。 +

fix.log ファイルを保存するために数ギガバイトの空き容量があることを確認してください。 +十分な空き容量のあるディスクから実行してください。 +

これで、復旧可能なすべてのものが復旧されました。一部のファイルが部分的または完全に +復旧できない場合、それらは .unrecoverable 拡張子を追加して名前が変更されます。 +

fix.log ファイルで、unrecoverable: で始まるすべての行をチェックすることで、 +すべての復旧不能なブロックの詳細なリストを見つけることができます。 +

復旧に満足できない場合は、何度でも再試行できます。 +

たとえば、最後の sync の後にアレイからファイルを削除した場合、 +これにより一部のファイルが復旧されない可能性があります。 +この場合、-i, --import オプションを使用して、これらのファイルが現在どこにあるかを指定することで、 +復旧プロセスにそれらを再度含めるように fix を再試行できます。 +

復旧に満足している場合は、さらに進むことができますが、**sync** の実行後には +fix コマンドを**再試行できない**ことに注意してください! +

+
+

+STEP 3 -> Check +

+

慎重なチェックとして、check コマンドを実行して、復旧されたディスク上の +すべてが正しいことを確認できます。 +

+snapraid -d NAME -a check
+
+

ここで NAME はディスクの名前であり、前の例では d1 のようなものです。 +

-d および -a オプションは、SnapRAIDに**指定されたディスクのみ**をチェックし、 +**すべてのパリティデータを無視**するように指示します。 +

このコマンドは時間がかかりますが、過度に慎重でない場合はスキップできます。 +

+
+

+STEP 4 -> Sync +

+

sync コマンドを実行して、アレイを新しいディスクと再同期します。 +

+snapraid sync
+
+

すべてが復旧されていれば、このコマンドは即座に完了します。 +

+
+
+
+

+Commands +

+

SnapRAIDは、次のことを可能にするいくつかの簡単なコマンドを提供します。 +

    +
  • +アレイの状態の概要を出力 -> status +
  • +
  • +ディスクの制御 -> smart、probe、up、down +
  • +
  • +バックアップ/スナップショットの作成 -> sync +
  • +
  • +データの定期的なチェック -> scrub +
  • +
  • +最後のバックアップ/スナップショットの復元 -> fix。 +
  • +
+

コマンドは**小文字**で記述する必要があります。 +

+

+status +

+

ディスクアレイの状態の概要を出力します。 +

これには、パリティの断片化、チェックなしでのブロックの古さ、および +スクラビング中に遭遇したすべての記録されたサイレントエラーに関する情報が +含まれます。 +

提示される情報は、最後に sync を実行した時点のものです。 +それ以降の変更は考慮されません。 +

不良ブロックが検出された場合、それらのブロック番号が一覧表示されます。 +それらを修正するには、fix -e コマンドを使用できます。 +

また、各ブロックが最後にスクラブまたは同期された時期を示すグラフも表示されます。 +スクラブされたブロックは * で、同期されたがまだスクラブされていないブロックは o で +示されます。 +

何も変更されません。 +

+
+

+smart +

+

システム内のすべてのディスクのSMARTレポートを出力します。 +

これには、翌年の故障確率の推定値が含まれており、疑わしい属性を示すディスクの +メンテナンス交換を計画できます。 +

この確率推定は、ディスクのSMART属性を次の場所で利用可能なBackblazeのデータと +相関させることで得られます。 +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

SMARTがディスクが故障していると報告した場合、そのディスクに対して FAIL または PREFAIL が +出力され、SnapRAIDはエラーを返します。 +この場合、**ディスクの即時交換**が強く推奨されます。 +

その他の可能なステータス文字列は次のとおりです。 +

+
+
+logfail +
+過去に、一部の属性がしきい値よりも低かった。 +
+
+
+
+logerr +
+デバイスのエラーログにエラーが含まれている。 +
+
+
+
+selferr +
+デバイスのセルフテストログにエラーが含まれている。 +
+
+
+
+
+
+-v, --verbose オプションが指定されている場合、より詳細な統計分析が提供されます。 +
+
+
+
+

この分析は、より多くまたはより少ないパリティが必要かどうかを決定するのに役立ちます。 +

このコマンドは smartctl ツールを使用し、すべてのデバイスで smartctl -a を実行するのと +同等です。 +

デバイスが正しく自動検出されない場合は、構成ファイルで smartctl オプションを +使用してカスタムコマンドを指定できます。 +

何も変更されません。 +

+
+

+probe +

+

システム内のすべてのディスクのPOWER状態を出力します。 +

Standby はディスクがスピンしていないことを意味します。Active は +ディスクがスピンしていることを意味します。 +

このコマンドは smartctl ツールを使用し、すべてのデバイスで smartctl -n standby -i を実行するのと +同等です。 +

デバイスが正しく自動検出されない場合は、構成ファイルで smartctl オプションを +使用してカスタムコマンドを指定できます。 +

何も変更されません。 +

+
+

+up +

+

アレイのすべてのディスクをスピンアップします。 +

+
+
+-d, --filter-disk オプションを使用して、特定のディスクのみをスピンアップできます。 +
+
+
+
+

すべてのディスクを同時にスピンアップするには、多くの電力が必要です。 +電源がそれに耐えられることを確認してください。 +

何も変更されません。 +

+
+

+down +

+

アレイのすべてのディスクをスピンダウンします。 +

このコマンドは smartctl ツールを使用し、すべてのデバイスで smartctl -s standby,now を実行するのと +同等です。 +

+
+
+-d, --filter-disk オプションを使用して、特定のディスクのみをスピンダウンできます。 +
+
+
+
+

エラー時に自動的にスピンダウンするには、他の任意のコマンドで -s, --spin-down-on-error +オプションを使用できます。これは、エラーが発生したときに手動で down を実行するのと同等です。 +

何も変更されません。 +

+
+

+diff +

+

最後の sync 以降に変更され、パリティデータを再計算する必要があるすべてのファイルを +一覧表示します。 +

このコマンドはファイルデータはチェックせず、ファイルのタイムスタンプ、サイズ、 +およびinodeのみをチェックします。 +

変更されたすべてのファイルを一覧表示した後、変更の概要が +次のようにグループ化されて提示されます。 +

+
+
+equal +
+変更されていないファイル。 +
+
+
+
+added +
+以前は存在しなかった追加されたファイル。 +
+
+
+
+removed +
+削除されたファイル。 +
+
+
+
+updated +
+サイズまたはタイムスタンプが異なるファイル。これは、 +変更されたことを意味します。 +
+
+
+
+moved +
+同じディスク上の異なるディレクトリに移動されたファイル。 +同じ名前、サイズ、タイムスタンプ、およびinodeを持ちますが、ディレクトリが +異なることで識別されます。 +
+
+
+
+copied +
+元のファイルがまだ存在する、同じディスクまたは別の +ディスクにコピーされたファイル。 +これらは、同じ名前、サイズ、およびタイムスタンプを持つこと +によって識別されます。 +サブ秒のタイムスタンプがゼロの場合、名前だけでなくフルパス +が一致する必要があります。 +
+
+
+
+relocated +
+オリジナルが消失した、同じディスクまたは別のディ +スクに移動されたファイル。 +これらは、同じ名前、サイズ、およびタイムスタンプを持つこと +によって識別されます。 +サブ秒のタイムスタンプがゼロの場合、識別するにはフルパスが +一致する必要があります。 +同じディスク上の 'moved' ファイルとは異なり、再配置された +ファイルは異なる inode を持ちます。 +
+
+
+
+restored +
+inode は異なるが、ディレクトリ、名前、サイズ、お +よびタイムスタンプが一致するファイル。 +これらは通常、削除された後に復元されたファイルです。 +
+
+
+

sync が必要な場合、プロセスはデフォルトの0ではなく、リターンコード2を返します。 +リターンコード1は、一般的なエラー状態に使用されます。 +

何も変更されません。 +

+
+

+sync +

+

パリティ情報を更新します。ディスクアレイ内のすべての変更されたファイルが読み取られ、 +対応するパリティデータが更新されます。 +

Ctrl+Cを押すことでいつでもこのプロセスを停止でき、 +既に完了した作業を失うことはありません。 +次回の実行時には、sync プロセスは中断された場所から +再開されます。 +

プロセス中にサイレントエラーまたは入出力エラーが見つかった場合、 +対応するブロックは不良としてマークされます。 +

ファイルはパスおよび/またはinodeによって識別され、サイズとタイムスタンプによって +チェックされます。 +ファイルサイズまたはタイムスタンプが異なる場合、パリティデータはファイル全体で +再計算されます。 +ファイルが同じディスク上で移動または名前が変更され、同じinodeが保持されている場合、 +パリティは再計算されません。 +ファイルが別のディスクに移動された場合、パリティは再計算されますが、 +以前に計算されたハッシュ情報は保持されます。 +

content ファイルと parity ファイルは必要に応じて変更されます。 +アレイ内のファイルは**変更されません**。 +

+
+

+scrub +

+

アレイをスクラブし、データおよびパリティディスクのサイレントエラーまたは入出力エラーを +チェックします。 +

1回の呼び出しごとに、最後の10日間で既にスクラブされたデータを除いて、 +アレイの約8%がチェックされます。 +これは、週に1回スクラビングを実行すると、すべてのデータが少なくとも3か月に1回は +チェックされることを意味します。 +

+
+
+-p, --plan オプションを使用して、異なるスクラブプランまたは量を定義できます。 +
+
+
+
+

このオプションは以下を受け入れます。 +bad - 不良としてマークされたブロックをスクラブします。 +new - まだスクラブされていない、同期されたばかりのブロックをスクラブします。 +full - すべてをスクラブします。 +0-100 - 指定されたパーセンテージのブロックをスクラブします。 +

パーセンテージの量を指定する場合、-o, --older-than オプションを使用して、 +ブロックがどれくらいの古さである必要があるかを定義することもできます。 +最も古いブロックが最初にスクラブされ、最適なチェックが保証されます。 +まだスクラブされていない、同期されたばかりのブロックのみをスクラブしたい場合は、 +-p new オプションを使用します。 +

スクラブステータスの詳細を取得するには、status コマンドを使用します。 +

見つかったサイレントエラーまたは入出力エラーごとに、対応するブロックは +content ファイル内で不良としてマークされます。 +これらの不良ブロックは status で一覧表示され、fix -e で修正できます。 +修正後、次回のスクラブで再チェックされ、修正されていると判明した場合、 +不良マークは削除されます。 +不良ブロックのみをスクラブするには、scrub -p bad コマンドを使用できます。 +

未同期のデータによって引き起こされた報告されたエラーを避けるために、 +scrub は**同期された**アレイでのみ実行することをお勧めします。これらのエラーは +サイレントエラーではないと認識され、ブロックは不良としてマークされませんが、 +そのようなエラーはコマンドの出力で報告されます。 +

content ファイルは、各ブロックの最後のチェック時刻を更新し、不良ブロックを +マークするために変更されます。 +parity ファイルは**変更されません**。 +アレイ内のファイルは**変更されません**。 +

+
+

+fix +

+

すべてのファイルとパリティデータを修正します。 +

すべてのファイルとパリティデータは、最後の sync で保存されたスナップショット状態と +比較されます。 +違いが見つかった場合、保存されたスナップショットに**元に戻されます**。 +

**警告!** fix コマンドは、エラーと意図的な変更を区別しません。 +ファイルの_状態を_最後の sync に**無条件に元に戻します**。 +

他のオプションが指定されていない場合、アレイ全体が処理されます。 +フィルタオプションを使用して、操作するファイルまたはディスクのサブセットを +選択します。 +

sync および scrub 中に不良としてマークされたブロックのみを修正するには、 +-e, --filter-error オプションを使用します。 +他のフィルタオプションとは異なり、これは最新の sync 以降に**変更されていない** +ファイルにのみ修正を適用します。 +

SnapRAIDは、修正できないすべてのファイルの名前を .unrecoverable 拡張子を +追加して変更します。 +

修正する前に、アレイ全体がスキャンされ、最後の sync 操作以降に移動されたファイルが +見つけられます。 +これらのファイルは、名前を無視してタイムスタンプによって識別され、 +必要に応じて復旧プロセスで使用されます。 +それらのいくつかをアレイ外に移動した場合は、-i, --import オプションを使用して +スキャンする追加のディレクトリを指定できます。 +

ファイルは**パスによってのみ**識別され、inodeによっては識別されません。 +

content ファイルは**変更されません**。 +parity ファイルは必要に応じて変更されます。 +アレイ内のファイルは必要に応じて変更されます。 +

+
+

+check +

+

すべてのファイルとパリティデータを検証します。 +

fix のように機能しますが、復旧を**シミュレートするだけ**で、アレイに**変更は書き込まれません**。 +

このコマンドは、主に復旧プロセス後やその他の特殊な条件下での手動検証を +目的としています。 +定期的でスケジュールされたチェックには、scrub を使用します。 +

+
+
+-a, --audit-only オプションを使用すると、ファイルの**ハッシュのみ**がチェックされ、 +
+
+
+
+

パリティデータは無視されるため、チェックプロセスが大幅に高速化されます。 +

ファイルは**パスによってのみ**識別され、inodeによっては識別されません。 +

何も変更されません。 +

+
+

+list +

+

最後の sync の時点のアレイに含まれるすべてのファイルを +一覧表示します。 +

+
+
+-v または --verbose を使用すると、サブ秒の時間も表示されます。 +
+
+
+
+

何も変更されません。 +

+
+

+dup +

+

すべての重複ファイルを一覧表示します。ハッシュが一致する場合、2つのファイルは等しいと見なされます。 +ファイルデータは読み取られず、事前に計算されたハッシュのみが使用されます。 +

何も変更されません。 +

+
+

+pool +

+

pooling ディレクトリに、ディスクアレイ内のすべてのファイルの仮想ビューを +作成または更新します。 +

ファイルはコピーされず、シンボリックリンクを使用してリンクされます。 +

更新時、既存のすべてのシンボリックリンクと空のサブディレクトリは削除され、 +アレイの新しいビューに置き換えられます。その他の通常のファイルはそのまま残されます。 +

プールディレクトリ外は何も変更されません。 +

+
+

+devices +

+

アレイで使用される低レベルデバイスを出力します。 +

このコマンドは、アレイ内のデバイスの関連付けを表示し、主にスクリプトインターフェイスを +目的としています。 +

最初の2つの列は、低レベルデバイスIDとパスです。 +次の2つの列は、高レベルデバイスIDとパスです。 +最後の列は、アレイ内のディスク名です。 +

ほとんどの場合、アレイ内のディスクごとに1つの低レベルデバイスがありますが、 +より複雑な構成では、単一のアレイ内のディスクで複数の低レベルデバイスが +使用される場合があります。 +

何も変更されません。 +

+
+

+touch +

+

サブ秒のタイムスタンプがゼロに設定されているすべてのファイルに、任意のサブ秒のタイムスタンプを +設定します。 +

これにより、タイムスタンプがほぼ一意になり、重複の可能性が減るため、 +SnapRAIDが移動およびコピーされたファイルを認識する能力が向上します。 +

より具体的には、サブ秒のタイムスタンプがゼロでない場合、移動またはコピーされたファイルは、 +名前、サイズ、およびタイムスタンプが一致する場合にそうであると識別されます。 +サブ秒のタイムスタンプがゼロの場合、フルパス、サイズ、およびタイムスタンプのすべてが +一致する場合にのみコピーと見なされます。 +

秒精度のタイムスタンプは変更されないため、ファイルのすべての日付と時刻は +保持されます。 +

+
+

+rehash +

+

アレイ全体のリハッシュをスケジュールします。 +

このコマンドは、使用されるハッシュの種類を変更します。これは通常、32ビットシステムから +64ビットシステムにアップグレードするときに、MurmurHash3からより高速なSpookyHashに +切り替えるために行われます。 +

既に最適なハッシュを使用している場合、このコマンドは何もせず、アクションが不要であることを +通知します。 +

リハッシュはすぐには実行されず、sync および scrub の間に徐々に実行されます。 +

status を使用してリハッシュの状態を確認できます。 +

リハッシュ中もSnapRAIDは完全な機能を維持しますが、唯一の例外として、 +dup は異なるハッシュを使用している重複ファイルを検出できません。 +

+
+

+locate +

+

パリティディスクに保存されているファイルを検索します。一致する各ファイルについて、 +パリティファイル内での位置と、それが占有するフラグメントの数を出力します。 +

+
+
+-t, --tail オプションを使用すると、パリティの指定された末尾部分を占有する +
+
+
+
+

ファイルに操作を制限できます。 +

これらのファイルを再配置したい場合は、-W, --force-realloc-tail オプションを +使用できます。 +再配置プロセス中、これらのファイルはパリティによって保護されないことに +注意してください。 +

+
+
+

+Options +

+

SnapRAIDには、次のオプションがあります。 +

+
+
+-c, --conf CONFIG +
+使用する構成ファイルを選択します。指定されていない場合、Unixでは、存在すれば +/usr/local/etc/snapraid.conf を使用し、それ以外の場合は /etc/snapraid.conf を +使用します。 +Windowsでは、snapraid.exe と同じディレクトリにある snapraid.conf ファイルを +使用します。 +
+
+
+
+
+
+-f, --filter PATTERN +
+check および fix で処理するファイルをフィルタリングします。 +指定されたパターンに一致するファイルのみが処理されます。 +このオプションは複数回使用できます。 +パターン仕様の詳細については、PATTERNセクションを参照してください。 +Unixでは、グロブ文字を使用する場合は引用符で囲むようにしてください。 +このオプションは、check および fix のみで使用できます。 +これらは常にアレイ全体を処理するため、sync および scrub では +使用できません。 +
+
+
+
+
+
+-d, --filter-disk NAME +
+check、fix、up、および down で処理するディスクをフィルタリングします。 +構成ファイルで定義されているディスク名を指定する必要があります。 +parity、2-parity、3-parity などの名前でパリティディスクも指定して、 +特定のパリティディスクに操作を限定できます。 +複数の --filter、--filter-disk、および --filter-missing オプションを組み合わせると、 +すべてのフィルタに一致するファイルのみが選択されます。 +このオプションは複数回使用できます。 +このオプションは、check、fix、up、および down のみで使用できます。 +これらは常にアレイ全体を処理するため、sync および scrub では +使用できません。 +
+
+
+
+
+
+-m, --filter-missing +
+check および fix で処理するファイルをフィルタリングします。 +アレイから不足または削除されたファイルのみが処理されます。 +fix と一緒に使用すると、これは undelete コマンドとして機能します。 +複数の --filter、--filter-disk、および --filter-missing オプションを組み合わせると、 +すべてのフィルタに一致するファイルのみが選択されます。 +このオプションは、check および fix のみで使用できます。 +これらは常にアレイ全体を処理するため、sync および scrub では +使用できません。 +
+
+
+
+
+
+-e, --filter-error +
+check および fix でエラーのあるファイルを処理します。 +status で一覧表示されているように、sync および scrub 中にサイレントエラーまたは +入出力エラーでマークされたブロックを持つファイルのみを処理します。 +このオプションは、check および fix のみで使用できます。 +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+スクラブプランを選択します。PERCが0から100までの数値である場合、 +スクラブするブロックのパーセンテージとして解釈されます。 +パーセンテージの代わりに、プランを指定できます。 +bad は不良ブロックをスクラブし、new はまだスクラブされていないブロックをスクラブし、 +full はすべてをスクラブします。 +このオプションは、scrub のみで使用できます。 +
+
+
+
+
+
+-o, --older-than DAYS +
+scrub で処理するアレイの最も古い部分を選択します。 +DAYS は、ブロックがスクラブされるための最小経過日数であり、デフォルトは10です。 +不良としてマークされたブロックは、このオプションに関係なく常にスクラブされます。 +このオプションは、scrub のみで使用できます。 +
+
+
+
+
+
+-a, --audit-only +
+check で、パリティデータをチェックせずにファイルのハッシュを検証します。 +ファイルデータのみのチェックに関心がある場合、このオプションはチェックプロセスを +大幅に高速化できます。 +このオプションは、check のみで使用できます。 +
+
+
+
+
+
+-h, --pre-hash +
+sync で、パリティ計算の前の追加検証のために、すべての新しいデータの +予備ハッシュ化フェーズを実行します。 +通常、sync では、予備ハッシュ化は行われず、新しいデータはパリティ計算の直前に、 +最初に読み取られたときにハッシュ化されます。 +このプロセスは、システムが重い負荷の下にあり、すべてのディスクがスピンしており、CPUが +ビジーなときに発生します。 +これはマシンにとって極端な状態であり、潜在的なハードウェアの問題がある場合、 +データがまだハッシュ化されていないため、サイレントエラーが検出されないままになる +可能性があります。 +このリスクを回避するために、pre-hash モードを有効にして、すべてのデータを2回読み取り、 +その整合性を確保できます。 +このオプションは、アレイ内で移動されたファイルも検証して、移動操作が成功したことを +確認し、必要に応じて、続行する前に修正操作を実行できるようにします。 +このオプションは、sync のみで使用できます。 +
+
+
+
+
+
+-i, --import DIR +
+最後の sync の後にアレイから削除されたファイルを、指定されたディレクトリから +インポートします。 +これらのファイルをまだ持っている場合、それらは復旧プロセスを改善するために +check および fix で使用できます。 +ファイルは、サブディレクトリを含めて読み取られ、名前に関係なく識別されます。 +このオプションは、check および fix のみで使用できます。 +
+
+
+
+
+
+-s, --spin-down-on-error +
+エラーが発生した場合、非ゼロのステータスコードで終了する前に、管理されているすべてのディスクを +スピンダウンします。これにより、中断された操作後にドライブがアクティブなままスピンし続け、 +不要な熱の蓄積と電力消費を回避するのに役立ちます。 +コマンドが失敗した場合でも、ディスクが安全に停止されるように、このオプションを使用します。 +
+
+
+
+
+
+-w, --bw-limit RATE +
+すべてのディスクにグローバルな帯域幅制限を適用します。RATE は +1秒あたりのバイト数です。K、M、Gなどの乗数を指定できます +(例:--bw-limit 1G)。 +
+
+
+
+
+
+-t, --tail サイズ +
+ファイルリストを、パリティディスクの指定された末尾サイズ以下を +使用しているものに制限します。 +K、M、G、T などの倍数を使用できます(例:--tail 1G)。 +このオプションは、locate コマンドと一緒に使用された場合にのみ +有効です。 +
+
+
+
+
+
+-A, --stats +
+追加情報を表示する拡張ステータスビューを有効にします。 +画面には2つのグラフが表示されます。 +最初のグラフは、各ディスクのバッファリングされたストライプの数と、そのディスクで現在 +アクセスされているファイルのファイルパスを示します。通常、最も遅いディスクには +バッファが利用できず、これが達成可能な最大帯域幅を決定します。 +2番目のグラフは、過去100秒間に待機に費やされた時間のパーセンテージを示します。 +最も遅いディスクが待機時間のほとんどを引き起こすと予想され、他のディスクは +バッファリングされたストライプを使用できるため、待機時間がほとんどまたはまったくないはずです。 +このグラフは、ハッシュ計算とRAID計算に費やされた待機時間も示します。 +すべての計算はディスク操作と並行して実行されます。 +したがって、少なくとも1つのディスクで測定可能な待機時間がある限り、 +CPUがワークロードに追いつくのに十分速いことを示しています。 +
+
+
+
+
+
+-Z, --force-zero +
+以前は非ゼロだったサイズのファイルをゼロで同期するという安全でない操作を強制します。 +SnapRAIDがこのような状態を検出した場合、このオプションを指定しない限り、 +続行を停止します。 +これにより、システムクラッシュ後に一部のアクセスされたファイルが切り捨てられたときに、 +それを簡単に検出できます。 +これは、ext3/ext4ファイルシステムを使用したLinuxで起こりうる状態です。 +このオプションは、sync のみで使用できます。 +
+
+
+
+
+
+-E, --force-empty +
+元のファイルがすべて不足しているディスクを同期するという安全でない操作を強制します。 +SnapRAIDが、元々ディスクに存在していたすべてのファイルが不足しているか、 +書き換えられていることを検出した場合、このオプションを指定しない限り、 +続行を停止します。 +これにより、データファイルシステムがマウントされていないときに、それを簡単に +検出できます。 +このオプションは、sync のみで使用できます。 +
+
+
+
+
+
+-U, --force-uuid +
+UUIDが変更されたディスクとの同期、チェック、および修正という安全でない操作を強制します。 +SnapRAIDが一部のディスクがUUIDを変更したことを検出した場合、 +このオプションを指定しない限り、続行を停止します。 +これにより、ディスクが間違ったマウントポイントにマウントされているときに、それを検出できます。 +ただし、単一パリティでの単一のUUID変更、および複数のパリティでのより多くのUUID変更は +許可されています。これは、復旧後にディスクを交換するときの通常のケースであるためです。 +このオプションは、sync、check、または fix のみで使用できます。 +
+
+
+
+
+
+-D, --force-device +
+アクセスできないディスク、または同じ物理デバイス上のディスクとの修正という安全でない操作を強制します。 +たとえば、2台のデータディスクを失い、最初の1台だけを復旧するための予備ディスクがある場合、 +2番目のアクセスできないディスクを無視できます。 +または、既に**使用されている**ディスクに残された空き容量にディスクを復旧したい場合、 +同じ物理デバイスを共有します。 +このオプションは、fix のみで使用できます。 +
+
+
+
+
+
+-N, --force-nocopy +
+sync、check、および fix で、コピー検出ヒューリスティックを無効にします。 +このオプションがない場合、SnapRAIDは、名前、サイズ、タイムスタンプなどの同じ属性を持つファイルが、 +同じデータを持つコピーであると見なします。 +これにより、あるディスクから別のディスクにコピーまたは移動されたファイルを識別し、 +既に計算されたハッシュ情報を再利用して、サイレントエラーを検出したり、不足しているファイルを +復旧したりできます。 +まれに、この動作が誤検出や、多くのハッシュ検証によるプロセスの遅延につながる可能性があり、 +このオプションを使用すると、そのような問題を解決できます。 +このオプションは、sync、check、および fix のみで使用できます。 +
+
+
+
+
+
+-F, --force-full +
+sync で、パリティの完全な再計算を強制します。 +このオプションは、新しいパリティレベルを追加する場合、またはより新しいパリティデータを使用して +古いコンテンツファイルに戻した場合に使用できます。 +パリティを最初から再作成する代わりに、これにより、コンテンツファイルに存在するハッシュを +再利用してデータを検証し、既存のパリティデータを使用して sync プロセス中にデータ保護を +維持できます。 +このオプションは、sync のみで使用できます。 +
+
+
+
+
+
+-R, --force-realloc +
+sync で、ファイルの完全な再割り当てとパリティの再構築を強制します。 +このオプションは、コンテンツファイルに存在するハッシュを再利用してデータを検証しながら、 +断片化を削除して、すべてのファイルを完全に再割り当てするために使用できます。 +このオプションは、sync のみで使用できます。 +**警告!** このオプションはエキスパートのみを対象としており、使用しないことを強く +お勧めします。 +sync 操作中にデータ保護はありません。 +
+
+
+
+
+
+-W, --force-realloc-tail サイズ +
+-R, --force-realloc と同様に動作しますが、各パリティファイルの +指定された末尾部分(最後の「サイズ」バイト)に制限されます。 +現在その末尾セクションに保存されているファイルフラグメント/ブロックの +再配置(移動)を強制し、空きスペースがあるパリティファイル内の +任意の場所(既存のホールを含む)に配置できるようにします。 +このオプションの主な目的は、パリティファイルのディスク上でのサイズを +縮小することです。 +再配置によって末尾セクション全体が正常にクリアされた場合 +(それを使用するブロックが残っていない場合)、パリティファイルは +切り詰められ、未使用の末尾スペースが回収されます。 +K、M、G、T などの倍数を使用できます(例: +--force-realloc-tail 1G)。 +locate -t, --tail を使用して、影響を受けるファイルを事前に +知ることができます。 +警告! +このオプションはエキスパート専用であり、使用しないことが +強く推奨されます。 +影響を受けるファイルについては、sync 操作中にデータ保護は +行われません。 +
+
+
+
+
+
+-l, --log FILE +
+詳細なログを指定されたファイルに書き込みます。 +このオプションが指定されていない場合、予期しないエラーが画面に出力され、 +多くのエラーが発生した場合に過剰な出力になる可能性があります。 +-l, --log が指定されている場合、SnapRAIDが停止する原因となる致命的なエラーのみが +画面に出力されます。 +パスが >> で始まる場合、ファイルは追記モードで開かれます。 +名前に %D と %T が出現すると、それぞれYYYYMMDDとHHMMSSの形式で +日付と時刻に置き換えられます。Windowsバッチファイルでは、% 文字を +2倍にする必要があります。例:result-%%D.log。>> を使用するには、 +名前を引用符で囲む必要があります。例:">>result.log"。 +ログを標準出力または標準エラーに出力するには、それぞれ ">&1" および ">&2" を +使用できます。 +ログタグの説明については、snapraid_log.txtファイルまたはmanページを参照してください。 +
+
+
+
+
+
+-L, --error-limit NUMBER +
+実行を停止する前の新しいエラー制限を設定します。 +デフォルトでは、SnapRAIDは100を超える入出力エラーに遭遇した場合に停止します。 +これは、ディスクが故障している可能性が高いことを示しています。 +このオプションは sync と scrub に影響し、最初の一連のディスクエラーの後に +続行して操作を完了しようとすることが許可されます。 +ただし、check と fix は常に最初のエラーで停止します。 +
+
+
+
+
+
+-S, --start BLKSTART +
+指定されたブロック番号から処理を開始します。 +これは、破損したディスクの場合に特定のブロックを再試行してチェックまたは修正するのに +役立ちます。 +このオプションは、主に高度な手動復旧を目的としています。 +
+
+
+
+
+
+-B, --count BLKCOUNT +
+指定された数のブロックのみを処理します。 +このオプションは、主に高度な手動復旧を目的としています。 +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+既存のコンテンツファイルからダミーの構成ファイルを生成します。 +構成ファイルは標準出力に書き込まれ、既存のファイルを上書きしません。 +この構成ファイルには、システム全体を失った場合にディスクのマウントポイントを +再構築するために必要な情報も含まれています。 +
+
+
+
+
+
+-v, --verbose +
+画面により多くの情報を出力します。 +1回指定すると、除外されたファイルと追加の統計が出力されます。 +このオプションはログファイルには影響しません。 +
+
+
+
+
+
+-q, --quiet +
+画面に出力される情報を減らします。 +1回指定すると、プログレスバーが削除されます。2回指定すると、実行中の操作が削除されます。 +3回指定すると、情報メッセージが削除されます。4回指定すると、ステータスメッセージが削除されます。 +致命的なエラーは常に画面に出力されます。 +このオプションはログファイルには影響しません。 +
+
+
+
+
+
+-H, --help +
+短いヘルプ画面を出力します。 +
+
+
+
+
+
+-V, --version +
+プログラムのバージョンを出力します。 +
+
+
+
+
+

+Configuration +

+

SnapRAIDは、ディスクアレイの場所とパリティ情報の保存場所を知るために、構成ファイルを +必要とします。 +

Unixでは、存在すれば /usr/local/etc/snapraid.conf を使用し、それ以外の場合は +/etc/snapraid.conf を使用します。 +Windowsでは、snapraid.exe と同じディレクトリにある snapraid.conf ファイルを +使用します。 +

次のオプションを含める必要があります(大文字と小文字を区別します)。 +

+

+parity FILE [,FILE] ... +

+

パリティ情報を保存するために使用するファイルを定義します。 +パリティは、RAID5と同様に、単一のディスク障害からの保護を有効にします。 +

複数のファイルを指定でき、それらは異なるディスク上に存在する必要があります。 +ファイルがそれ以上成長できなくなると、次のファイルが使用されます。 +利用可能な総容量は、アレイ内の**最大のデータディスク**と少なくとも同じ大きさでなければなりません。 +

後で追加のパリティファイルを追加することはできますが、 +それらを並べ替えたり削除したりすることはできません。 +

パリティディスクをパリティ用に予約しておくことで、それらが断片化されるのを防ぎ、 +パフォーマンスを向上させます。 +

Windowsでは、フルディスクに関する警告を避けるために、各ディスクに256 MBが未使用で +残されます。 +

このオプションは必須であり、1回のみ使用できます。 +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

追加のパリティ情報を保存するために使用するファイルを定義します。 +

指定されたパリティレベルごとに、1つの追加の保護レベルが有効になります。 +

    +
  • +2-parity は RAID6 デュアルパリティを有効にします。 +
  • +
  • +3-parity は トリプルパリティを有効にします。 +
  • +
  • +4-parity は クアッド(4つ)パリティを有効にします。 +
  • +
  • +5-parity は ペンタ(5つ)パリティを有効にします。 +
  • +
  • +6-parity は ヘキサ(6つ)パリティを有効にします。 +
  • +
+

各パリティレベルには、以前のすべてのパリティレベルが存在する必要があります。 +

parity オプションと同じ考慮事項が適用されます。 +

これらのオプションはオプションであり、1回のみ使用できます。 +

+
+

+z-parity FILE [,FILE] ... +

+

トリプルパリティを保存するための代替ファイルとフォーマットを定義します。 +

このオプションは 3-parity の代替であり、主にARMやSSSE3命令セットをサポートしていない +AMD Phenom、Athlon、OpteronなどのローエンドCPUを対象としています。 +このような場合、より良いパフォーマンスを提供します。 +

このフォーマットは、ZFS RAIDZ3で使用されるものと似ていますが、より高速です。 +ZFSと同様に、トリプルパリティを超えては機能しません。 +

3-parity を使用している場合、パフォーマンス向上のために z-parity フォーマットの +使用が推奨される場合は警告が表示されます。 +

構成ファイルを目的の z-parity または 3-parity ファイルで調整し、 +fix を使用して再作成することで、あるフォーマットから別のフォーマットに +変換することが可能です。 +

+
+

+content FILE +

+

ディスクアレイに存在するすべてのファイルの一覧とチェックサムを保存するために使用するファイルを +定義します。 +

データ、パリティ、またはその他の利用可能なディスクに配置できます。 +データディスクを使用する場合、このファイルは sync プロセスから自動的に +除外されます。 +

このオプションは必須であり、同じファイルを複数コピー保存するために複数回使用できます。 +

使用するパリティディスクごとに**少なくとも1つのコピー**と、さらに**1つのコピー**を +保存する必要があります。追加のコピーを使用しても害はありません。 +

+
+

+data NAME DIR +

+

アレイ内のデータディスクの名前とマウントポイントを定義します。 +NAME はディスクを識別するために使用され、**一意である**必要があります。 +DIR はファイルシステム内のディスクの**マウントポイント**です。 +

NAME を固定したままにしておけば、必要に応じてマウントポイントを変更できます。 +

アレイ内のデータディスクごとに1つのオプションを使用する必要があります。 +

構成ファイルで直接 NAME を変更してから sync コマンドを実行することで、 +後でディスクの名前を変更できます。 +名前変更の場合、関連付けはディスクの保存されたUUIDを使用して行われます。 +

+
+

+extra NAME DIR +

+

smart および probe コマンドで監視する追加ディスクの名前とマウ +ントポイントを定義します。 +

これは、ブートディスクなど、アレイの一部ではないがシステムの機能に必 +要なディスクを監視するのに役立ちます。 +

これらのディスクは常に回転していることが期待されるため、up およ +び down コマンドの影響を受けないことに注意してください。 +

+
+

+nohidden +

+

すべての隠しファイルとディレクトリを除外します。 +Unixでは、隠しファイルは . で始まるファイルです。 +Windowsでは、隠し属性を持つファイルです。 +

+
+

+exclude/include PATTERN +

+

syncプロセスで除外または含めるファイルまたはディレクトリのパターンを定義します。 +すべてのパターンは指定された順序で処理されます。 +

一致する最初のパターンが exclude の場合、ファイルは除外されます。 +include の場合、ファイルは含まれます。 +パターンが一致しない場合、最後に指定されたパターンが include の場合はファイルは除外され、 +exclude の場合は含まれます。 +

パターン仕様の詳細については、PATTERNセクションを参照してください。 +

このオプションは複数回使用できます。 +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

パリティの基本ブロックサイズをキビバイト単位で定義します。 +1キビバイトは1024バイトです。 +

デフォルトのブロックサイズは256であり、ほとんどの場合に機能するはずです。 +

**警告!** このオプションはエキスパートのみを対象としており、この値を変更しないことを強く +お勧めします。今後この値を変更するには、パリティ全体を**再作成**する必要があります! +

異なるブロックサイズを使用する理由の1つは、数百万のオーダーの**多くの小さなファイル**を +持っている場合です。 +

ファイルごとに、たとえ数バイトであっても、パリティの**ブロック全体**が割り当てられ、 +ファイルが多いと、これにより**かなりの未使用パリティスペース**が発生する可能性があります。 +パリティディスクを完全に埋めると、データディスクにファイルを追加することは**許可されません**。 +ただし、浪費されたパリティはデータディスク間で蓄積されません。データディスク上の多数のファイルから +生じる浪費スペースは、**そのデータディスク上のデータ量**のみを制限し、他のデータディスクには +影響しません。 +

概算として、ファイルごとにブロックサイズの半分が浪費されると仮定できます。 +たとえば、100,000ファイルと256 KiBのブロックサイズがある場合、12.8 GBのパリティが浪費され、 +これによりデータディスク上で12.8 GB少ないスペースしか利用できなくなる可能性があります。 +

status を使用して、各ディスクの浪費スペースの量を確認できます。 +これは、データディスク上に**空き**として残す必要がある、またはアレイに含まれないファイルに +使用する必要があるスペースの量です。 +この値が負の場合、パリティが満杯に近づいていることを意味し、まだ浪費できるスペースを +表します。 +

この問題を回避するために、パリティにより大きなパーティションを使用できます。 +たとえば、パリティパーティションがデータディスクよりも12.8 GB大きい場合、 +各データディスクで最大100,000ファイルを処理するのに十分な追加スペースがあり、 +浪費スペースはありません。 +

Linuxでより大きなパリティパーティションを取得するトリックは、次のコマンドで +フォーマットすることです。 +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

これにより、約1.5%の追加スペース、4 TBディスクで約60 GBが得られ、 +浪費スペースなしで各データディスクで約460,000ファイルが可能になります。 +

+
+

+hashsize SIZE_IN_BYTES +

+

保存されたブロックのハッシュサイズをバイト単位で定義します。 +

デフォルトのハッシュサイズは16バイト(128ビット)であり、ほとんどの場合に機能するはずです。 +

**警告!** このオプションはエキスパートのみを対象としており、この値を変更しないことを強く +お勧めします。今後この値を変更するには、パリティ全体を**再作成**する必要があります! +

異なるハッシュサイズを使用する理由の1つは、システムのメモリが制限されている場合です。 +経験則として、SnapRAIDは通常、アレイ内のデータ16 TBごとに1 GiBのRAMを必要とします。 +

具体的には、データのハッシュを保存するために、SnapRAIDは +約 $TS \cdot (1 + HS) / BS$ バイトのRAMを必要とします。 +ここで、TSはディスクアレイの合計サイズ(バイト)、BSはブロックサイズ(バイト)、HSはハッシュサイズ(バイト)です。 +

たとえば、4 TBのディスク8台、ブロックサイズ256 KiB(1 KiB = 1024バイト)、 +ハッシュサイズ16の場合: +

+RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (256 \cdot 2^{10}) = 1.93 \text{ GiB}$
+
+

ハッシュサイズを8に切り替えると: +

+RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (256 \cdot 2^{10}) = 1.02 \text{ GiB}$
+
+

ブロックサイズを512に切り替えると: +

+RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (512 \cdot 2^{10}) = 0.96 \text{ GiB}$
+
+

ハッシュサイズを8、ブロックサイズを512の両方に切り替えると: +

+RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (512 \cdot 2^{10}) = 0.51 \text{ GiB}$
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

処理された指定されたGB量後に、同期またはスクラビング時に状態を自動的に保存します。 +このオプションは、マシンクラッシュやその他のイベントによって中断された場合に、 +長い sync コマンドを最初から再起動するのを避けるのに役立ちます。 +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

許容される最大ディスク温度を摂氏で設定します。指定されている場合、 +SnapRAIDは smartctl ツールを使用してすべてのディスクの温度を定期的にチェックします。 +SnapRAIDが動作している間、現在のディスク温度が表示されます。 +いずれかのディスクがこの制限を超えると、すべての操作が停止し、ディスクは temp_sleep +オプションで定義された期間、スピンダウン(スタンバイ状態に移行)されます。 +スリープ期間後、操作は再開されますが、温度制限に再度達した場合は再び一時停止する +可能性があります。 +

操作中、SnapRAIDは各ディスクの加熱曲線も分析し、アクティビティが継続した場合に +達すると予想される長期的な安定温度を推定します。推定は、ディスク温度が4回上昇した +後にのみ実行され、信頼できる傾向を確立するのに十分なデータポイントが利用可能であることを +保証します。 +この予測される安定温度は、現在の値の横に括弧で表示され、システムの冷却が +適切かどうかを評価するのに役立ちます。この推定温度は情報提供のみを目的としており、 +SnapRAIDの動作には影響しません。プログラムの動作は、実際の測定されたディスク温度にのみ +基づいています。 +

この分析を実行するために、SnapRAIDはシステム温度の参照が必要です。 +まず、利用可能なハードウェアセンサーから読み取ろうとします。システムセンサーに +アクセスできない場合は、実行開始時に測定された最も低いディスク温度をフォールバック参照として +使用します。 +

通常、SnapRAIDは最も熱いディスクの温度のみを表示します。 +すべてのディスクの温度を表示するには、-A または --stats オプションを使用します。 +

+
+

+temp_sleep TIME_IN_MINUTES +

+

温度制限に達したときのスタンバイ時間(分単位)を設定します。この期間中、ディスクは +スピンダウンしたままです。デフォルトは5分です。 +

+
+

+pool DIR +

+

pool コマンドを使用してディスクアレイの仮想ビューが作成されるプーリングディレクトリを +定義します。 +

ディレクトリは既に存在している必要があります。 +

+
+

+share UNC_DIR +

+

ディスクにリモートでアクセスするために必要なWindows UNCパスを定義します。 +

このオプションが指定されている場合、プールディレクトリに作成されたシンボリックリンクは、 +ディスクにアクセスするためにこのUNCパスを使用します。 +このオプションがない場合、生成されたシンボリックリンクはローカルパスのみを使用し、 +プールディレクトリをネットワーク経由で共有することはできません。 +

シンボリックリンクは、指定されたUNCパスを使用して形成され、data オプションで +指定されたディスク名を追加し、最後にファイルのディレクトリと名前を追加します。 +

このオプションはWindowsでのみ必要です。 +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

各ディスクのSMART属性を取得するためのカスタムsmartctlオプションを定義します。 +これは、RAIDコントローラーや一部のUSBディスクが自動検出できない場合に必要になる +ことがあります。%s プレースホルダーはデバイス名に置き換えられますが、 +RAIDコントローラーなどの固定デバイスではオプションです。 +

DISK は data オプションで指定されたのと同じディスク名です。 +PARITY はパリティ名のいずれかです:parity、2-parity、3-parity、 +4-parity、5-parity、6-parity、または z-parity。 +

指定された OPTIONS で、%s 文字列はデバイス名に置き換えられます。 +RAIDコントローラーの場合、デバイスは固定されている可能性が高いため、 +%s を使用する必要はないかもしれません。 +

使用可能なオプションについては、smartmontoolsのドキュメントを参照してください。 +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

例: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

ディスク障害の確率を計算するときに、指定されたSMART属性を無視します。 +このオプションは、ディスクが特定の属性について異常な値または誤解を招く値を報告する場合に +役立ちます。 +

DISK は data オプションで指定されたのと同じディスク名です。 +PARITY はパリティ名のいずれかです:parity、2-parity、3-parity、 +4-parity、5-parity、6-parity、または z-parity。 +特殊な値 * は、すべてのディスクで属性を無視するために使用できます。 +

例として、すべてのディスクで Current Pending Sector Count 属性を無視するには: +

+smartignore * 197
+
+

最初のパリティディスクでのみ無視するには: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Unixの一般的な構成の例は次のとおりです。 +

+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
+
+

Windowsの一般的な構成の例は次のとおりです。 +

+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
+
+
+
+
+

+Pattern +

+

パターンは、含めるファイルまたは除外するファイルをフィルタリングするための柔軟な方法を +提供します。グロブ文字を使用することで、すべてのパスを手動でリストすることなく、 +特定のファイル名やディレクトリ構造全体に一致するルールを定義できます。 +

疑問符 ? は、ディレクトリ区切り文字を除く任意の1文字に一致します。 +これにより、パターンを単一のディレクトリレベルに限定したまま、可変文字を +持つファイル名と一致させるのに役立ちます。 +

単一のアスタリスク * は任意の文字列に一致しますが、疑問符と同様に +ディレクトリの境界を越えることはありません。スラッシュで停止するため、 +単一のパスコンポーネント内での一致に適しています。これは、シェルの +グロブでおなじみの標準的なワイルドカードの動作です。 +

ダブルアスタリスク ** はより強力で、ディレクトリ区切り文字を含む +任意の文字列に一致します。これにより、パターンが複数のディレクトリレベルを +またいで一致できるようになります。** がパターン内に直接埋め込まれている場合、 +周囲のリテラルテキストの間にあるスラッシュを含む0文字以上の文字に一致します。 +

** の最も重要な使い方は、特別な形式である /**/ です。これは +0個以上の完全なディレクトリレベルに一致し、正確なパス構造を知らなくても、 +ディレクトリツリー内の任意の深さにあるファイルと一致させることができます。 +例えば、パターン src/**/main.js は src/main.js(ディレクトリを0個スキップ)、 +src/ui/main.js(1個スキップ)、src/ui/components/main.js(2個スキップ) +に一致します。 +

角括弧 [] を使用した文字クラスは、指定されたセットまたは範囲の +任意の1文字に一致します。他の単一文字パターンと同様に、 +ディレクトリ区切り文字には一致しません。クラスは範囲と、感嘆符を +使用した否定をサポートしています。 +

覚えておくべき根本的な違いは、*、?、および文字クラスはすべて +ディレクトリの境界を尊重し、単一のパスコンポーネント内でのみ一致するのに対し、 +** はディレクトリ区切り文字をまたいで一致できる唯一のパターンであるということです。 +

4つの異なる種類のパターンがあります。 +

+
+
+FILE +
+FILE という名前の任意のファイルを選択します。 +このパターンはファイルにのみ適用され、ディレクトリには適用されません。 +
+
+
+
+
+
+DIR/ +
+DIR という名前の任意のディレクトリとその中のすべてを選択します。 +このパターンはディレクトリにのみ適用され、ファイルには適用されません。 +
+
+
+
+
+
+/PATH/FILE +
+指定された正確なファイル パスを選択します。このパターンは +ファイルにのみ適用され、ディレクトリには適用されません。 +
+
+
+
+
+
+/PATH/DIR/ +
+指定された正確なディレクトリ パスとその中のすべてを選択します。 +このパターンはディレクトリにのみ適用され、ファイルには適用されません。 +
+
+
+
+
+
+/ で始まる絶対パスを指定する場合、それはローカルファイルシステムのルートディレクトリではなく、 +
+
+
+
+

**アレイのルートディレクトリ**に適用されます。 +

Windowsでは、フォワードスラッシュ / の代わりにバックスラッシュ \ を使用できます。 +Windowsシステムディレクトリ、ジャンクション、マウントポイント、およびその他のWindowsの +特殊ディレクトリはファイルとして扱われます。つまり、それらを除外するには、 +ディレクトリルールではなく**ファイルルール**を使用する必要があります。 +

ファイル名に *、?、[、または ] 文字が含まれている場合は、 +グロブ文字として解釈されないように**エスケープ**する必要があります。 +Unixではエスケープ文字は \ です。Windowsでは ^ です。 +パターンがコマンドラインにある場合は、コマンドシェルによって解釈されるのを防ぐために、 +エスケープ文字を**2倍**にする必要があります。 +

構成ファイルでは、処理するファイルをフィルタリングするために異なる戦略を使用できます。 +最も簡単なアプローチは、**除外**したいすべてのファイルとディレクトリを削除するために、 +exclude ルールのみを使用することです。例: +

+# *.unrecoverable という名前の任意のファイルを除外
+exclude *.unrecoverable
+# ルートディレクトリ /lost+found を除外
+exclude /lost+found/
+# tmp という名前の任意のサブディレクトリを除外
+exclude tmp/
+
+

反対のアプローチは、include ルールのみを使用して、**処理したいファイルのみ**を +定義することです。例: +

+# 一部のディレクトリのみを含める
+include /movies/
+include /musics/
+include /pictures/
+
+

最後の方法としては、exclude と include ルールを混在させます。この場合、 +**ルールの順序が重要**です。前のルールは後のルールよりも優先されます。 +簡素化するために、すべての exclude ルールを最初にリストし、次にすべての include +ルールをリストできます。例: +

+# *.unrecoverable という名前の任意のファイルを除外
+exclude *.unrecoverable
+# tmp という名前の任意のサブディレクトリを除外
+exclude tmp/
+# 一部のディレクトリのみを含める
+include /movies/
+include /musics/
+include /pictures/
+
+

コマンドラインで -f オプションを使用する場合、include パターンのみを +使用できます。例: +

+# .mp3 ファイルのみをチェック。
+# Unixでは、シェルによるグロブ展開を防ぐために引用符を使用。
+snapraid -f "*.mp3" check
+
+

Unixでは、コマンドラインでグロブ文字を使用する場合、シェルがそれらを展開するのを +防ぐために引用符で囲む必要があります。 +

+
+

+Ignore File +

+

設定ファイルのグローバルルールに加えて、アレイ内の任意のディレクトリに +.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。 +

.snapraidignore で定義されたルールは、設定ファイルのルールの後に +適用されます。これは、それらがより高い優先度を持ち、グローバル設定で +以前に含まれていたファイルを除外するために使用できることを意味します。 +事実上、ローカルルールが一致する場合、グローバルな包含設定に関係なく、 +ファイルは除外されます。 +

.snapraidignore のパターンロジックはグローバル設定を反映していますが、 +パターンはそのファイルが配置されているディレクトリに固定されます: +

+
+
+FILE +
+このディレクトリまたはその下にある、FILE という名前の任意のファイルを +選択します。これは、グローバルパターンと同じグロッビングルールに従います。 +
+
+
+
+
+
+DIR/ +
+このディレクトリまたはその下にある、DIR という名前の任意のディレクトリと +その中のすべてを選択します。 +
+
+
+
+
+
+/PATH/FILE +
+.snapraidignore ファイルの場所を基準にして、指定された正確な +ファイルを選択します。 +
+
+
+
+
+
+/PATH/DIR/ +
+.snapraidignore ファイルの場所を基準にして、指定された正確な +ディレクトリとその中のすべてを選択します。 +
+
+
+

グローバル設定とは異なり、.snapraidignore ファイルは除外ルールのみを +サポートします。include パターンや否定 (!) は使用できません。 +

たとえば、/mnt/disk1/projects/ に .snapraidignore がある場合: +

+# /mnt/disk1/projects/output.bin のみを除外
+/output.bin
+# projects/ 内の build という名前のディレクトリをすべて除外
+build/
+# projects/ またはそのサブフォルダ内のすべての .tmp ファイルを除外
+*.tmp
+
+
+
+

+Content +

+

SnapRAIDは、ファイルの一覧とチェックサムをコンテンツファイルに保存します。 +

これはバイナリファイルであり、ディスクアレイに存在するすべてのファイルと、 +それらの整合性を検証するためのすべてのチェックサムを一覧表示します。 +

このファイルは sync および scrub コマンドによって読み書きされ、 +fix、check、および status コマンドによって読み取られます。 +

+
+

+Parity +

+

SnapRAIDは、アレイのパリティ情報をパリティファイルに保存します。 +

これらはバイナリファイルであり、content ファイルで定義されたすべてのブロックの +計算されたパリティが含まれています。 +

これらのファイルは sync および fix コマンドによって読み書きされ、 +scrub および check コマンドによって**読み取られるだけ**です。 +

+
+

+Encoding +

+

UnixのSnapRAIDは、エンコーディングを無視します。ファイルシステムで使用されている +のと同じエンコーディングでファイル名を読み取り、保存します。 +

Windowsでは、ファイルシステムから読み取られたすべての名前はUTF-8形式に変換され、 +処理されます。 +

ファイル名を正しく出力するには、chcp 65001 コマンドでWindowsコンソールをUTF-8モードに設定し、 +コンソールフォントとして Lucida Console などのTrueTypeフォントを**使用する**必要があります。 +これは出力されるファイル名にのみ影響します。コンソール出力をファイルにリダイレクトする場合、 +結果のファイルは常にUTF-8形式になります。 +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-ko.html b/beta/manual-ko.html new file mode 100644 index 00000000..2e0ecfe6 --- /dev/null +++ b/beta/manual-ko.html @@ -0,0 +1,2073 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID는 디스크 어레이를 위해 설계된 백업 프로그램으로, +최대 6개의 디스크 오류가 발생해도 데이터를 복구하기 위한 +패리티 정보를 저장합니다. +

주로 크고 자주 변경되지 않는 파일을 가진 홈 미디어 센터를 +위해 고안된 SnapRAID는 다음과 같은 몇 가지 기능을 제공합니다: +

    +
  • +파일을 다시 포맷할 필요 없이 이미 파일로 채워진 디스크를 +활용할 수 있으며, 평소처럼 액세스할 수 있습니다. +
  • +
  • +데이터 무결성을 보장하고 무단 손상을 방지하기 위해 모든 데이터가 +해시됩니다. +
  • +
  • +실패한 디스크의 수가 패리티 수를 초과하는 경우, 데이터 손실은 +영향을 받은 디스크로 제한되며, 다른 디스크의 데이터는 +계속 액세스할 수 있습니다. +
  • +
  • +실수로 디스크의 파일을 삭제한 경우에도 복구가 가능합니다. +
  • +
  • +디스크는 서로 다른 크기를 가질 수 있습니다. +
  • +
  • +언제든지 디스크를 추가할 수 있습니다. +
  • +
  • +SnapRAID는 데이터를 가두지 않습니다. 언제든지 포맷하거나 데이터를 +이동할 필요 없이 사용을 중단할 수 있습니다. +
  • +
  • +파일에 액세스하려면 단일 디스크만 회전하면 되므로, 전력을 절약하고 +소음을 줄일 수 있습니다. +
  • +
+

더 자세한 정보는 공식 SnapRAID 사이트를 방문하십시오: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을 +결합하는 것을 목표로 합니다. 하지만, 사용 전에 고려해야 할 몇 가지 +제한 사항이 있습니다. +

주요 제한 사항은 디스크가 실패하고 최근에 동기화(sync)하지 않은 경우, +완전히 복구하지 못할 수 있다는 것입니다. +더 구체적으로, 마지막 동기화 작업 이후 변경되거나 삭제된 파일의 +크기만큼 복구가 불가능할 수 있습니다. +이는 변경되거나 삭제된 파일이 실패한 디스크에 있지 않더라도 발생합니다. +이것이 SnapRAID가 **거의 변경되지 않는 데이터**에 더 적합한 이유입니다. +

반면에, 새로 추가된 파일은 이미 존재하는 파일의 복구를 방해하지 않습니다. +새로 추가된 파일이 실패한 디스크에 있는 경우에만 해당 파일을 잃게 됩니다. +

기타 SnapRAID 제한 사항은 다음과 같습니다: +

    +
  • +SnapRAID를 사용하면 여전히 각 디스크에 대해 별도의 파일 시스템이 +있습니다. RAID를 사용하면 하나의 큰 파일 시스템을 얻습니다. +
  • +
  • +SnapRAID는 데이터를 스트라이핑하지 않습니다. +RAID를 사용하면 스트라이핑으로 속도 향상을 얻습니다. +
  • +
  • +SnapRAID는 실시간 복구를 지원하지 않습니다. +RAID를 사용하면 디스크가 실패했을 때 작업을 멈출 필요가 없습니다. +
  • +
  • +SnapRAID는 제한된 수의 디스크 오류에서만 데이터를 복구할 수 있습니다. +백업을 사용하면 전체 디스크 어레이의 완전한 오류로부터 +복구할 수 있습니다. +
  • +
  • +파일 이름, 타임스탬프, 심볼릭 링크, 하드 링크만 저장됩니다. +권한, 소유권, 확장 속성은 저장되지 않습니다. +
  • +
+
+
+

+Getting Started +

+

SnapRAID를 사용하려면, 먼저 디스크 어레이에서 하나의 디스크를 +parity(패리티) 정보 전용으로 선택해야 합니다. 하나의 패리티 디스크로 +RAID5와 유사하게 단일 디스크 오류로부터 복구할 수 있습니다. +

RAID6와 유사하게 더 많은 디스크 오류로부터 복구하려면, +추가 디스크를 패리티용으로 예약해야 합니다. 추가 패리티 디스크 +하나당 하나의 디스크 오류에 대한 복구를 더 허용합니다. +

패리티 디스크로는 어레이에서 가장 큰 디스크를 선택해야 합니다. +패리티 정보가 어레이에서 가장 큰 **데이터 디스크**의 크기만큼 +커질 수 있기 때문입니다. +

이 디스크들은 parity 파일을 저장하는 데 전념하게 됩니다. +여기에 데이터를 저장해서는 안 됩니다. +

다음으로, SnapRAID로 보호하려는 data(데이터) 디스크를 정의해야 합니다. +이 디스크들이 **거의 변경되지 않는 데이터**를 포함할 때 보호 효과가 +더 좋습니다. 이러한 이유로, Windows C:\ 디스크나 Unix의 /home, /var, +/tmp 디렉토리를 포함하지 않는 것이 좋습니다. +

파일 목록은 content 파일에 저장되며, 보통 데이터, 패리티, 또는 부트 +디스크에 저장됩니다. +이 파일에는 무결성을 확인하기 위한 모든 체크섬을 포함하여 +백업에 대한 세부 정보가 들어 있습니다. +content 파일은 여러 복사본으로 저장되며, 다중 디스크 오류의 경우에도 +적어도 하나의 복사본을 사용할 수 있도록 각 복사본은 서로 다른 디스크에 +있어야 합니다. +

예를 들어, 하나의 패리티 보호 수준만 원하고 디스크가 다음과 같이 +위치한다고 가정해 봅시다: +

+/mnt/diskp <- 패리티용으로 선택된 디스크
+/mnt/disk1 <- 보호할 첫 번째 디스크
+/mnt/disk2 <- 보호할 두 번째 디스크
+/mnt/disk3 <- 보호할 세 번째 디스크
+
+

다음 옵션으로 설정 파일 /etc/snapraid.conf를 생성해야 합니다: +

+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/
+
+

Windows를 사용하는 경우, 슬래시 대신 드라이브 문자 및 백슬래시를 사용하는 +Windows 경로 형식을 사용해야 합니다. +

+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\
+
+

디스크가 많아 드라이브 문자가 부족한 경우, 디스크를 하위 폴더에 +직접 마운트할 수 있습니다. 다음을 참조하십시오: +

+https://www.google.com/search?q=Windows+mount+point
+
+

이 시점에서, 패리티 정보를 빌드하기 위해 sync 명령을 실행할 +준비가 되었습니다. +

+snapraid sync
+
+

이 프로세스는 디스크에 이미 존재하는 데이터의 크기에 따라 첫 실행 시 +몇 시간이 걸릴 수 있습니다. 디스크가 비어 있으면 프로세스는 즉시 +완료됩니다. +

Ctrl+C를 눌러 언제든지 중지할 수 있으며, 다음 실행 시 중단된 +곳에서 재개됩니다. +

이 명령이 완료되면 데이터는 **SAFE**합니다. +

이제 어레이를 원하는 대로 사용하고 주기적으로 sync 명령을 +실행하여 패리티 정보를 업데이트할 수 있습니다. +

+

+Scrubbing +

+

주기적으로 데이터 및 패리티의 오류를 확인하려면 scrub 명령을 +실행할 수 있습니다. +

+snapraid scrub
+
+

이 명령은 데이터 무결성을 확인하기 위해 어레이의 데이터를 sync 명령 +중에 계산된 해시와 비교합니다. +

이 명령을 실행할 때마다 이전에 10일 이내에 스크럽된 데이터를 제외하고 +어레이의 약 8%를 확인합니다. +다른 양을 지정하려면 -p, --plan 옵션을 사용하고, 다른 일령(days)을 +지정하려면 -o, --older-than 옵션을 사용할 수 있습니다. +예를 들어, 20일보다 오래된 블록에 대해 어레이의 5%를 확인하려면 +다음과 같이 사용합니다: +

+snapraid -p 5 -o 20 scrub
+
+

이 프로세스 중에 무단 또는 입출력 오류가 발견되면, 해당 블록은 +content 파일에 bad로 표시되며 status 명령에 나열됩니다. +

+snapraid status
+
+

이들을 수정하려면 -e, --filter-error 옵션으로 bad 블록을 필터링하여 +fix 명령을 사용할 수 있습니다. +

+snapraid -e fix
+
+

다음 scrub 시에 오류가 실제로 수정되면 status 보고서에서 +사라집니다. 더 빠르게 하려면, -p bad를 사용하여 bad로 표시된 블록만 +스크럽할 수 있습니다. +

+snapraid -p bad scrub
+
+

동기화되지 않은 어레이에서 scrub을 실행하면 제거되거나 수정된 파일로 +인한 오류가 보고될 수 있습니다. 이러한 오류는 scrub 출력에는 +보고되지만, 관련 블록은 bad로 표시되지 않습니다. +

+
+

+Pooling +

+

참고: 아래에 설명된 풀링(pooling) 기능은 **mergerfs** 도구로 대체되었으며, +이는 SnapRAID 커뮤니티에서 Linux 사용자를 위한 권장 옵션입니다. +Mergefs는 여러 드라이브를 단일 통합 마운트 지점으로 풀링하는 더 유연하고 +효율적인 방법을 제공하여, 심볼릭 링크에 의존하지 않고 어레이 전체의 +파일에 대한 원활한 액세스를 허용합니다. 이는 패리티 보호를 위한 +SnapRAID와 잘 통합되며, OpenMediaVault (OMV) 또는 사용자 정의 NAS +구성과 같은 설정에서 흔히 사용됩니다. +

어레이의 모든 파일을 동일한 디렉토리 트리에 표시하려면, +pooling 기능을 활성화할 수 있습니다. 이 기능은 심볼릭 링크를 사용하여 +어레이의 모든 파일에 대한 읽기 전용 가상 뷰를 생성합니다. +

설정 파일에서 pooling 디렉토리를 다음과 같이 구성할 수 있습니다: +

+pool /pool
+
+

또는 Windows에서 다음과 같이 합니다: +

+pool C:\pool
+
+

그리고 나서 pool 명령을 실행하여 가상 뷰를 생성하거나 업데이트합니다. +

+snapraid pool
+
+

Unix 플랫폼을 사용하고 이 디렉토리를 Windows 또는 Unix 컴퓨터에 +네트워크를 통해 공유하려면, /etc/samba/smb.conf에 다음 옵션을 +추가해야 합니다: +

+# smb.conf의 global 섹션에서
+unix extensions = no
+
+
+# smb.conf의 share 섹션에서
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

Windows에서 네트워크를 통해 심볼릭 링크를 공유하려면 클라이언트가 +원격으로 이들을 해석해야 합니다. 이를 활성화하기 위해, 풀 디렉토리를 +공유하는 것 외에도, 설정 파일에 정의된 디스크 이름을 공유 지점으로 +사용하여 모든 디스크를 독립적으로 공유해야 합니다. 또한 설정 파일의 +share 옵션에서 원격 클라이언트가 이러한 공유 디스크에 액세스하는 데 +필요한 Windows UNC 경로를 지정해야 합니다. +

예를 들어, darkstar라는 서버에서 작업하는 경우, 다음 옵션을 +사용할 수 있습니다: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

그리고 네트워크를 통해 다음 디렉토리를 공유합니다: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

이렇게 하면 원격 클라이언트가 \\darkstar\pool에서 모든 파일에 액세스할 +수 있습니다. +

또한 다음 명령으로 원격 클라이언트를 구성하여 원격 심볼릭 링크에 +대한 액세스를 활성화해야 할 수도 있습니다: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID는 RAID 시스템보다는 백업 프로그램처럼 작동하며, +-f, --filter 옵션을 사용하여 파일이나 디렉토리를 이전 상태로 복원하거나 +삭제 취소할 수 있습니다: +

+snapraid fix -f FILE
+
+

또는 디렉토리에 대해: +

+snapraid fix -f DIR/
+
+

또한 -m, --filter-missing 옵션을 사용하여 디렉토리 내에서 실수로 +삭제된 파일만 복구할 수도 있습니다. 이 옵션은 누락된 파일만 복원하고 +다른 파일은 그대로 둡니다. +

+snapraid fix -m -f DIR/
+
+

또는 모든 드라이브에서 삭제된 모든 파일을 다음으로 복구합니다: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

최악의 상황이 발생하여 하나 이상의 디스크를 잃었습니다! +

**패닉하지 마십시오!** 복구할 수 있습니다! +

가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다. +모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된 +프로세스를 비활성화하십시오. +

그런 다음 다음 단계를 진행하십시오. +

+

+STEP 1 -> Reconfigure +

+

복구할 공간이 필요하며, 이상적으로는 추가 예비 디스크에, +하지만 외부 USB 디스크 또는 원격 디스크로도 충분합니다. +

SnapRAID 설정 파일을 수정하여 실패한 디스크의 data 또는 parity +옵션이 파일을 복구할 수 있는 충분한 빈 공간이 있는 위치를 +가리키도록 합니다. +

예를 들어, 디스크 d1이 실패한 경우, 다음에서 변경합니다: +

+data d1 /mnt/disk1/
+
+

다음으로: +

+data d1 /mnt/new_spare_disk/
+
+

복구할 디스크가 패리티 디스크인 경우, 적절한 parity 옵션을 +업데이트합니다. +여러 개의 실패한 디스크가 있는 경우, 모든 구성 옵션을 업데이트합니다. +

+
+

+STEP 2 -> Fix +

+

로그를 외부 파일에 저장하면서 fix 명령을 실행합니다: +

+snapraid -d NAME -l fix.log fix
+
+

여기서 NAME은 이전 예제의 d1과 같은 디스크 이름입니다. +복구할 디스크가 패리티 디스크인 경우, parity, 2-parity 등의 이름을 +사용합니다. +여러 개의 실패한 디스크가 있는 경우, 여러 -d 옵션을 사용하여 +모두 지정합니다. +

이 명령은 오랜 시간이 걸립니다. +

fix.log 파일을 저장할 몇 기가바이트의 여유 공간이 있는지 확인하십시오. +충분한 여유 공간이 있는 디스크에서 실행하십시오. +

이제 복구할 수 있는 모든 것을 복구했습니다. 일부 파일이 부분적으로 +또는 완전히 복구 불가능한 경우, .unrecoverable 확장자가 추가되어 +이름이 변경됩니다. +

unrecoverable:로 시작하는 모든 줄을 확인하여 fix.log 파일에서 +복구 불가능한 모든 블록의 자세한 목록을 찾을 수 있습니다. +

복구가 만족스럽지 않으면, 원하는 만큼 여러 번 재시도할 수 있습니다. +

예를 들어, 마지막 sync 이후 어레이에서 파일을 제거한 경우, +일부 파일이 복구되지 않을 수 있습니다. +이 경우, -i, --import 옵션을 사용하여 fix를 재시도하고, +이 파일들이 현재 어디에 있는지 지정하여 복구 프로세스에 다시 포함시킬 +수 있습니다. +

복구가 만족스럽다면 계속 진행할 수 있지만, 동기화 후에는 fix 명령을 +더 이상 재시도할 수 없다는 점에 유의하십시오! +

+
+

+STEP 3 -> Check +

+

조심스러운 확인으로, 이제 check 명령을 실행하여 복구된 디스크의 +모든 것이 올바른지 확인할 수 있습니다. +

+snapraid -d NAME -a check
+
+

여기서 NAME은 이전 예제의 d1과 같은 디스크 이름입니다. +

+
+
+-d 및 -a 옵션은 SnapRAID에게 지정된 디스크만 확인하고 모든 패리티 +
+
+
+
+

데이터를 무시하도록 지시합니다. +

이 명령은 오랜 시간이 걸리지만, 지나치게 조심스럽지 않다면 건너뛸 수 +있습니다. +

+
+

+STEP 4 -> Sync +

+

sync 명령을 실행하여 새 디스크로 어레이를 재동기화합니다. +

+snapraid sync
+
+

모든 것이 복구되면 이 명령은 즉시 완료됩니다. +

+
+
+
+

+Commands +

+

SnapRAID는 다음을 허용하는 몇 가지 간단한 명령을 제공합니다: +

    +
  • +어레이의 상태 출력 -> status +
  • +
  • +디스크 제어 -> smart, probe, up, down +
  • +
  • +백업/스냅샷 생성 -> sync +
  • +
  • +주기적으로 데이터 확인 -> scrub +
  • +
  • +마지막 백업/스냅샷 복원 -> fix. +
  • +
+

명령은 소문자로 작성해야 합니다. +

+

+status +

+

디스크 어레이의 상태 요약을 출력합니다. +

패리티 단편화, 확인 없이 블록이 얼마나 오래되었는지, 그리고 +스크럽 중에 발생한 모든 기록된 무단 오류에 대한 정보를 포함합니다. +

제시된 정보는 마지막으로 sync를 실행했을 때를 나타냅니다. +나중에 수정된 내용은 고려되지 않습니다. +

bad 블록이 감지되면 해당 블록 번호가 나열됩니다. +이들을 수정하려면 fix -e 명령을 사용할 수 있습니다. +

또한 각 블록이 마지막으로 스크럽되거나 동기화된 시간을 나타내는 +그래프를 보여줍니다. 스크럽된 블록은 *, 동기화되었지만 아직 +스크럽되지 않은 블록은 o로 표시됩니다. +

아무것도 수정되지 않습니다. +

+
+

+smart +

+

시스템의 모든 디스크에 대한 SMART 보고서를 출력합니다. +

향후 1년 동안의 실패 확률 추정치를 포함하여, 의심스러운 속성을 +보이는 디스크의 유지 보수 교체를 계획할 수 있습니다. +

이 확률 추정치는 다음에서 사용 가능한 Backblaze 데이터와 디스크의 +SMART 속성을 상호 연관시켜 얻습니다: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

SMART가 디스크가 실패하고 있다고 보고하면, 해당 디스크에 대해 +FAIL 또는 PREFAIL이 출력되며, SnapRAID는 오류를 반환하며 종료됩니다. +이 경우, 디스크의 즉각적인 교체가 강력히 권장됩니다. +

다른 가능한 상태 문자열은 다음과 같습니다: +

+
+
+logfail +
+과거에 일부 속성이 임계값보다 낮았습니다. +
+
+
+
+logerr +
+장치 오류 로그에 오류가 포함되어 있습니다. +
+
+
+
+selferr +
+장치 자체 테스트 로그에 오류가 포함되어 있습니다. +
+
+
+
+
+
+-v, --verbose 옵션이 지정되면, 더 깊은 통계 분석이 제공됩니다. +
+
+
+
+

이 분석은 더 많거나 적은 패리티가 필요한지 결정하는 데 도움이 될 수 있습니다. +

이 명령은 smartctl 도구를 사용하며, 모든 장치에서 smartctl -a를 +실행하는 것과 동일합니다. +

장치가 올바르게 자동 감지되지 않으면, 설정 파일에서 smartctl 옵션을 +사용하여 사용자 정의 명령을 지정할 수 있습니다. +

아무것도 수정되지 않습니다. +

+
+

+probe +

+

시스템의 모든 디스크의 POWER 상태를 출력합니다. +

Standby는 디스크가 회전하지 않음을 의미합니다. Active는 +디스크가 회전하고 있음을 의미합니다. +

이 명령은 smartctl 도구를 사용하며, 모든 장치에서 smartctl -n standby -i를 +실행하는 것과 동일합니다. +

장치가 올바르게 자동 감지되지 않으면, 설정 파일에서 smartctl 옵션을 +사용하여 사용자 정의 명령을 지정할 수 있습니다. +

아무것도 수정되지 않습니다. +

+
+

+up +

+

어레이의 모든 디스크를 회전시킵니다(spin up). +

+
+
+-d, --filter-disk 옵션을 사용하여 특정 디스크만 회전시킬 수 있습니다. +
+
+
+
+

모든 디스크를 동시에 회전시키려면 많은 전력이 필요합니다. +전원 공급 장치가 이를 지탱할 수 있는지 확인하십시오. +

아무것도 수정되지 않습니다. +

+
+

+down +

+

어레이의 모든 디스크를 회전 중지합니다(spin down). +

이 명령은 smartctl 도구를 사용하며, 모든 장치에서 smartctl -s standby,now를 +실행하는 것과 동일합니다. +

+
+
+-d, --filter-disk 옵션을 사용하여 특정 디스크만 회전 중지할 수 있습니다. +
+
+
+
+

오류 발생 시 자동으로 회전 중지하려면, 다른 명령과 함께 -s, --spin-down-on-error +옵션을 사용할 수 있습니다. 이는 오류 발생 시 수동으로 down을 실행하는 것과 +동일합니다. +

아무것도 수정되지 않습니다. +

+
+

+diff +

+

마지막 sync 이후 수정되어 패리티 데이터를 재계산해야 하는 모든 파일을 +나열합니다. +

이 명령은 파일 데이터를 확인하지 않고, 파일 타임스탬프, 크기 및 +아이노드(inode)만 확인합니다. +

모든 변경된 파일을 나열한 후, 다음과 같이 그룹화된 변경 사항 요약이 +제시됩니다: +

+
+
+equal +
+이전과 변경되지 않은 파일. +
+
+
+
+added +
+이전에 없던 추가된 파일. +
+
+
+
+removed +
+제거된 파일. +
+
+
+
+updated +
+크기 또는 타임스탬프가 다른 파일, 즉 수정된 파일. +
+
+
+
+moved +
+동일한 디스크의 다른 디렉토리로 이동된 파일. +이들은 이름, 크기, 타임스탬프 및 아이노드가 동일하지만 +디렉토리가 다른 것으로 식별됩니다. +
+
+
+
+copied +
+원본 파일이 여전히 존재하는 동일한 디스크 또는 다른 +디스크에 복사된 파일. +이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니 +다. +하위 초 타임스탬프가 0인 경우, 이름뿐만 아니라 전체 경로가 +일치해야 식별됩니다. +
+
+
+
+relocated +
+원본이 사라진 동일한 디스크 또는 다른 디스크로 이 +동된 파일. +이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니 +다. +하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치 +해야 합니다. +동일한 디스크의 'moved' 파일과 달리, 재배치된 파일은 다른 +inode를 가집니다. +
+
+
+
+restored +
+inode는 다르지만 디렉토리, 이름, 크기 및 타임스탬 +프가 일치하는 파일. +이들은 대개 삭제된 후 복구된 파일들입니다. +
+
+
+

sync가 필요한 경우, 프로세스 반환 코드는 기본 0 대신 2입니다. +반환 코드 1은 일반적인 오류 조건에 사용됩니다. +

아무것도 수정되지 않습니다. +

+
+

+sync +

+

패리티 정보를 업데이트합니다. 디스크 어레이의 모든 수정된 파일을 +읽고 해당 패리티 데이터를 업데이트합니다. +

이미 수행된 작업을 잃지 않고 Ctrl+C를 눌러 언제든지 이 프로세스를 +중지할 수 있습니다. +다음 실행 시 sync 프로세스는 중단된 곳에서 재개됩니다. +

이 프로세스 중에 무단 또는 입출력 오류가 발견되면, +해당 블록은 bad로 표시됩니다. +

파일은 경로 및/또는 아이노드로 식별되며 크기와 타임스탬프로 +확인됩니다. +파일 크기 또는 타임스탬프가 다르면 전체 파일에 대해 패리티 데이터가 +재계산됩니다. +파일이 동일한 디스크에서 이동되거나 이름이 변경되고 동일한 아이노드를 +유지하면 패리티는 재계산되지 않습니다. +파일이 다른 디스크로 이동되면 패리티는 재계산되지만, 이전에 계산된 +해시 정보는 유지됩니다. +

content 및 parity 파일은 필요한 경우 수정됩니다. +어레이의 파일은 수정되지 않습니다. +

+
+

+scrub +

+

어레이를 스크럽하여 데이터 및 패리티 디스크의 무단 또는 입출력 오류를 +확인합니다. +

각 호출은 이전에 10일 이내에 스크럽된 데이터를 제외하고 어레이의 +약 8%를 확인합니다. +이는 일주일에 한 번 스크럽하면 모든 데이터 비트가 적어도 3개월마다 +한 번씩 확인됨을 의미합니다. +

+
+
+-p, --plan 옵션을 사용하여 다른 스크럽 계획 또는 양을 정의할 수 있으며, +
+
+
+
+

다음 값을 허용합니다: +bad - bad로 표시된 블록 스크럽. +new - 동기화되었지만 아직 스크럽되지 않은 블록 스크럽. +full - 모든 것 스크럽. +0-100 - 지정된 비율의 블록 스크럽. +

백분율 양을 지정하면, -o, --older-than 옵션을 사용하여 블록이 +얼마나 오래되었는지 정의할 수도 있습니다. +가장 오래된 블록이 먼저 스크럽되어 최적의 확인을 보장합니다. +동기화되었지만 아직 스크럽되지 않은 블록만 스크럽하려면, +-p new 옵션을 사용하십시오. +

스크럽 상태의 세부 정보를 얻으려면 status 명령을 사용하십시오. +

발견된 모든 무단 또는 입출력 오류에 대해, 해당 블록은 content 파일에 +bad로 표시됩니다. +이러한 bad 블록은 status에 나열되며 fix -e로 수정할 수 있습니다. +수정 후, 다음 스크럽 시에 다시 확인되며, 수정된 것으로 발견되면 bad +표시는 제거됩니다. +bad 블록만 스크럽하려면 scrub -p bad 명령을 사용할 수 있습니다. +

동기화되지 않은 데이터로 인한 보고된 오류를 피하기 위해 동기화된 +어레이에서만 scrub을 실행하는 것이 좋습니다. 이러한 오류는 무단 +오류가 아닌 것으로 인식되며, 블록은 bad로 표시되지 않지만, +이러한 오류는 명령의 출력에 보고됩니다. +

content 파일은 각 블록의 마지막 확인 시간을 업데이트하고 bad 블록을 +표시하기 위해 수정됩니다. +parity 파일은 수정되지 않습니다. +어레이의 파일은 수정되지 않습니다. +

+
+

+fix +

+

모든 파일과 패리티 데이터를 수정합니다. +

모든 파일과 패리티 데이터는 마지막 sync에 저장된 스냅샷 +상태와 비교됩니다. +차이가 발견되면 저장된 스냅샷으로 되돌려집니다. +

**경고!** fix 명령은 오류와 의도적인 수정 사이를 구별하지 +않습니다. 파일 상태를 무조건 마지막 sync로 되돌립니다. +

다른 옵션이 지정되지 않으면 전체 어레이가 처리됩니다. +필터 옵션을 사용하여 처리할 파일 또는 디스크의 하위 집합을 선택하십시오. +

sync 및 scrub 중에 bad로 표시된 블록만 수정하려면, +-e, --filter-error 옵션을 사용하십시오. +다른 필터 옵션과 달리, 이 옵션은 최신 sync 이후 변경되지 않은 +파일에만 수정을 적용합니다. +

SnapRAID는 수정할 수 없는 모든 파일에 .unrecoverable 확장자를 +추가하여 이름을 변경합니다. +

수정하기 전에, 전체 어레이를 스캔하여 마지막 sync 이후 이동된 +파일을 찾습니다. +이 파일들은 이름과 디렉토리를 무시하고 타임스탬프로 식별되며, +필요한 경우 복구 프로세스에 사용됩니다. +일부 파일을 어레이 외부로 이동한 경우, -i, --import 옵션을 사용하여 +추가로 스캔할 디렉토리를 지정할 수 있습니다. +

파일은 아이노드가 아닌 경로로만 식별됩니다. +

content 파일은 수정되지 않습니다. +parity 파일은 필요한 경우 수정됩니다. +어레이의 파일은 필요한 경우 수정됩니다. +

+
+

+check +

+

모든 파일과 패리티 데이터를 확인합니다. +

fix처럼 작동하지만, 복구를 시뮬레이션할 뿐이며 어레이에 +어떤 변경 사항도 기록되지 않습니다. +

이 명령은 주로 복구 프로세스 후 또는 기타 특별한 조건에서와 같이 +수동 확인을 위한 것입니다. +주기적이고 예약된 확인을 위해서는 scrub을 사용하십시오. +

+
+
+-a, --audit-only 옵션을 사용하면 파일 데이터만 확인하고 +
+
+
+
+

패리티 데이터는 무시하여 실행 속도를 높일 수 있습니다. +

파일은 아이노드가 아닌 경로로만 식별됩니다. +

아무것도 수정되지 않습니다. +

+
+

+list +

+

마지막 sync 시점에 어레이에 포함된 모든 파일을 나열합니다. +

+
+
+-v 또는 --verbose를 사용하면 하위 초 시간도 표시됩니다. +
+
+
+
+

아무것도 수정되지 않습니다. +

+
+

+dup +

+

모든 중복 파일을 나열합니다. 두 파일의 해시가 일치하면 동일한 것으로 +간주됩니다. 파일 데이터는 읽지 않고, 미리 계산된 해시만 +사용됩니다. +

아무것도 수정되지 않습니다. +

+
+

+pool +

+

pooling 디렉토리에서 디스크 어레이의 모든 파일에 대한 가상 뷰를 +생성하거나 업데이트합니다. +

파일은 복사되지 않고 심볼릭 링크를 사용하여 연결됩니다. +

업데이트 시, 모든 기존 심볼릭 링크와 빈 하위 디렉토리는 삭제되고 +어레이의 새 뷰로 대체됩니다. 다른 일반 파일은 제자리에 남습니다. +

풀 디렉토리 외부에서는 아무것도 수정되지 않습니다. +

+
+

+devices +

+

어레이에서 사용되는 저수준(low-level) 장치를 출력합니다. +

이 명령은 어레이의 장치 연결을 표시하며, 주로 스크립트 인터페이스를 +위한 것입니다. +

처음 두 열은 저수준 장치 ID 및 경로입니다. +다음 두 열은 고수준(high-level) 장치 ID 및 경로입니다. +마지막 열은 어레이의 디스크 이름입니다. +

대부분의 경우, 어레이의 각 디스크에 대해 하나의 저수준 장치가 +있지만, 일부 더 복잡한 구성에서는 단일 어레이 디스크에 의해 사용되는 +여러 저수준 장치가 있을 수 있습니다. +

아무것도 수정되지 않습니다. +

+
+

+touch +

+

하위 초 타임스탬프가 0으로 설정된 모든 파일에 임의의 하위 초 타임스탬프를 +설정합니다. +

이는 타임스탬프를 거의 고유하게 만들어 가능한 중복을 줄이므로, +SnapRAID가 이동되거나 복사된 파일을 인식하는 능력을 향상시킵니다. +

더 구체적으로, 하위 초 타임스탬프가 0이 아닌 경우, 이동되거나 복사된 +파일은 이름, 크기 및 타임스탬프가 일치하면 그렇게 식별됩니다. +하위 초 타임스탬프가 0인 경우, 전체 경로, 크기 및 타임스탬프가 +모두 일치하는 경우에만 복사본으로 간주됩니다. +

초 단위 정밀도의 타임스탬프는 수정되지 않으므로, 파일의 모든 날짜와 +시간은 보존됩니다. +

+
+

+rehash +

+

전체 어레이의 재해시(rehash)를 예약합니다. +

이 명령은 사용되는 해시 종류를 변경하며, 일반적으로 32비트 시스템에서 +64비트 시스템으로 업그레이드할 때 MurmurHash3에서 더 빠른 SpookyHash로 +전환하기 위해 사용됩니다. +

이미 최적의 해시를 사용하고 있다면, 이 명령은 아무것도 하지 않고 +조치가 필요하지 않음을 알려줍니다. +

재해시는 즉시 수행되지 않고 sync 및 scrub 중에 점진적으로 +진행됩니다. +

status를 사용하여 재해시 상태를 확인할 수 있습니다. +

재해시 중에도 SnapRAID는 전체 기능을 유지하며, 유일한 예외는 +dup가 다른 해시를 사용하는 중복 파일을 감지할 수 없다는 것입니다. +

+
+

+locate +

+

패리티 디스크에 저장된 파일을 찾습니다. 일치하는 각 파일에 대해 +패리티 파일 내의 위치와 점유하고 있는 조각(fragment)의 수를 +출력합니다. +

+
+
+-t, --tail 옵션을 사용하여 패리티의 지정된 꼬리(tail) 부분을 점유하는 +
+
+
+
+

파일로 작업을 제한할 수 있습니다. +

이 파일들을 재할당하려면 -W, --force-realloc-tail 옵션을 +사용할 수 있습니다. +재할당 과정 동안 해당 파일들은 패리티에 의해 보호되지 않으므로 +주의하십시오. +

+
+
+

+Options +

+

SnapRAID는 다음 옵션을 제공합니다: +

+
+
+-c, --conf CONFIG +
+사용할 설정 파일을 선택합니다. 지정하지 않으면 Unix에서는 +/usr/local/etc/snapraid.conf 파일이 존재하면 사용하고, +그렇지 않으면 /etc/snapraid.conf를 사용합니다. +Windows에서는 snapraid.exe와 같은 디렉토리에 있는 +snapraid.conf 파일을 사용합니다. +
+
+
+
+
+
+-f, --filter PATTERN +
+check 및 fix에서 처리할 파일을 필터링합니다. +지정된 패턴과 일치하는 파일만 처리됩니다. +이 옵션은 여러 번 사용될 수 있습니다. +패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오. +Unix에서는 글로빙 문자가 사용되는 경우 따옴표로 묶어야 합니다. +이 옵션은 check 및 fix에서만 사용할 수 있습니다. +sync 및 scrub은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. +
+
+
+
+
+
+-d, --filter-disk NAME +
+check, fix, up, 및 down에서 처리할 디스크를 필터링합니다. +설정 파일에 정의된 디스크 이름을 지정해야 합니다. +또한 parity, 2-parity, 3-parity 등의 이름으로 패리티 디스크를 +지정하여 특정 패리티 디스크로 작업을 제한할 수 있습니다. +여러 --filter, --filter-disk, --filter-missing 옵션을 결합하면, +모든 필터와 일치하는 파일만 선택됩니다. +이 옵션은 여러 번 사용될 수 있습니다. +이 옵션은 check, fix, up, 및 down에서만 사용할 수 있습니다. +sync 및 scrub은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. +
+
+
+
+
+
+-m, --filter-missing +
+check 및 fix에서 처리할 파일을 필터링합니다. +어레이에서 누락되거나 삭제된 파일만 처리됩니다. +fix와 함께 사용하면, 이 옵션은 undelete 명령 역할을 합니다. +여러 --filter, --filter-disk, --filter-missing 옵션을 결합하면, +모든 필터와 일치하는 파일만 선택됩니다. +이 옵션은 check 및 fix에서만 사용할 수 있습니다. +sync 및 scrub은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. +
+
+
+
+
+
+-e, --filter-error +
+check 및 fix에서 오류가 있는 파일을 처리합니다. +status에 나열된 대로 sync 및 scrub 중에 무단 또는 입출력 오류가 +표시된 블록을 가진 파일만 처리합니다. +이 옵션은 check 및 fix에서만 사용할 수 있습니다. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+스크럽 계획을 선택합니다. PERC가 0에서 100 사이의 숫자 값인 경우, +스크럽할 블록의 백분율로 해석됩니다. +백분율 대신 계획을 지정할 수 있습니다: +bad는 bad 블록을 스크럽하고, new는 아직 스크럽되지 않은 +막 동기화된 블록을 스크럽하며, full은 모든 것을 스크럽합니다. +이 옵션은 scrub에서만 사용할 수 있습니다. +
+
+
+
+
+
+-o, --older-than DAYS +
+scrub에서 처리할 어레이의 가장 오래된 부분을 선택합니다. +DAYS는 블록이 스크럽되어야 하는 최소 일령(days)이며, +기본값은 10입니다. +bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다. +이 옵션은 scrub에서만 사용할 수 있습니다. +
+
+
+
+
+
+-a, --audit-only +
+check에서 패리티 데이터를 확인하지 않고 파일의 해시를 +확인합니다. +파일 데이터만 확인하는 데 관심이 있다면, 이 옵션은 확인 프로세스의 +속도를 상당히 높일 수 있습니다. +이 옵션은 check에서만 사용할 수 있습니다. +
+
+
+
+
+
+-h, --pre-hash +
+sync에서 패리티 계산 전에 추가 확인을 위해 모든 새 데이터에 대한 +예비 해시 단계를 실행합니다. +일반적으로 sync에서는 예비 해시가 수행되지 않으며, 새 데이터는 +패리티 계산 직전에 처음 읽을 때 해시됩니다. +이 프로세스는 모든 디스크가 회전하고 CPU가 바쁜, 시스템이 +과부하 상태일 때 발생합니다. +이는 기계의 극한 조건이며, 잠재된 하드웨어 문제가 있는 경우 +데이터가 아직 해시되지 않았기 때문에 무단 오류가 감지되지 않고 +지나갈 수 있습니다. +이러한 위험을 피하려면, pre-hash 모드를 활성화하여 모든 데이터를 +두 번 읽어 무결성을 보장할 수 있습니다. +이 옵션은 또한 어레이 내에서 이동된 파일을 확인하여 이동 작업이 +성공했는지 확인하고, 필요한 경우 계속 진행하기 전에 fix 작업을 +실행할 수 있도록 합니다. +이 옵션은 sync에서만 사용할 수 있습니다. +
+
+
+
+
+
+-i, --import DIR +
+지정된 디렉토리에서 마지막 sync 이후 어레이에서 삭제된 파일을 +가져옵니다. +이러한 파일이 여전히 있는 경우, 이들은 check 및 fix에 의해 +복구 프로세스를 개선하는 데 사용될 수 있습니다. +파일은 하위 디렉토리를 포함하여 읽히며, 이름에 관계없이 +식별됩니다. +이 옵션은 check 및 fix에서만 사용할 수 있습니다. +
+
+
+
+
+
+-s, --spin-down-on-error +
+오류 발생 시, 0이 아닌 상태 코드로 종료하기 전에 관리되는 모든 +디스크를 회전 중지합니다. 이는 중단된 작업 후에 드라이브가 계속 +활성 상태로 회전하는 것을 방지하여 불필요한 열 축적 및 전력 +소비를 방지하는 데 도움이 됩니다. 명령이 실패하더라도 디스크가 +안전하게 중지되도록 이 옵션을 사용하십시오. +
+
+
+
+
+
+-w, --bw-limit RATE +
+모든 디스크에 대한 전역 대역폭 제한을 적용합니다. RATE는 +초당 바이트 수입니다. K, M, 또는 G와 같은 승수(예: --bw-limit 1G)를 +지정할 수 있습니다. +
+
+
+
+
+
+-t, --tail 크기 +
+패리티 디스크의 지정된 꼬리 크기 이하를 사용하는 파일로 +목록을 제한합니다. +K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: --tail 1G). +이 옵션은 locate 명령과 함께 사용할 때만 유효합니다. +
+
+
+
+
+
+-A, --stats +
+추가 정보를 보여주는 확장된 상태 보기를 활성화합니다. +화면에는 두 개의 그래프가 표시됩니다: +첫 번째 그래프는 각 디스크에 대한 버퍼링된 스트라이프 수와 함께 +해당 디스크에서 현재 액세스 중인 파일의 경로를 보여줍니다. +일반적으로 가장 느린 디스크는 사용 가능한 버퍼가 없으며, +이는 달성 가능한 최대 대역폭을 결정합니다. +두 번째 그래프는 지난 100초 동안 대기하는 데 소비된 시간의 +백분율을 보여줍니다. 가장 느린 디스크가 대부분의 대기 시간을 +유발할 것으로 예상되며, 다른 디스크는 버퍼링된 스트라이프를 +사용할 수 있으므로 대기 시간이 거의 또는 전혀 없어야 합니다. +이 그래프는 또한 해시 계산 및 RAID 계산을 위해 소비된 시간을 +보여줍니다. +모든 계산은 디스크 작업과 병렬로 실행됩니다. +따라서 적어도 하나의 디스크에 대해 측정 가능한 대기 시간이 +있는 한, 이는 CPU가 워크로드에 충분히 빠르다는 것을 나타냅니다. +
+
+
+
+
+
+-Z, --force-zero +
+이전에 0이 아니었던 크기가 0인 파일의 동기화라는 안전하지 않은 +작업을 강제합니다. +SnapRAID가 이러한 조건을 감지하면, 이 옵션을 지정하지 않는 한 +진행을 중지합니다. +이는 시스템 충돌 후 일부 액세스된 파일이 잘렸을 때 쉽게 감지할 +수 있도록 합니다. +이는 ext3/ext4 파일 시스템을 사용하는 Linux에서 가능한 조건입니다. +이 옵션은 sync에서만 사용할 수 있습니다. +
+
+
+
+
+
+-E, --force-empty +
+원래 디스크에 있던 모든 파일이 누락된 디스크의 동기화라는 +안전하지 않은 작업을 강제합니다. +SnapRAID가 디스크에 원래 있던 모든 파일이 누락되거나 다시 +작성되었음을 감지하면, 이 옵션을 지정하지 않는 한 진행을 +중지합니다. +이는 데이터 파일 시스템이 마운트되지 않았을 때 쉽게 감지할 +수 있도록 합니다. +이 옵션은 sync에서만 사용할 수 있습니다. +
+
+
+
+
+
+-U, --force-uuid +
+UUID가 변경된 디스크를 사용하여 동기화, 확인 및 수정을 강제하는 +안전하지 않은 작업입니다. +SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면, +이 옵션을 지정하지 않는 한 진행을 중지합니다. +이는 디스크가 잘못된 마운트 지점에 마운트되었을 때 감지할 +수 있도록 합니다. +그러나 단일 패리티를 사용하는 경우 하나의 UUID 변경이 허용되며, +여러 패리티를 사용하는 경우 더 많은 변경이 허용됩니다. 이는 +복구 후 디스크를 교체할 때의 일반적인 경우이기 때문입니다. +이 옵션은 sync, check, 또는 fix에서만 사용할 수 있습니다. +
+
+
+
+
+
+-D, --force-device +
+액세스할 수 없는 디스크 또는 동일한 물리적 장치에 있는 디스크로 +수정을 강제하는 안전하지 않은 작업입니다. +예를 들어, 두 개의 데이터 디스크를 잃고 첫 번째 디스크만 +복구하기 위해 예비 디스크가 있는 경우, 두 번째 액세스할 수 없는 +디스크를 무시할 수 있습니다. +또는 이미 사용 중인 디스크에 남은 여유 공간에 디스크를 복구하려는 +경우, 동일한 물리적 장치를 공유합니다. +이 옵션은 fix에서만 사용할 수 있습니다. +
+
+
+
+
+
+-N, --force-nocopy +
+sync, check, 및 fix에서 복사 감지 발견법(heuristic)을 +비활성화합니다. +이 옵션이 없으면 SnapRAID는 이름, 크기 및 타임스탬프와 같은 +동일한 속성을 가진 파일이 동일한 데이터를 가진 복사본이라고 +가정합니다. +이는 한 디스크에서 다른 디스크로 복사되거나 이동된 파일을 +식별하고, 이미 계산된 해시 정보를 재사용하여 무단 오류를 +감지하거나 누락된 파일을 복구할 수 있도록 합니다. +일부 드문 경우에 이 동작은 오탐(false positives) 또는 많은 +해시 확인으로 인한 느린 프로세스를 초래할 수 있으며, 이 옵션을 +사용하면 이러한 문제를 해결할 수 있습니다. +이 옵션은 sync, check, 및 fix에서만 사용할 수 있습니다. +
+
+
+
+
+
+-F, --force-full +
+sync에서 패리티의 전체 재계산을 강제합니다. +이 옵션은 새 패리티 수준을 추가하거나, 더 최근의 패리티 데이터를 +사용하여 이전 content 파일로 되돌렸을 때 사용할 수 있습니다. +처음부터 패리티를 다시 생성하는 대신, 이 옵션을 사용하면 +content 파일에 있는 해시를 재사용하여 데이터를 검증하고 +기존 패리티 데이터를 사용하여 sync 프로세스 중에 데이터 보호를 +유지할 수 있습니다. +이 옵션은 sync에서만 사용할 수 있습니다. +
+
+
+
+
+
+-R, --force-realloc +
+sync에서 파일의 전체 재할당 및 패리티 재빌드를 강제합니다. +이 옵션은 content 파일에 있는 해시를 재사용하여 데이터를 +검증하면서 단편화를 제거하고 모든 파일을 완전히 재할당하는 데 +사용될 수 있습니다. +이 옵션은 sync에서만 사용할 수 있습니다. +**경고!** 이 옵션은 전문가 전용이며, 사용하지 않는 것이 +강력히 권장됩니다. +sync 작업 중에는 데이터 보호가 없습니다. +
+
+
+
+
+
+-W, --force-realloc-tail 크기 +
+-R, --force-realloc과 같이 작동하지만, 각 패리티 파일의 지정된 +꼬리 부분(마지막 '크기' 바이트)으로 제한됩니다. +현재 해당 꼬리 섹션에 저장된 모든 파일 조각/블록의 재할당(이동)을 +강제하여, 여유 공간이 있는 패리티 파일 내의 어느 곳이든(기존 +빈 공간 포함) 배치될 수 있도록 합니다. +이 옵션의 주요 목적은 패리티 파일의 디스크상 크기를 줄이는 것입니다. +재할당을 통해 전체 꼬리 섹션이 성공적으로 비워지면(남은 블록이 없음), +패리티 파일이 잘리고(truncated) 사용되지 않는 꼬리 공간을 회수합니다. +K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: +--force-realloc-tail 1G). +locate -t, --tail을 사용하여 영향을 받는 파일을 사전에 +확인할 수 있습니다. +경고! +이 옵션은 전문가 전용이며, 사용하지 않을 것을 강력히 +권장합니다. +영향을 받는 파일에 대해서는 sync 작업 동안 데이터 보호를 +받을 수 없습니다. +
+
+
+
+
+
+-l, --log FILE +
+지정된 파일에 자세한 로그를 기록합니다. +이 옵션을 지정하지 않으면 예상치 못한 오류가 화면에 출력되어, +많은 오류가 발생하는 경우 과도한 출력이 발생할 수 있습니다. +-l, --log가 지정되면 SnapRAID가 중지되는 치명적인 오류만 +화면에 출력됩니다. +경로가 >>로 시작하면 파일이 추가 모드로 열립니다. +이름의 %D와 %T는 YYYYMMDD 및 HHMMSS 형식의 날짜 및 +시간으로 대체됩니다. Windows 배치 파일에서는 % 문자를 +두 배로 늘려야 합니다(예: result-%%D.log). >>를 사용하려면 +이름을 따옴표로 묶어야 합니다(예: ">>result.log"). +로그를 표준 출력 또는 표준 오류로 출력하려면 각각 ">&1" 및 ">&2"를 +사용할 수 있습니다. +로그 태그 설명은 snapraid_log.txt 파일 또는 man 페이지를 참조하십시오. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+실행을 중지하기 전에 새로운 오류 제한을 설정합니다. +기본적으로 SnapRAID는 100개 이상의 입출력 오류가 발생하면 중지됩니다. +이는 디스크가 실패할 가능성이 있음을 나타냅니다. +이 옵션은 sync 및 scrub에 영향을 미치며, 첫 번째 디스크 오류 +세트 후에 계속 진행하여 작업을 완료하려고 시도할 수 있도록 +허용합니다. +그러나 check 및 fix는 항상 첫 번째 오류에서 중지됩니다. +
+
+
+
+
+
+-S, --start BLKSTART +
+지정된 블록 번호부터 처리를 시작합니다. +이는 손상된 디스크의 경우 특정 블록을 다시 확인하거나 수정하는 데 +유용할 수 있습니다. +이 옵션은 주로 고급 수동 복구를 위한 것입니다. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+지정된 수의 블록만 처리합니다. +이 옵션은 주로 고급 수동 복구를 위한 것입니다. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+기존 content 파일에서 더미 설정 파일을 생성합니다. +설정 파일은 표준 출력으로 작성되며 기존 파일을 덮어쓰지 않습니다. +이 설정 파일에는 전체 시스템을 잃을 경우 디스크 마운트 지점을 +재구성하는 데 필요한 정보도 포함되어 있습니다. +
+
+
+
+
+
+-v, --verbose +
+화면에 더 많은 정보를 출력합니다. +한 번 지정하면 제외된 파일 및 추가 통계를 출력합니다. +이 옵션은 로그 파일에는 영향을 미치지 않습니다. +
+
+
+
+
+
+-q, --quiet +
+화면에 더 적은 정보를 출력합니다. +한 번 지정하면 진행률 표시줄을 제거하고, 두 번 지정하면 +실행 중인 작업을 제거하며, 세 번 지정하면 정보 메시지를 +제거하고, 네 번 지정하면 상태 메시지를 제거합니다. +치명적인 오류는 항상 화면에 출력됩니다. +이 옵션은 로그 파일에는 영향을 미치지 않습니다. +
+
+
+
+
+
+-H, --help +
+간단한 도움말 화면을 출력합니다. +
+
+
+
+
+
+-V, --version +
+프로그램 버전을 출력합니다. +
+
+
+
+
+

+Configuration +

+

SnapRAID는 디스크 어레이의 위치와 패리티 정보를 저장할 위치를 +알기 위해 설정 파일이 필요합니다. +

Unix에서는 /usr/local/etc/snapraid.conf 파일이 존재하면 사용하고, +그렇지 않으면 /etc/snapraid.conf를 사용합니다. +Windows에서는 snapraid.exe와 같은 디렉토리에 있는 +snapraid.conf 파일을 사용합니다. +

다음 옵션이 포함되어야 합니다(대소문자 구분): +

+

+parity FILE [,FILE] ... +

+

패리티 정보를 저장하는 데 사용할 파일을 정의합니다. +패리티는 RAID5와 유사하게 단일 디스크 오류로부터 보호를 +가능하게 합니다. +

여러 파일을 지정할 수 있으며, 이들은 서로 다른 디스크에 +있어야 합니다. +하나의 파일이 더 이상 커질 수 없을 때 다음 파일이 사용됩니다. +총 사용 가능한 공간은 어레이에서 가장 큰 데이터 디스크보다 +적어도 커야 합니다. +

나중에 추가 패리티 파일을 추가할 수 있지만, 순서를 바꾸거나 +제거할 수는 없습니다. +

패리티 디스크를 패리티용으로 예약하면 단편화되지 않아 성능이 +향상됩니다. +

Windows에서는 디스크가 가득 찼다는 경고를 피하기 위해 각 디스크에 +256MB가 사용되지 않은 채로 남습니다. +

이 옵션은 필수이며 한 번만 사용할 수 있습니다. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

추가 패리티 정보를 저장하는 데 사용할 파일을 정의합니다. +

지정된 각 패리티 수준에 대해 하나의 추가 보호 수준이 +활성화됩니다: +

    +
  • +2-parity는 RAID6 이중 패리티를 활성화합니다. +
  • +
  • +3-parity는 삼중 패리티를 활성화합니다. +
  • +
  • +4-parity는 쿼드(4중) 패리티를 활성화합니다. +
  • +
  • +5-parity는 펜타(5중) 패리티를 활성화합니다. +
  • +
  • +6-parity는 헥사(6중) 패리티를 활성화합니다. +
  • +
+

각 패리티 수준은 모든 이전 패리티 수준의 존재를 +필요로 합니다. +

parity 옵션과 동일한 고려 사항이 적용됩니다. +

이 옵션은 선택 사항이며 한 번만 사용할 수 있습니다. +

+
+

+z-parity FILE [,FILE] ... +

+

삼중 패리티를 저장하는 대체 파일 및 형식을 정의합니다. +

이 옵션은 3-parity의 대안이며, 주로 SSSE3 명령어 세트를 지원하지 +않는 ARM 또는 AMD Phenom, Athlon, Opteron과 같은 저가형 CPU를 +위한 것입니다. 이러한 경우 더 나은 성능을 제공합니다. +

이 형식은 ZFS RAIDZ3에서 사용되는 것과 유사하지만 더 빠릅니다. +ZFS와 마찬가지로 삼중 패리티 이상에서는 작동하지 않습니다. +

3-parity를 사용할 때 성능 향상을 위해 z-parity 형식을 사용하는 +것이 권장되는 경우 경고를 받게 됩니다. +

원하는 z-parity 또는 3-parity 파일로 설정 파일을 조정하고 +fix를 사용하여 다시 생성함으로써 한 형식에서 다른 형식으로 +변환할 수 있습니다. +

+
+

+content FILE +

+

디스크 어레이에 있는 모든 파일의 목록과 체크섬을 저장하는 데 사용할 +파일을 정의합니다. +

데이터, 패리티 또는 사용 가능한 다른 디스크에 배치할 수 있습니다. +데이터 디스크를 사용하는 경우, 이 파일은 sync 프로세스에서 +자동으로 제외됩니다. +

이 옵션은 필수이며 동일한 파일의 여러 복사본을 저장하기 위해 +여러 번 사용될 수 있습니다. +

사용된 각 패리티 디스크에 대해 최소한 하나의 복사본을 +저장해야 하며, 하나를 더 추가해야 합니다. 추가 복사본을 +사용해도 해롭지 않습니다. +

+
+

+data NAME DIR +

+

어레이의 데이터 디스크의 이름과 마운트 지점을 정의합니다. +NAME은 디스크를 식별하는 데 사용되며 고유해야 합니다. DIR은 +파일 시스템에서 디스크의 마운트 지점입니다. +

NAME을 고정된 상태로 유지하는 한, 필요에 따라 마운트 지점을 +변경할 수 있습니다. +

어레이의 각 데이터 디스크에 대해 하나의 옵션을 사용해야 합니다. +

나중에 설정 파일에서 직접 NAME을 변경하고 sync 명령을 +실행하여 디스크의 이름을 바꿀 수 있습니다. +이름 변경의 경우, 디스크의 저장된 UUID를 사용하여 연결됩니다. +

+
+

+extra NAME DIR +

+

smart 및 probe 명령으로 모니터링할 추가 디스크의 이름과 마운트 +지점을 정의합니다. +

이것은 부팅 디스크와 같이 어레이의 일부는 아니지만 시스템 작동에 필요 +한 디스크를 모니터링하는 데 유용합니다. +

이러한 디스크는 항상 회전할 것으로 예상되므로 up 및 down 명령의 +영향을 받지 않습니다. +

+
+

+nohidden +

+

모든 숨겨진 파일 및 디렉토리를 제외합니다. +Unix에서는 숨겨진 파일은 '.'으로 시작하는 파일입니다. +Windows에서는 숨김 속성을 가진 파일입니다. +

+
+

+exclude/include PATTERN +

+

sync 프로세스에서 제외하거나 포함할 파일 또는 디렉토리 패턴을 +정의합니다. +모든 패턴은 지정된 순서대로 처리됩니다. +

일치하는 첫 번째 패턴이 exclude 패턴이면 파일은 제외됩니다. +include 패턴이면 파일은 포함됩니다. +일치하는 패턴이 없으면, 지정된 마지막 패턴이 include이면 +파일은 제외되고, exclude이면 포함됩니다. +

패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오. +

이 옵션은 여러 번 사용될 수 있습니다. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

패리티의 기본 블록 크기를 키비바이트(kibibyte) 단위로 정의합니다. +1키비바이트는 1024바이트입니다. +

기본 블록 크기는 256이며, 대부분의 경우에 작동해야 합니다. +

**경고!** 이 옵션은 전문가 전용이며, 이 값을 변경하지 않는 것이 +강력히 권장됩니다. 나중에 이 값을 변경하려면 전체 패리티를 +다시 생성해야 합니다! +

다른 블록 크기를 사용하는 이유는 수백만 개의 작은 파일이 많은 +경우입니다. +

각 파일에 대해, 몇 바이트만 있어도 전체 패리티 블록이 할당되며, +파일이 많으면 상당한 미사용 패리티 공간이 발생할 수 있습니다. +패리티 디스크를 완전히 채우면 데이터 디스크에 더 이상 파일을 +추가할 수 없습니다. +그러나 낭비된 패리티는 데이터 디스크 전체에 걸쳐 축적되지 않습니다. +데이터 디스크의 많은 파일로 인해 발생하는 낭비된 공간은 다른 +데이터 디스크가 아닌 해당 데이터 디스크의 데이터 양만 제한합니다. +

대략적으로, 각 파일에 대해 블록 크기의 절반이 낭비된다고 가정할 수 +있습니다. 예를 들어, 100,000개의 파일과 256KiB 블록 크기로 +12.8GB의 패리티가 낭비되며, 이는 데이터 디스크에서 12.8GB의 사용 가능한 +공간이 줄어들 수 있음을 의미합니다. +

status를 사용하여 각 디스크의 낭비된 공간의 양을 확인할 수 있습니다. +이는 데이터 디스크에 비워 두거나 어레이에 포함되지 않은 파일에 +사용해야 하는 공간의 양입니다. +이 값이 음수이면 패리티를 거의 채우고 있음을 의미하며, 여전히 +낭비할 수 있는 공간을 나타냅니다. +

이 문제를 피하려면 패리티에 대해 더 큰 파티션을 사용할 수 있습니다. +예를 들어, 패리티 파티션이 데이터 디스크보다 12.8GB 더 큰 경우, +각 데이터 디스크에 최대 100,000개의 파일을 낭비되는 공간 없이 +처리할 수 있는 충분한 추가 공간이 있습니다. +

Linux에서 더 큰 패리티 파티션을 얻는 트릭은 다음 명령으로 포맷하는 +것입니다: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

이로 인해 약 1.5%의 추가 공간이 발생하며, 4TB 디스크의 경우 약 60GB로, +낭비되는 공간 없이 각 데이터 디스크에 약 460,000개의 파일을 +허용합니다. +

+
+

+hashsize SIZE_IN_BYTES +

+

저장된 블록의 해시 크기를 바이트 단위로 정의합니다. +

기본 해시 크기는 16바이트(128비트)이며, 대부분의 경우에 작동해야 합니다. +

**경고!** 이 옵션은 전문가 전용이며, 이 값을 변경하지 않는 것이 +강력히 권장됩니다. 나중에 이 값을 변경하려면 전체 패리티를 +다시 생성해야 합니다! +

다른 해시 크기를 사용하는 이유는 시스템의 메모리가 제한적인 경우입니다. +경험상 SnapRAID는 어레이의 16TB 데이터당 일반적으로 1GiB의 RAM을 +필요로 합니다. +

구체적으로, 데이터의 해시를 저장하기 위해 SnapRAID는 대략 +TS*(1+HS)/BS 바이트의 RAM을 필요로 합니다. +여기서 TS는 디스크 어레이의 총 크기(바이트), BS는 블록 크기(바이트), +HS는 해시 크기(바이트)입니다. +

예를 들어, 4TB 디스크 8개, 블록 크기 256KiB +(1KiB = 1024바이트), 해시 크기 16인 경우 다음과 같습니다: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
+
+

해시 크기를 8로 전환하면 다음과 같습니다: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
+
+

블록 크기를 512로 전환하면 다음과 같습니다: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
+
+

해시 크기를 8로, 블록 크기를 512로 모두 전환하면 다음과 같습니다: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

지정된 GB 양이 처리된 후 동기화 또는 스크럽 시 상태를 자동으로 저장합니다. +이 옵션은 기계 충돌 또는 기타 이벤트로 인해 중단된 경우 긴 sync +명령을 처음부터 다시 시작하는 것을 방지하는 데 유용합니다. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

허용되는 최대 디스크 온도를 섭씨로 설정합니다. 지정되면 SnapRAID는 +smartctl 도구를 사용하여 주기적으로 모든 디스크의 온도를 확인합니다. +SnapRAID가 작동하는 동안 현재 디스크 온도가 표시됩니다. +어떤 디스크라도 이 제한을 초과하면 모든 작업이 중지되고, 디스크는 +temp_sleep 옵션으로 정의된 기간 동안 회전 중지됩니다(대기 모드로 +전환됨). 절전 기간 후 작업이 재개되며, 온도 제한에 다시 도달하면 +다시 일시 중지될 수 있습니다. +

작동 중에 SnapRAID는 각 디스크의 가열 곡선을 분석하고 활동이 계속되면 +도달할 것으로 예상되는 장기 정상 온도를 추정합니다. +추정은 디스크 온도가 네 번 증가한 후에만 수행되어, 신뢰할 수 있는 +추세를 설정하기에 충분한 데이터 포인트가 확보되도록 합니다. +이 예측된 정상 온도는 현재 값 옆에 괄호 안에 표시되며, 시스템의 +냉각이 적절한지 평가하는 데 도움이 됩니다. 이 추정 온도는 정보 제공 +목적일 뿐이며 SnapRAID의 동작에는 영향을 미치지 않습니다. +프로그램의 동작은 오로지 실제 측정된 디스크 온도에 기반합니다. +

이 분석을 수행하려면 SnapRAID는 시스템 온도에 대한 참조가 필요합니다. +먼저 사용 가능한 하드웨어 센서에서 읽으려고 시도합니다. +시스템 센서에 액세스할 수 없는 경우, 실행 시작 시 측정된 가장 낮은 +디스크 온도를 대체 참조로 사용합니다. +

일반적으로 SnapRAID는 가장 뜨거운 디스크의 온도만 표시합니다. +모든 디스크의 온도를 표시하려면 -A 또는 --stats 옵션을 사용하십시오. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

온도 제한에 도달했을 때의 대기 시간(분)을 설정합니다. 이 기간 동안 +디스크는 회전 중지 상태를 유지합니다. 기본값은 5분입니다. +

+
+

+pool DIR +

+

pool 명령을 사용하여 디스크 어레이의 가상 뷰가 생성되는 풀링 +디렉토리를 정의합니다. +

디렉토리는 이미 존재해야 합니다. +

+
+

+share UNC_DIR +

+

디스크에 원격으로 액세스하는 데 필요한 Windows UNC 경로를 정의합니다. +

이 옵션이 지정되면 풀 디렉토리에 생성된 심볼릭 링크는 이 UNC 경로를 +사용하여 디스크에 액세스합니다. +이 옵션이 없으면 생성된 심볼릭 링크는 로컬 경로만 사용하며, 이는 +네트워크를 통해 풀 디렉토리를 공유하는 것을 허용하지 않습니다. +

심볼릭 링크는 지정된 UNC 경로를 사용하여 형성되며, data 옵션에 +지정된 디스크 이름이 추가되고, 마지막으로 파일 디렉토리와 이름이 +추가됩니다. +

이 옵션은 Windows에만 필요합니다. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

각 디스크에 대한 SMART 속성을 얻기 위한 사용자 정의 smartctl 옵션을 +정의합니다. 이는 RAID 컨트롤러 및 일부 자동 감지할 수 없는 USB 디스크에 +필요할 수 있습니다. %s 자리 표시자는 장치 이름으로 대체되지만, +RAID 컨트롤러와 같은 고정된 장치에서는 선택 사항입니다. +

DISK는 data 옵션에 지정된 것과 동일한 디스크 이름입니다. +PARITY는 parity, 2-parity, 3-parity, 4-parity, 5-parity, +6-parity, 또는 z-parity 중 하나의 패리티 이름입니다. +

지정된 OPTIONS에서 %s 문자열은 장치 이름으로 대체됩니다. +RAID 컨트롤러의 경우 장치가 고정되어 있을 가능성이 높으므로 +%s를 사용할 필요가 없을 수 있습니다. +

가능한 옵션은 smartmontools 설명서를 참조하십시오: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

예: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

디스크 실패 확률을 계산할 때 지정된 SMART 속성을 무시합니다. +이 옵션은 디스크가 특정 속성에 대해 특이하거나 오해의 소지가 있는 +값을 보고하는 경우에 유용합니다. +

DISK는 data 옵션에 지정된 것과 동일한 디스크 이름입니다. +PARITY는 parity, 2-parity, 3-parity, 4-parity, 5-parity, +6-parity, 또는 z-parity 중 하나의 패리티 이름입니다. +특수 값 *는 모든 디스크에서 속성을 무시하는 데 사용될 수 있습니다. +

예를 들어, 모든 디스크에서 Current Pending Sector Count 속성을 +무시하려면: +

+smartignore * 197
+
+

첫 번째 패리티 디스크에서만 무시하려면: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Unix의 일반적인 설정 예는 다음과 같습니다: +

+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
+
+

Windows의 일반적인 설정 예는 다음과 같습니다: +

+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
+
+
+
+
+

+Pattern +

+

패턴은 포함하거나 제외할 파일을 필터링하는 유연한 방법을 제공합니다. +글로빙(globbing) 문자를 사용하면 모든 경로를 일일이 나열하지 않고도 +특정 파일 이름이나 전체 디렉토리 구조와 일치하는 규칙을 정의할 수 있습니다. +

물음표 ?는 디렉토리 구분 기호를 제외한 모든 단일 문자와 일치합니다. +이는 패턴을 단일 디렉토리 수준으로 제한하면서 가변 문자가 포함된 +파일 이름을 일치시키는 데 유용합니다. +

단일 별표 *는 모든 문자 시퀀스와 일치하지만, 물음표와 마찬가지로 +디렉토리 경계를 넘지 않습니다. 슬래시에서 멈추므로 단일 경로 구성 요소 +내에서의 일치에 적합합니다. 이는 쉘 글로빙에서 익숙한 표준 와일드카드 +동작입니다. +

이중 별표 **는 더 강력하며 디렉토리 구분 기호를 포함한 모든 문자 +시퀀스와 일치합니다. 이를 통해 패턴이 여러 디렉토리 수준에서 일치할 수 +있습니다. **가 패턴 내에 직접 포함된 경우, 주변 리터럴 텍스트 사이의 +슬래시를 포함하여 0개 이상의 문자와 일치할 수 있습니다. +

**의 가장 중요한 용도는 특수 형식인 /**/입니다. 이는 0개 이상의 +전체 디렉토리 수준과 일치하므로 정확한 경로 구조를 모르더라도 +디렉토리 트리의 모든 깊이에서 파일과 일치시킬 수 있습니다. +예를 들어, src/**/main.js 패턴은 src/main.js(0개의 디렉토리 건너뜀), +src/ui/main.js(1개의 디렉토리 건너뜀), src/ui/components/main.js +(2개의 디렉토리 건너뜀)와 일치합니다. +

대괄호 []를 사용하는 문자 클래스는 지정된 세트 또는 범위에서 +단일 문자와 일치합니다. 다른 단일 문자 패턴과 마찬가지로 디렉토리 +구분 기호와는 일치하지 않습니다. 클래스는 범위 및 느낌표를 사용한 +부정을 지원합니다. +

기억해야 할 근본적인 차이점은 *, ? 및 문자 클래스는 모두 +디렉토리 경계를 준수하고 단일 경로 구성 요소 내에서만 일치하는 반면, +**는 디렉토리 구분 기호를 가로질러 일치할 수 있는 유일한 패턴이라는 것입니다. +

네 가지 유형의 패턴이 있습니다: +

+
+
+FILE +
+FILE이라는 이름의 모든 파일을 선택합니다. +이 패턴은 디렉토리가 아닌 파일에만 적용됩니다. +
+
+
+
+
+
+DIR/ +
+DIR이라는 이름의 모든 디렉토리와 그 안의 모든 것을 선택합니다. +이 패턴은 파일이 아닌 디렉토리에만 적용됩니다. +
+
+
+
+
+
+/PATH/FILE +
+지정된 정확한 파일 경로를 선택합니다. 이 패턴은 디렉토리가 아닌 +파일에만 적용됩니다. +
+
+
+
+
+
+/PATH/DIR/ +
+지정된 정확한 디렉토리 경로와 그 안의 모든 것을 선택합니다. +이 패턴은 파일이 아닌 디렉토리에만 적용됩니다. +
+
+
+
+
+
+/로 시작하는 절대 경로를 지정하면 로컬 파일 시스템의 루트 디렉토리가 +
+
+
+
+

아닌 어레이 루트 디렉토리에 적용됩니다. +

Windows에서는 정방향 슬래시 / 대신 역슬래시 \를 사용할 수 있습니다. +Windows 시스템 디렉토리, 접합점(junctions), 마운트 지점 및 기타 +Windows 특수 디렉토리는 파일로 취급됩니다. 즉, 이들을 제외하려면 +디렉토리 규칙이 아닌 파일 규칙을 사용해야 합니다. +

파일 이름에 *, ?, [, +또는 ] 문자가 포함된 경우, 글로빙 문자로 해석되는 것을 피하기 위해 +이스케이프해야 합니다. Unix에서는 이스케이프 문자가 \이고, +Windows에서는 ^입니다. +패턴이 명령줄에 있는 경우, 명령 셸에 의해 해석되는 것을 피하기 위해 +이스케이프 문자를 두 배로 늘려야 합니다. +

설정 파일에서는 처리할 파일을 필터링하기 위해 다른 전략을 사용할 수 +있습니다. +가장 간단한 접근 방식은 원하지 않는 모든 파일과 디렉토리를 제거하기 +위해 exclude 규칙만 사용하는 것입니다. 예를 들어: +

+# *.unrecoverable이라는 이름의 모든 파일 제외
+exclude *.unrecoverable
+# 루트 디렉토리 /lost+found 제외
+exclude /lost+found/
+# tmp라는 이름의 모든 하위 디렉토리 제외
+exclude tmp/
+
+

반대 접근 방식은 include 규칙만 사용하여 처리하려는 파일만 +정의하는 것입니다. 예를 들어: +

+# 일부 디렉토리만 포함
+include /movies/
+include /musics/
+include /pictures/
+
+

최종 접근 방식은 exclude 및 include 규칙을 혼합하는 것입니다. +이 경우 규칙의 순서가 중요합니다. 앞선 규칙이 뒤의 규칙보다 +우선합니다. +단순화를 위해 모든 exclude 규칙을 먼저 나열한 다음 모든 +include 규칙을 나열할 수 있습니다. 예를 들어: +

+# *.unrecoverable이라는 이름의 모든 파일 제외
+exclude *.unrecoverable
+# tmp라는 이름의 모든 하위 디렉토리 제외
+exclude tmp/
+# 일부 디렉토리만 포함
+include /movies/
+include /musics/
+include /pictures/
+
+

명령줄에서 -f 옵션을 사용할 때 include 패턴만 사용할 수 있습니다. +예를 들어: +

+# .mp3 파일만 확인.
+# Unix에서는 셸에 의한 글로빙 확장을 피하기 위해 따옴표를 사용합니다.
+snapraid -f "*.mp3" check
+
+

Unix에서는 명령줄에서 글로빙 문자를 사용할 때 셸이 확장하는 것을 +방지하기 위해 따옴표로 묶어야 합니다. +

+
+

+Ignore File +

+

설정 파일의 전역 규칙 외에도, 배열 내의 모든 디렉토리에 .snapraidignore +파일을 배치하여 분산된 제외 규칙을 정의할 수 있습니다. +

.snapraidignore에 정의된 규칙은 설정 파일의 규칙 다음에 적용됩니다. +이는 해당 규칙들이 더 높은 우선순위를 가지며, 전역 설정에 의해 이전에 +포함되었던 파일들을 제외하는 데 사용될 수 있음을 의미합니다. 사실상 +로컬 규칙이 일치하면, 전역 포함 설정과 관계없이 해당 파일은 제외됩니다. +

.snapraidignore의 패턴 로직은 전역 설정을 따르지만, 패턴은 해당 파일이 +위치한 디렉토리를 기준으로 고정됩니다: +

+
+
+FILE +
+이 디렉토리 또는 그 하위에서 FILE이라는 이름의 모든 파일을 선택합니다. +이는 전역 패턴과 동일한 글로빙(globbing) 규칙을 따릅니다. +
+
+
+
+
+
+DIR/ +
+이 디렉토리 또는 그 하위에서 DIR이라는 이름의 모든 디렉토리와 +그 안의 모든 항목을 선택합니다. +
+
+
+
+
+
+/PATH/FILE +
+.snapraidignore 파일의 위치를 기준으로 지정된 정확한 파일을 +선택합니다. +
+
+
+
+
+
+/PATH/DIR/ +
+.snapraidignore 파일의 위치를 기준으로 지정된 정확한 디렉토리와 +그 안의 모든 항목을 선택합니다. +
+
+
+

전역 설정과 달리, .snapraidignore 파일은 제외 규칙만 지원합니다. +include 패턴이나 부정(!)은 사용할 수 없습니다. +

예를 들어, /mnt/disk1/projects/에 .snapraidignore가 있는 경우: +

+# /mnt/disk1/projects/output.bin만 제외
+/output.bin
+# projects/ 내부의 build라는 이름의 모든 디렉토리 제외
+build/
+# projects/ 또는 그 하위 폴더의 모든 .tmp 파일 제외
+*.tmp
+
+
+
+

+Content +

+

SnapRAID는 content 파일에 파일 목록과 체크섬을 저장합니다. +

이것은 디스크 어레이에 있는 모든 파일의 목록과 무결성을 확인하기 위한 +모든 체크섬을 나열하는 이진 파일입니다. +

이 파일은 sync 및 scrub 명령에 의해 읽고 쓰여지며, +fix, check, 및 status 명령에 의해 읽혀집니다. +

+
+

+Parity +

+

SnapRAID는 패리티 파일에 어레이의 패리티 정보를 저장합니다. +

이들은 content 파일에 정의된 모든 블록의 계산된 패리티를 포함하는 +이진 파일입니다. +

이 파일들은 sync 및 fix 명령에 의해 읽고 쓰여지며, +scrub 및 check 명령에 의해서만 읽혀집니다. +

+
+

+Encoding +

+

Unix의 SnapRAID는 인코딩을 무시합니다. 파일 시스템에서 사용되는 +것과 동일한 인코딩으로 파일 이름을 읽고 저장합니다. +

Windows에서는 파일 시스템에서 읽은 모든 이름이 UTF-8 형식으로 +변환되고 처리됩니다. +

파일 이름이 올바르게 출력되도록 하려면, chcp 65001 명령으로 +Windows 콘솔을 UTF-8 모드로 설정하고 콘솔 글꼴로 Lucida Console과 +같은 TrueType 글꼴을 사용해야 합니다. +이는 출력되는 파일 이름에만 영향을 미치며, 콘솔 출력을 파일로 +리디렉션하는 경우 결과 파일은 항상 UTF-8 형식입니다. +

+ + +
+
+
+ + + + + + + diff --git a/manual-log.html b/beta/manual-log.html similarity index 100% rename from manual-log.html rename to beta/manual-log.html diff --git a/beta/manual-pl.html b/beta/manual-pl.html new file mode 100644 index 00000000..a897944f --- /dev/null +++ b/beta/manual-pl.html @@ -0,0 +1,2064 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID to program do tworzenia kopii zapasowych przeznaczony +dla macierzy dyskowych, przechowujący informacje parzystości +do odzyskiwania danych w przypadku awarii do sześciu dysków. +

Przeznaczony głównie dla domowych centrów multimedialnych z dużymi, +rzadko zmieniającymi się plikami, SnapRAID oferuje kilka funkcji: +

    +
  • +Możesz używać dysków już wypełnionych plikami bez +konieczności ich ponownego formatowania, uzyskując do nich dostęp jak zwykle. +
  • +
  • +Wszystkie Twoje dane są haszowane, aby zapewnić integralność danych i zapobiec +cichej korupcji. +
  • +
  • +Gdy liczba uszkodzonych dysków przekracza liczbę parzystości, +utrata danych ogranicza się do dotkniętych dysków; dane na +innych dyskach pozostają dostępne. +
  • +
  • +Jeśli przypadkowo usuniesz pliki na dysku, możliwe jest ich odzyskanie. +
  • +
  • +Dyski mogą mieć różne rozmiary. +
  • +
  • +Możesz dodawać dyski w dowolnym momencie. +
  • +
  • +SnapRAID nie blokuje Twoich danych; możesz przestać go używać +w dowolnym momencie bez ponownego formatowania ani przenoszenia danych. +
  • +
  • +Aby uzyskać dostęp do pliku, wystarczy, że zakręci się tylko jeden dysk, +co oszczędza energię i zmniejsza hałas. +
  • +
+

Więcej informacji można znaleźć na oficjalnej stronie SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID to hybryda programu RAID i programu do tworzenia kopii zapasowych, +której celem jest połączenie najlepszych zalet obu. Ma jednak pewne +ograniczenia, które należy wziąć pod uwagę przed jego użyciem. +

Głównym ograniczeniem jest to, że jeśli dysk ulegnie awarii, a Ty nie wykonałeś +niedawno synchronizacji, możesz nie być w stanie w pełni odzyskać danych. +Dokładniej, możesz nie być w stanie odzyskać danych o wielkości +zmienionych lub usuniętych plików od czasu ostatniej operacji synchronizacji. +Dzieje się tak, nawet jeśli zmienione lub usunięte pliki nie znajdują się na +uszkodzonym dysku. Dlatego SnapRAID jest lepiej dostosowany do +danych, które rzadko się zmieniają. +

Z drugiej strony, nowo dodane pliki nie uniemożliwiają odzyskania już +istniejących plików. Stracisz tylko ostatnio dodane pliki, jeśli +znajdują się one na uszkodzonym dysku. +

Inne ograniczenia SnapRAID to: +

    +
  • +W SnapRAID nadal masz oddzielne systemy plików dla każdego dysku. +W RAID otrzymujesz jeden duży system plików. +
  • +
  • +SnapRAID nie rozdziela danych. +W RAID uzyskujesz wzrost prędkości dzięki rozdzielaniu. +
  • +
  • +SnapRAID nie obsługuje odzyskiwania w czasie rzeczywistym. +W RAID nie musisz przerywać pracy, gdy dysk ulegnie awarii. +
  • +
  • +SnapRAID może odzyskać dane tylko z ograniczonej liczby awarii dysków. +W przypadku kopii zapasowej możesz odzyskać dane po całkowitej +awarii całej macierzy dysków. +
  • +
  • +Zapisywane są tylko nazwy plików, znaczniki czasu, dowiązania symboliczne +i dowiązania twarde. +Uprawnienia, właścicielstwo i rozszerzone atrybuty nie są zapisywane. +
  • +
+
+
+

+Getting Started +

+

Aby użyć SnapRAID, musisz najpierw wybrać jeden dysk w swojej macierzy +dysków, który zostanie przeznaczony na informacje o parzystości. Z jednym dyskiem +na parzystość będziesz w stanie odzyskać dane po awarii pojedynczego dysku, +podobnie jak w RAID5. +

Jeśli chcesz odzyskać dane po większej liczbie awarii dysków, podobnie jak +w RAID6, musisz zarezerwować dodatkowe dyski na parzystość. Każdy dodatkowy +dysk parzystości umożliwia odzyskanie danych po jeszcze jednej awarii dysku. +

Jako dyski parzystości musisz wybrać największe dyski w macierzy, +ponieważ informacje o parzystości mogą urosnąć do rozmiaru największego +dysku danych w macierzy. +

Dyski te będą przeznaczone do przechowywania plików parzystości. +Nie powinieneś na nich przechowywać swoich danych. +

Następnie musisz zdefiniować dyski danych, które chcesz chronić +za pomocą SnapRAID. Ochrona jest bardziej skuteczna, jeśli te dyski +zawierają dane, które rzadko się zmieniają. Z tego powodu lepiej jest +NIE włączać dysku C:\ w systemie Windows ani katalogów /home, /var i /tmp +w systemie Unix. +

Lista plików jest zapisywana w plikach zawartości, zwykle +przechowywanych na dyskach danych, parzystości lub rozruchowych. +Plik ten zawiera szczegóły Twojej kopii zapasowej, w tym wszystkie +sumy kontrolne w celu weryfikacji jej integralności. +Plik zawartości jest przechowywany w wielu kopiach, a każda kopia musi +znajdować się na innym dysku, aby zapewnić, że nawet w przypadku wielu +awarii dysków, przynajmniej jedna kopia jest dostępna. +

Na przykład, załóżmy, że interesuje Cię tylko jeden poziom parzystości +i Twoje dyski znajdują się w: +

+/mnt/diskp <- wybrany dysk dla parzystości
+/mnt/disk1 <- pierwszy dysk do ochrony
+/mnt/disk2 <- drugi dysk do ochrony
+/mnt/disk3 <- trzeci dysk do ochrony
+
+

Musisz utworzyć plik konfiguracyjny /etc/snapraid.conf z +następującymi opcjami: +

+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/
+
+

Jeśli używasz systemu Windows, powinieneś użyć formatu ścieżek Windows, +z literami dysków i ukośnikami odwrotnymi zamiast ukośników: +

+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\
+
+

Jeśli masz wiele dysków i zabrakło Ci liter dysków, możesz zamontować +dyski bezpośrednio w podfolderach. Zobacz: +

+https://www.google.com/search?q=Windows+mount+point
+
+

W tym momencie jesteś gotowy do uruchomienia polecenia sync, aby zbudować +informacje o parzystości. +

+snapraid sync
+
+

Ten proces może zająć kilka godzin za pierwszym razem, w zależności od rozmiaru +danych już obecnych na dyskach. Jeśli dyski są puste, +proces jest natychmiastowy. +

Możesz go zatrzymać w dowolnym momencie, naciskając Ctrl+C, a przy następnym +uruchomieniu wznowi się w miejscu, w którym został przerwany. +

Kiedy to polecenie się zakończy, Twoje dane są BEZPIECZNE. +

Teraz możesz zacząć używać swojej macierzy, jak chcesz, i okresowo +aktualizować informacje o parzystości, uruchamiając polecenie sync. +

+

+Scrubbing +

+

Aby okresowo sprawdzać dane i parzystość pod kątem błędów, możesz +uruchomić polecenie scrub. +

+snapraid scrub
+
+

To polecenie porównuje dane w Twojej macierzy z haszem obliczonym +podczas polecenia sync, aby zweryfikować integralność. +

Każde uruchomienie polecenia sprawdza około 8% macierzy, z wyłączeniem danych +już sprawdzonych w ciągu poprzednich 10 dni. +Możesz użyć opcji -p, --plan, aby określić inną ilość, +oraz opcji -o, --older-than, aby określić inny wiek w dniach. +Na przykład, aby sprawdzić 5% macierzy dla bloków starszych niż 20 dni, użyj: +

+snapraid -p 5 -o 20 scrub
+
+

Jeśli podczas procesu zostaną znalezione ciche błędy lub błędy wejścia/wyjścia, +odpowiednie bloki zostaną oznaczone jako złe w pliku content +i wymienione w poleceniu status. +

+snapraid status
+
+

Aby je naprawić, możesz użyć polecenia fix, filtrując złe bloki +za pomocą opcji -e, --filter-error: +

+snapraid -e fix
+
+

Przy następnym scrub, błędy znikną z raportu status, +jeśli zostały faktycznie naprawione. Aby przyspieszyć, możesz użyć -p bad, aby +sprawdzić tylko bloki oznaczone jako złe. +

+snapraid -p bad scrub
+
+

Uruchomienie scrub na niezsynchronizowanej macierzy może zgłosić błędy +spowodowane usuniętymi lub zmodyfikowanymi plikami. Błędy te są zgłaszane +w wyniku scrub, ale powiązane bloki nie są oznaczane jako złe. +

+
+

+Pooling +

+

Uwaga: Funkcja łączenia w pulę opisana poniżej została zastąpiona przez +narzędzie mergerfs, które jest obecnie zalecaną opcją dla użytkowników Linuksa +w społeczności SnapRAID. Mergefs zapewnia bardziej elastyczny i wydajny +sposób łączenia wielu dysków w jeden ujednolicony punkt montowania, +umożliwiając bezproblemowy dostęp do plików w całej macierzy bez polegania +na dowiązaniach symbolicznych. Dobrze integruje się z SnapRAID w celu ochrony +parzystości i jest powszechnie używane w konfiguracjach takich jak +OpenMediaVault (OMV) lub niestandardowe konfiguracje NAS. +

Aby wszystkie pliki w Twojej macierzy były widoczne w tym samym drzewie katalogów, +możesz włączyć funkcję pooling. Tworzy ona wirtualny, tylko do odczytu, +widok wszystkich plików w Twojej macierzy za pomocą dowiązań symbolicznych. +

Katalog pooling możesz skonfigurować w pliku konfiguracyjnym za pomocą: +

+pool /pool
+
+

lub, jeśli używasz systemu Windows, za pomocą: +

+pool C:\pool
+
+

a następnie uruchom polecenie pool, aby utworzyć lub zaktualizować wirtualny widok. +

+snapraid pool
+
+

Jeśli używasz platformy Unix i chcesz udostępnić ten katalog +przez sieć maszynom Windows lub Unix, powinieneś dodać +następujące opcje do swojego /etc/samba/smb.conf: +

+# W sekcji globalnej smb.conf
+unix extensions = no
+
+
+# W sekcji udziału smb.conf
+[pool]
+comment = Pula
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

W systemie Windows udostępnianie dowiązań symbolicznych przez sieć wymaga od klientów +zdalnego ich rozwiązywania. Aby to umożliwić, oprócz udostępnienia katalogu puli, +musisz również udostępnić wszystkie dyski niezależnie, używając nazw dysków +zdefiniowanych w pliku konfiguracyjnym jako punkty udostępniania. Musisz również +określić w opcji share w pliku konfiguracyjnym ścieżkę UNC Windows, +której klienci zdalni muszą użyć, aby uzyskać dostęp do tych udostępnionych dysków. +

Na przykład, działając z serwera o nazwie darkstar, możesz użyć +opcji: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

i udostępnić w sieci następujące katalogi: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

aby umożliwić zdalnym klientom dostęp do wszystkich plików pod adresem \\darkstar\pool. +

Możesz również potrzebować skonfigurować klientów zdalnych, aby umożliwić dostęp +do zdalnych dowiązań symbolicznych za pomocą polecenia: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID działa bardziej jak program do tworzenia kopii zapasowych niż system RAID +i może być użyty do przywrócenia lub odzyskania usuniętych plików do ich poprzedniego +stanu za pomocą opcji -f, --filter: +

+snapraid fix -f FILE
+
+

lub dla katalogu: +

+snapraid fix -f DIR/
+
+

Możesz go również użyć do odzyskania tylko przypadkowo usuniętych plików wewnątrz +katalogu za pomocą opcji -m, --filter-missing, która przywraca +tylko brakujące pliki, pozostawiając wszystkie inne nienaruszone. +

+snapraid fix -m -f DIR/
+
+

Lub aby odzyskać wszystkie usunięte pliki na wszystkich dyskach za pomocą: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków! +

NIE PANIKUJ! Będziesz w stanie je odzyskać! +

Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków. +Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym +jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID. +

Następnie postępuj zgodnie z poniższymi krokami. +

+

+KROK 1 -> Ponowna konfiguracja +

+

Potrzebujesz trochę miejsca do odzyskania, najlepiej na dodatkowych +zapasowych dyskach, ale wystarczy zewnętrzny dysk USB lub dysk zdalny. +

Zmodyfikuj plik konfiguracyjny SnapRAID, aby opcja data lub parity +uszkodzonego dysku wskazywała na lokalizację z wystarczającą ilością pustego +miejsca do odzyskania plików. +

Na przykład, jeśli dysk d1 uległ awarii, zmień z: +

+data d1 /mnt/disk1/
+
+

na: +

+data d1 /mnt/new_spare_disk/
+
+

Jeśli dysk do odzyskania jest dyskiem parzystości, zaktualizuj odpowiednią +opcję parity. +Jeśli masz wiele uszkodzonych dysków, zaktualizuj wszystkie ich opcje konfiguracyjne. +

+
+

+KROK 2 -> Naprawa +

+

Uruchom polecenie fix, zapisując log w pliku zewnętrznym za pomocą: +

+snapraid -d NAME -l fix.log fix
+
+

Gdzie NAME to nazwa dysku, taka jak d1 w naszym poprzednim przykładzie. +Jeśli dysk do odzyskania jest dyskiem parzystości, użyj nazw parity, 2-parity, +itp. +Jeśli masz wiele uszkodzonych dysków, użyj wielu opcji -d, aby określić +wszystkie z nich. +

To polecenie zajmie dużo czasu. +

Upewnij się, że masz kilka gigabajtów wolnego miejsca na zapisanie pliku fix.log. +Uruchom je z dysku z wystarczającą ilością wolnego miejsca. +

Teraz odzyskałeś wszystko, co jest możliwe do odzyskania. Jeśli niektóre pliki +są częściowo lub całkowicie nie do odzyskania, zostaną one przemianowane +poprzez dodanie rozszerzenia .unrecoverable. +

Szczegółową listę wszystkich nie do odzyskania bloków znajdziesz w pliku fix.log, +sprawdzając wszystkie linie zaczynające się od unrecoverable:. +

Jeśli nie jesteś zadowolony z odzyskiwania, możesz spróbować ponownie +tyle razy, ile chcesz. +

Na przykład, jeśli usunąłeś pliki z macierzy po ostatniej +sync, może to spowodować, że niektóre pliki nie zostaną odzyskane. +W tym przypadku możesz ponowić próbę fix za pomocą opcji -i, --import, +określając, gdzie te pliki znajdują się teraz, aby włączyć je ponownie +do procesu odzyskiwania. +

Jeśli jesteś zadowolony z odzyskiwania, możesz kontynuować, +ale pamiętaj, że po synchronizacji nie możesz już ponowić próby polecenia fix! +

+
+

+KROK 3 -> Sprawdzenie +

+

Jako ostrożne sprawdzenie, możesz teraz uruchomić polecenie check, aby upewnić się, że +wszystko jest poprawne na odzyskanym dysku. +

+snapraid -d NAME -a check
+
+

Gdzie NAME to nazwa dysku, taka jak d1 w naszym poprzednim przykładzie. +

Opcje -d i -a mówią SnapRAID, aby sprawdził tylko określony dysk +i zignorował wszystkie dane parzystości. +

To polecenie zajmie dużo czasu, ale jeśli nie jesteś zbyt ostrożny, +możesz je pominąć. +

+
+

+KROK 4 -> Synchronizacja +

+

Uruchom polecenie sync, aby ponownie zsynchronizować macierz z nowym dyskiem. +

+snapraid sync
+
+

Jeśli wszystko zostanie odzyskane, to polecenie jest natychmiastowe. +

+
+
+
+

+Commands +

+

SnapRAID udostępnia kilka prostych poleceń, które pozwalają na: +

    +
  • +Wyświetlenie statusu macierzy -> status +
  • +
  • +Kontrolę dysków -> smart, probe, up, down +
  • +
  • +Wykonanie kopii zapasowej/migawki -> sync +
  • +
  • +Okresowe sprawdzanie danych -> scrub +
  • +
  • +Przywrócenie ostatniej kopii zapasowej/migawki -> fix. +
  • +
+

Polecenia muszą być zapisane małymi literami. +

+

+status +

+

Wyświetla podsumowanie stanu macierzy dysków. +

Zawiera informacje o fragmentacji parzystości, jak stare +są bloki bez sprawdzenia i wszystkie zarejestrowane ciche +błędy napotkane podczas scrubbingu. +

Prezentowane informacje odnoszą się do ostatniego momentu, w którym +uruchomiłeś sync. Późniejsze modyfikacje nie są brane pod uwagę. +

Jeśli wykryto złe bloki, ich numery bloków są wymienione. +Aby je naprawić, możesz użyć polecenia fix -e. +

Pokazuje również wykres reprezentujący ostatni raz, kiedy każdy blok +został sprawdzony lub zsynchronizowany. Sprawdzone bloki są pokazane +za pomocą *, bloki zsynchronizowane, ale jeszcze niesprawdzone, za pomocą o. +

Nic nie jest modyfikowane. +

+
+

+smart +

+

Wyświetla raport SMART wszystkich dysków w systemie. +

Zawiera oszacowanie prawdopodobieństwa awarii w następnym +roku, co pozwala zaplanować wymianę konserwacyjną dysków, które wykazują +podejrzane atrybuty. +

To oszacowanie prawdopodobieństwa uzyskuje się poprzez skorelowanie atrybutów SMART +dysków z danymi Backblaze dostępnymi pod adresem: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Jeśli SMART zgłosi, że dysk ulega awarii, dla tego dysku +wyświetlane jest FAIL lub PREFAIL, a SnapRAID zwraca błąd. +W takim przypadku natychmiastowa wymiana dysku jest wysoce zalecana. +

Inne możliwe ciągi statusu to: +

+
+
+logfail +
+W przeszłości niektóre atrybuty były niższe niż +próg. +
+
+
+
+logerr +
+Dziennik błędów urządzenia zawiera błędy. +
+
+
+
+selferr +
+Dziennik autotestu urządzenia zawiera błędy. +
+
+
+

Jeśli określono opcję -v, --verbose, dostarczana jest głębsza analiza +statystyczna. Ta analiza może pomóc Ci zdecydować, czy potrzebujesz +więcej czy mniej parzystości. +

To polecenie używa narzędzia smartctl i jest równoważne +uruchomieniu smartctl -a na wszystkich urządzeniach. +

Jeśli Twoje urządzenia nie zostaną poprawnie wykryte automatycznie, możesz określić +niestandardowe polecenie za pomocą opcji smartctl w pliku konfiguracyjnym. +

Nic nie jest modyfikowane. +

+
+

+probe +

+

Wyświetla stan ZASILANIA wszystkich dysków w systemie. +

Standby oznacza, że dysk się nie kręci. Active oznacza, +że dysk się kręci. +

To polecenie używa narzędzia smartctl i jest równoważne +uruchomieniu smartctl -n standby -i na wszystkich urządzeniach. +

Jeśli Twoje urządzenia nie zostaną poprawnie wykryte automatycznie, możesz określić +niestandardowe polecenie za pomocą opcji smartctl w pliku konfiguracyjnym. +

Nic nie jest modyfikowane. +

+
+

+up +

+

Rozpędza wszystkie dyski macierzy. +

Możesz rozpędzić tylko określone dyski za pomocą opcji -d, --filter-disk. +

Rozpędzanie wszystkich dysków w tym samym czasie wymaga dużo energii. +Upewnij się, że Twój zasilacz jest w stanie to wytrzymać. +

Nic nie jest modyfikowane. +

+
+

+down +

+

Zatrzymuje wszystkie dyski macierzy. +

To polecenie używa narzędzia smartctl i jest równoważne +uruchomieniu smartctl -s standby,now na wszystkich urządzeniach. +

Możesz zatrzymać tylko określone dyski za pomocą opcji -d, --filter-disk. +

Aby automatycznie zatrzymać dyski w przypadku błędu, możesz użyć +opcji -s, --spin-down-on-error z dowolnym innym poleceniem, co jest +równoważne ręcznemu uruchomieniu down, gdy wystąpi błąd. +

Nic nie jest modyfikowane. +

+
+

+diff +

+

Wyświetla listę wszystkich plików zmodyfikowanych od ostatniej sync, które +wymagają ponownego obliczenia danych parzystości. +

To polecenie nie sprawdza danych pliku, a jedynie znacznik czasu pliku, +rozmiar i inode. +

Po wyświetleniu listy wszystkich zmienionych plików, prezentowane jest +podsumowanie zmian, pogrupowane według: +

+
+
+equal +
+Pliki niezmienione od wcześniej. +
+
+
+
+added +
+Pliki dodane, których wcześniej nie było. +
+
+
+
+removed +
+Pliki usunięte. +
+
+
+
+updated +
+Pliki o innym rozmiarze lub znaczniku czasu, co oznacza, że +zostały zmodyfikowane. +
+
+
+
+moved +
+Pliki przeniesione do innego katalogu na tym samym dysku. +Są one identyfikowane przez tę samą nazwę, rozmiar, znacznik czasu +i inode, ale inny katalog. +
+
+
+
+copied +
+Pliki skopiowane na ten sam lub inny dysk, gdzie +oryginalny plik nadal istnieje. +Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru +i znacznika czasu. +Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka +musi być zgodna, aby plik został zidentyfikowany, a nie +tylko nazwa. +
+
+
+
+relocated +
+Pliki przeniesione na ten sam lub inny dysk, gdzie +oryginał zniknął. +Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru +i znacznika czasu. +Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka +musi być zgodna, aby plik został zidentyfikowany. +W przeciwieństwie do plików 'moved' na tym samym dysku, pliki +relokowane mają inny i-węzeł. +
+
+
+
+restored +
+Pliki o innym i-węźle, ale pasującym katalogu, +nazwie, rozmiarze i znaczniku czasu. +Są to zazwyczaj pliki przywrócone po ich usunięciu. +
+
+
+

Jeśli wymagana jest sync, kod powrotu procesu wynosi 2, zamiast +domyślnego 0. Kod powrotu 1 jest używany dla ogólnego stanu błędu. +

Nic nie jest modyfikowane. +

+
+

+sync +

+

Aktualizuje informacje o parzystości. Wszystkie zmodyfikowane pliki +w macierzy dysków są odczytywane, a odpowiednie dane parzystości +są aktualizowane. +

Możesz zatrzymać ten proces w dowolnym momencie, naciskając Ctrl+C, +bez utraty już wykonanej pracy. +Przy następnym uruchomieniu proces sync wznowi się w miejscu, w którym +został przerwany. +

Jeśli podczas procesu zostaną znalezione ciche błędy lub błędy wejścia/wyjścia, +odpowiednie bloki zostaną oznaczone jako złe. +

Pliki są identyfikowane po ścieżce i/lub inode i sprawdzane +po rozmiarze i znaczniku czasu. +Jeśli rozmiar pliku lub znacznik czasu się różni, dane parzystości +są ponownie obliczane dla całego pliku. +Jeśli plik zostanie przeniesiony lub zmieniony na tym samym dysku, zachowując ten sam inode, +parzystość nie jest ponownie obliczana. +Jeśli plik zostanie przeniesiony na inny dysk, parzystość jest ponownie obliczana, +ale wcześniej obliczone informacje o haszu są zachowywane. +

Pliki content i parity są modyfikowane w razie potrzeby. +Pliki w macierzy NIE są modyfikowane. +

+
+

+scrub +

+

Sprawdza macierz, szukając cichych błędów lub błędów wejścia/wyjścia w danych +i dyskach parzystości. +

Każde wywołanie sprawdza około 8% macierzy, z wyłączeniem +danych już sprawdzonych w ciągu ostatnich 10 dni. +Oznacza to, że sprawdzanie raz w tygodniu zapewnia sprawdzenie każdego bitu danych +przynajmniej raz na trzy miesiące. +

Możesz zdefiniować inny plan sprawdzania lub ilość za pomocą opcji -p, --plan, +która akceptuje: +bad - Sprawdza bloki oznaczone jako złe. +new - Sprawdza bloki właśnie zsynchronizowane, jeszcze niesprawdzone. +full - Sprawdza wszystko. +0-100 - Sprawdza określony procent bloków. +

Jeśli określisz wartość procentową, możesz również użyć opcji -o, --older-than, +aby zdefiniować, jak stary powinien być blok. +Najpierw sprawdzane są najstarsze bloki, co zapewnia optymalne sprawdzenie. +Jeśli chcesz sprawdzić tylko bloki właśnie zsynchronizowane, jeszcze niesprawdzone, +użyj opcji -p new. +

Aby uzyskać szczegóły statusu sprawdzania, użyj polecenia status. +

Dla każdego znalezionego cichego błędu lub błędu wejścia/wyjścia, odpowiednie bloki +są oznaczane jako złe w pliku content. +Te złe bloki są wymienione w status i mogą zostać naprawione za pomocą fix -e. +Po naprawie, przy następnym sprawdzeniu, zostaną one ponownie sprawdzone, a jeśli okaże się, +że zostały poprawione, oznaczenie złego zostanie usunięte. +Aby sprawdzić tylko złe bloki, możesz użyć polecenia scrub -p bad. +

Zaleca się uruchamianie scrub tylko na zsynchronizowanej macierzy, aby uniknąć +zgłaszania błędów spowodowanych przez niezsynchronizowane dane. Błędy te są rozpoznawane +jako nie będące cichymi błędami, a bloki nie są oznaczane jako złe, +ale takie błędy są zgłaszane w wyniku polecenia. +

Plik content jest modyfikowany w celu zaktualizowania czasu ostatniego sprawdzenia +dla każdego bloku i oznaczenia złych bloków. +Pliki parity NIE są modyfikowane. +Pliki w macierzy NIE są modyfikowane. +

+
+

+fix +

+

Naprawia wszystkie pliki i dane parzystości. +

Wszystkie pliki i dane parzystości są porównywane ze stanem migawki +zapisanym w ostatniej sync. +Jeśli zostanie znaleziona różnica, jest ona przywracana do zapisanego stanu migawki. +

OSTRZEŻENIE! Polecenie fix nie rozróżnia błędów od +celowych modyfikacji. Bezwarunkowo przywraca stan pliku +do ostatniej sync. +

Jeśli nie określono żadnej innej opcji, przetwarzana jest cała macierz. +Użyj opcji filtra, aby wybrać podzbiór plików lub dysków do operacji. +

Aby naprawić tylko bloki oznaczone jako złe podczas sync i scrub, +użyj opcji -e, --filter-error. +W przeciwieństwie do innych opcji filtra, ta stosuje poprawki tylko do plików, które są +niezmienione od ostatniej sync. +

SnapRAID zmienia nazwy wszystkich plików, których nie można naprawić, dodając +rozszerzenie .unrecoverable. +

Przed naprawą, cała macierz jest skanowana w celu znalezienia wszelkich plików przeniesionych +od ostatniej operacji sync. +Pliki te są identyfikowane na podstawie ich znacznika czasu, ignorując ich nazwę +i katalog, i są używane w procesie odzyskiwania, jeśli to konieczne. +Jeśli przeniosłeś niektóre z nich poza macierz, możesz użyć opcji -i, --import, +aby określić dodatkowe katalogi do skanowania. +

Pliki są identyfikowane tylko po ścieżce, a nie po inode. +

Plik content NIE jest modyfikowany. +Pliki parity są modyfikowane w razie potrzeby. +Pliki w macierzy są modyfikowane w razie potrzeby. +

+
+

+check +

+

Weryfikuje wszystkie pliki i dane parzystości. +

Działa jak fix, ale tylko symuluje odzyskiwanie i żadne zmiany +nie są zapisywane w macierzy. +

To polecenie jest przeznaczone głównie do ręcznej weryfikacji, +takiej jak po procesie odzyskiwania lub w innych specjalnych warunkach. +Do okresowych i zaplanowanych sprawdzeń użyj scrub. +

Jeśli użyjesz opcji -a, --audit-only, sprawdzane są tylko +dane pliku, a dane parzystości są ignorowane, co zapewnia +szybsze działanie. +

Pliki są identyfikowane tylko po ścieżce, a nie po inode. +

Nic nie jest modyfikowane. +

+
+

+list +

+

Wyświetla listę wszystkich plików zawartych w macierzy w momencie +ostatniej sync. +

Z -v lub --verbose, wyświetlany jest również czas z dokładnością do podsekundy. +

Nic nie jest modyfikowane. +

+
+

+dup +

+

Wyświetla listę wszystkich zduplikowanych plików. Dwa pliki są uważane za równe, jeśli ich +hasze pasują. Dane pliku nie są odczytywane; używane są tylko +wcześniej obliczone hasze. +

Nic nie jest modyfikowane. +

+
+

+pool +

+

Tworzy lub aktualizuje wirtualny widok wszystkich +plików w Twojej macierzy dysków w katalogu pooling. +

Pliki nie są kopiowane, ale linkowane za pomocą +dowiązań symbolicznych. +

Podczas aktualizacji, wszystkie istniejące dowiązania symboliczne i puste +podkatalogi są usuwane i zastępowane nowym +widokiem macierzy. Wszelkie inne zwykłe pliki pozostają na swoim miejscu. +

Nic nie jest modyfikowane poza katalogiem puli. +

+
+

+devices +

+

Wyświetla urządzenia niskiego poziomu używane przez macierz. +

To polecenie wyświetla skojarzenia urządzeń w macierzy +i jest przeznaczone głównie jako interfejs skryptowy. +

Pierwsze dwie kolumny to identyfikator i ścieżka urządzenia niskiego poziomu. +Następne dwie kolumny to identyfikator i ścieżka urządzenia wysokiego poziomu. +Ostatnia kolumna to nazwa dysku w macierzy. +

W większości przypadków masz jedno urządzenie niskiego poziomu dla każdego dysku w +macierzy, ale w niektórych bardziej złożonych konfiguracjach możesz mieć wiele +urządzeń niskiego poziomu używanych przez pojedynczy dysk w macierzy. +

Nic nie jest modyfikowane. +

+
+

+touch +

+

Ustawia arbitralny znacznik czasu z dokładnością do podsekundy dla wszystkich plików, +które mają go ustawiony na zero. +

Poprawia to zdolność SnapRAID do rozpoznawania przeniesionych +i skopiowanych plików, ponieważ sprawia, że znacznik czasu jest prawie unikalny, +redukując możliwe duplikaty. +

Dokładniej, jeśli znacznik czasu z dokładnością do podsekundy nie jest zerowy, +przeniesiony lub skopiowany plik jest identyfikowany jako taki, jeśli pasuje do +nazwy, rozmiaru i znacznika czasu. Jeśli znacznik czasu z dokładnością do podsekundy +jest zerowy, jest uważany za kopię tylko wtedy, gdy pasują pełna ścieżka, +rozmiar i znacznik czasu. +

Znacznik czasu z dokładnością do sekundy nie jest modyfikowany, +więc wszystkie daty i czasy Twoich plików zostaną zachowane. +

+
+

+rehash +

+

Planuje ponowne haszowanie całej macierzy. +

To polecenie zmienia używany rodzaj hasza, zazwyczaj podczas aktualizacji +z systemu 32-bitowego na 64-bitowy, aby przełączyć się z +MurmurHash3 na szybszy SpookyHash. +

Jeśli używasz już optymalnego hasza, to polecenie +nic nie robi i informuje Cię, że nie jest potrzebne żadne działanie. +

Ponowne haszowanie nie jest wykonywane natychmiast, ale odbywa się +stopniowo podczas sync i scrub. +

Możesz sprawdzić stan ponownego haszowania za pomocą status. +

Podczas ponownego haszowania SnapRAID zachowuje pełną funkcjonalność, +z jedynym wyjątkiem, że dup nie może wykryć zduplikowanych +plików używających innego hasza. +

+
+

+locate +

+

Lokalizuje pliki zapisane na dyskach parzystości. Dla każdego dopasowanego pliku +wypisuje jego lokalizację w pliku parzystości oraz liczbę zajmowanych przez +niego fragmentów. +

Możesz użyć opcji -t, --tail, aby ograniczyć operację do plików zajmujących +określoną końcową część parzystości. +

Jeśli chcesz dokonać realokacji tych plików, możesz użyć opcji +-W, --force-realloc-tail. +Pamiętaj, że takie pliki nie będą chronione przez parzystość podczas procesu +realokacji. +

+
+
+

+Options +

+

SnapRAID udostępnia następujące opcje: +

+
+
+-c, --conf CONFIG +
+Wybiera plik konfiguracyjny do użycia. Jeśli nie określono, w systemie Unix +używa pliku /usr/local/etc/snapraid.conf, jeśli istnieje, +w przeciwnym razie /etc/snapraid.conf. +W systemie Windows używa pliku snapraid.conf w tym samym +katalogu co snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtruje pliki do przetworzenia w check i fix. +Przetwarzane są tylko pliki pasujące do określonego wzorca. +Ta opcja może być używana wielokrotnie. +Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat +specyfikacji wzorców. +W systemie Unix upewnij się, że znaki globbing są cytowane, jeśli są używane. +Ta opcja może być używana tylko z check i fix. +Nie może być używana z sync i scrub, ponieważ zawsze +przetwarzają całą macierz. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtruje dyski do przetworzenia w check, fix, up i down. +Musisz określić nazwę dysku zdefiniowaną w pliku konfiguracyjnym. +Możesz również określić dyski parzystości za pomocą nazw: parity, 2-parity, +3-parity, itp., aby ograniczyć operacje do określonego dysku parzystości. +Jeśli połączysz wiele opcji --filter, --filter-disk i --filter-missing, +wybrane zostaną tylko pliki pasujące do wszystkich filtrów. +Ta opcja może być używana wielokrotnie. +Ta opcja może być używana tylko z check, fix, up i down. +Nie może być używana z sync i scrub, ponieważ zawsze +przetwarzają całą macierz. +
+
+
+
+
+
+-m, --filter-missing +
+Filtruje pliki do przetworzenia w check i fix. +Przetwarzane są tylko pliki brakujące lub usunięte z macierzy. +Użyte z fix, działa to jako polecenie undelete. +Jeśli połączysz wiele opcji --filter, --filter-disk i --filter-missing, +wybrane zostaną tylko pliki pasujące do wszystkich filtrów. +Ta opcja może być używana tylko z check i fix. +Nie może być używana z sync i scrub, ponieważ zawsze +przetwarzają całą macierz. +
+
+
+
+
+
+-e, --filter-error +
+Przetwarza pliki z błędami w check i fix. +Przetwarza tylko pliki, które mają bloki oznaczone cichymi +błędami lub błędami wejścia/wyjścia podczas sync i scrub, jak wymieniono w status. +Ta opcja może być używana tylko z check i fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Wybiera plan sprawdzania. Jeśli PERC jest wartością numeryczną od 0 do 100, +jest interpretowany jako procent bloków do sprawdzenia. +Zamiast wartości procentowej możesz określić plan: +bad sprawdza złe bloki, new sprawdza bloki jeszcze niesprawdzone, +a full sprawdza wszystko. +Ta opcja może być używana tylko z scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Wybiera najstarszą część macierzy do przetworzenia w scrub. +DAYS to minimalny wiek w dniach dla bloku, który ma być sprawdzony; +domyślnie jest to 10. +Bloki oznaczone jako złe są zawsze sprawdzane niezależnie od tej opcji. +Ta opcja może być używana tylko z scrub. +
+
+
+
+
+
+-a, --audit-only +
+W check, weryfikuje hasz plików bez +sprawdzania danych parzystości. +Jeśli interesuje Cię tylko sprawdzenie danych pliku, ta +opcja może znacznie przyspieszyć proces sprawdzania. +Ta opcja może być używana tylko z check. +
+
+
+
+
+
+-h, --pre-hash +
+W sync, uruchamia wstępną fazę haszowania wszystkich nowych danych +w celu dodatkowej weryfikacji przed obliczeniem parzystości. +Zazwyczaj w sync nie jest wykonywane wstępne haszowanie, a nowe +dane są haszowane tuż przed obliczeniem parzystości, gdy są odczytywane +po raz pierwszy. +Ten proces zachodzi, gdy system jest pod +dużym obciążeniem, wszystkie dyski się kręcą, a CPU jest zajęte. +Jest to ekstremalny warunek dla maszyny, a jeśli ma +ukryty problem sprzętowy, ciche błędy mogą pozostać niewykryte, +ponieważ dane nie są jeszcze haszowane. +Aby uniknąć tego ryzyka, możesz włączyć tryb pre-hash, aby +wszystkie dane były odczytywane dwukrotnie w celu zapewnienia ich integralności. +Ta opcja weryfikuje również pliki przeniesione wewnątrz macierzy, +aby upewnić się, że operacja przeniesienia zakończyła się pomyślnie, i, jeśli to konieczne, +umożliwia uruchomienie operacji fix przed kontynuowaniem. +Ta opcja może być używana tylko z sync. +
+
+
+
+
+
+-i, --import DIR +
+Importuje z określonego katalogu wszelkie pliki usunięte +z macierzy po ostatniej sync. +Jeśli nadal masz takie pliki, mogą być użyte przez check +i fix, aby poprawić proces odzyskiwania. +Pliki są odczytywane, w tym w podkatalogach, i są +identyfikowane niezależnie od ich nazwy. +Ta opcja może być używana tylko z check i fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+W przypadku każdego błędu, zatrzymuje wszystkie zarządzane dyski przed wyjściem +z niezerowym kodem statusu. Zapobiega to pozostawaniu dysków +aktywnymi i kręcącymi się po przerwanej operacji, +pomagając uniknąć niepotrzebnego gromadzenia się ciepła i zużycia +energii. Użyj tej opcji, aby upewnić się, że dyski są bezpiecznie +zatrzymane, nawet gdy polecenie zakończy się niepowodzeniem. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Stosuje globalne ograniczenie przepustowości dla wszystkich dysków. RATE to +liczba bajtów na sekundę. Możesz określić mnożnik, +taki jak K, M lub G (np. --bw-limit 1G). +
+
+
+
+
+
+-t, --tail ROZMIAR +
+Ogranicza listę plików do tych, które nie używają więcej niż określony +końcowy rozmiar dysków parzystości. +Możesz użyć mnożników takich jak K, M, G lub T (np. --tail 1G). +Opcja ta jest ważna tylko wtedy, gdy jest używana wraz z poleceniem +locate. +
+
+
+
+
+
+-A, --stats +
+Włącza rozszerzony widok statusu, który pokazuje dodatkowe informacje. +Ekran wyświetla dwa wykresy: +Pierwszy wykres pokazuje liczbę buforowanych pasków dla każdego +dysku, wraz ze ścieżką pliku, do którego aktualnie uzyskuje się dostęp +na tym dysku. Zazwyczaj najwolniejszy dysk nie będzie miał dostępnego +bufora, co determinuje maksymalną osiągalną przepustowość. +Drugi wykres pokazuje procent czasu spędzonego na czekaniu +w ciągu ostatnich 100 sekund. Oczekuje się, że najwolniejszy dysk +spowoduje większość czasu oczekiwania, podczas gdy inne dyski powinny mieć +niewielki lub żaden czas oczekiwania, ponieważ mogą używać swoich buforowanych pasków. +Ten wykres pokazuje również czas spędzony na czekaniu na obliczenia +hasza i obliczenia RAID. +Wszystkie obliczenia są wykonywane równolegle z operacjami dyskowymi. +Dlatego, dopóki istnieje mierzalny czas oczekiwania dla +przynajmniej jednego dysku, oznacza to, że CPU jest wystarczająco szybkie, aby +nadążyć za obciążeniem. +
+
+
+
+
+
+-Z, --force-zero +
+Wymusza niebezpieczną operację synchronizacji pliku o zerowym +rozmiarze, który wcześniej był niezerowy. +Jeśli SnapRAID wykryje taki stan, zatrzymuje przetwarzanie, +chyba że określisz tę opcję. +Pozwala to łatwo wykryć, kiedy po awarii systemu +niektóre dostępne pliki zostały obcięte. +Jest to możliwy stan w systemie Linux z systemami plików ext3/ext4. +Ta opcja może być używana tylko z sync. +
+
+
+
+
+
+-E, --force-empty +
+Wymusza niebezpieczną operację synchronizacji dysku z brakującymi +wszystkimi oryginalnymi plikami. +Jeśli SnapRAID wykryje, że brakuje wszystkich plików pierwotnie obecnych +na dysku lub zostały przepisane, zatrzymuje przetwarzanie, +chyba że określisz tę opcję. +Pozwala to łatwo wykryć, kiedy system plików danych nie jest +zamontowany. +Ta opcja może być używana tylko z sync. +
+
+
+
+
+
+-U, --force-uuid +
+Wymusza niebezpieczną operację synchronizacji, sprawdzania i naprawiania +z dyskami, które zmieniły swój UUID. +Jeśli SnapRAID wykryje, że niektóre dyski zmieniły UUID, +zatrzymuje przetwarzanie, chyba że określisz tę opcję. +Pozwala to wykryć, kiedy Twoje dyski są zamontowane w +niewłaściwych punktach montowania. +Dozwolona jest jednak pojedyncza zmiana UUID z +pojedynczą parzystością i więcej z wielokrotną parzystością, ponieważ jest to +normalny przypadek podczas wymiany dysków po odzyskaniu. +Ta opcja może być używana tylko z sync, check lub +fix. +
+
+
+
+
+
+-D, --force-device +
+Wymusza niebezpieczną operację naprawiania z niedostępnymi dyskami +lub z dyskami na tym samym urządzeniu fizycznym. +Na przykład, jeśli straciłeś dwa dyski danych i masz zapasowy dysk do odzyskania +tylko pierwszego, możesz zignorować drugi niedostępny dysk. +Lub, jeśli chcesz odzyskać dysk w wolnym miejscu pozostawionym na +już używanym dysku, współdzielącym to samo urządzenie fizyczne. +Ta opcja może być używana tylko z fix. +
+
+
+
+
+
+-N, --force-nocopy +
+W sync, check i fix, wyłącza heurystykę wykrywania kopii. +Bez tej opcji SnapRAID zakłada, że pliki o tych samych +atrybutach, takich jak nazwa, rozmiar i znacznik czasu, są kopiami z tymi +samymi danymi. +Pozwala to na identyfikację skopiowanych lub przeniesionych plików z jednego dysku +na inny i ponowne wykorzystanie już obliczonych informacji o haszu +w celu wykrycia cichych błędów lub odzyskania brakujących plików. +W niektórych rzadkich przypadkach to zachowanie może prowadzić do fałszywych alarmów +lub spowolnienia procesu z powodu wielu weryfikacji hasza, a ta +opcja pozwala rozwiązać takie problemy. +Ta opcja może być używana tylko z sync, check i fix. +
+
+
+
+
+
+-F, --force-full +
+W sync, wymusza pełne ponowne obliczenie parzystości. +Ta opcja może być używana, gdy dodajesz nowy poziom parzystości lub jeśli +powróciłeś do starego pliku zawartości, używając nowszych danych parzystości. +Zamiast ponownego tworzenia parzystości od podstaw, pozwala to +na ponowne wykorzystanie haszy obecnych w pliku zawartości do walidacji danych +i utrzymania ochrony danych podczas procesu sync za pomocą +istniejących danych parzystości. +Ta opcja może być używana tylko z sync. +
+
+
+
+
+
+-R, --force-realloc +
+W sync, wymusza pełną realokację plików i przebudowę parzystości. +Ta opcja może być używana do całkowitej realokacji wszystkich plików, +usuwając fragmentację, jednocześnie ponownie wykorzystując hasze obecne w pliku zawartości +do walidacji danych. +Ta opcja może być używana tylko z sync. +OSTRZEŻENIE! Ta opcja jest tylko dla ekspertów i jest wysoce +zalecane, aby jej nie używać. +NIE MASZ ochrony danych podczas operacji sync. +
+
+
+
+
+
+-W, --force-realloc-tail ROZMIAR +
+Działa jak -R, --force-realloc, ale ogranicza się do określonej części +końcowej (ostatnie ROZMIAR bajtów) każdego pliku parzystości. +Wymusza realokację (przeniesienie) wszelkich fragmentów/bloków plików +obecnie przechowywanych w tej sekcji końcowej, pozwalając na ich +umieszczenie w dowolnym miejscu w pliku (plikach) parzystości, gdzie +dostępne jest wolne miejsce (w tym w istniejących lukach). +Głównym celem tej opcji jest zmniejszenie rozmiaru pliku parzystości +na dysku. +Jeśli realokacja pomyślnie wyczyści całą sekcję końcową (nie pozostaną +żadne bloki korzystające z niej), plik parzystości zostanie przycięty, +odzyskując nieużywane miejsce na końcu. +Możesz użyć mnożników takich jak K, M, G lub T (np. +--force-realloc-tail 1G). +Możesz użyć locate -t, --tail, aby wcześniej poznać pliki, których +będzie to dotyczyć. +OSTRZEŻENIE! +Ta opcja jest przeznaczona wyłącznie dla ekspertów i zdecydowanie +zaleca się jej nie używać. +Podczas operacji sync pliki, których to dotyczy, NIE mają ochrony +danych. +
+
+
+
+
+
+-l, --log FILE +
+Zapisuje szczegółowy log do określonego pliku. +Jeśli ta opcja nie jest określona, nieoczekiwane błędy są drukowane +na ekranie, potencjalnie prowadząc do nadmiernego wyjścia w przypadku +wielu błędów. Gdy -l, --log jest określone, tylko +krytyczne błędy, które powodują zatrzymanie SnapRAID, są drukowane +na ekranie. +Jeśli ścieżka zaczyna się od >>, plik jest otwierany +w trybie dołączania. Wystąpienia %D i %T w nazwie są +zastępowane datą i czasem w formacie RRRRMMDD i +GGMMSS. W plikach wsadowych Windows musisz podwoić +znak %, np. result-%%D.log. Aby użyć >>, musisz +ujęć nazwę w cudzysłów, np. ">>result.log". +Aby wyprowadzić log do standardowego wyjścia lub standardowego błędu, +możesz użyć odpowiednio ">&1" i ">&2". +Opisy tagów logu znajdziesz w pliku snapraid_log.txt lub na stronie podręcznika. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Ustawia nowy limit błędów przed zatrzymaniem wykonania. +Domyślnie SnapRAID zatrzymuje się, jeśli napotka więcej niż 100 +błędów wejścia/wyjścia, co wskazuje, że dysk prawdopodobnie ulega awarii. +Ta opcja dotyczy sync i scrub, które mogą +kontynuować po pierwszym zestawie błędów dysku, aby spróbować +ukończyć swoje operacje. +Jednak check i fix zawsze zatrzymują się przy pierwszym błędzie. +
+
+
+
+
+
+-S, --start BLKSTART +
+Zaczyna przetwarzanie od określonego +numeru bloku. Może to być przydatne do ponownej próby sprawdzenia +lub naprawy określonych bloków w przypadku uszkodzonego dysku. +Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Przetwarza tylko określoną liczbę bloków. +Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Generuje atrapę pliku konfiguracyjnego z istniejącego +pliku zawartości. +Plik konfiguracyjny jest zapisywany na standardowe wyjście +i nie nadpisuje istniejącego. +Ten plik konfiguracyjny zawiera również informacje +potrzebne do rekonstrukcji punktów montowania dysków na wypadek +utraty całego systemu. +
+
+
+
+
+
+-v, --verbose +
+Wyświetla więcej informacji na ekranie. +Jeśli określono raz, drukuje wykluczone pliki +i dodatkowe statystyki. +Ta opcja nie ma wpływu na pliki logów. +
+
+
+
+
+
+-q, --quiet +
+Wyświetla mniej informacji na ekranie. +Jeśli określono raz, usuwa pasek postępu; dwa razy, +bieżące operacje; trzy razy, komunikaty informacyjne; cztery razy, +komunikaty statusu. +Krytyczne błędy są zawsze drukowane na ekranie. +Ta opcja nie ma wpływu na pliki logów. +
+
+
+
+
+
+-H, --help +
+Wyświetla krótki ekran pomocy. +
+
+
+
+
+
+-V, --version +
+Wyświetla wersję programu. +
+
+
+
+
+

+Configuration +

+

SnapRAID wymaga pliku konfiguracyjnego, aby wiedzieć, gdzie znajduje się Twoja macierz +dysków i gdzie przechowywać informacje o parzystości. +

W systemie Unix używa pliku /usr/local/etc/snapraid.conf, jeśli istnieje, +w przeciwnym razie /etc/snapraid.conf. +W systemie Windows używa pliku snapraid.conf w tym samym +katalogu co snapraid.exe. +

Musi zawierać następujące opcje (uwzględniające wielkość liter): +

+

+parity FILE [,FILE] ... +

+

Definiuje pliki do użycia do przechowywania informacji o parzystości. +Parzystość umożliwia ochronę przed awarią pojedynczego dysku, +podobnie jak w RAID5. +

Możesz określić wiele plików, które muszą znajdować się na różnych dyskach. +Gdy plik nie może już rosnąć, używany jest następny. +Całkowita dostępna przestrzeń musi być co najmniej tak duża jak największy dysk danych w +macierzy. +

Możesz dodać dodatkowe pliki parzystości później, ale nie możesz +ich zmieniać kolejności ani usuwać. +

Trzymanie dysków parzystości zarezerwowanych dla parzystości zapewnia, że +nie ulegną fragmentacji, co poprawia wydajność. +

W systemie Windows 256 MB jest pozostawione niewykorzystane na każdym dysku, aby uniknąć +ostrzeżenia o pełnych dyskach. +

Ta opcja jest obowiązkowa i może być używana tylko raz. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Definiuje pliki do użycia do przechowywania dodatkowych informacji o parzystości. +

Dla każdego określonego poziomu parzystości włączany jest jeden dodatkowy +poziom ochrony: +

    +
  • +2-parity włącza podwójną parzystość RAID6. +
  • +
  • +3-parity włącza potrójną parzystość. +
  • +
  • +4-parity włącza poczwórną (cztery) parzystość. +
  • +
  • +5-parity włącza pięciokrotną (pięć) parzystość. +
  • +
  • +6-parity włącza sześciokrotną (sześć) parzystość. +
  • +
+

Każdy poziom parzystości wymaga obecności wszystkich poprzednich poziomów parzystości. +

Obowiązują te same uwagi, co dla opcji parity. +

Te opcje są opcjonalne i mogą być używane tylko raz. +

+
+

+z-parity FILE [,FILE] ... +

+

Definiuje alternatywny plik i format do przechowywania potrójnej parzystości. +

Ta opcja jest alternatywą dla 3-parity, przeznaczoną głównie dla +procesorów niskiej klasy, takich jak ARM lub AMD Phenom, Athlon i Opteron, +które nie obsługują zestawu instrukcji SSSE3. W takich przypadkach zapewnia +lepszą wydajność. +

Ten format jest podobny, ale szybszy niż ten używany przez ZFS RAIDZ3. +Podobnie jak ZFS, nie działa powyżej potrójnej parzystości. +

Podczas używania 3-parity zostaniesz ostrzeżony, jeśli zaleca się użycie +formatu z-parity w celu poprawy wydajności. +

Możliwa jest konwersja z jednego formatu na inny poprzez dostosowanie +pliku konfiguracyjnego z pożądanym plikiem z-parity lub 3-parity +i użycie fix do jego ponownego utworzenia. +

+
+

+content FILE +

+

Definiuje plik do użycia do przechowywania listy i sum kontrolnych wszystkich +plików obecnych w Twojej macierzy dysków. +

Może być umieszczony na dysku używanym do danych, parzystości lub +każdym innym dostępnym dysku. +Jeśli użyjesz dysku danych, ten plik jest automatycznie wykluczony +z procesu sync. +

Ta opcja jest obowiązkowa i może być używana wielokrotnie do zapisania +wielu kopii tego samego pliku. +

Musisz przechowywać co najmniej jedną kopię dla każdego używanego dysku parzystości +plus jeden. Używanie dodatkowych kopii nie szkodzi. +

+
+

+data NAME DIR +

+

Definiuje nazwę i punkt montowania dysków danych w +macierzy. NAME służy do identyfikacji dysku i musi +być unikalna. DIR to punkt montowania dysku w +systemie plików. +

Możesz zmieniać punkt montowania w razie potrzeby, o ile +zachowasz stałą nazwę NAME. +

Powinieneś użyć jednej opcji dla każdego dysku danych w macierzy. +

Możesz później zmienić nazwę dysku, zmieniając bezpośrednio nazwę NAME +w pliku konfiguracyjnym, a następnie uruchamiając polecenie sync. +W przypadku zmiany nazwy, skojarzenie odbywa się za pomocą zapisanego +UUID dysków. +

+
+

+extra NAME DIR +

+

Definiuje nazwę i punkt montowania dodatkowych dysków do +monitorowania za pomocą poleceń smart oraz probe. +

Jest to przydatne do monitorowania dysków, które nie są częścią +macierzy, ale są wymagane do funkcjonowania systemu, takich jak +dysk rozruchowy. +

Należy zauważyć, że polecenia up i down nie mają wpływu na takie +dyski, ponieważ oczekuje się, że będą one zawsze w ruchu. +

+
+

+nohidden +

+

Wyklucza wszystkie ukryte pliki i katalogi. +W systemie Unix ukryte pliki to te zaczynające się od .. +W systemie Windows są to te z atrybutem ukrycia. +

+
+

+exclude/include PATTERN +

+

Definiuje wzorce plików lub katalogów do wykluczenia lub włączenia +do procesu synchronizacji. +Wszystkie wzorce są przetwarzane w określonej kolejności. +

Jeśli pierwszy pasujący wzorzec jest exclude, plik +jest wykluczony. Jeśli jest to include, plik jest włączony. +Jeśli żaden wzorzec nie pasuje, plik jest wykluczony, jeśli ostatni określony +wzorzec to include, lub włączony, jeśli ostatni określony wzorzec to exclude. +

Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat specyfikacji +wzorców. +

Ta opcja może być używana wielokrotnie. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Definiuje podstawowy rozmiar bloku w kibibajtach dla parzystości. +Jeden kibibajt to 1024 bajty. +

Domyślny rozmiar bloku to 256, co powinno działać w większości przypadków. +

OSTRZEŻENIE! Ta opcja jest tylko dla ekspertów i jest wysoce +zalecane, aby nie zmieniać tej wartości. Aby zmienić tę wartość w przyszłości, +będziesz musiał ponownie utworzyć całą parzystość! +

Powodem użycia innego rozmiaru bloku jest posiadanie wielu małych +plików, rzędu milionów. +

Dla każdego pliku, nawet jeśli ma tylko kilka bajtów, alokowany jest cały blok parzystości, +a przy wielu plikach może to skutkować znaczną nieużywaną przestrzenią parzystości. +Kiedy całkowicie wypełnisz dysk parzystości, nie możesz +dodawać więcej plików do dysków danych. +Jednak marnowana parzystość nie gromadzi się na dyskach danych. Marnowane miejsce +wynikające z dużej liczby plików na dysku danych ogranicza tylko +ilość danych na tym dysku danych, a nie na innych. +

Jako przybliżenie, możesz założyć, że połowa rozmiaru bloku jest +marnowana dla każdego pliku. Na przykład, z 100 000 plików i rozmiarem bloku 256 KiB, +zmarnujesz 12,8 GB parzystości, co może skutkować +12,8 GB mniejszą dostępną przestrzenią na dysku danych. +

Możesz sprawdzić ilość zmarnowanego miejsca na każdym dysku za pomocą status. +Jest to ilość miejsca, którą musisz pozostawić wolną na dyskach danych +lub użyć dla plików nie włączonych do macierzy. +Jeśli ta wartość jest ujemna, oznacza to, że jesteś blisko wypełnienia +parzystości i reprezentuje to przestrzeń, którą nadal możesz zmarnować. +

Aby uniknąć tego problemu, możesz użyć większej partycji dla parzystości. +Na przykład, jeśli partycja parzystości jest o 12,8 GB większa niż dyski danych, +masz wystarczająco dużo dodatkowego miejsca, aby obsłużyć do 100 000 +plików na każdym dysku danych bez marnowania miejsca. +

Sztuczką, aby uzyskać większą partycję parzystości w systemie Linux, jest sformatowanie jej +za pomocą polecenia: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Daje to około 1,5% dodatkowego miejsca, około 60 GB dla +dysku 4 TB, co pozwala na około 460 000 plików na każdym dysku danych bez +marnowania miejsca. +

+
+

+hashsize SIZE_IN_BYTES +

+

Definiuje rozmiar hasza w bajtach dla zapisanych bloków. +

Domyślny rozmiar hasza to 16 bajtów (128 bitów), co powinno działać +w większości przypadków. +

OSTRZEŻENIE! Ta opcja jest tylko dla ekspertów i jest wysoce +zalecane, aby nie zmieniać tej wartości. Aby zmienić tę wartość w przyszłości, +będziesz musiał ponownie utworzyć całą parzystość! +

Powodem użycia innego rozmiaru hasza jest to, że Twój system ma +ograniczoną pamięć. Z reguły, SnapRAID zwykle wymaga +1 GiB pamięci RAM na każde 16 TB danych w macierzy. +

Konkretnie, aby przechowywać hasze danych, SnapRAID wymaga +około TS*(1+HS)/BS bajtów pamięci RAM, +gdzie TS to całkowity rozmiar w bajtach Twojej macierzy dysków, BS to +rozmiar bloku w bajtach, a HS to rozmiar hasza w bajtach. +

Na przykład, z 8 dyskami po 4 TB, rozmiarem bloku 256 KiB +(1 KiB = 1024 bajty) i rozmiarem hasza 16, otrzymujesz: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1,93 GiB
+
+

Przełączając się na rozmiar hasza 8, otrzymujesz: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1,02 GiB
+
+

Przełączając się na rozmiar bloku 512, otrzymujesz: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0,96 GiB
+
+

Przełączając się zarówno na rozmiar hasza 8, jak i rozmiar bloku 512, otrzymujesz: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Automatycznie zapisuje stan podczas synchronizacji lub sprawdzania po przetworzeniu +określonej ilości GB. +Ta opcja jest przydatna, aby uniknąć ponownego uruchamiania długich poleceń sync +od zera, jeśli zostaną przerwane przez awarię maszyny lub inne zdarzenie. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Ustawia maksymalną dozwoloną temperaturę dysku w stopniach Celsjusza. Po określeniu, +SnapRAID okresowo sprawdza temperaturę wszystkich dysków za pomocą +narzędzia smartctl. Aktualne temperatury dysków są wyświetlane podczas +działania SnapRAID. Jeśli którykolwiek dysk przekroczy ten limit, wszystkie operacje +zostają zatrzymane, a dyski są zatrzymywane (przechodzą w stan gotowości) na czas +zdefiniowany przez opcję temp_sleep. Po okresie uśpienia, operacje +są wznawiane, potencjalnie ponownie zatrzymując się, jeśli limit temperatury +zostanie ponownie osiągnięty. +

Podczas działania SnapRAID analizuje również krzywą nagrzewania każdego +dysku i szacuje długoterminową stałą temperaturę, którą mają +osiągnąć, jeśli aktywność będzie kontynuowana. Oszacowanie jest wykonywane tylko po +czterokrotnym wzroście temperatury dysku, co zapewnia, że +dostępnych jest wystarczająco dużo punktów danych do ustalenia wiarygodnego trendu. +Ta przewidywana stała temperatura jest pokazywana w nawiasach obok +aktualnej wartości i pomaga ocenić, czy chłodzenie systemu jest +odpowiednie. Ta szacowana temperatura ma charakter wyłącznie informacyjny +i nie ma wpływu na zachowanie SnapRAID. Działania programu +opierają się wyłącznie na faktycznie zmierzonych temperaturach dysków. +

Aby wykonać tę analizę, SnapRAID potrzebuje odniesienia dla temperatury systemu. +Najpierw próbuje odczytać ją z dostępnych czujników sprzętowych. +Jeśli nie można uzyskać dostępu do żadnego czujnika systemu, jako awaryjne odniesienie +wykorzystuje najniższą temperaturę dysku zmierzoną na początku uruchomienia. +

Normalnie SnapRAID pokazuje tylko temperaturę najgorętszego dysku. +Aby wyświetlić temperaturę wszystkich dysków, użyj opcji -A lub --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Ustawia czas gotowości, w minutach, po osiągnięciu limitu temperatury. +W tym okresie dyski pozostają zatrzymane. Domyślnie jest to 5 minut. +

+
+

+pool DIR +

+

Definiuje katalog puli, w którym tworzony jest wirtualny widok macierzy +dysków za pomocą polecenia pool. +

Katalog musi już istnieć. +

+
+

+share UNC_DIR +

+

Definiuje ścieżkę UNC Windows wymaganą do zdalnego dostępu do dysków. +

Jeśli ta opcja jest określona, dowiązania symboliczne utworzone w katalogu puli +używają tej ścieżki UNC do dostępu do dysków. +Bez tej opcji generowane dowiązania symboliczne używają tylko ścieżek lokalnych, +co nie pozwala na udostępnianie katalogu puli w sieci. +

Dowiązania symboliczne są tworzone przy użyciu określonej ścieżki UNC, +dodając nazwę dysku określoną w opcji data, a na końcu dodając +katalog i nazwę pliku. +

Ta opcja jest wymagana tylko dla systemu Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Definiuje niestandardowe opcje smartctl do uzyskania atrybutów SMART dla +każdego dysku. Może to być wymagane dla kontrolerów RAID i niektórych dysków USB, +których nie można wykryć automatycznie. Symbol zastępczy %s jest zastępowany +nazwą urządzenia, ale jest opcjonalny dla stałych urządzeń, takich jak kontrolery RAID. +

DISK to ta sama nazwa dysku określona w opcji data. +PARITY to jedna z nazw parzystości: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity lub z-parity. +

W określonych OPCJACH ciąg %s jest zastępowany +nazwą urządzenia. W przypadku kontrolerów RAID, urządzenie jest +prawdopodobnie stałe i może nie być konieczne użycie %s. +

Zapoznaj się z dokumentacją smartmontools, aby uzyskać możliwe opcje: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Na przykład: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignoruje określony atrybut SMART podczas obliczania prawdopodobieństwa +awarii dysku. Ta opcja jest przydatna, jeśli dysk zgłasza nietypowe lub +wprowadzające w błąd wartości dla określonego atrybutu. +

DISK to ta sama nazwa dysku określona w opcji data. +PARITY to jedna z nazw parzystości: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity lub z-parity. +Specjalna wartość * może być użyta do zignorowania atrybutu na wszystkich dyskach. +

Na przykład, aby zignorować atrybut Current Pending Sector Count na +wszystkich dyskach: +

+smartignore * 197
+
+

Aby zignorować go tylko na pierwszym dysku parzystości: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Przykład typowej konfiguracji dla systemu Unix: +

+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
+
+

Przykład typowej konfiguracji dla systemu Windows: +

+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
+
+
+
+
+

+Pattern +

+

Wzorce zapewniają elastyczny sposób filtrowania plików do uwzględnienia lub +wykluczenia. Używając znaków globbingowych, można zdefiniować reguły, które +pasują do określonych nazw plików lub całych struktur katalogów bez +ręcznego wymieniania każdej ścieżki. +

Znak zapytania ? dopasowuje dowolny pojedynczy znak z wyjątkiem +separatora katalogów. Dzięki temu jest przydatny do dopasowywania nazw plików ze +zmiennymi znakami, przy jednoczesnym ograniczeniu wzorca do jednego poziomu katalogu. +

Pojedyncza gwiazdka * dopasowuje dowolną sekwencję znaków, ale podobnie jak +znak zapytania, nigdy nie przekracza granic katalogów. Zatrzymuje się na +ukośniku, co czyni ją odpowiednią do dopasowywania w obrębie jednego +składnika ścieżki. Jest to standardowe zachowanie symboli wieloznacznych znane +z globbingu powłoki (shell). +

Podwójna gwiazdka ** jest potężniejsza, dopasowuje dowolną sekwencję +znaków, w tym separatory katalogów. Pozwala to wzorcom dopasowywać się +na wielu poziomach katalogów. Gdy ** pojawia się bezpośrednio wewnątrz +wzorca, może dopasować zero lub więcej znaków, w tym ukośniki między +otaczającym tekstem dosłownym. +

Najważniejszym zastosowaniem ** jest specjalna forma /**/. Dopasowuje ona +zero lub więcej pełnych poziomów katalogów, umożliwiając dopasowanie plików +na dowolnej głębokości w drzewie katalogów bez znajomości dokładnej struktury ścieżki. +Na przykład wzorzec src/**/main.js pasuje do src/main.js (pomijając +zero katalogów), src/ui/main.js (pomijając jeden katalog) oraz +src/ui/components/main.js (pomijając dwa katalogi). +

Klasy znaków używające nawiasów kwadratowych [] dopasowują pojedynczy znak z +określonego zestawu lub zakresu. Podobnie jak inne wzorce pojedynczych znaków, +nie pasują one do separatorów katalogów. Klasy obsługują zakresy i negację za pomocą +wykrzyknika. +

Podstawową różnicą, o której należy pamiętać, jest to, że *, ? i klasy znaków +wszystkie respektują granice katalogów i dopasowują się tylko w obrębie jednego +składnika ścieżki, podczas gdy ** jest jedynym wzorcem, który może dopasowywać się poprzez +separatory katalogów. +

Istnieją cztery różne typy wzorców: +

+
+
+FILE +
+Wybiera dowolny plik o nazwie FILE. +Ten wzorzec dotyczy tylko plików, a nie katalogów. +
+
+
+
+
+
+DIR/ +
+Wybiera dowolny katalog o nazwie DIR i wszystko, co się w nim znajduje. +Ten wzorzec dotyczy tylko katalogów, a nie plików. +
+
+
+
+
+
+/PATH/FILE +
+Wybiera dokładnie określoną ścieżkę pliku. Ten wzorzec dotyczy +tylko plików, a nie katalogów. +
+
+
+
+
+
+/PATH/DIR/ +
+Wybiera dokładnie określoną ścieżkę katalogu i wszystko, co się w nim +znajduje. Ten wzorzec dotyczy tylko katalogów, a nie plików. +
+
+
+

Gdy określisz ścieżkę bezwzględną zaczynającą się od /, jest ona stosowana w +katalogu głównym macierzy, a nie w katalogu głównym lokalnego systemu plików. +

W systemie Windows możesz użyć ukośnika odwrotnego \ zamiast ukośnika /. +Katalogi systemowe Windows, połączenia, punkty montowania i inne +specjalne katalogi Windows są traktowane jako pliki, co oznacza, że aby je +wykluczyć, musisz użyć reguły pliku, a nie katalogu. +

Jeśli nazwa pliku zawiera znak *, ?, [, +lub ], musisz go uciec, aby uniknąć interpretacji jako +znaku globbing. W systemie Unix znakiem ucieczki jest \; w systemie Windows jest to ^. +Gdy wzorzec znajduje się w wierszu poleceń, musisz podwoić znak ucieczki, +aby uniknąć interpretacji przez powłokę poleceń. +

W pliku konfiguracyjnym możesz użyć różnych strategii do filtrowania +plików do przetworzenia. +Najprostszym podejściem jest użycie tylko reguł exclude, aby usunąć wszystkie +pliki i katalogi, których nie chcesz przetwarzać. Na przykład: +

+# Wyklucza dowolny plik o nazwie *.unrecoverable
+exclude *.unrecoverable
+# Wyklucza katalog główny /lost+found
+exclude /lost+found/
+# Wyklucza dowolny podkatalog o nazwie tmp
+exclude tmp/
+
+

Odwrotnym podejściem jest zdefiniowanie tylko plików, które chcesz przetwarzać, +używając tylko reguł include. Na przykład: +

+# Włącza tylko niektóre katalogi
+include /movies/
+include /musics/
+include /pictures/
+
+

Ostatecznym podejściem jest mieszanie reguł exclude i include. W tym przypadku +kolejność reguł jest ważna. Wcześniejsze reguły mają +pierwszeństwo przed późniejszymi. +Aby uprościć, możesz najpierw wymienić wszystkie reguły exclude, a następnie +wszystkie reguły include. Na przykład: +

+# Wyklucza dowolny plik o nazwie *.unrecoverable
+exclude *.unrecoverable
+# Wyklucza dowolny podkatalog o nazwie tmp
+exclude tmp/
+# Włącza tylko niektóre katalogi
+include /movies/
+include /musics/
+include /pictures/
+
+

W wierszu poleceń, używając opcji -f, możesz użyć tylko wzorców include. +Na przykład: +

+# Sprawdza tylko pliki .mp3.
+# W systemie Unix użyj cudzysłowów, aby uniknąć rozszerzenia globbing przez powłokę.
+snapraid -f "*.mp3" check
+
+

W systemie Unix, używając znaków globbing w wierszu poleceń, musisz +je cytować, aby zapobiec ich rozszerzeniu przez powłokę. +

+
+

+Ignore File +

+

Oprócz reguł globalnych w pliku konfiguracyjnym, możesz umieścić pliki +.snapraidignore w dowolnym katalogu w macierzy, aby zdefiniować +zdecentralizowane reguły wykluczania. +

Reguły zdefiniowane w .snapraidignore są stosowane po regułach w pliku +konfiguracyjnym. Oznacza to, że mają one wyższy priorytet i mogą być używane +do wykluczania plików, które zostały wcześniej uwzględnione przez konfigurację +globalną. Skutecznie, jeśli reguła lokalna pasuje, plik jest wykluczany bez +względu na globalne ustawienia uwzględniania. +

Logika wzorców w .snapraidignore odzwierciedla konfigurację globalną, ale +zakotwicza wzorce w katalogu, w którym znajduje się plik: +

+
+
+FILE +
+Wybiera dowolny plik o nazwie FILE w tym katalogu lub poniżej. +Podlega to tym samym zasadom dopasowywania (globbing) co wzorzec globalny. +
+
+
+
+
+
+DIR/ +
+Wybiera dowolny katalog o nazwie DIR i wszystko w jego wnętrzu, +znajdujący się w tym katalogu lub poniżej. +
+
+
+
+
+
+/PATH/FILE +
+Wybiera dokładnie określony plik względem lokalizacji +pliku .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Wybiera dokładnie określony katalog i wszystko w jego wnętrzu, +względem lokalizacji pliku .snapraidignore. +
+
+
+

W przeciwieństwie do konfiguracji globalnej, pliki .snapraidignore obsługują +tylko reguły wykluczania; nie można używać wzorców include ani negacji (!). +

Na przykład, jeśli masz .snapraidignore w /mnt/disk1/projects/: +

+# Wyklucza TYLKO /mnt/disk1/projects/output.bin
+/output.bin
+# Wyklucza każdy katalog o nazwie build wewnątrz projects/
+build/
+# Wyklucza każdy plik .tmp wewnątrz projects/ lub jego podfolderach
+*.tmp
+
+
+
+

+Content +

+

SnapRAID przechowuje listę i sumy kontrolne Twoich plików w pliku zawartości. +

Jest to plik binarny, który zawiera listę wszystkich plików obecnych w Twojej macierzy dysków, +wraz ze wszystkimi sumami kontrolnymi w celu weryfikacji ich integralności. +

Ten plik jest odczytywany i zapisywany przez polecenia sync i scrub +oraz odczytywany przez polecenia fix, check i status. +

+
+

+Parity +

+

SnapRAID przechowuje informacje o parzystości Twojej macierzy w plikach +parzystości. +

Są to pliki binarne zawierające obliczoną parzystość wszystkich +bloków zdefiniowanych w pliku content. +

Pliki te są odczytywane i zapisywane przez polecenia sync i fix +oraz tylko odczytywane przez polecenia scrub i check. +

+
+

+Encoding +

+

SnapRAID w systemie Unix ignoruje wszelkie kodowanie. Odczytuje i przechowuje +nazwy plików z tym samym kodowaniem używanym przez system plików. +

W systemie Windows wszystkie nazwy odczytane z systemu plików są konwertowane i +przetwarzane w formacie UTF-8. +

Aby nazwy plików były poprawnie drukowane, musisz ustawić konsolę Windows +na tryb UTF-8 za pomocą polecenia chcp 65001 i użyć +czcionki TrueType, takiej jak Lucida Console, jako czcionki konsoli. +Dotyczy to tylko drukowanych nazw plików; jeśli +przekierujesz wyjście konsoli do pliku, wynikowy plik jest zawsze +w formacie UTF-8. +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-pt.html b/beta/manual-pt.html new file mode 100644 index 00000000..683fed57 --- /dev/null +++ b/beta/manual-pt.html @@ -0,0 +1,2112 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Sinopse +

+
+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]
+
+
+
+

+Descrição +

+

SnapRAID é um programa de backup projetado para arrays de disco, +armazenando informações de paridade para recuperação de dados no +caso de até seis falhas de disco. +

Destinado principalmente a centros de mídia domésticos com arquivos +grandes e que mudam com pouca frequência, o SnapRAID oferece vários recursos: +

    +
  • +Você pode utilizar discos já preenchidos com arquivos sem a +necessidade de reformatá-los, acessando-os normalmente. +
  • +
  • +Todos os seus dados são submetidos a hash para garantir a integridade +dos dados e prevenir corrupção silenciosa. +
  • +
  • +Quando o número de discos com falha excede a contagem de paridade, +a perda de dados é confinada aos discos afetados; os dados em +outros discos permanecem acessíveis. +
  • +
  • +Se você acidentalmente excluir arquivos em um disco, a recuperação é +possível. +
  • +
  • +Os discos podem ter tamanhos diferentes. +
  • +
  • +Você pode adicionar discos a qualquer momento. +
  • +
  • +O SnapRAID não prende seus dados; você pode parar de usá-lo +a qualquer momento sem reformatar ou mover dados. +
  • +
  • +Para acessar um arquivo, apenas um único disco precisa girar (spin), +economizando energia e reduzindo o ruído. +
  • +
+

Para mais informações, visite o site oficial do SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Limitações +

+

SnapRAID é um híbrido entre um programa RAID e um programa de backup, +visando combinar os melhores benefícios de ambos. No entanto, ele tem +algumas limitações que você deve considerar antes de usá-lo. +

A principal limitação é que, se um disco falhar e você não tiver +sincronizado recentemente, talvez não consiga recuperar totalmente. +Mais especificamente, você pode não conseguir recuperar até o tamanho dos +arquivos alterados ou excluídos desde a última operação de sincronização. +Isso ocorre mesmo que os arquivos alterados ou excluídos não estejam no +disco com falha. É por isso que o SnapRAID é mais adequado para +dados que raramente mudam. +

Por outro lado, arquivos recém-adicionados não impedem a recuperação de +arquivos já existentes. Você perderá apenas os arquivos adicionados +recentemente se estiverem no disco com falha. +

Outras limitações do SnapRAID são: +

    +
  • +Com o SnapRAID, você ainda tem sistemas de arquivos separados para cada disco. +Com o RAID, você obtém um único sistema de arquivos grande. +
  • +
  • +O SnapRAID não faz striping de dados. +Com o RAID, você obtém um aumento de velocidade com striping. +
  • +
  • +O SnapRAID não suporta recuperação em tempo real. +Com o RAID, você não precisa parar de trabalhar quando um disco falha. +
  • +
  • +O SnapRAID pode recuperar dados apenas de um número limitado de falhas de disco. +Com um backup, você pode recuperar de uma falha completa +de todo o array de discos. +
  • +
  • +Apenas nomes de arquivos, carimbos de data/hora, symlinks e hardlinks +são salvos. Permissões, propriedade e atributos estendidos não são salvos. +
  • +
+
+
+

+Primeiros Passos +

+

Para usar o SnapRAID, você precisa primeiro selecionar um disco em seu array +de discos para dedicar às informações de parity (paridade). Com um +disco para paridade, você poderá recuperar de uma única falha de disco, +semelhante ao RAID5. +

Se você quiser recuperar de mais falhas de disco, semelhante ao RAID6, +você deve reservar discos adicionais para paridade. Cada disco de paridade +adicional permite a recuperação de mais uma falha de disco. +

Como discos de paridade, você deve escolher os maiores discos do array, +pois a informação de paridade pode crescer até o tamanho do maior +disco de dados no array. +

Esses discos serão dedicados a armazenar os arquivos de parity. +Você não deve armazenar seus dados neles. +

Em seguida, você deve definir os discos de data (dados) que deseja proteger +com o SnapRAID. A proteção é mais eficaz se esses discos +contiverem dados que raramente mudam. Por esse motivo, é melhor +NÃO incluir o disco C:\ do Windows ou os diretórios /home, /var e /tmp +do Unix. +

A lista de arquivos é salva nos arquivos de content (conteúdo), geralmente +armazenados nos discos de dados, paridade ou boot. +Este arquivo contém os detalhes do seu backup, incluindo todos os +checksums para verificar sua integridade. +O arquivo de content é armazenado em várias cópias, e cada cópia deve +estar em um disco diferente para garantir que, mesmo em caso de múltiplas +falhas de disco, pelo menos uma cópia esteja disponível. +

Por exemplo, suponha que você esteja interessado em apenas um nível de +proteção de paridade, e seus discos estejam localizados em: +

+/mnt/diskp <- disco selecionado para paridade
+/mnt/disk1 <- primeiro disco a proteger
+/mnt/disk2 <- segundo disco a proteger
+/mnt/disk3 <- terceiro disco a proteger
+
+

Você deve criar o arquivo de configuração /etc/snapraid.conf com +as seguintes opções: +

+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/
+
+

Se você estiver no Windows, deve usar o formato de caminho do Windows, com +letras de unidade e barras invertidas em vez de barras. +

+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\
+
+

Se você tiver muitos discos e ficar sem letras de unidade, pode montar +discos diretamente em subpastas. Consulte: +

+https://www.google.com/search?q=Windows+mount+point
+
+

Neste ponto, você está pronto para executar o comando sync para construir +as informações de paridade. +

+snapraid sync
+
+

Este processo pode levar várias horas na primeira vez, dependendo do +tamanho dos dados já presentes nos discos. Se os discos estiverem vazios, +o processo é imediato. +

Você pode pará-lo a qualquer momento pressionando Ctrl+C e, na próxima +execução, ele será retomado de onde foi interrompido. +

Quando este comando for concluído, seus dados estarão SEGUROS. +

Agora você pode começar a usar seu array como quiser e periodicamente +atualizar as informações de paridade executando o comando sync. +

+

+Scrubbing +

+

Para verificar periodicamente os dados e a paridade em busca de erros, +você pode executar o comando scrub. +

+snapraid scrub
+
+

Este comando compara os dados em seu array com o hash calculado +durante o comando sync para verificar a integridade. +

Cada execução do comando verifica aproximadamente 8% do array, excluindo +dados já examinados nos 10 dias anteriores. +Você pode usar a opção -p, --plan para especificar uma quantidade diferente +e a opção -o, --older-than para especificar uma idade diferente em dias. +Por exemplo, para verificar 5% do array em busca de blocos com mais de +20 dias, use: +

+snapraid -p 5 -o 20 scrub
+
+

Se erros silenciosos ou de entrada/saída forem encontrados durante o processo, +os blocos correspondentes serão marcados como ruins no arquivo de content +e listados no comando status. +

+snapraid status
+
+

Para corrigi-los, você pode usar o comando fix, filtrando por blocos +ruins com a opção -e, --filter-error: +

+snapraid -e fix
+
+

Na próxima execução de scrub, os erros desaparecerão do relatório de status +se estiverem realmente corrigidos. Para torná-lo mais rápido, você pode usar +-p bad para examinar apenas blocos marcados como ruins. +

+snapraid -p bad scrub
+
+

Executar scrub em um array não sincronizado pode relatar erros causados por +arquivos removidos ou modificados. Esses erros são relatados na saída de scrub, +mas os blocos relacionados não são marcados como ruins. +

+
+

+Pooling +

+

Nota: O recurso de pooling descrito abaixo foi substituído pela ferramenta +mergerfs, que agora é a opção recomendada para usuários Linux na comunidade +SnapRAID. Mergefs oferece uma maneira mais flexível e eficiente de agrupar +várias unidades em um único ponto de montagem unificado, permitindo acesso +perfeito a arquivos em todo o seu array sem depender de links simbólicos. +Ele se integra bem ao SnapRAID para proteção de paridade e é comumente usado +em configurações como OpenMediaVault (OMV) ou configurações NAS personalizadas. +

Para ter todos os arquivos em seu array mostrados na mesma árvore de +diretórios, você pode habilitar o recurso de pooling. Ele cria uma +visualização virtual somente leitura de todos os arquivos em seu array +usando links simbólicos. +

Você pode configurar o diretório de pooling no arquivo de configuração com: +

+pool /pool
+
+

ou, se você estiver no Windows, com: +

+pool C:\pool
+
+

e, em seguida, executar o comando pool para criar ou atualizar a +visualização virtual. +

+snapraid pool
+
+

Se você estiver usando uma plataforma Unix e quiser compartilhar este +diretório pela rede com máquinas Windows ou Unix, você deve adicionar +as seguintes opções ao seu /etc/samba/smb.conf: +

+# Na seção global de smb.conf
+unix extensions = no
+
+
+# Na seção de compartilhamento de smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

No Windows, compartilhar links simbólicos por uma rede requer que os +clientes os resolvam remotamente. Para habilitar isso, além de +compartilhar o diretório do pool, você também deve compartilhar todos +os discos de forma independente, usando os nomes de disco definidos no +arquivo de configuração como pontos de compartilhamento. Você também +deve especificar na opção share do arquivo de configuração o caminho +UNC do Windows que os clientes remotos precisam usar para acessar +esses discos compartilhados. +

Por exemplo, operando a partir de um servidor chamado darkstar, você +pode usar as opções: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

e compartilhar os seguintes diretórios pela rede: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

para permitir que clientes remotos acessem todos os arquivos em \\darkstar\pool. +

Você também pode precisar configurar clientes remotos para habilitar +o acesso a symlinks remotos com o comando: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Desexcluir (Undeleting) +

+

O SnapRAID funciona mais como um programa de backup do que como um sistema +RAID, e pode ser usado para restaurar ou desexcluir arquivos para seu +estado anterior usando a opção -f, --filter: +

+snapraid fix -f FILE
+
+

ou para um diretório: +

+snapraid fix -f DIR/
+
+

Você também pode usá-lo para recuperar apenas arquivos excluídos +acidentalmente dentro de um diretório usando a opção -m, --filter-missing, +que restaura apenas arquivos ausentes, deixando todos os outros intocados. +

+snapraid fix -m -f DIR/
+
+

Ou para recuperar todos os arquivos excluídos em todas as unidades com: +

+snapraid fix -m
+
+
+
+

+Recuperando +

+

O pior aconteceu e você perdeu um ou mais discos! +

NÃO ENTRE EM PÂNICO! Você será capaz de recuperá-los! +

A primeira coisa que você deve fazer é evitar mais alterações em seu array +de discos. Desabilite quaisquer conexões remotas a ele e quaisquer +processos agendados, incluindo qualquer sincronização noturna ou scrub +agendado do SnapRAID. +

Em seguida, prossiga com as seguintes etapas. +

+

+PASSO 1 -> Reconfigurar +

+

Você precisa de algum espaço para recuperar, idealmente em discos sobressalentes +adicionais, mas um disco USB externo ou um disco remoto será suficiente. +

Modifique o arquivo de configuração do SnapRAID para fazer com que a opção +data ou parity do disco com falha aponte para um local com espaço +vazio suficiente para recuperar os arquivos. +

Por exemplo, se o disco d1 falhou, mude de: +

+data d1 /mnt/disk1/
+
+

para: +

+data d1 /mnt/new_spare_disk/
+
+

Se o disco a ser recuperado for um disco de paridade, atualize a opção +parity apropriada. +Se você tiver vários discos com falha, atualize todas as opções de +configuração deles. +

+
+

+PASSO 2 -> Corrigir +

+

Execute o comando fix, armazenando o log em um arquivo externo com: +

+snapraid -d NAME -l fix.log fix
+
+

Onde NAME é o nome do disco, como d1 em nosso exemplo anterior. +Se o disco a ser recuperado for um disco de paridade, use os nomes +parity, 2-parity, etc. +Se você tiver vários discos com falha, use várias opções -d para +especificar todos eles. +

Este comando levará muito tempo. +

Certifique-se de ter alguns gigabytes livres para armazenar o arquivo fix.log. +Execute-o a partir de um disco com espaço livre suficiente. +

Agora você recuperou tudo o que é recuperável. Se alguns arquivos estiverem +parcialmente ou totalmente irrecuperáveis, eles serão renomeados +adicionando a extensão .unrecoverable. +

Você pode encontrar uma lista detalhada de todos os blocos irrecuperáveis +no arquivo fix.log, verificando todas as linhas que começam com unrecoverable:. +

Se você não estiver satisfeito com a recuperação, pode tentar novamente +quantas vezes quiser. +

Por exemplo, se você removeu arquivos do array após a última +sync, isso pode resultar em alguns arquivos não sendo recuperados. +Neste caso, você pode tentar novamente o fix usando a opção -i, --import, +especificando onde esses arquivos estão agora para incluí-los novamente +no processo de recuperação. +

Se você estiver satisfeito com a recuperação, pode prosseguir, +mas observe que, após a sincronização, você não pode mais tentar +o comando fix novamente! +

+
+

+PASSO 3 -> Checar +

+

Como uma verificação cautelosa, você pode agora executar um comando +check para garantir que tudo esteja correto no disco recuperado. +

+snapraid -d NAME -a check
+
+

Onde NAME é o nome do disco, como d1 em nosso exemplo anterior. +

As opções -d e -a dizem ao SnapRAID para verificar apenas o disco +especificado e ignorar todos os dados de paridade. +

Este comando levará muito tempo, mas se você não for excessivamente +cauteloso, pode pulá-lo. +

+
+

+PASSO 4 -> Sincronizar +

+

Execute o comando sync para ressincronizar o array com o novo disco. +

+snapraid sync
+
+

Se tudo for recuperado, este comando é imediato. +

+
+
+
+

+Comandos +

+

SnapRAID fornece alguns comandos simples que permitem a você: +

    +
  • +Imprimir o status do array -> status +
  • +
  • +Controlar os discos -> smart, probe, up, down +
  • +
  • +Fazer um backup/snapshot -> sync +
  • +
  • +Verificar periodicamente os dados -> scrub +
  • +
  • +Restaurar o último backup/snapshot -> fix. +
  • +
+

Os comandos devem ser escritos em letras minúsculas. +

+

+status +

+

Imprime um resumo do estado do array de discos. +

Inclui informações sobre a fragmentação da paridade, a idade +dos blocos sem verificação e todos os erros silenciosos registrados +encontrados durante o scrubbing. +

As informações apresentadas referem-se à última vez que você +executou sync. Modificações posteriores não são levadas em conta. +

Se blocos ruins foram detectados, seus números de bloco são listados. +Para corrigi-los, você pode usar o comando fix -e. +

Também mostra um gráfico que representa a última vez que cada bloco +foi examinado (scrubbed) ou sincronizado (synced). Blocos examinados +são mostrados com *, blocos sincronizados, mas ainda não examinados, +com o. +

Nada é modificado. +

+
+

+smart +

+

Imprime um relatório SMART de todos os discos no sistema. +

Inclui uma estimativa da probabilidade de falha no próximo +ano, permitindo que você planeje substituições de manutenção de +discos que mostrem atributos suspeitos. +

Esta estimativa de probabilidade é obtida correlacionando os atributos +SMART dos discos com os dados do Backblaze disponíveis em: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Se o SMART relatar que um disco está falhando, FAIL ou PREFAIL é +impresso para esse disco, e o SnapRAID retorna com um erro. +Neste caso, a substituição imediata do disco é altamente recomendada. +

Outras possíveis strings de status são: +

+
+
+logfail +
+No passado, alguns atributos estavam abaixo do +limite. +
+
+
+
+logerr +
+O log de erros do dispositivo contém erros. +
+
+
+
+selferr +
+O log de autoteste do dispositivo contém erros. +
+
+
+

Se a opção -v, --verbose for especificada, uma análise estatística +mais profunda é fornecida. Esta análise pode ajudá-lo a decidir +se você precisa de mais ou menos paridade. +

Este comando usa a ferramenta smartctl e é equivalente a executar +smartctl -a em todos os dispositivos. +

Se seus dispositivos não forem detectados automaticamente corretamente, +você pode especificar um comando personalizado usando a opção +smartctl no arquivo de configuração. +

Nada é modificado. +

+
+

+probe +

+

Imprime o estado de ENERGIA de todos os discos no sistema. +

Standby significa que o disco não está girando. Active significa +que o disco está girando. +

Este comando usa a ferramenta smartctl e é equivalente a executar +smartctl -n standby -i em todos os dispositivos. +

Se seus dispositivos não forem detectados automaticamente corretamente, +você pode especificar um comando personalizado usando a opção +smartctl no arquivo de configuração. +

Nada é modificado. +

+
+

+up +

+

Liga (spins up) todos os discos do array. +

Você pode ligar apenas discos específicos usando a opção -d, --filter-disk. +

Ligar todos os discos ao mesmo tempo requer muita energia. +Certifique-se de que sua fonte de alimentação pode suportar isso. +

Nada é modificado. +

+
+

+down +

+

Desliga (spins down) todos os discos do array. +

Este comando usa a ferramenta smartctl e é equivalente a executar +smartctl -s standby,now em todos os dispositivos. +

Você pode desligar apenas discos específicos usando a opção -d, --filter-disk. +

Para desligar automaticamente em caso de erro, você pode usar a opção +-s, --spin-down-on-error com qualquer outro comando, o que é +equivalente a executar down manualmente quando ocorre um erro. +

Nada é modificado. +

+
+

+diff +

+

Lista todos os arquivos modificados desde o último sync que precisam ter +seus dados de paridade recalculados. +

Este comando não verifica os dados do arquivo, mas apenas o carimbo de +data/hora, tamanho e inode do arquivo. +

Após listar todos os arquivos alterados, um resumo das alterações é +apresentado, agrupado por: +

+
+
+equal +
+Arquivos inalterados de antes. +
+
+
+
+added +
+Arquivos adicionados que não estavam presentes antes. +
+
+
+
+removed +
+Arquivos removidos. +
+
+
+
+updated +
+Arquivos com tamanho ou carimbo de data/hora diferente, +o que significa que foram modificados. +
+
+
+
+moved +
+Arquivos movidos para um diretório diferente no mesmo disco. +Eles são identificados por terem o mesmo nome, tamanho, +carimbo de data/hora e inode, mas um diretório diferente. +
+
+
+
+copied +
+Arquivos copiados no mesmo disco ou em um disco +diferente onde o arquivo original ainda existe. +Eles são identificados por terem o mesmo nome, tamanho e +carimbo de data/hora. +Se o carimbo de data/hora de subsegundos for zero, o caminho +completo deve corresponder para ser identificado, não apenas +o nome. +
+
+
+
+relocated +
+Arquivos movidos no mesmo disco ou em um disco +diferente onde o original desapareceu. +Eles são identificados por terem o mesmo nome, tamanho e +carimbo de data/hora. +Se o carimbo de data/hora de subsegundos for zero, o caminho +completo deve corresponder para ser identificado. +Ao contrário dos arquivos 'moved' no mesmo disco, os arquivos +realocados têm um inode diferente. +
+
+
+
+restored +
+Arquivos com um inode diferente, mas com diretório, +nome, tamanho e carimbo de data/hora correspondentes. +Geralmente são arquivos restaurados após serem excluídos. +
+
+
+

Se uma sync for necessária, o código de retorno do processo é 2, +em vez do padrão 0. O código de retorno 1 é usado para uma condição +de erro genérica. +

Nada é modificado. +

+
+

+sync +

+

Atualiza as informações de paridade. Todos os arquivos modificados +no array de discos são lidos, e os dados de paridade correspondentes +são atualizados. +

Você pode parar este processo a qualquer momento pressionando Ctrl+C, +sem perder o trabalho já feito. +Na próxima execução, o processo sync será retomado de onde +foi interrompido. +

Se erros silenciosos ou de entrada/saída forem encontrados durante o processo, +os blocos correspondentes são marcados como ruins. +

Os arquivos são identificados por caminho e/ou inode e verificados por +tamanho e carimbo de data/hora. +Se o tamanho ou carimbo de data/hora do arquivo for diferente, a paridade +dos dados é recalculada para todo o arquivo. +Se o arquivo for movido ou renomeado no mesmo disco, mantendo o +mesmo inode, a paridade não é recalculada. +Se o arquivo for movido para outro disco, a paridade é recalculada, +mas as informações de hash calculadas anteriormente são mantidas. +

Os arquivos content e parity são modificados se necessário. +Os arquivos no array NÃO são modificados. +

+
+

+scrub +

+

Examina (scrubs) o array, verificando se há erros silenciosos ou de +entrada/saída nos discos de dados e paridade. +

Cada invocação verifica aproximadamente 8% do array, excluindo +dados já examinados nos últimos 10 dias. +Isso significa que examinar (scrubbing) uma vez por semana garante +que cada bit de dados seja verificado pelo menos uma vez a cada +três meses. +

Você pode definir um plano de scrub ou quantidade diferente usando a opção +-p, --plan, que aceita: +bad - Examina blocos marcados como ruins. +new - Examina blocos recém-sincronizados ainda não examinados. +full - Examina tudo. +0-100 - Examina a porcentagem especificada de blocos. +

Se você especificar um valor percentual, também pode usar a opção +-o, --older-than para definir a idade mínima do bloco. +Os blocos mais antigos são examinados primeiro, garantindo uma +verificação ideal. +Se você quiser examinar apenas os blocos recém-sincronizados ainda +não examinados, use a opção -p new. +

Para obter detalhes do status do scrub, use o comando status. +

Para qualquer erro silencioso ou de entrada/saída encontrado, os blocos +correspondentes são marcados como ruins no arquivo de content. +Esses blocos ruins são listados em status e podem ser corrigidos com +fix -e. +Após a correção, no próximo scrub, eles serão verificados novamente e, +se considerados corrigidos, a marcação de ruim será removida. +Para examinar apenas os blocos ruins, você pode usar o comando +scrub -p bad. +

É recomendado executar scrub apenas em um array sincronizado para +evitar erros relatados causados por dados não sincronizados. Esses erros +são reconhecidos como não sendo erros silenciosos, e os blocos não são +marcados como ruins, mas tais erros são relatados na saída do comando. +

O arquivo content é modificado para atualizar o tempo da última verificação +para cada bloco e para marcar blocos ruins. +Os arquivos parity NÃO são modificados. +Os arquivos no array NÃO são modificados. +

+
+

+fix +

+

Corrige todos os arquivos e os dados de paridade. +

Todos os arquivos e dados de paridade são comparados com o estado de +snapshot salvo na última sync. +Se uma diferença for encontrada, ela é revertida para o snapshot armazenado. +

ATENÇÃO! O comando fix não diferencia entre erros e modificações +intencionais. Ele reverte incondicionalmente o estado do arquivo +para a última sync. +

Se nenhuma outra opção for especificada, todo o array é processado. +Use as opções de filtro para selecionar um subconjunto de arquivos ou +discos para operar. +

Para corrigir apenas os blocos marcados como ruins durante sync e scrub, +use a opção -e, --filter-error. +Ao contrário de outras opções de filtro, esta aplica correções apenas a +arquivos que não foram alterados desde a última sync. +

O SnapRAID renomeia todos os arquivos que não podem ser corrigidos adicionando +a extensão .unrecoverable. +

Antes de corrigir, todo o array é escaneado para encontrar quaisquer +arquivos movidos desde a última operação sync. +Esses arquivos são identificados por seu carimbo de data/hora, ignorando +seu nome e diretório, e são usados no processo de recuperação, se +necessário. +Se você moveu alguns deles para fora do array, pode usar a opção +-i, --import para especificar diretórios adicionais para escanear. +

Os arquivos são identificados apenas por caminho, não por inode. +

O arquivo content NÃO é modificado. +Os arquivos parity são modificados se necessário. +Os arquivos no array são modificados se necessário. +

+
+

+check +

+

Verifica todos os arquivos e os dados de paridade. +

Funciona como fix, mas apenas simula uma recuperação e nenhuma alteração +é escrita no array. +

Este comando é destinado principalmente a verificações manuais, +como após um processo de recuperação ou em outras condições especiais. +Para verificações periódicas e agendadas, use scrub. +

Se você usar a opção -a, --audit-only, apenas os dados do arquivo +são verificados, e os dados de paridade são ignorados para uma +execução mais rápida. +

Os arquivos são identificados apenas por caminho, não por inode. +

Nada é modificado. +

+
+

+list +

+

Lista todos os arquivos contidos no array no momento da +última sync. +

Com -v ou --verbose, o tempo sub-segundo também é mostrado. +

Nada é modificado. +

+
+

+dup +

+

Lista todos os arquivos duplicados. Dois arquivos são considerados +iguais se seus hashes corresponderem. Os dados do arquivo não são lidos; +apenas os hashes pré-calculados são usados. +

Nada é modificado. +

+
+

+pool +

+

Cria ou atualiza uma visualização virtual de todos +os arquivos em seu array de discos no diretório pooling. +

Os arquivos não são copiados, mas ligados usando +links simbólicos. +

Ao atualizar, todos os links simbólicos existentes e subdiretórios +vazios são excluídos e substituídos pela nova +visualização do array. Quaisquer outros arquivos regulares são +deixados no lugar. +

Nada é modificado fora do diretório do pool. +

+
+

+devices +

+

Imprime os dispositivos de baixo nível usados pelo array. +

Este comando exibe as associações de dispositivos no array +e destina-se principalmente como uma interface de script. +

As duas primeiras colunas são o ID do dispositivo de baixo nível e o +caminho. As próximas duas colunas são o ID do dispositivo de alto nível +e o caminho. A última coluna é o nome do disco no array. +

Na maioria dos casos, você tem um dispositivo de baixo nível para cada disco +no array, mas em algumas configurações mais complexas, você pode ter +vários dispositivos de baixo nível usados por um único disco no array. +

Nada é modificado. +

+
+

+touch +

+

Define um carimbo de data/hora sub-segundo arbitrário para todos os arquivos +que o têm definido como zero. +

Isso melhora a capacidade do SnapRAID de reconhecer arquivos movidos +e copiados, pois torna o carimbo de data/hora quase único, +reduzindo possíveis duplicatas. +

Mais especificamente, se o carimbo de data/hora sub-segundo não for zero, +um arquivo movido ou copiado é identificado como tal se corresponder +ao nome, tamanho e carimbo de data/hora. Se o carimbo de data/hora +sub-segundo for zero, ele é considerado uma cópia apenas se o caminho +completo, tamanho e carimbo de data/hora corresponderem. +

O carimbo de data/hora de precisão de segundo não é modificado, +portanto, todas as datas e horas de seus arquivos serão preservadas. +

+
+

+rehash +

+

Agenda um novo hash de todo o array. +

Este comando altera o tipo de hash usado, tipicamente ao atualizar +de um sistema de 32 bits para um de 64 bits, para alternar do +MurmurHash3 para o mais rápido SpookyHash. +

Se você já estiver usando o hash ideal, este comando +não faz nada e informa que nenhuma ação é necessária. +

O novo hash não é executado imediatamente, mas ocorre +progressivamente durante sync e scrub. +

Você pode verificar o estado do novo hash usando status. +

Durante o novo hash, o SnapRAID mantém a funcionalidade total, +com a única exceção de que dup não pode detectar arquivos duplicados +usando um hash diferente. +

+
+

+locate +

+

Localiza arquivos armazenados nos discos de paridade. Para cada arquivo +correspondente, imprime sua localização dentro do arquivo de paridade e o +número de fragmentos que ocupa. +

Você pode usar a opção -t, --tail para restringir a operação aos arquivos +que ocupam a parte final especificada da paridade. +

Se desejar realocar esses arquivos, você poderá usar a opção +-W, --force-realloc-tail. +Esteja ciente de que tais arquivos não estarão protegidos pela paridade durante +o processo de realocação. +

+
+
+

+Opções +

+

SnapRAID fornece as seguintes opções: +

+
+
+-c, --conf CONFIG +
+Seleciona o arquivo de configuração a ser usado. Se não for especificado, +no Unix, ele usa o arquivo /usr/local/etc/snapraid.conf se existir, +caso contrário, /etc/snapraid.conf. +No Windows, ele usa o arquivo snapraid.conf no mesmo +diretório que snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtra os arquivos a serem processados em check e fix. +Apenas os arquivos que correspondem ao padrão especificado são processados. +Esta opção pode ser usada várias vezes. +Consulte a seção PATTERN para obter mais detalhes sobre +especificações de padrão. +No Unix, certifique-se de que os caracteres globbing sejam citados, se usados. +Esta opção pode ser usada apenas com check e fix. +Não pode ser usada com sync e scrub, pois eles sempre +processam o array inteiro. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtra os discos a serem processados em check, fix, up e down. +Você deve especificar um nome de disco conforme definido no +arquivo de configuração. +Você também pode especificar discos de paridade com os nomes: parity, +2-parity, 3-parity, etc., para limitar as operações a um +disco de paridade específico. +Se você combinar múltiplas opções --filter, --filter-disk e --filter-missing, +apenas os arquivos que correspondem a todos os filtros são selecionados. +Esta opção pode ser usada várias vezes. +Esta opção pode ser usada apenas com check, fix, up e down. +Não pode ser usada com sync e scrub, pois eles sempre +processam o array inteiro. +
+
+
+
+
+
+-m, --filter-missing +
+Filtra os arquivos a serem processados em check e fix. +Apenas os arquivos ausentes ou excluídos do array são processados. +Quando usado com fix, isso age como um comando undelete (desexcluir). +Se você combinar múltiplas opções --filter, --filter-disk e --filter-missing, +apenas os arquivos que correspondem a todos os filtros são selecionados. +Esta opção pode ser usada apenas com check e fix. +Não pode ser usada com sync e scrub, pois eles sempre +processam o array inteiro. +
+
+
+
+
+
+-e, --filter-error +
+Processa os arquivos com erros em check e fix. +Processa apenas arquivos que têm blocos marcados com erros silenciosos +ou de entrada/saída durante sync e scrub, conforme listado em status. +Esta opção pode ser usada apenas com check e fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Seleciona o plano de scrub. Se PERC for um valor numérico de 0 a 100, +ele é interpretado como a porcentagem de blocos a serem examinados. +Em vez de uma porcentagem, você pode especificar um plano: +bad examina blocos ruins, new examina blocos ainda não examinados, +e full examina tudo. +Esta opção pode ser usada apenas com scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Seleciona a parte mais antiga do array a ser processada em scrub. +DAYS é a idade mínima em dias para um bloco ser examinado; +o padrão é 10. +Os blocos marcados como ruins são sempre examinados, +independentemente desta opção. +Esta opção pode ser usada apenas com scrub. +
+
+
+
+
+
+-a, --audit-only +
+Em check, verifica o hash dos arquivos sem +verificar os dados de paridade. +Se você estiver interessado apenas em verificar os dados do arquivo, +esta opção pode acelerar significativamente o processo de verificação. +Esta opção pode ser usada apenas com check. +
+
+
+
+
+
+-h, --pre-hash +
+Em sync, executa uma fase de hash preliminar de todos os novos dados +para verificação adicional antes do cálculo da paridade. +Normalmente, em sync, nenhum hash preliminar é feito, e os novos +dados são hashados logo antes do cálculo da paridade, quando são lidos +pela primeira vez. +Este processo ocorre quando o sistema está sob +carga pesada, com todos os discos girando e uma CPU ocupada. +Esta é uma condição extrema para a máquina, e se ela tiver um +problema de hardware latente, erros silenciosos podem passar +despercebidos porque os dados ainda não foram hashados. +Para evitar esse risco, você pode habilitar o modo pre-hash para +ter todos os dados lidos duas vezes para garantir sua integridade. +Esta opção também verifica arquivos movidos dentro do array +para garantir que a operação de movimentação foi bem-sucedida e, +se necessário, permite que você execute uma operação fix antes de prosseguir. +Esta opção pode ser usada apenas com sync. +
+
+
+
+
+
+-i, --import DIR +
+Importa do diretório especificado quaisquer arquivos excluídos +do array após a última sync. +Se você ainda tiver esses arquivos, eles podem ser usados por check +e fix para melhorar o processo de recuperação. +Os arquivos são lidos, incluindo em subdiretórios, e são +identificados independentemente de seu nome. +Esta opção pode ser usada apenas com check e fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+Em qualquer erro, desliga (spins down) todos os discos gerenciados +antes de sair com um código de status diferente de zero. Isso +impede que as unidades permaneçam ativas e girando após uma +operação abortada, ajudando a evitar acúmulo desnecessário de +calor e consumo de energia. Use esta opção para garantir que os +discos sejam interrompidos com segurança, mesmo quando um comando falhar. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Aplica um limite de largura de banda global para todos os discos. A +RATE é o número de bytes por segundo. Você pode especificar um +multiplicador como K, M ou G (por exemplo, --bw-limit 1G). +
+
+
+
+
+
+-t, --tail TAMANHO +
+Limita a listagem de arquivos àqueles que não usam mais do que o +tamanho final especificado dos discos de paridade. +Você pode usar multiplicadores como K, M, G ou T (ex: --tail 1G). +Esta opção só é válida quando usada em conjunto com o comando +locate. +
+
+
+
+
+
+-A, --stats +
+Habilita uma visualização de status estendida que mostra informações +adicionais. A tela exibe dois gráficos: +O primeiro gráfico mostra o número de stripes em buffer para cada +disco, juntamente com o caminho do arquivo que está sendo +acessado atualmente nesse disco. Tipicamente, o disco mais lento não +terá buffer disponível, o que determina a largura de banda máxima +alcançável. +O segundo gráfico mostra a porcentagem de tempo gasto esperando +nos últimos 100 segundos. Espera-se que o disco mais lento +cause a maior parte do tempo de espera, enquanto outros discos +devem ter pouco ou nenhum tempo de espera porque podem usar seus +stripes em buffer. +Este gráfico também mostra o tempo gasto esperando por cálculos +de hash e cálculos RAID. +Todos os cálculos são executados em paralelo com as operações de disco. +Portanto, enquanto houver tempo de espera mensurável para +pelo menos um disco, isso indica que a CPU é rápida o suficiente +para acompanhar a carga de trabalho. +
+
+
+
+
+
+-Z, --force-zero +
+Força a operação insegura de sincronizar um arquivo com tamanho zero +que era anteriormente não zero. +Se o SnapRAID detectar tal condição, ele para de prosseguir +a menos que você especifique esta opção. +Isso permite que você detecte facilmente quando, após uma falha +do sistema, alguns arquivos acessados foram truncados. +Esta é uma condição possível no Linux com os sistemas de arquivos +ext3/ext4. +Esta opção pode ser usada apenas com sync. +
+
+
+
+
+
+-E, --force-empty +
+Força a operação insegura de sincronizar um disco com todos +os arquivos originais ausentes. +Se o SnapRAID detectar que todos os arquivos originalmente presentes +no disco estão ausentes ou foram reescritos, ele para de prosseguir +a menos que você especifique esta opção. +Isso permite que você detecte facilmente quando um sistema de +arquivos de dados não está montado. +Esta opção pode ser usada apenas com sync. +
+
+
+
+
+
+-U, --force-uuid +
+Força a operação insegura de sincronizar, verificar e corrigir +com discos que tiveram seus UUIDs alterados. +Se o SnapRAID detectar que alguns discos tiveram seus UUIDs alterados, +ele para de prosseguir a menos que você especifique esta opção. +Isso permite que você detecte quando seus discos estão montados +nos pontos de montagem errados. +No entanto, é permitido ter uma única mudança de UUID com +paridade única e mais com paridade múltipla, porque este é +o caso normal ao substituir discos após uma recuperação. +Esta opção pode ser usada apenas com sync, check ou +fix. +
+
+
+
+
+
+-D, --force-device +
+Força a operação insegura de corrigir com discos inacessíveis +ou com discos no mesmo dispositivo físico. +Por exemplo, se você perdeu dois discos de dados e tem um disco +sobressalente para recuperar apenas o primeiro, você pode ignorar +o segundo disco inacessível. +Ou, se você quiser recuperar um disco no espaço livre restante +em um disco já usado, compartilhando o mesmo dispositivo físico. +Esta opção pode ser usada apenas com fix. +
+
+
+
+
+
+-N, --force-nocopy +
+Em sync, check e fix, desabilita a heurística de detecção +de cópia. Sem esta opção, o SnapRAID assume que arquivos com os +mesmos atributos, como nome, tamanho e carimbo de data/hora, +são cópias com os mesmos dados. +Isso permite a identificação de arquivos copiados ou movidos de um +disco para outro e reutiliza as informações de hash já calculadas +para detectar erros silenciosos ou para recuperar arquivos ausentes. +Em alguns casos raros, esse comportamento pode resultar em falsos +positivos ou em um processo lento devido a muitas verificações de hash, +e esta opção permite que você resolva tais problemas. +Esta opção pode ser usada apenas com sync, check e fix. +
+
+
+
+
+
+-F, --force-full +
+Em sync, força um recálculo completo da paridade. +Esta opção pode ser usada quando você adiciona um novo nível de +paridade ou se você reverteu para um arquivo de conteúdo antigo +usando dados de paridade mais recentes. +Em vez de recriar a paridade do zero, isso permite +que você reutilize os hashes presentes no arquivo de conteúdo para +validar dados e manter a proteção de dados durante o processo +sync usando os dados de paridade existentes. +Esta opção pode ser usada apenas com sync. +
+
+
+
+
+
+-R, --force-realloc +
+Em sync, força uma realocação completa de arquivos e reconstrução +da paridade. +Esta opção pode ser usada para realocar completamente todos os +arquivos, removendo a fragmentação, enquanto reutiliza os hashes +presentes no arquivo de conteúdo para validar dados. +Esta opção pode ser usada apenas com sync. +ATENÇÃO! Esta opção é apenas para especialistas e é altamente +recomendado não usá-la. +Você NÃO tem proteção de dados durante a operação sync. +
+
+
+
+
+
+-W, --force-realloc-tail TAMANHO +
+Funciona como -R, --force-realloc, mas limitado à parte final +especificada (últimos TAMANHO bytes) de cada arquivo de paridade. +Força a realocação (movimentação) de quaisquer fragmentos/blocos de arquivos +atualmente armazenados nessa seção final, permitindo que sejam colocados +em qualquer lugar no(s) arquivo(s) de paridade onde houver espaço livre +disponível (incluindo espaços vazios existentes). +O objetivo principal desta opção é diminuir o tamanho em disco +do arquivo de paridade. +Se a realocação limpar com sucesso toda a seção final (nenhum bloco +permanecer usando-a), o arquivo de paridade será truncado, +recuperando o espaço final não utilizado. +Você pode usar multiplicadores como K, M, G ou T (ex: +--force-realloc-tail 1G). +Você pode usar locate -t, --tail para saber antecipadamente os +arquivos afetados. +AVISO! +Esta opção é apenas para especialistas e é altamente recomendado +não utilizá-la. +Você NÃO terá proteção de datos durante a operação sync para os +arquivos afetados. +
+
+
+
+
+
+-l, --log FILE +
+Escreve um log detalhado para o arquivo especificado. +Se esta opção não for especificada, erros inesperados são +impressos na tela, resultando potencialmente em saída excessiva +em caso de muitos erros. Quando -l, --log é especificado, apenas +erros fatais que fazem o SnapRAID parar são impressos +na tela. +Se o caminho começar com >>, o arquivo é aberto +no modo de anexação. Ocorrências de %D e %T no nome são +substituídas pela data e hora no formato YYYYMMDD e +HHMMSS. Em arquivos em lote do Windows, você deve duplicar +o caractere %, por exemplo, resultado-%%D.log. Para usar >>, você deve +colocar o nome entre aspas, por exemplo, ">>resultado.log". +Para enviar o log para a saída padrão ou erro padrão, +você pode usar ">&1" e ">&2", respectivamente. +Consulte o arquivo snapraid_log.txt ou a página man para descrições +de tags de log. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Define um novo limite de erro antes de interromper a execução. +Por padrão, o SnapRAID para se encontrar mais de 100 +erros de entrada/saída, indicando que um disco provavelmente está +falhando. +Esta opção afeta sync e scrub, que têm permissão +para continuar após o primeiro conjunto de erros de disco para tentar +completar suas operações. +No entanto, check e fix sempre param no primeiro erro. +
+
+
+
+
+
+-S, --start BLKSTART +
+Começa o processamento a partir do número de bloco +especificado. Isso pode ser útil para tentar verificar +ou corrigir blocos específicos em caso de um disco danificado. +Esta opção é principalmente para recuperação manual avançada. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Processa apenas o número especificado de blocos. +Esta opção é principalmente para recuperação manual avançada. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Gera um arquivo de configuração dummy a partir de um arquivo +de conteúdo existente. +O arquivo de configuração é escrito na saída padrão +e não sobrescreve um existente. +Este arquivo de configuração também contém as informações +necessárias para reconstruir os pontos de montagem do disco, +caso você perca todo o sistema. +
+
+
+
+
+
+-v, --verbose +
+Imprime mais informações na tela. +Se especificado uma vez, ele imprime arquivos excluídos +e estatísticas adicionais. +Esta opção não tem efeito nos arquivos de log. +
+
+
+
+
+
+-q, --quiet +
+Imprime menos informações na tela. +Se especificado uma vez, remove a barra de progresso; duas vezes, +as operações em execução; três vezes, as mensagens de informação; +quatro vezes, as mensagens de status. +Erros fatais são sempre impressos na tela. +Esta opção não tem efeito nos arquivos de log. +
+
+
+
+
+
+-H, --help +
+Imprime uma tela de ajuda curta. +
+
+
+
+
+
+-V, --version +
+Imprime a versão do programa. +
+
+
+
+
+

+Configuração +

+

SnapRAID requer um arquivo de configuração para saber onde seu array +de discos está localizado e onde armazenar as informações de paridade. +

No Unix, ele usa o arquivo /usr/local/etc/snapraid.conf se existir, +caso contrário, /etc/snapraid.conf. +No Windows, ele usa o arquivo snapraid.conf no mesmo +diretório que snapraid.exe. +

Deve conter as seguintes opções (sensível a maiúsculas/minúsculas): +

+

+parity FILE [,FILE] ... +

+

Define os arquivos a serem usados para armazenar as informações de paridade. +A paridade permite proteção contra uma única falha de disco, +semelhante ao RAID5. +

Você pode especificar vários arquivos, que devem estar em discos diferentes. +Quando um arquivo não pode mais crescer, o próximo é usado. +O espaço total disponível deve ser pelo menos tão grande quanto o maior +disco de dados no array. +

Você pode adicionar arquivos de paridade adicionais mais tarde, mas você +não pode reordenar ou removê-los. +

Manter os discos de paridade reservados para paridade garante que +eles não se fragmentem, melhorando o desempenho. +

No Windows, 256 MB são deixados sem uso em cada disco para evitar o +aviso sobre discos cheios. +

Esta opção é obrigatória e pode ser usada apenas uma vez. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Define os arquivos a serem usados para armazenar informações de paridade extra. +

Para cada nível de paridade especificado, um nível adicional de proteção +é habilitado: +

    +
  • +2-parity habilita paridade dupla RAID6. +
  • +
  • +3-parity habilita paridade tripla. +
  • +
  • +4-parity habilita paridade quádrupla (quatro). +
  • +
  • +5-parity habilita paridade penta (cinco). +
  • +
  • +6-parity habilita paridade hexa (seis). +
  • +
+

Cada nível de paridade requer a presença de todos os níveis de paridade +anteriores. +

As mesmas considerações que para a opção parity se aplicam. +

Estas opções são opcionais e podem ser usadas apenas uma vez. +

+
+

+z-parity FILE [,FILE] ... +

+

Define um arquivo e formato alternativo para armazenar paridade tripla. +

Esta opção é uma alternativa a 3-parity, destinada principalmente a +CPUs de baixo custo como ARM ou AMD Phenom, Athlon e Opteron que não +suportam o conjunto de instruções SSSE3. Nesses casos, ela fornece +melhor desempenho. +

Este formato é semelhante, mas mais rápido do que o usado pelo ZFS RAIDZ3. +Assim como o ZFS, ele não funciona além da paridade tripla. +

Ao usar 3-parity, você será avisado se for recomendado usar +o formato z-parity para melhoria de desempenho. +

É possível converter de um formato para outro ajustando +o arquivo de configuração com o z-parity ou 3-parity desejado +e usando fix para recriá-lo. +

+
+

+content FILE +

+

Define o arquivo a ser usado para armazenar a lista e os checksums de todos +os arquivos presentes em seu array de discos. +

Pode ser colocado em um disco usado para dados, paridade ou +qualquer outro disco disponível. +Se você usar um disco de dados, este arquivo é automaticamente excluído +do processo sync. +

Esta opção é obrigatória e pode ser usada várias vezes para salvar +múltiplas cópias do mesmo arquivo. +

Você deve armazenar pelo menos uma cópia para cada disco de paridade usado +mais um. Usar cópias adicionais não prejudica. +

+
+

+data NAME DIR +

+

Define o nome e o ponto de montagem dos discos de dados no +array. NAME é usado para identificar o disco e deve +ser único. DIR é o ponto de montagem do disco no +sistema de arquivos. +

Você pode alterar o ponto de montagem conforme necessário, desde que +mantenha o NAME fixo. +

Você deve usar uma opção para cada disco de dados no array. +

Você pode renomear um disco mais tarde alterando o NAME diretamente +no arquivo de configuração e, em seguida, executando um comando sync. +No caso de renomeação, a associação é feita usando o UUID +armazenado dos discos. +

+
+

+extra NAME DIR +

+

Define o nome e o ponto de montagem de discos adicionais para +monitorar com os comandos smart e probe. +

Isso é útil para monitorar discos que não fazem parte da matriz, +mas que são necessários para o funcionamento do sistema, como o +disco de inicialização. +

Observe que tais discos não são afetados pelos comandos up e down +porque se espera que estejam sempre girando. +

+
+

+nohidden +

+

Exclui todos os arquivos e diretórios ocultos. +No Unix, arquivos ocultos são aqueles que começam com .. +No Windows, são aqueles com o atributo oculto. +

+
+

+exclude/include PATTERN +

+

Define os padrões de arquivo ou diretório a serem excluídos ou incluídos +no processo de sincronização. +Todos os padrões são processados na ordem especificada. +

Se o primeiro padrão que corresponde for um exclude, o arquivo +é excluído. Se for um include, o arquivo é incluído. +Se nenhum padrão corresponder, o arquivo é excluído se o último padrão +especificado for um include, ou incluído se o último padrão +especificado for um exclude. +

Consulte a seção PATTERN para obter mais detalhes sobre +especificações de padrão. +

Esta opção pode ser usada várias vezes. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Define o tamanho básico do bloco em kibibytes para a paridade. +Um kibibyte é 1024 bytes. +

O blocksize padrão é 256, o que deve funcionar para a maioria dos casos. +

ATENÇÃO! Esta opção é apenas para especialistas e é altamente +recomendado não alterar este valor. Para alterar este valor no +futuro, você precisará recriar toda a paridade! +

Uma razão para usar um blocksize diferente é se você tiver muitos arquivos +pequenos, na ordem de milhões. +

Para cada arquivo, mesmo que apenas alguns bytes, um bloco inteiro de +paridade é alocado, e com muitos arquivos, isso pode resultar em +espaço de paridade não utilizado significativo. +Quando você preenche completamente o disco de paridade, você não está +autorizado a adicionar mais arquivos aos discos de dados. +No entanto, a paridade desperdiçada não se acumula em todos os discos de dados. +O espaço desperdiçado resultante de um grande número de arquivos em um disco +de dados limita apenas a quantidade de dados nesse disco de dados, +não em outros. +

Como uma aproximação, você pode assumir que metade do tamanho do bloco é +desperdiçada para cada arquivo. Por exemplo, com 100.000 arquivos e um +tamanho de bloco de 256 KiB, você desperdiçará 12,8 GB de paridade, o +que pode resultar em 12,8 GB a menos de espaço disponível no disco de dados. +

Você pode verificar a quantidade de espaço desperdiçado em cada disco usando status. +Esta é a quantidade de espaço que você deve deixar livre nos discos +de dados ou usar para arquivos não incluídos no array. +Se este valor for negativo, significa que você está perto de encher +a paridade e representa o espaço que você ainda pode desperdiçar. +

Para evitar esse problema, você pode usar uma partição maior para paridade. +Por exemplo, se a partição de paridade for 12,8 GB maior que os discos de dados, +você tem espaço extra suficiente para lidar com até 100.000 +arquivos em cada disco de dados sem qualquer espaço desperdiçado. +

Um truque para obter uma partição de paridade maior no Linux é formatá-la +com o comando: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Isso resulta em cerca de 1,5% de espaço extra, aproximadamente 60 GB para +um disco de 4 TB, o que permite cerca de 460.000 arquivos em cada disco +de dados sem qualquer espaço desperdiçado. +

+
+

+hashsize SIZE_IN_BYTES +

+

Define o tamanho do hash em bytes para os blocos salvos. +

O hashsize padrão é 16 bytes (128 bits), o que deve funcionar +para a maioria dos casos. +

ATENÇÃO! Esta opção é apenas para especialistas e é altamente +recomendado não alterar este valor. Para alterar este valor no +futuro, você precisará recriar toda a paridade! +

Uma razão para usar um hashsize diferente é se o seu sistema tiver +memória limitada. Como regra geral, o SnapRAID tipicamente requer +1 GiB de RAM para cada 16 TB de dados no array. +

Especificamente, para armazenar os hashes dos dados, o SnapRAID requer +aproximadamente TS*(1+HS)/BS bytes de RAM, +onde TS é o tamanho total em bytes do seu array de discos, BS é o +tamanho do bloco em bytes, e HS é o tamanho do hash em bytes. +

Por exemplo, com 8 discos de 4 TB, um tamanho de bloco de 256 KiB +(1 KiB = 1024 bytes), e um tamanho de hash de 16, você obtém: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
+
+

Mudando para um tamanho de hash de 8, você obtém: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
+
+

Mudando para um tamanho de bloco de 512, você obtém: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
+
+

Mudando para um tamanho de hash de 8 e um tamanho de bloco de 512, você obtém: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Salva automaticamente o estado ao sincronizar ou examinar após a +quantidade especificada de GB processados. +Esta opção é útil para evitar reiniciar longos comandos sync +do zero se interrompidos por uma falha de máquina ou qualquer outro evento. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Define a temperatura máxima permitida do disco em Celsius. Quando especificado, +o SnapRAID verifica periodicamente a temperatura de todos os discos usando a +ferramenta smartctl. As temperaturas atuais dos discos são exibidas enquanto +o SnapRAID está operando. Se algum disco exceder este limite, todas as +operações param, e os discos são desligados (colocados em standby) pela +duração definida pela opção temp_sleep. Após o período de espera, as +operações são retomadas, potencialmente pausando novamente se o limite de +temperatura for atingido mais uma vez. +

Durante a operação, o SnapRAID também analisa a curva de aquecimento de +cada disco e estima a temperatura estável de longo prazo que eles +devem atingir se a atividade continuar. A estimativa é realizada apenas +depois que a temperatura do disco aumentou quatro vezes, garantindo +que pontos de dados suficientes estejam disponíveis para estabelecer uma +tendência confiável. +Esta temperatura estável prevista é mostrada entre parênteses ao lado +do valor atual e ajuda a avaliar se o resfriamento do sistema é +adequado. Esta temperatura estimada é apenas para fins informativos +e não tem efeito no comportamento do SnapRAID. As ações do programa +são baseadas exclusivamente nas temperaturas reais medidas dos discos. +

Para realizar esta análise, o SnapRAID precisa de uma referência para a +temperatura do sistema. Ele tenta primeiro lê-la dos sensores de hardware +disponíveis. Se nenhum sensor do sistema puder ser acessado, ele usa +a temperatura mais baixa do disco medida no início da execução como +referência de fallback. +

Normalmente, o SnapRAID mostra apenas a temperatura do disco mais quente. +Para exibir a temperatura de todos os discos, use a opção -A ou --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Define o tempo de espera (standby time), em minutos, quando o limite de +temperatura é atingido. Durante este período, os discos permanecem +desligados. O padrão é 5 minutos. +

+
+

+pool DIR +

+

Define o diretório de pooling onde a visualização virtual do array +de discos é criada usando o comando pool. +

O diretório já deve existir. +

+
+

+share UNC_DIR +

+

Define o caminho UNC do Windows necessário para acessar os discos remotamente. +

Se esta opção for especificada, os links simbólicos criados no diretório +do pool usam este caminho UNC para acessar os discos. +Sem esta opção, os links simbólicos gerados usam apenas caminhos locais, +o que não permite compartilhar o diretório do pool pela rede. +

Os links simbólicos são formados usando o caminho UNC especificado, +adicionando o nome do disco conforme especificado na opção data, +e finalmente adicionando o diretório e nome do arquivo. +

Esta opção é necessária apenas para Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Define opções smartctl personalizadas para obter os atributos SMART para +cada disco. Isso pode ser necessário para controladores RAID e alguns +discos USB que não podem ser detectados automaticamente. O placeholder +%s é substituído pelo nome do dispositivo, mas é opcional para dispositivos +fixos como controladores RAID. +

DISK é o mesmo nome de disco especificado na opção data. +PARITY é um dos nomes de paridade: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity ou z-parity. +

Nas OPTIONS especificadas, a string %s é substituída pelo +nome do dispositivo. Para controladores RAID, o dispositivo é +provavelmente fixo, e você pode não precisar usar %s. +

Consulte a documentação do smartmontools para possíveis opções: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Por exemplo: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignora o atributo SMART especificado ao calcular a probabilidade +de falha do disco. Esta opção é útil se um disco relatar valores +incomuns ou enganosos para um atributo específico. +

DISK é o mesmo nome de disco especificado na opção data. +PARITY é um dos nomes de paridade: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity ou z-parity. +O valor especial * pode ser usado para ignorar o atributo em todos os discos. +

Por exemplo, para ignorar o atributo Current Pending Sector Count em +todos os discos: +

+smartignore * 197
+
+

Para ignorá-lo apenas no primeiro disco de paridade: +

+smartignore parity 197
+
+
+
+

+Exemplos +

+

Um exemplo de uma configuração típica para Unix é: +

+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
+
+

Um exemplo de uma configuração típica para Windows é: +

+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
+
+
+
+
+

+Padrão (Pattern) +

+

Os padrões fornecem uma maneira flexível de filtrar arquivos para inclusão ou +exclusão. Ao usar caracteres de globbing, você pode definir regras que +correspondam a nomes de arquivos específicos ou estruturas de diretórios inteiras sem +listar cada caminho manualmente. +

O ponto de interrogação ? corresponde a qualquer caractere único, exceto o +separador de diretórios. Isso o torna útil para corresponder nomes de arquivos com +caracteres variáveis, mantendo o padrão confinado a um único nível de diretório. +

O asterisco simples * corresponde a qualquer sequência de caracteres, mas, como o +ponto de interrogação, nunca cruza as fronteiras do diretório. Ele para na +barra invertida, tornando-o adequado para correspondência dentro de um único +componente de caminho. Este é o comportamento padrão de curinga familiar do +globbing de shell. +

O asterisco duplo ** é mais poderoso, ele corresponde a qualquer sequência de +caracteres, incluindo separadores de diretórios. Isso permite que os padrões correspondam +em vários níveis de diretório. Quando o ** aparece incorporado diretamente em +um padrão, ele pode corresponder a zero ou mais caracteres, incluindo barras entre +o texto literal circundante. +

O uso mais importante do ** é na forma especial /**/. Isso corresponde a +zero ou mais níveis de diretório completos, tornando possível corresponder arquivos +em qualquer profundidade em uma árvore de diretórios sem conhecer a estrutura exata do caminho. +Por exemplo, o padrão src/**/main.js corresponde a src/main.js (pulando +zero diretórios), src/ui/main.js (pulando um diretório) e +src/ui/components/main.js (pulando dois diretórios). +

Classes de caracteres usando colchetes [] correspondem a um único caractere de um +conjunto ou intervalo especificado. Como os outros padrões de caractere único, elas +não correspondem a separadores de diretório. As classes suportam intervalos e negação usando +um ponto de exclamação. +

A distinção fundamental a ser lembrada é que *, ? e classes de caracteres +respeitam os limites do diretório e correspondem apenas dentro de um único +componente de caminho, enquanto ** é o único padrão que pode corresponder através de +separadores de diretório. +

Existem quatro tipos diferentes de padrões: +

+
+
+FILE +
+Seleciona qualquer arquivo chamado FILE. +Este padrão se aplica apenas a arquivos, não a diretórios. +
+
+
+
+
+
+DIR/ +
+Seleciona qualquer diretório chamado DIR e tudo o que estiver dentro dele. +Este padrão se aplica apenas a diretórios, não a arquivos. +
+
+
+
+
+
+/PATH/FILE +
+Seleciona o caminho exato do arquivo especificado. Este padrão se aplica +apenas a arquivos, não a diretórios. +
+
+
+
+
+
+/PATH/DIR/ +
+Seleciona o caminho exato do diretório especificado e tudo o que estiver +dentro dele. Este padrão se aplica apenas a diretórios, não a arquivos. +
+
+
+

Quando você especifica um caminho absoluto começando com /, ele é aplicado +no diretório raiz do array, não no diretório raiz do sistema de arquivos local. +

No Windows, você pode usar a barra invertida \ em vez da barra. +Diretórios do sistema Windows, junctions, pontos de montagem e outros +diretórios especiais do Windows são tratados como arquivos, o que significa +que para excluí-los, você deve usar uma regra de arquivo, não uma de diretório. +

Se o nome do arquivo contiver um caractere *, ?, [, +ou ], você deve escapá-lo para evitar que seja interpretado como um +caractere globbing. No Unix, o caractere de escape é \; no Windows, é ^. +Quando o padrão está na linha de comando, você deve duplicar o caractere +de escape para evitar que seja interpretado pelo shell de comando. +

No arquivo de configuração, você pode usar diferentes estratégias para filtrar +os arquivos a serem processados. +A abordagem mais simples é usar apenas regras exclude para remover todos os +arquivos e diretórios que você não deseja processar. Por exemplo: +

+# Exclui qualquer arquivo chamado *.unrecoverable
+exclude *.unrecoverable
+# Exclui o diretório raiz /lost+found
+exclude /lost+found/
+# Exclui qualquer subdiretório chamado tmp
+exclude tmp/
+
+

A abordagem oposta é definir apenas os arquivos que você deseja processar, +usando apenas regras include. Por exemplo: +

+# Inclui apenas alguns diretórios
+include /movies/
+include /musics/
+include /pictures/
+
+

A abordagem final é misturar regras exclude e include. Neste caso, +a ordem das regras é importante. As regras anteriores têm +precedência sobre as posteriores. +Para simplificar, você pode listar todas as regras exclude primeiro e +depois todas as regras include. Por exemplo: +

+# Exclui qualquer arquivo chamado *.unrecoverable
+exclude *.unrecoverable
+# Exclui qualquer subdiretório chamado tmp
+exclude tmp/
+# Inclui apenas alguns diretórios
+include /movies/
+include /musics/
+include /pictures/
+
+

Na linha de comando, usando a opção -f, você pode usar apenas padrões include. +Por exemplo: +

+# Verifica apenas os arquivos .mp3.
+# No Unix, use aspas para evitar a expansão globbing pelo shell.
+snapraid -f "*.mp3" check
+
+

No Unix, ao usar caracteres globbing na linha de comando, você deve +citá-los para evitar que o shell os expanda. +

+
+

+Ignorar Arquivos (Ignore File) +

+

Além das regras globais no arquivo de configuração, você pode colocar +arquivos .snapraidignore em qualquer diretório dentro do array para definir +regras de exclusão descentralizadas. +

As regras definidas em .snapraidignore são aplicadas após as regras no +arquivo de configuração. Isso significa que elas têm uma prioridade maior e +podem ser usadas para excluir arquivos que foram anteriormente incluídos pela +configuração global. Efetivamente, se uma regra local corresponder, o arquivo +é excluído independentemente das configurações globais de inclusão. +

A lógica de padrões no .snapraidignore espelha a configuração global, mas +ancora os padrões ao diretório onde o arquivo está localizado: +

+
+
+FILE +
+Seleciona qualquer arquivo chamado FILE neste diretório ou abaixo. +Isso segue as mesmas regras de globbing do padrão global. +
+
+
+
+
+
+DIR/ +
+Seleciona qualquer diretório chamado DIR e tudo dentro dele, +residente neste diretório ou abaixo. +
+
+
+
+
+
+/PATH/FILE +
+Seleciona o arquivo exato especificado relativo à localização +do arquivo .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Seleciona o diretório exato especificado e tudo dentro dele, +relativo à localização do arquivo .snapraidignore. +
+
+
+

Ao contrário da configuração global, os arquivos .snapraidignore suportam +apenas regras de exclusão; você não pode usar padrões include ou negação (!). +

Por exemplo, se você tiver um .snapraidignore em /mnt/disk1/projects/: +

+# Exclui APENAS /mnt/disk1/projects/output.bin
+/output.bin
+# Exclui qualquer diretório chamado build dentro de projects/
+build/
+# Exclui qualquer arquivo .tmp dentro de projects/ ou suas subpastas
+*.tmp
+
+
+
+

+Conteúdo (Content) +

+

SnapRAID armazena a lista e os checksums de seus arquivos no arquivo content. +

É um arquivo binário que lista todos os arquivos presentes em seu array +de discos, juntamente com todos os checksums para verificar sua integridade. +

Este arquivo é lido e escrito pelos comandos sync e scrub e +lido pelos comandos fix, check e status. +

+
+

+Paridade (Parity) +

+

SnapRAID armazena as informações de paridade do seu array nos arquivos parity. +

Estes são arquivos binários contendo a paridade calculada de todos os +blocos definidos no arquivo content. +

Estes arquivos são lidos e escritos pelos comandos sync e fix e +apenas lidos pelos comandos scrub e check. +

+
+

+Codificação (Encoding) +

+

SnapRAID no Unix ignora qualquer codificação. Ele lê e armazena os +nomes de arquivo com a mesma codificação usada pelo sistema de arquivos. +

No Windows, todos os nomes lidos do sistema de arquivos são convertidos +e processados no formato UTF-8. +

Para que os nomes de arquivo sejam impressos corretamente, você deve +definir o console do Windows para o modo UTF-8 com o comando chcp 65001 +e usar uma fonte TrueType como Lucida Console como fonte do console. +Isso afeta apenas os nomes de arquivo impressos; se você +redirecionar a saída do console para um arquivo, o arquivo resultante +estará sempre no formato UTF-8. +

+
+

+Direitos Autorais (Copyright) +

+

Este arquivo é Copyright (C) 2025 Andrea Mazzoleni +

+
+

+Veja Também (See Also) +

+

snapraid_log(1), snapraidd(1) +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-ro.html b/beta/manual-ro.html new file mode 100644 index 00000000..b3d9ef45 --- /dev/null +++ b/beta/manual-ro.html @@ -0,0 +1,2077 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Sintaxă +

+
+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]
+
+
+
+

+Descriere +

+

SnapRAID este un program de backup conceput pentru matrici de discuri, care stochează +informații de paritate pentru recuperarea datelor în cazul a până la șase +defecte de disc. +

Destinat în principal centrelor media de acasă cu fișiere mari, +care se schimbă rar, SnapRAID oferă câteva caracteristici: +

    +
  • +Puteți utiliza discuri deja pline cu fișiere fără +nevoia de a le reformat, accesându-le ca de obicei. +
  • +
  • +Toate datele dvs. sunt hash-uite pentru a asigura integritatea datelor și a preveni +corupția silențioasă. +
  • +
  • +Când numărul de discuri defecte depășește numărul de parități, +pierderea de date este limitată la discurile afectate; datele de pe +celelalte discuri rămân accesibile. +
  • +
  • +Dacă ștergeți accidental fișiere de pe un disc, recuperarea este +posibilă. +
  • +
  • +Discurile pot avea dimensiuni diferite. +
  • +
  • +Puteți adăuga discuri în orice moment. +
  • +
  • +SnapRAID nu vă blochează datele; puteți înceta să-l utilizați +oricând fără a reforma sau muta date. +
  • +
  • +Pentru a accesa un fișier, este necesar să se rotească doar un singur disc, economisind +energie și reducând zgomotul. +
  • +
+

Pentru mai multe informații, vă rugăm să vizitați site-ul oficial SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Limitări +

+

SnapRAID este un hibrid între un program RAID și unul de backup, care urmărește să combine +cele mai bune beneficii ale ambelor. Cu toate acestea, are unele limitări pe care ar trebui +să le luați în considerare înainte de a-l utiliza. +

Principala limitare este că, dacă un disc se defectează și nu ați făcut recent o sincronizare, +este posibil să nu puteți recupera complet. +Mai exact, este posibil să nu puteți recupera până la dimensiunea +fișierelor modificate sau șterse de la ultima operațiune de sincronizare. +Acest lucru se întâmplă chiar dacă fișierele modificate sau șterse nu sunt pe +discul defect. Acesta este motivul pentru care SnapRAID este mai potrivit pentru +date care se schimbă rar. +

Pe de altă parte, fișierele nou adăugate nu împiedică recuperarea fișierelor +deja existente. Veți pierde doar fișierele adăugate recent dacă acestea +se află pe discul defect. +

Alte limitări ale SnapRAID sunt: +

    +
  • +Cu SnapRAID, aveți în continuare sisteme de fișiere separate pentru fiecare disc. +Cu RAID, obțineți un singur sistem de fișiere mare. +
  • +
  • +SnapRAID nu face striping de date. +Cu RAID, obțineți un spor de viteză prin striping. +
  • +
  • +SnapRAID nu suportă recuperarea în timp real. +Cu RAID, nu trebuie să vă opriți din lucru atunci când un disc se defectează. +
  • +
  • +SnapRAID poate recupera date doar dintr-un număr limitat de defecte de disc. +Cu un backup, puteți recupera dintr-o defecțiune completă +a întregii matrici de discuri. +
  • +
  • +Sunt salvate doar numele fișierelor, mărcile temporale, symlink-urile și hardlink-urile. +Permisiunile, proprietarul și atributele extinse nu sunt salvate. +
  • +
+
+
+

+Noțiuni de Bază +

+

Pentru a utiliza SnapRAID, trebuie mai întâi să selectați un disc în matricea dvs. de discuri +pentru a-l dedica informațiilor de paritate. Cu un singur disc pentru paritate, veți +putea recupera dintr-o singură defecțiune de disc, similar cu RAID5. +

Dacă doriți să recuperați din mai multe defecțiuni de disc, similar cu RAID6, +trebuie să rezervați discuri suplimentare pentru paritate. Fiecare disc de paritate +suplimentar permite recuperarea dintr-o defecțiune de disc în plus. +

Ca discuri de paritate, trebuie să le alegeți pe cele mai mari din matrice, +deoarece informațiile de paritate pot crește până la dimensiunea celui mai mare disc de date +din matrice. +

Aceste discuri vor fi dedicate stocării fișierelor de paritate. +Nu ar trebui să stocați datele dvs. pe ele. +

Apoi, trebuie să definiți discurile de date pe care doriți să le protejați +cu SnapRAID. Protecția este mai eficientă dacă aceste discuri +conțin date care se schimbă rar. Din acest motiv, este mai bine să +NU includeți discul C:\ al Windows sau directoarele Unix /home, /var și /tmp. +

Lista de fișiere este salvată în fișierele de conținut, de obicei +stocate pe discurile de date, de paritate sau de boot. +Acest fișier conține detaliile backup-ului dvs., inclusiv toate +sumele de control (checksums) pentru a-i verifica integritatea. +Fișierul de conținut este stocat în mai multe copii, iar fiecare copie trebuie +să fie pe un disc diferit pentru a se asigura că, chiar și în cazul a multiple +defecte de disc, cel puțin o copie este disponibilă. +

De exemplu, să presupunem că sunteți interesați doar de un singur nivel de paritate +de protecție și discurile dvs. se află la: +

+/mnt/diskp <- discul selectat pentru paritate
+/mnt/disk1 <- primul disc de protejat
+/mnt/disk2 <- al doilea disc de protejat
+/mnt/disk3 <- al treilea disc de protejat
+
+

Trebuie să creați fișierul de configurare /etc/snapraid.conf cu +următoarele opțiuni: +

+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/
+
+

Dacă sunteți pe Windows, ar trebui să utilizați formatul de cale Windows, cu litere de unitate +și backslash-uri în loc de slash-uri. +

+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\
+
+

Dacă aveți multe discuri și rămâneți fără litere de unitate, puteți monta +discurile direct în subfoldere. Vedeți: +

+https://www.google.com/search?q=Windows+mount+point
+
+

În acest moment, sunteți gata să rulați comanda sync pentru a construi +informațiile de paritate. +

+snapraid sync
+
+

Acest proces poate dura câteva ore prima dată, în funcție de dimensiunea +datelor deja prezente pe discuri. Dacă discurile sunt goale, +procesul este imediat. +

Îl puteți opri oricând apăsând Ctrl+C, iar la următoarea rulare, +va relua de unde a fost întrerupt. +

Când această comandă se finalizează, datele dvs. sunt ÎN SIGURANȚĂ. +

Acum puteți începe să utilizați matricea după cum doriți și +să actualizați periodic informațiile de paritate rulând comanda sync. +

+

+Scrubbing (Verificare) +

+

Pentru a verifica periodic datele și paritatea pentru erori, puteți +rula comanda scrub. +

+snapraid scrub
+
+

Această comandă compară datele din matricea dvs. cu hash-ul calculat +în timpul comenzii sync pentru a verifica integritatea. +

Fiecare rulare a comenzii verifică aproximativ 8% din matrice, excluzând datele +deja verificate în ultimele 10 zile. +Puteți utiliza opțiunea -p, --plan pentru a specifica o cantitate diferită +și opțiunea -o, --older-than pentru a specifica o vârstă diferită în zile. +De exemplu, pentru a verifica 5% din matrice pentru blocuri mai vechi de 20 de zile, utilizați: +

+snapraid -p 5 -o 20 scrub
+
+

Dacă se găsesc erori silențioase sau de intrare/ieșire în timpul procesului, +blocurile corespunzătoare sunt marcate ca fiind defecte în fișierul de conținut +și listate în comanda status. +

+snapraid status
+
+

Pentru a le repara, puteți utiliza comanda fix, filtrând pentru blocuri defecte cu +opțiunea -e, --filter-error: +

+snapraid -e fix
+
+

La următorul scrub, erorile vor dispărea din raportul status +dacă sunt într-adevăr reparate. Pentru a face mai rapid, puteți utiliza -p bad pentru a verifica +doar blocurile marcate ca defecte. +

+snapraid -p bad scrub
+
+

Rularea scrub pe o matrice nesincronizată poate raporta erori cauzate de +fișiere eliminate sau modificate. Aceste erori sunt raportate în ieșirea scrub, +dar blocurile aferente nu sunt marcate ca defecte. +

+
+

+Pooling (Agregare) +

+

Notă: Funcționalitatea de pooling descrisă mai jos a fost înlocuită de instrumentul +mergerfs, care este acum opțiunea recomandată pentru utilizatorii Linux în +comunitatea SnapRAID. Mergefs oferă o modalitate mai flexibilă și eficientă +de a agrega mai multe discuri într-un singur punct de montare unificat, +permițând accesul neîntrerupt la fișiere pe toată matricea dvs. fără a se baza +pe link-uri simbolice. Se integrează bine cu SnapRAID pentru protecția parității +și este utilizat în mod obișnuit în configurații precum OpenMediaVault (OMV) +sau configurații NAS personalizate. +

Pentru a avea toate fișierele din matricea dvs. afișate în același arbore de directoare, +puteți activa funcționalitatea de pooling. Aceasta creează o vizualizare virtuală +doar în citire a tuturor fișierelor din matricea dvs. folosind link-uri simbolice. +

Puteți configura directorul de pooling în fișierul de configurare cu: +

+pool /pool
+
+

sau, dacă sunteți pe Windows, cu: +

+pool C:\pool
+
+

și apoi rulați comanda pool pentru a crea sau actualiza vizualizarea virtuală. +

+snapraid pool
+
+

Dacă utilizați o platformă Unix și doriți să partajați acest director +peste rețea către mașini Windows sau Unix, ar trebui să adăugați +următoarele opțiuni la /etc/samba/smb.conf: +

+# În secțiunea global a smb.conf
+unix extensions = no
+
+
+# În secțiunea share a smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

În Windows, partajarea link-urilor simbolice peste o rețea necesită ca clienții să +le rezolve de la distanță. Pentru a permite acest lucru, pe lângă partajarea directorului pool, +trebuie să partajați și toate discurile în mod independent, folosind numele discurilor +definite în fișierul de configurare ca puncte de partajare. De asemenea, trebuie să specificați +în opțiunea share din fișierul de configurare calea UNC Windows pe care +clienții la distanță trebuie să o folosească pentru a accesa aceste discuri partajate. +

De exemplu, operând de pe un server numit darkstar, puteți utiliza +opțiunile: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

și partajați următoarele directoare peste rețea: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

pentru a permite clienților la distanță să acceseze toate fișierele la \\darkstar\pool. +

De asemenea, ar putea fi necesar să configurați clienții la distanță pentru a permite accesul la symlink-uri la distanță cu comanda: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting (Anulare Ștergere) +

+

SnapRAID funcționează mai mult ca un program de backup decât un sistem RAID și poate +fi folosit pentru a restaura sau anula ștergerea fișierelor la starea lor anterioară utilizând +opțiunea -f, --filter: +

+snapraid fix -f FILE
+
+

sau pentru un director: +

+snapraid fix -f DIR/
+
+

De asemenea, îl puteți utiliza pentru a recupera doar fișiere șterse accidental în interiorul +unui director folosind opțiunea -m, --filter-missing, care restaurează +doar fișierele lipsă, lăsându-le pe toate celelalte neatinse. +

+snapraid fix -m -f DIR/
+
+

Sau pentru a recupera toate fișierele șterse de pe toate unitățile cu: +

+snapraid fix -m
+
+
+
+

+Recuperare +

+

Cel mai rău s-a întâmplat și ați pierdut unul sau mai multe discuri! +

NU INTRAȚI ÎN PANICĂ! Veți putea să le recuperați! +

Primul lucru pe care trebuie să-l faceți este să evitați modificările ulterioare la matricea dvs. de discuri. +Dezactivați orice conexiuni la distanță la aceasta și orice procese programate, inclusiv +orice sincronizare sau verificare SnapRAID programată pe timp de noapte. +

Apoi continuați cu următorii pași. +

+

+PASUL 1 -> Reconfigurare +

+

Aveți nevoie de spațiu pentru a recupera, ideal pe discuri de rezervă +suplimentare, dar un disc USB extern sau un disc la distanță vor fi suficiente. +

Modificați fișierul de configurare SnapRAID pentru a face ca opțiunea data sau parity +a discului defect să indice o locație cu suficient spațiu gol +pentru a recupera fișierele. +

De exemplu, dacă discul d1 a eșuat, schimbați de la: +

+data d1 /mnt/disk1/
+
+

la: +

+data d1 /mnt/new_spare_disk/
+
+

Dacă discul de recuperat este un disc de paritate, actualizați opțiunea parity +corespunzătoare. +Dacă aveți mai multe discuri defecte, actualizați toate opțiunile lor de configurare. +

+
+

+PASUL 2 -> Reparare (Fix) +

+

Rulați comanda fix, stocând jurnalul într-un fișier extern cu: +

+snapraid -d NAME -l fix.log fix
+
+

Unde NAME este numele discului, cum ar fi d1 în exemplul nostru anterior. +Dacă discul de recuperat este un disc de paritate, utilizați numele parity, 2-parity, +etc. +Dacă aveți mai multe discuri defecte, utilizați mai multe opțiuni -d pentru a le specifica pe toate. +

Această comandă va dura mult timp. +

Asigurați-vă că aveți câțiva gigabytes liberi pentru a stoca fișierul fix.log. +Rulați-l de pe un disc cu suficient spațiu liber. +

Acum ați recuperat tot ce este recuperabil. Dacă unele fișiere sunt parțial +sau total nerecuperabile, vor fi redenumite adăugând extensia .unrecoverable. +

Puteți găsi o listă detaliată a tuturor blocurilor nerecuperabile în fișierul fix.log +verificând toate liniile care încep cu unrecoverable:. +

Dacă nu sunteți mulțumit de recuperare, o puteți reîncerca de câte +ori doriți. +

De exemplu, dacă ați eliminat fișiere din matrice după ultima +sync, acest lucru poate duce la nerecuperarea unor fișiere. +În acest caz, puteți reîncerca fix-ul utilizând opțiunea -i, --import, +specificând unde se află acum aceste fișiere pentru a le include din nou în +procesul de recuperare. +

Dacă sunteți mulțumit de recuperare, puteți continua, +dar rețineți că după sincronizare, nu mai puteți reîncerca comanda fix +deloc! +

+
+

+PASUL 3 -> Verificare (Check) +

+

Ca o verificare prudentă, puteți rula acum o comandă check pentru a vă asigura că +totul este corect pe discul recuperat. +

+snapraid -d NAME -a check
+
+

Unde NAME este numele discului, cum ar fi d1 în exemplul nostru anterior. +

Opțiunile -d și -a spun SnapRAID să verifice doar discul specificat +și să ignore toate datele de paritate. +

Această comandă va dura mult timp, dar dacă nu sunteți excesiv de prudent, +o puteți sări. +

+
+

+PASUL 4 -> Sincronizare (Sync) +

+

Rulați comanda sync pentru a resincroniza matricea cu noul disc. +

+snapraid sync
+
+

Dacă totul este recuperat, această comandă este imediată. +

+
+
+
+

+Comenzi +

+

SnapRAID oferă câteva comenzi simple care vă permit să: +

    +
  • +Tipăriți starea matricei -> status +
  • +
  • +Controlați discurile -> smart, probe, up, down +
  • +
  • +Faceți un backup/snapshot -> sync +
  • +
  • +Verificați periodic datele -> scrub +
  • +
  • +Restaurați ultimul backup/snapshot -> fix. +
  • +
+

Comenzile trebuie scrise cu litere mici. +

+

+status +

+

Tipărește un rezumat al stării matricei de discuri. +

Include informații despre fragmentarea parității, cât de vechi +sunt blocurile fără verificare și toate erorile silențioase înregistrate +întâlnite în timpul verificării (scrubbing). +

Informațiile prezentate se referă la ultima dată când ați +rulat sync. Modificările ulterioare nu sunt luate în considerare. +

Dacă au fost detectate blocuri defecte, numerele lor de bloc sunt listate. +Pentru a le repara, puteți utiliza comanda fix -e. +

De asemenea, arată un grafic care reprezintă ultima dată când fiecare bloc +a fost verificat (scrubbed) sau sincronizat. Blocurile verificate sunt afișate cu *, +blocurile sincronizate, dar încă neverificate, cu o. +

Nimic nu este modificat. +

+
+

+smart +

+

Tipărește un raport SMART al tuturor discurilor din sistem. +

Include o estimare a probabilității de eșec în anul următor, +permițându-vă să planificați înlocuiri de întreținere a discurilor care prezintă +atribute suspecte. +

Această estimare a probabilității este obținută prin corelarea atributelor SMART +ale discurilor cu datele Backblaze disponibile la: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Dacă SMART raportează că un disc este pe cale să eșueze, FAIL sau PREFAIL este tipărit +pentru acel disc, iar SnapRAID returnează o eroare. +În acest caz, înlocuirea imediată a discului este puternic recomandată. +

Alte șiruri de stare posibile sunt: +

+
+
+logfail +
+În trecut, unele atribute au fost mai mici decât +pragul. +
+
+
+
+logerr +
+Jurnalul de erori al dispozitivului conține erori. +
+
+
+
+selferr +
+Jurnalul de auto-test al dispozitivului conține erori. +
+
+
+

Dacă opțiunea -v, --verbose este specificată, este furnizată o analiză statistică +mai profundă. Această analiză vă poate ajuta să decideți dacă aveți nevoie de mai multă +sau mai puțină paritate. +

Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea +smartctl -a pe toate dispozitivele. +

Dacă dispozitivele dvs. nu sunt detectate automat corect, puteți specifica +o comandă personalizată utilizând opțiunea smartctl în fișierul de configurare. +

Nimic nu este modificat. +

+
+

+probe +

+

Tipărește starea de ALIMENTARE (POWER) a tuturor discurilor din sistem. +

Standby înseamnă că discul nu se rotește. Active înseamnă +că discul se rotește. +

Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea +smartctl -n standby -i pe toate dispozitivele. +

Dacă dispozitivele dvs. nu sunt detectate automat corect, puteți specifica +o comandă personalizată utilizând opțiunea smartctl în fișierul de configurare. +

Nimic nu este modificat. +

+
+

+up +

+

Pornirea tuturor discurilor din matrice. +

Puteți porni doar discuri specifice utilizând opțiunea -d, --filter-disk. +

Pornirea tuturor discurilor în același timp necesită multă energie. +Asigurați-vă că sursa dvs. de alimentare o poate susține. +

Nimic nu este modificat. +

+
+

+down +

+

Oprirea (spin down) tuturor discurilor din matrice. +

Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea +smartctl -s standby,now pe toate dispozitivele. +

Puteți opri doar discuri specifice utilizând opțiunea -d, --filter-disk. +

Pentru a opri automat la eroare, puteți utiliza opțiunea -s, --spin-down-on-error +cu orice altă comandă, care este echivalentă cu rularea manuală a down +atunci când apare o eroare. +

Nimic nu este modificat. +

+
+

+diff +

+

Listează toate fișierele modificate de la ultima sync care trebuie +să li se recalculeze datele de paritate. +

Această comandă nu verifică datele fișierului, ci doar marca temporală, +dimensiunea și inodul fișierului. +

După listarea tuturor fișierelor modificate, este prezentat un rezumat al modificărilor, +grupate după: +

+
+
+equal +
+Fișiere neschimbate față de înainte. +
+
+
+
+added +
+Fișiere adăugate care nu erau prezente înainte. +
+
+
+
+removed +
+Fișiere eliminate. +
+
+
+
+updated +
+Fișiere cu o dimensiune sau marcă temporală diferită, ceea ce înseamnă că au +fost modificate. +
+
+
+
+moved +
+Fișiere mutate într-un director diferit pe același disc. +Sunt identificate având același nume, dimensiune, marcă temporală +și inod, dar un director diferit. +
+
+
+
+copied +
+Fișiere copiate pe același disc sau pe un disc diferit +unde fișierul original încă există. +Acestea sunt identificate prin faptul că au același nume, +dimensiune și amprentă temporală. +Dacă amprenta temporală sub-secundă este zero, calea completă +trebuie să se potrivească pentru a fi identificate, nu doar +numele. +
+
+
+
+relocated +
+Fișiere mutate pe același disc sau pe un disc diferit +unde originalul a dispărut. +Acestea sunt identificate prin faptul că au același nume, +dimensiune și amprentă temporală. +Dacă amprenta temporală sub-secundă este zero, calea completă +trebuie să se potrivească pentru a fi identificate. +Spre deosebire de fișierele 'moved' de pe același disc, fișierele +relocate au un inod diferit. +
+
+
+
+restored +
+Fișiere cu un inod diferit, dar care se potrivesc ca +director, nume, dimensiune și amprentă temporală. +Acestea sunt de obicei fișiere restaurate după ce au fost șterse. +
+
+
+

Dacă este necesară o sync, codul de retur al procesului este 2, în loc de +cel implicit 0. Codul de retur 1 este utilizat pentru o condiție de eroare generică. +

Nimic nu este modificat. +

+
+

+sync +

+

Actualizează informațiile de paritate. Toate fișierele modificate +din matricea de discuri sunt citite și datele de paritate +corespunzătoare sunt actualizate. +

Puteți opri acest proces în orice moment apăsând Ctrl+C, +fără a pierde munca deja efectuată. +La următoarea rulare, procesul sync va relua de unde +a fost întrerupt. +

Dacă se găsesc erori silențioase sau de intrare/ieșire în timpul procesului, +blocurile corespunzătoare sunt marcate ca defecte. +

Fișierele sunt identificate prin cale și/sau inod și verificate prin +dimensiune și marcă temporală. +Dacă dimensiunea sau marca temporală a fișierului diferă, datele de paritate +sunt recalculate pentru întregul fișier. +Dacă fișierul este mutat sau redenumit pe același disc, păstrând același +inod, paritatea nu este recalculată. +Dacă fișierul este mutat pe un alt disc, paritatea este recalculată, +dar informațiile hash calculate anterior sunt păstrate. +

Fișierele de content și parity sunt modificate dacă este necesar. +Fișierele din matrice NU sunt modificate. +

+
+

+scrub +

+

Verifică (scrubs) matricea, căutând erori silențioase sau de intrare/ieșire în discurile +de date și de paritate. +

Fiecare invocare verifică aproximativ 8% din matrice, excluzând +datele deja verificate în ultimele 10 zile. +Acest lucru înseamnă că verificarea o dată pe săptămână asigură că fiecare bit de date este verificat +cel puțin o dată la trei luni. +

Puteți defini un plan de verificare sau o cantitate diferită utilizând opțiunea -p, --plan, +care acceptă: +bad - Verifică blocurile marcate ca defecte. +new - Verifică blocurile tocmai sincronizate care nu au fost încă verificate. +full - Verifică totul. +0-100 - Verifică procentul specificat de blocuri. +

Dacă specificați o valoare procentuală, puteți utiliza și opțiunea -o, --older-than +pentru a defini cât de vechi ar trebui să fie blocul. +Cele mai vechi blocuri sunt verificate primele, asigurând o verificare optimă. +Dacă doriți să verificați doar blocurile tocmai sincronizate care nu au fost încă verificate, +utilizați opțiunea -p new. +

Pentru a obține detalii despre starea verificării, utilizați comanda status. +

Pentru orice eroare silențioasă sau de intrare/ieșire găsită, blocurile corespunzătoare +sunt marcate ca defecte în fișierul de content. +Aceste blocuri defecte sunt listate în status și pot fi reparate cu fix -e. +După reparare, la următorul scrub, vor fi reverificate, iar dacă se găsesc +corectate, marca defectă va fi eliminată. +Pentru a verifica doar blocurile defecte, puteți utiliza comanda scrub -p bad. +

Este recomandat să rulați scrub doar pe o matrice sincronizată pentru a evita +erorile raportate cauzate de date nesincronizate. Aceste erori sunt recunoscute +ca nefiind erori silențioase, iar blocurile nu sunt marcate ca defecte, +dar astfel de erori sunt raportate în ieșirea comenzii. +

Fișierul de content este modificat pentru a actualiza ora ultimei verificări +pentru fiecare bloc și pentru a marca blocurile defecte. +Fișierele de parity NU sunt modificate. +Fișierele din matrice NU sunt modificate. +

+
+

+fix +

+

Repară toate fișierele și datele de paritate. +

Toate fișierele și datele de paritate sunt comparate cu starea snapshot-ului +salvată la ultima sync. +Dacă se găsește o diferență, este readusă la snapshot-ul stocat. +

ATENȚIE! Comanda fix nu face diferența între erori și +modificări intenționate. Ea revine necondiționat la starea fișierului +de la ultima sync. +

Dacă nu este specificată nicio altă opțiune, întreaga matrice este procesată. +Utilizați opțiunile de filtrare pentru a selecta un subset de fișiere sau discuri de operat. +

Pentru a repara doar blocurile marcate ca defecte în timpul sync și scrub, +utilizați opțiunea -e, --filter-error. +Spre deosebire de alte opțiuni de filtrare, aceasta aplică reparații doar fișierelor care sunt +neschimbate de la ultima sync. +

SnapRAID redenumește toate fișierele care nu pot fi reparate adăugând extensia +.unrecoverable. +

Înainte de reparare, întreaga matrice este scanată pentru a găsi orice fișiere mutate +de la ultima operațiune sync. +Aceste fișiere sunt identificate prin marca lor temporală, ignorând numele +și directorul lor și sunt utilizate în procesul de recuperare dacă este necesar. +Dacă ați mutat unele dintre ele în afara matricei, puteți utiliza opțiunea -i, --import +pentru a specifica directoare suplimentare de scanat. +

Fișierele sunt identificate doar prin cale, nu prin inod. +

Fișierul de content NU este modificat. +Fișierele de parity sunt modificate dacă este necesar. +Fișierele din matrice sunt modificate dacă este necesar. +

+
+

+check +

+

Verifică toate fișierele și datele de paritate. +

Funcționează ca fix, dar simulează doar o recuperare și nu sunt scrise modificări +în matrice. +

Această comandă este destinată în primul rând verificării manuale, +cum ar fi după un proces de recuperare sau în alte condiții speciale. +Pentru verificări periodice și programate, utilizați scrub. +

Dacă utilizați opțiunea -a, --audit-only, doar datele fișierului +sunt verificate, iar datele de paritate sunt ignorate pentru o +rulare mai rapidă. +

Fișierele sunt identificate doar prin cale, nu prin inod. +

Nimic nu este modificat. +

+
+

+list +

+

Listează toate fișierele conținute în matrice la momentul +ultimei sync. +

Cu -v sau --verbose, este afișat și timpul sub-secundă. +

Nimic nu este modificat. +

+
+

+dup +

+

Listează toate fișierele duplicate. Două fișiere sunt considerate egale dacă hash-urile +lor se potrivesc. Datele fișierului nu sunt citite; sunt utilizate doar +hash-urile precalculate. +

Nimic nu este modificat. +

+
+

+pool +

+

Creează sau actualizează o vizualizare virtuală a tuturor +fișierelor din matricea dvs. de discuri în directorul de pooling. +

Fișierele nu sunt copiate, ci legate folosind +link-uri simbolice. +

La actualizare, toate link-urile simbolice existente și subdirectoarele goale +sunt șterse și înlocuite cu noua +vizualizare a matricei. Orice alte fișiere obișnuite sunt lăsate pe loc. +

Nimic nu este modificat în afara directorului pool. +

+
+

+devices +

+

Tipărește dispozitivele de nivel scăzut utilizate de matrice. +

Această comandă afișează asocierile de dispozitive din matrice +și este destinată în principal ca interfață de script. +

Primele două coloane sunt ID-ul și calea dispozitivului de nivel scăzut. +Următoarele două coloane sunt ID-ul și calea dispozitivului de nivel înalt. +Ultima coloană este numele discului din matrice. +

În majoritatea cazurilor, aveți un dispozitiv de nivel scăzut pentru fiecare disc din +matrice, dar în unele configurații mai complexe, puteți avea mai multe +dispozitive de nivel scăzut utilizate de un singur disc din matrice. +

Nimic nu este modificat. +

+
+

+touch +

+

Setează o marcă temporală arbitrară sub-secundă pentru toate fișierele +care o au setată la zero. +

Acest lucru îmbunătățește capacitatea SnapRAID de a recunoaște fișierele mutate +și copiate, deoarece face ca marca temporală să fie aproape unică, +reducând posibilele duplicate. +

Mai exact, dacă marca temporală sub-secundă nu este zero, +un fișier mutat sau copiat este identificat ca atare dacă se potrivește +cu numele, dimensiunea și marca temporală. Dacă marca temporală sub-secundă +este zero, este considerat o copie doar dacă calea completă, +dimensiunea și marca temporală se potrivesc toate. +

Marca temporală cu precizie de secundă nu este modificată, +deci toate datele și orele fișierelor dvs. vor fi păstrate. +

+
+

+rehash +

+

Programează o rehash-uire a întregii matrici. +

Această comandă schimbă tipul de hash utilizat, de obicei la actualizarea +de la un sistem pe 32 de biți la unul pe 64 de biți, pentru a trece de la +MurmurHash3 la SpookyHash, care este mai rapid. +

Dacă utilizați deja hash-ul optim, această comandă +nu face nimic și vă informează că nu este necesară nicio acțiune. +

Rehash-ul nu este efectuat imediat, ci are loc +progresiv în timpul sync și scrub. +

Puteți verifica starea rehash-ului utilizând status. +

În timpul rehash-ului, SnapRAID își menține funcționalitatea completă, +cu singura excepție că dup nu poate detecta fișierele duplicate +folosind un hash diferit. +

+
+

+locate +

+

Localizează fișierele stocate pe discurile de paritate. Pentru fiecare fișier +potrivit, afișează locația acestuia în fișierul de paritate și numărul de +fragmente pe care le ocupă. +

Puteți utiliza opțiunea -t, --tail pentru a restricționa operațiunea la fișierele +care ocupă porțiunea finală specificată a parității. +Dacă doriți să realocați aceste fișiere, puteți utiliza apoi opțiunea +-W, --force-realloc-tail. +

Rețineți că astfel de fișiere nu vor fi protejate de paritate în timpul procesului +de realocare. +

+
+
+

+Opțiuni +

+

SnapRAID oferă următoarele opțiuni: +

+
+
+-c, --conf CONFIG +
+Selectează fișierul de configurare de utilizat. Dacă nu este specificat, în Unix +utilizează fișierul /usr/local/etc/snapraid.conf dacă există, +altfel /etc/snapraid.conf. +În Windows, utilizează fișierul snapraid.conf din același +director ca snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtrează fișierele de procesat în check și fix. +Sunt procesate doar fișierele care se potrivesc cu modelul specificat. +Această opțiune poate fi utilizată de mai multe ori. +Vedeți secțiunea PATTERN pentru mai multe detalii despre +specificațiile modelului. +În Unix, asigurați-vă că caracterele globbing sunt citate dacă sunt utilizate. +Această opțiune poate fi utilizată doar cu check și fix. +Nu poate fi utilizată cu sync și scrub, deoarece acestea +procesează întotdeauna întreaga matrice. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtrează discurile de procesat în check, fix, up și down. +Trebuie să specificați un nume de disc așa cum este definit în fișierul de configurare. +Puteți specifica și discurile de paritate cu numele: parity, 2-parity, +3-parity, etc., pentru a limita operațiunile la un anumit disc de paritate. +Dacă combinați mai multe opțiuni --filter, --filter-disk și --filter-missing, +sunt selectate doar fișierele care se potrivesc cu toate filtrele. +Această opțiune poate fi utilizată de mai multe ori. +Această opțiune poate fi utilizată doar cu check, fix, up și down. +Nu poate fi utilizată cu sync și scrub, deoarece acestea +procesează întotdeauna întreaga matrice. +
+
+
+
+
+
+-m, --filter-missing +
+Filtrează fișierele de procesat în check și fix. +Sunt procesate doar fișierele lipsă sau șterse din matrice. +Când este utilizată cu fix, aceasta acționează ca o comandă de undelete (anulare ștergere). +Dacă combinați mai multe opțiuni --filter, --filter-disk și --filter-missing, +sunt selectate doar fișierele care se potrivesc cu toate filtrele. +Această opțiune poate fi utilizată doar cu check și fix. +Nu poate fi utilizată cu sync și scrub, deoarece acestea +procesează întotdeauna întreaga matrice. +
+
+
+
+
+
+-e, --filter-error +
+Procesează fișierele cu erori în check și fix. +Procesează doar fișierele care au blocuri marcate cu erori silențioase +sau de intrare/ieșire în timpul sync și scrub, așa cum sunt listate în status. +Această opțiune poate fi utilizată doar cu check și fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Selectează planul de verificare (scrub). Dacă PERC este o valoare numerică de la 0 la 100, +este interpretată ca procentul de blocuri de verificat. +În loc de un procent, puteți specifica un plan: +bad verifică blocurile defecte, new verifică blocurile care nu au fost încă verificate, +iar full verifică totul. +Această opțiune poate fi utilizată doar cu scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Selectează cea mai veche parte a matricei de procesat în scrub. +DAYS este vârsta minimă în zile pentru ca un bloc să fie verificat; +valoarea implicită este 10. +Blocurile marcate ca defecte sunt întotdeauna verificate, indiferent de această opțiune. +Această opțiune poate fi utilizată doar cu scrub. +
+
+
+
+
+
+-a, --audit-only +
+În check, verifică hash-ul fișierelor fără +a verifica datele de paritate. +Dacă sunteți interesați doar de verificarea datelor fișierului, această +opțiune poate accelera semnificativ procesul de verificare. +Această opțiune poate fi utilizată doar cu check. +
+
+
+
+
+
+-h, --pre-hash +
+În sync, rulează o fază preliminară de hashing a tuturor datelor noi +pentru o verificare suplimentară înainte de calculul parității. +De obicei, în sync, nu se face hashing preliminar, iar datele noi +sunt hash-uite chiar înainte de calculul parității, atunci când sunt citite +pentru prima dată. +Acest proces are loc atunci când sistemul este sub +încărcare mare, cu toate discurile rotindu-se și un CPU ocupat. +Aceasta este o condiție extremă pentru mașină și, dacă are o +problemă hardware latentă, erorile silențioase pot trece nedetectate +deoarece datele nu sunt încă hash-uite. +Pentru a evita acest risc, puteți activa modul pre-hash pentru a avea +toate datele citite de două ori pentru a le asigura integritatea. +Această opțiune verifică și fișierele mutate în cadrul matricei +pentru a se asigura că operațiunea de mutare a fost reușită și, dacă este necesar, +vă permite să rulați o operațiune de reparare (fix) înainte de a continua. +Această opțiune poate fi utilizată doar cu sync. +
+
+
+
+
+
+-i, --import DIR +
+Importă din directorul specificat orice fișiere șterse +din matrice după ultima sync. +Dacă mai aveți astfel de fișiere, ele pot fi utilizate de check +și fix pentru a îmbunătăți procesul de recuperare. +Fișierele sunt citite, inclusiv în subdirectoare, și sunt +identificate indiferent de numele lor. +Această opțiune poate fi utilizată doar cu check și fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+La orice eroare, oprește (spin down) toate discurile gestionate înainte de a ieși cu +un cod de stare diferit de zero. Acest lucru împiedică unitățile să +rămână active și să se rotească după o operațiune întreruptă, +ajutând la evitarea acumulării inutile de căldură și a consumului de energie. +Utilizați această opțiune pentru a vă asigura că discurile sunt oprite în siguranță +chiar și atunci când o comandă eșuează. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Aplică o limită globală de lățime de bandă pentru toate discurile. RATE este +numărul de octeți pe secundă. Puteți specifica un multiplicator +cum ar fi K, M sau G (de exemplu, --bw-limit 1G). +
+
+
+
+
+
+-t, --tail DIMENSIUNE +
+Limitează listarea fișierelor la cele care nu utilizează mai mult de +dimensiunea finală specificată a discurilor de paritate. +Puteți utiliza multiplicatori precum K, M, G sau T (ex. --tail 1G). +Această opțiune este valabilă numai atunci când este utilizată împreună +cu comanda locate. +
+
+
+
+
+
+-A, --stats +
+Activează o vizualizare de stare extinsă care arată informații suplimentare. +Ecranul afișează două grafice: +Primul grafic arată numărul de dungi (stripes) tamponate pentru fiecare +disc, împreună cu calea fișierului care este +accesat în prezent pe acel disc. În mod obișnuit, cel mai lent disc nu va avea +tampon disponibil, ceea ce determină lățimea de bandă maximă realizabilă. +Al doilea grafic arată procentul de timp petrecut așteptând +în ultimele 100 de secunde. Este de așteptat ca cel mai lent disc să +cauzeze cea mai mare parte a timpului de așteptare, în timp ce alte discuri ar trebui să aibă +puțin sau deloc timp de așteptare, deoarece își pot utiliza dungile tamponate. +Acest grafic arată și timpul petrecut așteptând calculele hash +și calculele RAID. +Toate calculele rulează în paralel cu operațiunile de disc. +Prin urmare, atâta timp cât există timp de așteptare măsurabil pentru +cel puțin un disc, indică faptul că CPU-ul este suficient de rapid pentru a +ține pasul cu sarcina de lucru. +
+
+
+
+
+
+-Z, --force-zero +
+Forțează operațiunea nesigură de sincronizare a unui fișier cu dimensiunea zero +care era anterior non-zero. +Dacă SnapRAID detectează o astfel de condiție, se oprește din a continua +dacă nu specificați această opțiune. +Acest lucru vă permite să detectați cu ușurință când, după o cădere de sistem, +unele fișiere accesate au fost trunchiate. +Aceasta este o condiție posibilă în Linux cu sistemele de fișiere ext3/ext4. +Această opțiune poate fi utilizată doar cu sync. +
+
+
+
+
+
+-E, --force-empty +
+Forțează operațiunea nesigură de sincronizare a unui disc cu toate +fișierele originale lipsă. +Dacă SnapRAID detectează că toate fișierele prezente inițial +pe disc lipsesc sau au fost rescrise, se oprește din a continua +dacă nu specificați această opțiune. +Acest lucru vă permite să detectați cu ușurință când un sistem de fișiere de date nu este +montat. +Este permis, totuși, să aveți o singură schimbare de UUID cu +paritate simplă și mai multe cu paritate multiplă, deoarece acesta este +cazul normal la înlocuirea discurilor după o recuperare. +Această opțiune poate fi utilizată doar cu sync, check sau +fix. +
+
+
+
+
+
+-U, --force-uuid +
+Forțează operațiunea nesigură de sincronizare, verificare și reparare +cu discuri care și-au schimbat UUID-ul. +Dacă SnapRAID detectează că unele discuri și-au schimbat UUID-ul, +se oprește din a continua dacă nu specificați această opțiune. +Acest lucru vă permite să detectați când discurile dvs. sunt montate la +punctele de montare greșite. +Este permis, totuși, să aveți o singură schimbare de UUID cu +paritate simplă și mai multe cu paritate multiplă, deoarece acesta este +cazul normal la înlocuirea discurilor după o recuperare. +Această opțiune poate fi utilizată doar cu sync, check sau +fix. +
+
+
+
+
+
+-D, --force-device +
+Forțează operațiunea nesigură de reparare cu discuri inaccesibile +sau cu discuri pe același dispozitiv fizic. +De exemplu, dacă ați pierdut două discuri de date și aveți un disc de rezervă pentru a recupera +doar primul, puteți ignora al doilea disc inaccesibil. +Sau, dacă doriți să recuperați un disc în spațiul liber rămas pe un +disc deja utilizat, partajând același dispozitiv fizic. +Această opțiune poate fi utilizată doar cu fix. +
+
+
+
+
+
+-N, --force-nocopy +
+În sync, check și fix, dezactivează euristica de detectare a copiei. +Fără această opțiune, SnapRAID presupune că fișierele cu aceleași +atribute, cum ar fi numele, dimensiunea și marca temporală, sunt copii cu +aceleași date. +Acest lucru permite identificarea fișierelor copiate sau mutate de pe un disc +pe altul și refolosirea informațiilor hash deja calculate +pentru a detecta erori silențioase sau pentru a recupera fișiere lipsă. +În unele cazuri rare, acest comportament poate duce la rezultate fals pozitive +sau la un proces lent din cauza multor verificări hash, iar această +opțiune vă permite să rezolvați astfel de probleme. +Această opțiune poate fi utilizată doar cu sync, check și fix. +
+
+
+
+
+
+-F, --force-full +
+În sync, forțează o recalculare completă a parității. +Această opțiune poate fi utilizată atunci când adăugați un nou nivel de paritate sau dacă +ați revenit la un fișier de conținut vechi utilizând date de paritate mai recente. +În loc să recreați paritatea de la zero, aceasta vă permite +să reutilizați hash-urile prezente în fișierul de conținut pentru a valida datele +și a menține protecția datelor în timpul procesului sync utilizând +datele de paritate existente. +Această opțiune poate fi utilizată doar cu sync. +
+
+
+
+
+
+-R, --force-realloc +
+În sync, forțează o realocare completă a fișierelor și o reconstruire a parității. +Această opțiune poate fi utilizată pentru a realoca complet toate fișierele, +eliminând fragmentarea, în timp ce reutilizați hash-urile prezente în fișierul de conținut +pentru a valida datele. +Această opțiune poate fi utilizată doar cu sync. +ATENȚIE! Această opțiune este doar pentru experți și este puternic +recomandat să nu o utilizați. +NU aveți protecție a datelor în timpul operațiunii sync. +
+
+
+
+
+
+-W, --force-realloc-tail DIMENSIUNE +
+Funcționează ca -R, --force-realloc, dar limitat la porțiunea finală +specificată (ultimii DIMENSIUNE octeți) ai fiecărui fișier de paritate. +Forțează realocarea (mutarea) oricăror fragmente/blocuri de fișiere stocate +în prezent în acea secțiune finală, permițându-le să fie plasate oriunde +în fișierul/fișierele de paritate unde este disponibil spațiu liber +(inclusiv golurile existente). +Scopul principal al acestei opțiuni este de a reduce dimensiunea pe disc +a fișierului de paritate. +Dacă realocarea eliberează cu succes întreaga secțiune finală +(nu mai rămân blocuri care să o utilizeze), fișierul de paritate este +trunchiat, recuperând spațiul final neutilizat. +Puteți utiliza multiplicatori precum K, M, G sau T (ex. +--force-realloc-tail 1G). +Puteți utiliza locate -t, --tail pentru a cunoaște în avans +fișierele afectate. +AVERTIZARE! +Această opțiune este doar pentru experți și se recomandă +insistent să nu fie utilizată. +NU beneficiați de protecție a datelor în timpul operațiunii sync +pentru fișierele afectate. +
+
+
+
+
+
+-l, --log FILE +
+Scrie un jurnal detaliat în fișierul specificat. +Dacă această opțiune nu este specificată, erorile neașteptate sunt tipărite +pe ecran, putând rezulta o ieșire excesivă în caz de +multe erori. Când -l, --log este specificat, doar +erorile fatale care fac SnapRAID să se oprească sunt tipărite +pe ecran. +Dacă calea începe cu >>, fișierul este deschis +în modul de adăugare. Aparițiile de %D și %T în nume sunt +înlocuite cu data și ora în formatul YYYYMMDD și +HHMMSS. În fișierele batch Windows, trebuie să dublați +caracterul %, de exemplu, result-%%D.log. Pentru a utiliza >>, trebuie +să închideți numele între ghilimele, de exemplu, ">>result.log". +Pentru a scoate jurnalul la ieșirea standard sau la eroarea standard, +puteți utiliza ">&1" și ">&2", respectiv. +Vedeți fișierul snapraid_log.txt sau pagina de manual pentru descrieri ale etichetelor jurnalului. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Setează o nouă limită de erori înainte de a opri execuția. +În mod implicit, SnapRAID se oprește dacă întâlnește mai mult de 100 +de erori de intrare/ieșire, indicând că un disc probabil eșuează. +Această opțiune afectează sync și scrub, cărora li se permite +să continue după primul set de erori de disc pentru a încerca +să își finalizeze operațiunile. +Cu toate acestea, check și fix se opresc întotdeauna la prima eroare. +
+
+
+
+
+
+-S, --start BLKSTART +
+Începe procesarea de la numărul de bloc +specificat. Acest lucru poate fi util pentru a reîncerca verificarea +sau repararea anumitor blocuri în cazul unui disc deteriorat. +Această opțiune este în principal pentru recuperarea manuală avansată. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Procesează doar numărul specificat de blocuri. +Această opțiune este în principal pentru recuperarea manuală avansată. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Generează un fișier de configurare fictiv dintr-un fișier +de conținut existent. +Fișierul de configurare este scris la ieșirea standard +și nu suprascrie unul existent. +Acest fișier de configurare conține și informațiile +necesare pentru a reconstrui punctele de montare a discului în cazul în care +pierdeți întregul sistem. +
+
+
+
+
+
+-v, --verbose +
+Tipărește mai multe informații pe ecran. +Dacă este specificat o dată, tipărește fișierele excluse +și statistici suplimentare. +Această opțiune nu are niciun efect asupra fișierelor jurnal. +
+
+
+
+
+
+-q, --quiet +
+Tipărește mai puține informații pe ecran. +Dacă este specificat o dată, elimină bara de progres; de două ori, +operațiunile în curs; de trei ori, mesajele info +; de patru ori, mesajele de stare. +Erorile fatale sunt întotdeauna tipărite pe ecran. +Această opțiune nu are niciun efect asupra fișierelor jurnal. +
+
+
+
+
+
+-H, --help +
+Tipărește un ecran de ajutor scurt. +
+
+
+
+
+
+-V, --version +
+Tipărește versiunea programului. +
+
+
+
+
+

+Configurare +

+

SnapRAID necesită un fișier de configurare pentru a ști unde se află matricea dvs. de discuri +și unde să stocheze informațiile de paritate. +

În Unix, utilizează fișierul /usr/local/etc/snapraid.conf dacă există, +altfel /etc/snapraid.conf. +În Windows, utilizează fișierul snapraid.conf din același +director ca snapraid.exe. +

Trebuie să conțină următoarele opțiuni (sensibile la majuscule/minuscule): +

+

+parity FILE [,FILE] ... +

+

Definește fișierele de utilizat pentru a stoca informațiile de paritate. +Paritatea permite protecția împotriva unei singure defecțiuni de disc, +similar cu RAID5. +

Puteți specifica mai multe fișiere, care trebuie să fie pe discuri diferite. +Când un fișier nu mai poate crește, este utilizat următorul. +Spațiul total disponibil trebuie să fie cel puțin la fel de mare ca cel mai mare disc de date din +matrice. +

Puteți adăuga fișiere de paritate suplimentare mai târziu, dar nu +le puteți reordona sau elimina. +

Păstrarea discurilor de paritate rezervate pentru paritate asigură că +nu devin fragmentate, îmbunătățind performanța. +

În Windows, 256 MB sunt lăsați neutilizați pe fiecare disc pentru a evita +avertismentul despre discuri pline. +

Această opțiune este obligatorie și poate fi utilizată o singură dată. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Definește fișierele de utilizat pentru a stoca informații de paritate suplimentare. +

Pentru fiecare nivel de paritate specificat, este activat un nivel suplimentar de protecție: +

    +
  • +2-parity activează paritatea dublă RAID6. +
  • +
  • +3-parity activează paritatea triplă. +
  • +
  • +4-parity activează paritatea quad (patru). +
  • +
  • +5-parity activează paritatea penta (cinci). +
  • +
  • +6-parity activează paritatea hexa (șase). +
  • +
+

Fiecare nivel de paritate necesită prezența tuturor nivelurilor de paritate +anterioare. +

Aceleași considerații ca pentru opțiunea parity se aplică. +

Aceste opțiuni sunt opționale și pot fi utilizate o singură dată. +

+
+

+z-parity FILE [,FILE] ... +

+

Definește un fișier și un format alternativ pentru a stoca paritatea triplă. +

Această opțiune este o alternativă la 3-parity, destinată în primul rând +CPU-urilor low-end precum ARM sau AMD Phenom, Athlon și Opteron care nu +suportă setul de instrucțiuni SSSE3. În astfel de cazuri, oferă +o performanță mai bună. +

Acest format este similar, dar mai rapid decât cel utilizat de ZFS RAIDZ3. +Ca și ZFS, nu funcționează dincolo de paritatea triplă. +

Când utilizați 3-parity, veți fi avertizați dacă este recomandat să utilizați +formatul z-parity pentru îmbunătățirea performanței. +

Este posibil să convertiți de la un format la altul ajustând +fișierul de configurare cu fișierul z-parity sau 3-parity dorit +și utilizând fix pentru a-l recrea. +

+
+

+content FILE +

+

Definește fișierul de utilizat pentru a stoca lista și sumele de control (checksums) a tuturor +fișierelor prezente în matricea dvs. de discuri. +

Poate fi plasat pe un disc utilizat pentru date, paritate sau +orice alt disc disponibil. +Dacă utilizați un disc de date, acest fișier este automat exclus +din procesul sync. +

Această opțiune este obligatorie și poate fi utilizată de mai multe ori pentru a salva +mai multe copii ale aceluiași fișier. +

Trebuie să stocați cel puțin o copie pentru fiecare disc de paritate utilizat +plus unul. Utilizarea de copii suplimentare nu dăunează. +

+
+

+data NAME DIR +

+

Definește numele și punctul de montare al discurilor de date din +matrice. NAME este utilizat pentru a identifica discul și trebuie +să fie unic. DIR este punctul de montare al discului în +sistemul de fișiere. +

Puteți schimba punctul de montare după cum este necesar, atâta timp cât +păstrați NAME fix. +

Ar trebui să utilizați o opțiune pentru fiecare disc de date din matrice. +

Puteți redenumi un disc mai târziu schimbând NAME direct +în fișierul de configurare și apoi rulând o comandă sync. +În cazul redenumirii, asocierea se face utilizând UUID-ul stocat +al discurilor. +

+
+

+extra NAME DIR +

+

Definește numele și punctul de montare al discurilor suplimentare +care vor fi monitorizate cu comenzile smart și probe. +

Acest lucru este util pentru monitorizarea discurilor care nu fac +parte din matrice, dar sunt necesare pentru funcționarea +sistemului, cum ar fi discul de pornire. +

Rețineți că astfel de discuri nu sunt afectate de comenzile up și +down deoarece se așteaptă ca acestea să se rotească mereu. +

+
+

+nohidden +

+

Exclude toate fișierele și directoarele ascunse. +În Unix, fișierele ascunse sunt cele care încep cu .. +În Windows, sunt cele cu atributul ascuns. +

+
+

+exclude/include PATTERN +

+

Definește modelele de fișiere sau directoare de exclus sau inclus +în procesul de sincronizare. +Toate modelele sunt procesate în ordinea specificată. +

Dacă primul model care se potrivește este un exclude, fișierul +este exclus. Dacă este un include, fișierul este inclus. +Dacă niciun model nu se potrivește, fișierul este exclus dacă ultimul model +specificat este un include, sau inclus dacă ultimul model +specificat este un exclude. +

Vedeți secțiunea PATTERN pentru mai multe detalii despre +specificațiile modelului. +

Această opțiune poate fi utilizată de mai multe ori. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Definește dimensiunea de bază a blocului în kibibytes pentru paritate. +Un kibibyte este 1024 de octeți. +

Dimensiunea implicită a blocului este 256, care ar trebui să funcționeze pentru majoritatea cazurilor. +

ATENȚIE! Această opțiune este doar pentru experți și este puternic +recomandat să nu schimbați această valoare. Pentru a schimba această valoare în +viitor, va trebui să recreați întreaga paritate! +

Un motiv pentru a utiliza o dimensiune de bloc diferită este dacă aveți multe fișiere +mici, de ordinul milioanelor. +

Pentru fiecare fișier, chiar dacă are doar câțiva octeți, este alocat un bloc întreg de paritate, +iar cu multe fișiere, acest lucru poate duce la un spațiu de paritate neutilizat semnificativ. +Când umpleți complet discul de paritate, nu vi se +permite să adăugați mai multe fișiere pe discurile de date. +Cu toate acestea, paritatea irosită nu se acumulează pe discurile de date. Spațiul irosit +rezultat dintr-un număr mare de fișiere pe un disc de date limitează doar +cantitatea de date de pe acel disc de date, nu pe celelalte. +

Ca o aproximare, puteți presupune că jumătate din dimensiunea blocului este +irosită pentru fiecare fișier. De exemplu, cu 100.000 de fișiere și o dimensiune de bloc +de 256 KiB, veți irosi 12,8 GB de paritate, ceea ce poate duce +la 12,8 GB mai puțin spațiu disponibil pe discul de date. +

Puteți verifica cantitatea de spațiu irosit pe fiecare disc utilizând status. +Aceasta este cantitatea de spațiu pe care trebuie să o lăsați liberă pe discurile de date +sau să o utilizați pentru fișiere care nu sunt incluse în matrice. +Dacă această valoare este negativă, înseamnă că sunteți aproape de a umple +paritatea și reprezintă spațiul pe care îl puteți irosi încă. +

Pentru a evita această problemă, puteți utiliza o partiție mai mare pentru paritate. +De exemplu, dacă partiția de paritate este cu 12,8 GB mai mare decât discurile de date, +aveți suficient spațiu suplimentar pentru a gestiona până la 100.000 +de fișiere pe fiecare disc de date fără niciun spațiu irosit. +

Un truc pentru a obține o partiție de paritate mai mare în Linux este să o formatați +cu comanda: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Acest lucru duce la aproximativ 1,5% spațiu suplimentar, aproximativ 60 GB pentru +un disc de 4 TB, ceea ce permite aproximativ 460.000 de fișiere pe fiecare disc de date fără +niciun spațiu irosit. +

+
+

+hashsize SIZE_IN_BYTES +

+

Definește dimensiunea hash-ului în octeți pentru blocurile salvate. +

Dimensiunea implicită a hash-ului este de 16 octeți (128 de biți), care ar trebui să funcționeze +pentru majoritatea cazurilor. +

ATENȚIE! Această opțiune este doar pentru experți și este puternic +recomandat să nu schimbați această valoare. Pentru a schimba această valoare în +viitor, va trebui să recreați întreaga paritate! +

Un motiv pentru a utiliza o dimensiune de hash diferită este dacă sistemul dvs. are +memorie limitată. Ca regulă generală, SnapRAID necesită de obicei +1 GiB de RAM pentru fiecare 16 TB de date din matrice. +

Mai exact, pentru a stoca hash-urile datelor, SnapRAID necesită +aproximativ TS*(1+HS)/BS octeți de RAM, +unde TS este dimensiunea totală în octeți a matricei dvs. de discuri, BS este +dimensiunea blocului în octeți, iar HS este dimensiunea hash-ului în octeți. +

De exemplu, cu 8 discuri de 4 TB, o dimensiune de bloc de 256 KiB +(1 KiB = 1024 octeți) și o dimensiune de hash de 16, obțineți: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1,93 GiB
+
+

Trecând la o dimensiune de hash de 8, obțineți: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1,02 GiB
+
+

Trecând la o dimensiune de bloc de 512, obțineți: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0,96 GiB
+
+

Trecând la ambele, o dimensiune de hash de 8 și o dimensiune de bloc de 512, obțineți: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Salvează automat starea la sincronizare sau verificare după +cantitatea specificată de GB procesați. +Această opțiune este utilă pentru a evita repornirea comenzilor sync lungi +de la zero dacă sunt întrerupte de o cădere a mașinii sau de orice alt eveniment. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Setează temperatura maximă permisă a discului în Celsius. Când este specificată, +SnapRAID verifică periodic temperatura tuturor discurilor utilizând +instrumentul smartctl. Temperaturile curente ale discurilor sunt afișate în timp ce +SnapRAID funcționează. Dacă un disc depășește această limită, toate operațiunile +se opresc, iar discurile sunt oprite (puse în standby) pentru durata +definită de opțiunea temp_sleep. După perioada de așteptare, operațiunile +reiau, putând întrerupe din nou dacă limita de temperatură este atinsă +încă o dată. +

În timpul funcționării, SnapRAID analizează și curba de încălzire a fiecărui +disc și estimează temperatura constantă pe termen lung pe care se așteaptă să o +atingă dacă activitatea continuă. Estimarea este efectuată numai după +ce temperatura discului a crescut de patru ori, asigurându-se că sunt disponibile +suficiente puncte de date pentru a stabili o tendință fiabilă. +Această temperatură constantă prezisă este afișată între paranteze lângă +valoarea curentă și ajută la evaluarea dacă răcirea sistemului este +adecvată. Această temperatură estimată este doar în scop informativ +și nu are niciun efect asupra comportamentului SnapRAID. Acțiunile programului +se bazează exclusiv pe temperaturile reale măsurate ale discurilor. +

Pentru a efectua această analiză, SnapRAID are nevoie de o referință pentru +temperatura sistemului. Încearcă mai întâi să o citească de la senzorii hardware +disponibili. Dacă nu poate fi accesat niciun senzor de sistem, utilizează +cea mai scăzută temperatură a discului măsurată la începutul rulării ca referință de rezervă. +

În mod normal, SnapRAID arată doar temperatura celui mai fierbinte disc. +Pentru a afișa temperatura tuturor discurilor, utilizați opțiunea -A sau --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Setează timpul de așteptare (standby), în minute, când limita de temperatură este +atinsă. În această perioadă, discurile rămân oprite. Valoarea implicită +este 5 minute. +

+
+

+pool DIR +

+

Definește directorul de pooling unde este creată vizualizarea virtuală a matricei +de discuri utilizând comanda pool. +

Directorul trebuie să existe deja. +

+
+

+share UNC_DIR +

+

Definește calea UNC Windows necesară pentru a accesa discurile de la distanță. +

Dacă această opțiune este specificată, link-urile simbolice create în directorul pool +utilizează această cale UNC pentru a accesa discurile. +Fără această opțiune, link-urile simbolice generate utilizează doar căi locale, +ceea ce nu permite partajarea directorului pool peste rețea. +

Link-urile simbolice sunt formate utilizând calea UNC specificată, adăugând +numele discului specificat în opțiunea data și, în final, adăugând +directorul și numele fișierului. +

Această opțiune este necesară doar pentru Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Definește opțiuni smartctl personalizate pentru a obține atributele SMART pentru +fiecare disc. Acest lucru poate fi necesar pentru controlerele RAID și unele discuri USB +care nu pot fi detectate automat. Substituția %s este înlocuită de +numele dispozitivului, dar este opțională pentru dispozitivele fixe, cum ar fi controlerele RAID. +

DISK este același nume de disc specificat în opțiunea data. +PARITY este unul dintre numele de paritate: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity sau z-parity. +

În OPȚIUNILE specificate, șirul %s este înlocuit de +numele dispozitivului. Pentru controlerele RAID, dispozitivul este +probabil fix și este posibil să nu fie nevoie să utilizați %s. +

Consultați documentația smartmontools pentru opțiuni posibile: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

De exemplu: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignoră atributul SMART specificat la calcularea probabilității +de eșec a discului. Această opțiune este utilă dacă un disc raportează valori neobișnuite sau +înșelătoare pentru un anumit atribut. +

DISK este același nume de disc specificat în opțiunea data. +PARITY este unul dintre numele de paritate: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity sau z-parity. +Valoarea specială * poate fi utilizată pentru a ignora atributul pe toate discurile. +

De exemplu, pentru a ignora atributul Current Pending Sector Count pe +toate discurile: +

+smartignore * 197
+
+

Pentru a-l ignora doar pe primul disc de paritate: +

+smartignore parity 197
+
+
+
+

+Exemple +

+

Un exemplu de configurare tipică pentru Unix este: +

+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
+
+

Un exemplu de configurare tipică pentru Windows este: +

+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
+
+
+
+
+

+Model (Pattern) +

+

Modelele oferă o modalitate flexibilă de a filtra fișierele pentru includere sau +excludere. Folosind caractere de tip globbing, puteți defini reguli care să +se potrivească cu nume de fișiere specifice sau cu structuri întregi de directoare fără +a lista manual fiecare cale. +

Semnul întrebării ? se potrivește cu orice caracter unic, cu excepția +separatorului de directoare. Acest lucru îl face util pentru potrivirea numelor de fișiere cu +caractere variabile, păstrând în același timp modelul limitat la un singur nivel de director. +

Asteriscul simplu * se potrivește cu orice secvență de caractere, dar, la fel ca +semnul întrebării, nu trece niciodată de limitele directoarelor. Se oprește la +slash-ul înainte, ceea ce îl face potrivit pentru potrivirea în cadrul unei singure +componente a căii. Acesta este comportamentul standard al metacaracterelor, familiar +din shell globbing. +

Asteriscul dublu ** este mai puternic, se potrivește cu orice secvență de +caractere, inclusiv separatori de directoare. Acest lucru permite modelelor să se potrivească +pe mai multe niveluri de directoare. Când ** apare inserat direct într-un +model, se poate potrivi cu zero sau mai multe caractere, inclusiv slash-uri între +textul literal înconjurător. +

Cea mai importantă utilizare a lui ** este în forma specială /**/. Aceasta se potrivește cu +zero sau mai multe niveluri complete de directoare, făcând posibilă potrivirea fișierelor +la orice adâncime într-un arbore de directoare fără a cunoaște structura exactă a căii. +De exemplu, modelul src/**/main.js se potrivește cu src/main.js (sărind +peste zero directoare), src/ui/main.js (sărind peste un director) și +src/ui/components/main.js (sărind peste două directoare). +

Clasele de caractere care utilizează paranteze pătrate [] se potrivesc cu un singur caracter dintr-un +set sau interval specificat. La fel ca și celelalte modele de un singur caracter, acestea +nu se potrivesc cu separatorii de directoare. Clasele suportă intervale și negarea folosind +un semn de exclamare. +

Distincția fundamentală de reținut este că *, ? și clasele de caractere +respectă toate limitele directoarelor și se potrivesc doar în cadrul unei singure +componente a căii, în timp ce ** este singurul model care se poate potrivi peste +separatorii de directoare. +

Există patru tipuri diferite de modele: +

+
+
+FILE +
+Selectează orice fișier cu numele FILE. +Acest model se aplică numai fișierelor, nu și directoarelor. +
+
+
+
+
+
+DIR/ +
+Selectează orice director cu numele DIR și tot ce se află în interior. +Acest model se aplică numai directoarelor, nu și fișierelor. +
+
+
+
+
+
+/PATH/FILE +
+Selectează calea exactă a fișierului specificat. Acest model se aplică +numai fișierelor, nu și directoarelor. +
+
+
+
+
+
+/PATH/DIR/ +
+Selectează calea exactă a directorului specificat și tot ce se află +în interior. Acest model se aplică numai directoarelor, nu și fișierelor. +
+
+
+

Când specificați o cale absolută care începe cu /, aceasta este aplicată la +directorul rădăcină al matricei, nu la directorul rădăcină al sistemului de fișiere local. +

În Windows, puteți utiliza backslash-ul \ în loc de slash-ul /. +Directoarele de sistem Windows, joncțiunile, punctele de montare și alte directoare +speciale Windows sunt tratate ca fișiere, ceea ce înseamnă că pentru a le exclude, +trebuie să utilizați o regulă de fișier, nu una de director. +

Dacă numele fișierului conține un caracter *, ?, [, +sau ], trebuie să îl escape-ați pentru a evita să fie interpretat ca un +caracter de globbing. În Unix, caracterul escape este \; în Windows, este ^. +Când modelul este pe linia de comandă, trebuie să dublați caracterul escape +pentru a evita ca acesta să fie interpretat de shell-ul de comandă. +

În fișierul de configurare, puteți utiliza diferite strategii pentru a filtra +fișierele de procesat. +Abordarea cea mai simplă este să utilizați doar reguli exclude pentru a elimina toate +fișierele și directoarele pe care nu doriți să le procesați. De exemplu: +

+# Exclude orice fișier numit *.unrecoverable
+exclude *.unrecoverable
+# Exclude directorul rădăcină /lost+found
+exclude /lost+found/
+# Exclude orice subdirector numit tmp
+exclude tmp/
+
+

Abordarea opusă este să definiți doar fișierele pe care doriți să le procesați, utilizând +doar reguli include. De exemplu: +

+# Include doar unele directoare
+include /movies/
+include /musics/
+include /pictures/
+
+

Abordarea finală este de a amesteca regulile exclude și include. În acest caz, +ordinea regulilor este importantă. Regulile anterioare au +precedență față de cele ulterioare. +Pentru a simplifica, puteți lista toate regulile exclude mai întâi și apoi +toate regulile include. De exemplu: +

+# Exclude orice fișier numit *.unrecoverable
+exclude *.unrecoverable
+# Exclude orice subdirector numit tmp
+exclude tmp/
+# Include doar unele directoare
+include /movies/
+include /musics/
+include /pictures/
+
+

Pe linia de comandă, utilizând opțiunea -f, puteți utiliza doar modele include. +De exemplu: +

+# Verifică doar fișierele .mp3.
+# În Unix, utilizați ghilimele pentru a evita expansiunea globbing de către shell.
+snapraid -f "*.mp3" check
+
+

În Unix, când utilizați caractere globbing pe linia de comandă, trebuie +să le citați pentru a împiedica shell-ul să le extindă. +

+
+

+Fișiere de Ignorat (Ignore File) +

+

Pe lângă regulile globale din fișierul de configurare, puteți plasa fișiere +.snapraidignore în orice director din array pentru a defini reguli de excludere +descentralizate. +

Regulile definite în .snapraidignore sunt aplicate după regulile din fișierul +de configurare. Acest lucru înseamnă că au o prioritate mai mare și pot fi +utilizate pentru a exclude fișiere care au fost incluse anterior de configurația +globală. Efectiv, dacă o regulă locală se potrivește, fișierul este exclus +indiferent de setările globale de includere. +

Logica modelelor în .snapraidignore oglindește configurația globală, dar +ancorează modelele de directorul în care se află fișierul: +

+
+
+FILE +
+Selectează orice fișier numit FILE în acest director sau mai jos. +Acesta urmează aceleași reguli de globbing ca modelul global. +
+
+
+
+
+
+DIR/ +
+Selectează orice director numit DIR și tot ce se află în interior, +aflat în acest director sau mai jos. +
+
+
+
+
+
+/PATH/FILE +
+Selectează fișierul exact specificat raportat la locația +fișierului .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Selectează directorul exact specificat și tot ce se află în interior, +raportat la locația fișierului .snapraidignore. +
+
+
+

Spre deosebire de configurația globală, fișierele .snapraidignore suportă +doar reguli de excludere; nu puteți utiliza modele de include sau negația (!). +

De exemplu, dacă aveți un .snapraidignore în /mnt/disk1/projects/: +

+# Exclude DOAR /mnt/disk1/projects/output.bin
+/output.bin
+# Exclude orice director numit build în interiorul projects/
+build/
+# Exclude orice fișier .tmp în interiorul projects/ sau subfolderele sale
+*.tmp
+
+
+
+

+Conținut (Content) +

+

SnapRAID stochează lista și sumele de control (checksums) ale fișierelor dvs. în fișierul de conținut. +

Este un fișier binar care listează toate fișierele prezente în matricea dvs. de discuri, +împreună cu toate sumele de control pentru a le verifica integritatea. +

Acest fișier este citit și scris de comenzile sync și scrub și +citit de comenzile fix, check și status. +

+
+

+Paritate (Parity) +

+

SnapRAID stochează informațiile de paritate ale matricei dvs. în fișierele de paritate. +

Acestea sunt fișiere binare care conțin paritatea calculată a tuturor +blocurilor definite în fișierul de content. +

Aceste fișiere sunt citite și scrise de comenzile sync și fix și +doar citite de comenzile scrub și check. +

+
+

+Codare (Encoding) +

+

SnapRAID în Unix ignoră orice codare. Citește și stochează +numele fișierelor cu aceeași codare utilizată de sistemul de fișiere. +

În Windows, toate numele citite din sistemul de fișiere sunt convertite și +procesate în format UTF-8. +

Pentru a avea numele fișierelor tipărite corect, trebuie să setați consola Windows +în modul UTF-8 cu comanda chcp 65001 și să utilizați +un font TrueType precum Lucida Console ca font al consolei. +Acest lucru afectează doar numele de fișiere tipărite; dacă +redirecționați ieșirea consolei către un fișier, fișierul rezultat este întotdeauna +în format UTF-8. +

+
+

+Drept de Autor (Copyright) +

+

Acest fișier este Copyright (C) 2025 Andrea Mazzoleni +

+
+

+Vezi și (See Also) +

+

snapraid_log(1), snapraidd(1) +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-ru.html b/beta/manual-ru.html new file mode 100644 index 00000000..da057bb8 --- /dev/null +++ b/beta/manual-ru.html @@ -0,0 +1,2068 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID — это программа резервного копирования, разработанная для дисковых массивов, +хранящая информацию четности для восстановления данных в случае сбоя +до шести дисков. +

В первую очередь предназначенная для домашних медиацентров с большими, +редко меняющимися файлами, SnapRAID предлагает несколько функций: +

    +
  • +Вы можете использовать диски, уже заполненные файлами, без +необходимости их переформатирования, получая к ним доступ как обычно. +
  • +
  • +Все ваши данные хэшируются для обеспечения целостности данных и +предотвращения скрытого повреждения. +
  • +
  • +Когда число отказавших дисков превышает количество дисков четности, +потеря данных ограничивается затронутыми дисками; данные на +других дисках остаются доступными. +
  • +
  • +Если вы случайно удалите файлы на диске, возможно их восстановление. +
  • +
  • +Диски могут иметь разные размеры. +
  • +
  • +Вы можете добавлять диски в любое время. +
  • +
  • +SnapRAID не блокирует ваши данные; вы можете прекратить его использование +в любое время без переформатирования или перемещения данных. +
  • +
  • +Для доступа к файлу должен раскручиваться только один диск, что экономит +энергию и снижает шум. +
  • +
+

Для получения дополнительной информации, пожалуйста, посетите официальный сайт SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID — это гибрид программы RAID и программы резервного копирования, +стремящийся объединить лучшие преимущества обеих. Однако у него есть +некоторые ограничения, которые следует учитывать перед использованием. +

Основное ограничение заключается в том, что если диск выходит из строя, а вы +недавно не выполняли синхронизацию, вы можете не восстановить данные полностью. +В частности, вы можете не восстановить данные в объеме, равном размеру +измененных или удаленных файлов с момента последней операции синхронизации. +Это происходит, даже если измененные или удаленные файлы не находятся +на отказавшем диске. Вот почему SnapRAID лучше подходит для +данных, которые редко меняются. +

С другой стороны, недавно добавленные файлы не препятствуют восстановлению уже +существующих файлов. Вы потеряете только недавно добавленные файлы, +если они находятся на отказавшем диске. +

Другие ограничения SnapRAID: +

    +
  • +Со SnapRAID у вас все еще отдельные файловые системы для каждого диска. +С RAID вы получаете единую большую файловую систему. +
  • +
  • +SnapRAID не выполняет чередование данных. +С RAID вы получаете прирост скорости благодаря чередованию. +
  • +
  • +SnapRAID не поддерживает восстановление в реальном времени. +С RAID вам не нужно прекращать работу при сбое диска. +
  • +
  • +SnapRAID может восстановить данные только при ограниченном числе сбоев дисков. +С резервным копированием вы можете восстановиться после полного +сбоя всего дискового массива. +
  • +
  • +Сохраняются только имена файлов, метки времени, символические ссылки и жесткие ссылки. +Разрешения, права владения и расширенные атрибуты не сохраняются. +
  • +
+
+
+

+Getting Started +

+

Чтобы использовать SnapRAID, вам нужно сначала выбрать один диск в вашем дисковом массиве +для выделения под информацию четности (parity). С одним диском для четности, вы +сможете восстановиться после одного сбоя диска, подобно RAID5. +

Если вы хотите восстановиться после большего числа сбоев дисков, подобно RAID6, +вы должны зарезервировать дополнительные диски для четности. Каждый дополнительный диск +четности позволяет восстановиться после еще одного сбоя диска. +

В качестве дисков четности вы должны выбирать самые большие диски в массиве, +так как информация четности может вырасти до размера самого большого +диска данных в массиве. +

Эти диски будут выделены для хранения файлов четности. +Вы не должны хранить на них свои данные. +

Затем вы должны определить диски данных, которые вы хотите защитить +с помощью SnapRAID. Защита более эффективна, если эти диски +содержат данные, которые редко меняются. По этой причине лучше +НЕ включать диск Windows C:\ или каталоги Unix /home, /var и /tmp. +

Список файлов сохраняется в файлах content, обычно +хранящихся на дисках данных, четности или загрузочных дисках. +Этот файл содержит детали вашего резервного копирования, включая все +контрольные суммы для проверки его целостности. +Файл content хранится в нескольких копиях, и каждая копия должна +находиться на отдельном диске, чтобы гарантировать, что даже в случае +множественных сбоев дисков, хотя бы одна копия будет доступна. +

Например, предположим, что вы заинтересованы только в одном уровне защиты четности, +и ваши диски расположены по адресам: +

+/mnt/diskp <- выбранный диск для четности
+/mnt/disk1 <- первый диск для защиты
+/mnt/disk2 <- второй диск для защиты
+/mnt/disk3 <- третий диск для защиты
+
+

Вы должны создать файл конфигурации /etc/snapraid.conf со +следующими опциями: +

+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/
+
+

Если вы используете Windows, вам следует использовать формат пути Windows, +с буквами дисков и обратными слешами вместо прямых. +

+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\
+
+

Если у вас много дисков и заканчиваются буквы дисков, вы можете монтировать +диски непосредственно в подпапки. См.: +

+https://www.google.com/search?q=Windows+mount+point
+
+

На этом этапе вы готовы запустить команду sync для создания +информации четности. +

+snapraid sync
+
+

Этот процесс может занять несколько часов в первый раз, в зависимости от размера +данных, уже присутствующих на дисках. Если диски пустые, +процесс происходит немедленно. +

Вы можете остановить его в любое время, нажав Ctrl+C, и при следующем запуске он +возобновит работу с того места, где был прерван. +

Когда эта команда завершится, ваши данные ЗАЩИЩЕНЫ. +

Теперь вы можете начать использовать свой массив, как вам угодно, и периодически +обновлять информацию четности, запуская команду sync. +

+

+Scrubbing +

+

Для периодической проверки данных и четности на наличие ошибок, вы можете +запустить команду scrub. +

+snapraid scrub
+
+

Эта команда сравнивает данные в вашем массиве с хэшем, вычисленным +во время команды sync, для проверки целостности. +

Каждый запуск команды проверяет примерно 8% массива, исключая данные, +уже проверенные за предыдущие 10 дней. +Вы можете использовать опцию -p, --plan, чтобы указать другое количество, +и опцию -o, --older-than, чтобы указать другой возраст в днях. +Например, для проверки 5% массива на наличие блоков старше 20 дней, используйте: +

+snapraid -p 5 -o 20 scrub
+
+

Если во время процесса обнаруживаются скрытые ошибки или ошибки ввода/вывода, +соответствующие блоки помечаются как плохие в файле content +и перечисляются в команде status. +

+snapraid status
+
+

Чтобы исправить их, вы можете использовать команду fix, фильтруя плохие блоки +с помощью опции -e, --filter-error: +

+snapraid -e fix
+
+

При следующем scrub ошибки исчезнут из отчета status, +если они действительно исправлены. Чтобы ускорить процесс, вы можете использовать +-p bad для проверки только блоков, помеченных как плохие. +

+snapraid -p bad scrub
+
+

Запуск scrub на несинхронизированном массиве может сообщить об ошибках, вызванных +удаленными или измененными файлами. Эти ошибки сообщаются в выводе scrub, +но соответствующие блоки не помечаются как плохие. +

+
+

+Pooling +

+

Примечание: Функция объединения (pooling), описанная ниже, была заменена инструментом +mergerfs, который теперь является рекомендуемым вариантом для пользователей Linux +в сообществе SnapRAID. Mergefs предоставляет более гибкий и эффективный +способ объединения нескольких дисков в единую точку монтирования, +обеспечивая беспрепятственный доступ к файлам по всему массиву без +опоры на символические ссылки. Он хорошо интегрируется со SnapRAID для +защиты четности и обычно используется в установках, таких как OpenMediaVault (OMV) +или пользовательских конфигурациях NAS. +

Чтобы все файлы в вашем массиве отображались в одном дереве каталогов, +вы можете включить функцию pooling. Она создает виртуальное +представление всех файлов в вашем массиве только для чтения, используя +символические ссылки. +

Вы можете настроить каталог pooling в файле конфигурации с помощью: +

+pool /pool
+
+

или, если вы используете Windows, с помощью: +

+pool C:\pool
+
+

а затем запустить команду pool для создания или обновления виртуального представления. +

+snapraid pool
+
+

Если вы используете платформу Unix и хотите предоставить общий доступ к этому каталогу +по сети как для машин Windows, так и для Unix, вы должны добавить +следующие опции в ваш /etc/samba/smb.conf: +

+# В глобальном разделе smb.conf
+unix extensions = no
+
+
+# В разделе общего ресурса smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

В Windows совместное использование символических ссылок по сети требует, чтобы клиенты +разрешали их удаленно. Чтобы включить это, помимо предоставления общего доступа +к каталогу pool, вы также должны предоставить общий доступ ко всем дискам +независимо, используя имена дисков, определенные в файле конфигурации, в качестве +точек общего доступа. Вы также должны указать в опции share файла +конфигурации путь UNC Windows, который удаленные клиенты должны использовать +для доступа к этим общим дискам. +

Например, работая с сервера с именем darkstar, вы можете использовать +опции: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

и предоставить общий доступ к следующим каталогам по сети: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

чтобы разрешить удаленным клиентам доступ ко всем файлам по адресу \\darkstar\pool. +

Вам также может потребоваться настроить удаленные клиенты для включения доступа к +удаленным символическим ссылкам с помощью команды: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID функционирует скорее как программа резервного копирования, чем как система RAID, +и может использоваться для восстановления или отмены удаления файлов до их +предыдущего состояния с помощью опции -f, --filter: +

+snapraid fix -f FILE
+
+

или для каталога: +

+snapraid fix -f DIR/
+
+

Вы также можете использовать его для восстановления только случайно удаленных файлов внутри +каталога с помощью опции -m, --filter-missing, которая восстанавливает +только отсутствующие файлы, оставляя все остальные нетронутыми. +

+snapraid fix -m -f DIR/
+
+

Или для восстановления всех удаленных файлов на всех дисках с помощью: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

Случилось худшее, и вы потеряли один или несколько дисков! +

НЕ ПАНИКУЙТЕ! Вы сможете их восстановить! +

Первое, что вы должны сделать, это избегать дальнейших изменений в вашем дисковом массиве. +Отключите любые удаленные подключения к нему и любые запланированные процессы, +включая любое запланированное ночное sync или scrub SnapRAID. +

Затем приступайте к следующим шагам. +

+

+STEP 1 -> Reconfigure +

+

Вам нужно место для восстановления, в идеале на дополнительных +запасных дисках, но внешнего USB-диска или удаленного диска будет достаточно. +

Измените файл конфигурации SnapRAID, чтобы опция data или parity +отказавшего диска указывала на место с достаточным пустым +пространством для восстановления файлов. +

Например, если диск d1 вышел из строя, измените с: +

+data d1 /mnt/disk1/
+
+

на: +

+data d1 /mnt/new_spare_disk/
+
+

Если восстанавливаемый диск является диском четности, обновите соответствующую опцию parity. +Если у вас несколько отказавших дисков, обновите все их опции конфигурации. +

+
+

+STEP 2 -> Fix +

+

Запустите команду fix, сохраняя журнал во внешнем файле с помощью: +

+snapraid -d NAME -l fix.log fix
+
+

Где NAME — это имя диска, например d1 в нашем предыдущем примере. +Если восстанавливаемый диск является диском четности, используйте имена parity, 2-parity +и т. д. +Если у вас несколько отказавших дисков, используйте несколько опций -d, чтобы указать +их все. +

Эта команда займет много времени. +

Убедитесь, что у вас есть несколько гигабайт свободного места для хранения файла fix.log. +Запустите ее с диска с достаточным свободным местом. +

Теперь вы восстановили все, что можно было восстановить. Если некоторые файлы +частично или полностью невосстановимы, они будут переименованы с добавлением +расширения .unrecoverable. +

Вы можете найти подробный список всех невосстановимых блоков в файле fix.log, +проверяя все строки, начинающиеся с unrecoverable:. +

Если вы не удовлетворены восстановлением, вы можете повторять его столько +раз, сколько пожелаете. +

Например, если вы удалили файлы из массива после последнего +sync, это может привести к тому, что некоторые файлы не будут восстановлены. +В этом случае вы можете повторить fix, используя опцию -i, --import, +указав, где эти файлы находятся сейчас, чтобы снова включить их в +процесс восстановления. +

Если вы удовлетворены восстановлением, вы можете продолжить, +но учтите, что после синхронизации вы больше не сможете повторить команду fix! +

+
+

+STEP 3 -> Check +

+

В качестве осторожной проверки, вы можете теперь запустить команду check, чтобы убедиться, +что все в порядке на восстановленном диске. +

+snapraid -d NAME -a check
+
+

Где NAME — это имя диска, например d1 в нашем предыдущем примере. +

Опции -d и -a говорят SnapRAID проверить только указанный диск +и игнорировать все данные четности. +

Эта команда займет много времени, но если вы не чрезмерно осторожны, +вы можете ее пропустить. +

+
+

+STEP 4 -> Sync +

+

Запустите команду sync, чтобы ресинхронизировать массив с новым диском. +

+snapraid sync
+
+

Если все восстановлено, эта команда выполняется немедленно. +

+
+
+
+

+Commands +

+

SnapRAID предоставляет несколько простых команд, которые позволяют: +

    +
  • +Печатать статус массива -> status +
  • +
  • +Управлять дисками -> smart, probe, up, down +
  • +
  • +Сделать резервную копию/снимок -> sync +
  • +
  • +Периодически проверять данные -> scrub +
  • +
  • +Восстановить последнюю резервную копию/снимок -> fix. +
  • +
+

Команды должны быть написаны строчными буквами. +

+

+status +

+

Печатает сводку состояния дискового массива. +

Она включает информацию о фрагментации четности, о том, насколько старые +блоки без проверки, и все записанные скрытые ошибки, +возникшие во время scrubbing. +

Представленная информация относится к последнему времени, когда вы +запускали sync. Более поздние изменения не учитываются. +

Если были обнаружены плохие блоки, перечисляются их номера. +Чтобы исправить их, вы можете использовать команду fix -e. +

Он также показывает график, представляющий последнее время, когда каждый блок +был проверен (scrubbed) или синхронизирован (synced). Проверенные блоки +обозначены символом *, блоки, синхронизированные, но еще не проверенные, +символом o. +

Ничего не изменяется. +

+
+

+smart +

+

Печатает отчет SMART всех дисков в системе. +

Он включает оценку вероятности сбоя в следующем году, +позволяя планировать плановую замену дисков, которые показывают +подозрительные атрибуты. +

Эта оценка вероятности получена путем корреляции атрибутов SMART +дисков с данными Backblaze, доступными по адресу: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Если SMART сообщает, что диск выходит из строя, для этого диска +выводится FAIL или PREFAIL, и SnapRAID возвращает ошибку. +В этом случае немедленная замена диска настоятельно рекомендуется. +

Другие возможные строки статуса: +

+
+
+logfail +
+В прошлом некоторые атрибуты были ниже +порогового значения. +
+
+
+
+logerr +
+Журнал ошибок устройства содержит ошибки. +
+
+
+
+selferr +
+Журнал самотестирования устройства содержит ошибки. +
+
+
+

Если указана опция -v, --verbose, предоставляется более глубокий +статистический анализ. Этот анализ может помочь вам решить, нужно ли вам +больше или меньше четности. +

Эта команда использует инструмент smartctl и эквивалентна запуску +smartctl -a на всех устройствах. +

Если ваши устройства не обнаруживаются автоматически правильно, вы можете указать +пользовательскую команду, используя опцию smartctl в файле +конфигурации. +

Ничего не изменяется. +

+
+

+probe +

+

Печатает состояние POWER всех дисков в системе. +

Standby означает, что диск не вращается. Active означает, +что диск вращается. +

Эта команда использует инструмент smartctl и эквивалентна запуску +smartctl -n standby -i на всех устройствах. +

Если ваши устройства не обнаруживаются автоматически правильно, вы можете указать +пользовательскую команду, используя опцию smartctl в файле +конфигурации. +

Ничего не изменяется. +

+
+

+up +

+

Раскручивает все диски массива. +

Вы можете раскрутить только определенные диски, используя опцию -d, --filter-disk. +

Раскручивание всех дисков одновременно требует много энергии. +Убедитесь, что ваш блок питания может это выдержать. +

Ничего не изменяется. +

+
+

+down +

+

Останавливает вращение всех дисков массива. +

Эта команда использует инструмент smartctl и эквивалентна запуску +smartctl -s standby,now на всех устройствах. +

Вы можете остановить вращение только определенных дисков, используя опцию -d, --filter-disk. +

Чтобы автоматически остановить вращение при ошибке, вы можете использовать опцию +-s, --spin-down-on-error с любой другой командой, что эквивалентно +ручному запуску down при возникновении ошибки. +

Ничего не изменяется. +

+
+

+diff +

+

Перечисляет все файлы, измененные с момента последнего sync, для которых +требуется пересчитать данные четности. +

Эта команда не проверяет данные файла, а только метку времени файла, +размер и inode. +

После перечисления всех измененных файлов представляется сводка изменений, +сгруппированных по: +

+
+
+equal +
+Файлы, не измененные по сравнению с предыдущим состоянием. +
+
+
+
+added +
+Добавленные файлы, которых не было раньше. +
+
+
+
+removed +
+Удаленные файлы. +
+
+
+
+updated +
+Файлы с другим размером или меткой времени, что означает, что они +были изменены. +
+
+
+
+moved +
+Файлы, перемещенные в другой каталог на том же диске. +Они идентифицируются как имеющие то же имя, размер, метку времени +и inode, но другой каталог. +
+
+
+
+copied +
+файлы, скопированные на тот же или другой диск, где +исходный файл все еще существует. +Они идентифицируются по совпадению имени, размера и метки +времени. +Если дробная часть метки времени равна нулю, для идентификации +должен совпадать полный путь, а не только имя. +
+
+
+
+relocated +
+файлы, перемещенные на тот же или другой диск, где +оригинал исчез. +Они идентифицируются по совпадению имени, размера и метки +времени. +Если дробная часть метки времени равна нулю, для идентификации +должен совпадать полный путь. +В отличие от файлов 'moved' на том же диске, перемещенные файлы +имеют другой inode. +
+
+
+
+restored +
+файлы с другим inode, но совпадающим каталогом, +именем, размером и меткой времени. +Обычно это файлы, восстановленные после удаления. +
+
+
+

Если требуется sync, код возврата процесса равен 2, а не +по умолчанию 0. Код возврата 1 используется для общего условия ошибки. +

Ничего не изменяется. +

+
+

+sync +

+

Обновляет информацию четности. Все измененные файлы +в дисковом массиве считываются, и соответствующие данные четности +обновляются. +

Вы можете остановить этот процесс в любое время, нажав Ctrl+C, +не теряя уже проделанной работы. +При следующем запуске процесс sync возобновится с того места, +где был прерван. +

Если во время процесса обнаруживаются скрытые ошибки или ошибки ввода/вывода, +соответствующие блоки помечаются как плохие. +

Файлы идентифицируются по пути и/или inode и проверяются по +размеру и метке времени. +Если размер файла или метка времени отличаются, данные четности +пересчитываются для всего файла. +Если файл перемещен или переименован на том же диске, сохраняя +тот же inode, четность не пересчитывается. +Если файл перемещен на другой диск, четность пересчитывается, +но ранее вычисленная информация хэша сохраняется. +

Файлы content и parity изменяются при необходимости. +Файлы в массиве НЕ изменяются. +

+
+

+scrub +

+

Проверяет массив, проверяя на наличие скрытых ошибок или ошибок ввода/вывода +на дисках данных и четности. +

Каждый вызов проверяет примерно 8% массива, исключая +данные, уже проверенные за последние 10 дней. +Это означает, что проверка раз в неделю гарантирует, что каждый бит данных +проверяется хотя бы раз в три месяца. +

Вы можете определить другой план или объем проверки, используя опцию -p, --plan, +которая принимает: +bad - Проверить блоки, помеченные как плохие. +new - Проверить только что синхронизированные блоки, которые еще не были проверены. +full - Проверить все. +0-100 - Проверить указанный процент блоков. +

Если вы указываете процентное значение, вы также можете использовать опцию -o, --older-than, +чтобы определить, насколько старым должен быть блок. +Сначала проверяются самые старые блоки, обеспечивая оптимальную проверку. +Если вы хотите проверить только что синхронизированные блоки, которые еще не были проверены, +используйте опцию -p new. +

Чтобы получить подробности о статусе проверки, используйте команду status. +

При обнаружении любой скрытой ошибки или ошибки ввода/вывода соответствующие блоки +помечаются как плохие в файле content. +Эти плохие блоки перечисляются в status и могут быть исправлены с помощью fix -e. +После исправления при следующем scrub они будут перепроверены, и если +обнаружатся исправленными, плохая метка будет удалена. +Чтобы проверить только плохие блоки, вы можете использовать команду scrub -p bad. +

Рекомендуется запускать scrub только на синхронизированном массиве, чтобы избежать +сообщений об ошибках, вызванных несинхронизированными данными. Эти ошибки +распознаются как не являющиеся скрытыми ошибками, и блоки не помечаются +как плохие, но такие ошибки сообщаются в выводе команды. +

Файл content изменяется для обновления времени последней проверки +для каждого блока и для пометки плохих блоков. +Файлы parity НЕ изменяются. +Файлы в массиве НЕ изменяются. +

+
+

+fix +

+

Исправляет все файлы и данные четности. +

Все файлы и данные четности сравниваются с состоянием снимка, +сохраненным при последнем sync. +Если обнаружено различие, оно возвращается к сохраненному снимку. +

ВНИМАНИЕ! Команда fix не различает ошибки и +преднамеренные изменения. Она безусловно возвращает состояние файла +к последнему sync. +

Если не указана другая опция, обрабатывается весь массив. +Используйте опции фильтрации, чтобы выбрать подмножество файлов или дисков для работы. +

Чтобы исправить только блоки, помеченные как плохие во время sync и scrub, +используйте опцию -e, --filter-error. +В отличие от других опций фильтрации, эта применяет исправления только к файлам, +которые не были изменены с момента последнего sync. +

SnapRAID переименовывает все файлы, которые не могут быть исправлены, добавляя +расширение .unrecoverable. +

Перед исправлением сканируется весь массив, чтобы найти файлы, перемещенные +с момента последней операции sync. +Эти файлы идентифицируются по их метке времени, игнорируя их имя +и каталог, и используются в процессе восстановления при необходимости. +Если вы переместили некоторые из них за пределы массива, вы можете использовать опцию +-i, --import, чтобы указать дополнительные каталоги для сканирования. +

Файлы идентифицируются только по пути, а не по inode. +

Файл content НЕ изменяется. +Файлы parity изменяются при необходимости. +Файлы в массиве изменяются при необходимости. +

+
+

+check +

+

Проверяет все файлы и данные четности. +

Он работает как fix, но только имитирует восстановление, и никакие изменения +не записываются в массив. +

Эта команда в основном предназначена для ручной проверки, +например, после процесса восстановления или в других особых условиях. +Для периодических и запланированных проверок используйте scrub. +

Если вы используете опцию -a, --audit-only, проверяются только данные +файла, а данные четности игнорируются для +более быстрого выполнения. +

Файлы идентифицируются только по пути, а не по inode. +

Ничего не изменяется. +

+
+

+list +

+

Перечисляет все файлы, содержащиеся в массиве на момент +последнего sync. +

С -v или --verbose также отображается время с точностью до доли секунды. +

Ничего не изменяется. +

+
+

+dup +

+

Перечисляет все дублирующиеся файлы. Два файла считаются равными, если их +хэши совпадают. Данные файла не считываются; используются только +предварительно вычисленные хэши. +

Ничего не изменяется. +

+
+

+pool +

+

Создает или обновляет виртуальное представление всех +файлов в вашем дисковом массиве в каталоге pooling. +

Файлы не копируются, а связываются с помощью +символических ссылок. +

При обновлении все существующие символические ссылки и пустые +подкаталоги удаляются и заменяются новым +представлением массива. Любые другие обычные файлы остаются на месте. +

Ничего не изменяется за пределами каталога pool. +

+
+

+devices +

+

Печатает низкоуровневые устройства, используемые массивом. +

Эта команда отображает ассоциации устройств в массиве +и в основном предназначена как интерфейс для скриптов. +

Первые два столбца — это низкоуровневый идентификатор устройства и путь. +Следующие два столбца — это высокоуровневый идентификатор устройства и путь. +Последний столбец — это имя диска в массиве. +

В большинстве случаев у вас есть одно низкоуровневое устройство для каждого диска в +массиве, но в некоторых более сложных конфигурациях у вас может быть несколько +низкоуровневых устройств, используемых одним диском в массиве. +

Ничего не изменяется. +

+
+

+touch +

+

Устанавливает произвольную метку времени с точностью до доли секунды для всех файлов, +у которых она установлена в ноль. +

Это улучшает способность SnapRAID распознавать перемещенные +и скопированные файлы, так как делает метку времени почти уникальной, +уменьшая возможные дубликаты. +

Более конкретно, если метка времени с точностью до доли секунды не равна нулю, +перемещенный или скопированный файл идентифицируется как таковой, если он совпадает +по имени, размеру и метке времени. Если метка времени с точностью до доли секунды +равна нулю, он считается копией только в том случае, если полностью совпадают +полный путь, размер и метка времени. +

Метка времени с точностью до секунды не изменяется, +поэтому все даты и время ваших файлов будут сохранены. +

+
+

+rehash +

+

Планирует перехэширование всего массива. +

Эта команда изменяет используемый тип хэша, обычно при обновлении +с 32-разрядной системы на 64-разрядную, для переключения с +MurmurHash3 на более быстрый SpookyHash. +

Если вы уже используете оптимальный хэш, эта команда +ничего не делает и информирует вас, что никакие действия не требуются. +

Перехэширование не выполняется немедленно, а происходит +постепенно во время sync и scrub. +

Вы можете проверить состояние перехэширования с помощью status. +

Во время перехэширования SnapRAID сохраняет полную функциональность, +за единственным исключением, что dup не может обнаружить дублирующиеся +файлы, использующие другой хэш. +

+
+

+locate +

+

Находит файлы, хранящиеся на дисках четности. Для каждого найденного файла +выводится его расположение внутри файла четности и количество занимаемых +им фрагментов. +

Вы можете использовать параметр -t, --tail, чтобы ограничить операцию файлами, +занимающими указанную хвостовую часть четности. +

Если вы хотите перераспределить эти файлы, вы можете использовать параметр +-W, --force-realloc-tail. +Имейте в виду, что такие файлы не будут защищены четностью во время процесса +перераспределения. +

+
+
+

+Options +

+

SnapRAID предоставляет следующие опции: +

+
+
+-c, --conf CONFIG +
+Выбирает файл конфигурации для использования. Если не указан, в Unix +используется файл /usr/local/etc/snapraid.conf, если он существует, +в противном случае /etc/snapraid.conf. +В Windows используется файл snapraid.conf в том же +каталоге, что и snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Фильтрует файлы для обработки в check и fix. +Обрабатываются только файлы, соответствующие указанному шаблону. +Эту опцию можно использовать несколько раз. +Подробнее о спецификациях шаблонов см. в разделе PATTERN. +В Unix убедитесь, что символы глоббинга заключены в кавычки, если используются. +Эту опцию можно использовать только с check и fix. +Ее нельзя использовать с sync и scrub, так как они всегда +обрабатывают весь массив. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Фильтрует диски для обработки в check, fix, up и down. +Вы должны указать имя диска, определенное в файле конфигурации. +Вы также можете указать диски четности с именами: parity, 2-parity, +3-parity и т. д., чтобы ограничить операции конкретным диском четности. +Если вы комбинируете несколько опций --filter, --filter-disk и --filter-missing, +выбираются только файлы, соответствующие всем фильтрам. +Эту опцию можно использовать несколько раз. +Эту опцию можно использовать только с check, fix, up и down. +Ее нельзя использовать с sync и scrub, так как они всегда +обрабатывают весь массив. +
+
+
+
+
+
+-m, --filter-missing +
+Фильтрует файлы для обработки в check и fix. +Обрабатываются только файлы, отсутствующие или удаленные из массива. +При использовании с fix, это действует как команда undelete. +Если вы комбинируете несколько опций --filter, --filter-disk и --filter-missing, +выбираются только файлы, соответствующие всем фильтрам. +Эту опцию можно использовать только с check и fix. +Ее нельзя использовать с sync и scrub, так как они всегда +обрабатывают весь массив. +
+
+
+
+
+
+-e, --filter-error +
+Обрабатывает файлы с ошибками в check и fix. +Он обрабатывает только файлы, блоки которых помечены скрытыми +ошибками или ошибками ввода/вывода во время sync и scrub, как +перечислено в status. +Эту опцию можно использовать только с check и fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Выбирает план проверки (scrub). Если PERC — это числовое значение от 0 до 100, +оно интерпретируется как процент блоков для проверки. +Вместо процента вы можете указать план: +bad проверяет плохие блоки, new проверяет блоки, которые еще не были проверены, +и full проверяет все. +Эту опцию можно использовать только с scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Выбирает самую старую часть массива для обработки в scrub. +DAYS — это минимальный возраст в днях для блока, который будет проверен; +по умолчанию — 10. +Блоки, помеченные как плохие, всегда проверяются независимо от этой опции. +Эту опцию можно использовать только с scrub. +
+
+
+
+
+
+-a, --audit-only +
+В check, проверяет хэш файлов без +проверки данных четности. +Если вы заинтересованы только в проверке данных файла, эта +опция может значительно ускорить процесс проверки. +Эту опцию можно использовать только с check. +
+
+
+
+
+
+-h, --pre-hash +
+В sync, запускает предварительную фазу хэширования всех новых данных +для дополнительной проверки перед вычислением четности. +Обычно в sync предварительное хэширование не выполняется, и новые +данные хэшируются непосредственно перед вычислением четности, когда они +считываются в первый раз. +Этот процесс происходит, когда система находится под +тяжелой нагрузкой, со всеми вращающимися дисками и занятым процессором. +Это экстремальное условие для машины, и если у нее есть +скрытая аппаратная проблема, скрытые ошибки могут остаться незамеченными, +потому что данные еще не хэшированы. +Чтобы избежать этого риска, вы можете включить режим pre-hash, чтобы +все данные считывались дважды для обеспечения их целостности. +Эта опция также проверяет файлы, перемещенные внутри массива, +чтобы убедиться, что операция перемещения прошла успешно, и, при необходимости, +позволяет запустить операцию исправления (fix) перед продолжением. +Эту опцию можно использовать только с sync. +
+
+
+
+
+
+-i, --import DIR +
+Импортирует из указанного каталога любые файлы, удаленные +из массива после последнего sync. +Если у вас все еще есть такие файлы, они могут использоваться check +и fix для улучшения процесса восстановления. +Файлы считываются, включая подкаталоги, и идентифицируются +независимо от их имени. +Эту опцию можно использовать только с check и fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+При любой ошибке останавливает вращение всех управляемых дисков перед выходом с +ненулевым кодом состояния. Это предотвращает оставление дисков +активными и вращающимися после прерванной операции, +помогая избежать ненужного нагрева и энергопотребления. +Используйте эту опцию, чтобы гарантировать безопасную остановку дисков, +даже когда команда завершается неудачей. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Применяет глобальное ограничение пропускной способности для всех дисков. RATE — это +количество байтов в секунду. Вы можете указать множитель, +например K, M или G (например, --bw-limit 1G). +
+
+
+
+
+
+-t, --tail РАЗМЕР +
+Ограничивает список файлов теми, которые используют не более +указанного размера хвоста дисков четности. +Можно использовать множители, такие как K, M, G или T (например, --tail 1G). +Этот параметр действителен только при использовании вместе с +командой locate. +
+
+
+
+
+
+-A, --stats +
+Включает расширенный вид статуса, который показывает дополнительную информацию. +На экране отображаются два графика: +Первый график показывает количество буферизованных полос для каждого +диска, а также путь к файлу, к которому в данный момент осуществляется +доступ на этом диске. Обычно самый медленный диск не будет иметь +доступного буфера, что определяет максимально достижимую +пропускную способность. +Второй график показывает процент времени, потраченного на ожидание +за последние 100 секунд. Ожидается, что самый медленный диск +вызовет большую часть времени ожидания, в то время как другие диски должны +иметь мало или совсем не иметь времени ожидания, потому что они могут +использовать свои буферизованные полосы. +Этот график также показывает время, потраченное на ожидание +вычислений хэша и вычислений RAID. +Все вычисления выполняются параллельно с дисковыми операциями. +Следовательно, пока есть измеримое время ожидания для +хотя бы одного диска, это указывает на то, что ЦП достаточно быстр, чтобы +справляться с рабочей нагрузкой. +
+
+
+
+
+
+-Z, --force-zero +
+Форсирует небезопасную операцию синхронизации файла с нулевым +размером, который ранее был ненулевым. +Если SnapRAID обнаруживает такое условие, он прекращает выполнение, +если вы не укажете эту опцию. +Это позволяет легко обнаружить, когда после сбоя системы +некоторые доступные файлы были усечены. +Это возможное условие в Linux с файловыми системами ext3/ext4. +Эту опцию можно использовать только с sync. +
+
+
+
+
+
+-E, --force-empty +
+Форсирует небезопасную операцию синхронизации диска, на котором +отсутствуют все исходные файлы. +Если SnapRAID обнаруживает, что все файлы, изначально присутствующие +на диске, отсутствуют или перезаписаны, он прекращает выполнение, +если вы не укажете эту опцию. +Это позволяет легко обнаружить, когда файловая система данных не +смонтирована. +Эту опцию можно использовать только с sync. +
+
+
+
+
+
+-U, --force-uuid +
+Форсирует небезопасную операцию синхронизации, проверки и исправления +с дисками, у которых изменился UUID. +Если SnapRAID обнаруживает, что у некоторых дисков изменился UUID, +он прекращает выполнение, если вы не укажете эту опцию. +Это позволяет обнаружить, когда ваши диски смонтированы в +неправильных точках монтирования. +Однако допускается однократное изменение UUID с +одиночной четностью, и больше с множественной четностью, потому что это +нормальный случай при замене дисков после восстановления. +Эту опцию можно использовать только с sync, check или +fix. +
+
+
+
+
+
+-D, --force-device +
+Форсирует небезопасную операцию исправления с недоступными дисками +или с дисками на том же физическом устройстве. +Например, если вы потеряли два диска данных и у вас есть запасной диск для восстановления +только первого, вы можете игнорировать второй недоступный диск. +Или, если вы хотите восстановить диск в свободное место, оставшееся на +уже используемом диске, совместно использующем то же физическое устройство. +Эту опцию можно использовать только с fix. +
+
+
+
+
+
+-N, --force-nocopy +
+В sync, check и fix, отключает эвристику обнаружения копирования. +Без этой опции SnapRAID предполагает, что файлы с одинаковыми +атрибутами, такими как имя, размер и метка времени, являются копиями с +одинаковыми данными. +Это позволяет идентифицировать скопированные или перемещенные файлы с одного диска +на другой и повторно использовать уже вычисленную информацию хэша +для обнаружения скрытых ошибок или восстановления отсутствующих файлов. +В некоторых редких случаях это поведение может привести к ложным срабатываниям +или замедлению процесса из-за большого количества проверок хэша, и эта +опция позволяет решить такие проблемы. +Эту опцию можно использовать только с sync, check и fix. +
+
+
+
+
+
+-F, --force-full +
+В sync, форсирует полный пересчет четности. +Эту опцию можно использовать, когда вы добавляете новый уровень четности или если +вы вернулись к старому файлу content, используя более свежие данные четности. +Вместо того чтобы воссоздавать четность с нуля, это позволяет +повторно использовать хэши, присутствующие в файле content, для проверки данных +и поддержания защиты данных во время процесса sync с использованием +существующих данных четности. +Эту опцию можно использовать только с sync. +
+
+
+
+
+
+-R, --force-realloc +
+В sync, форсирует полное перераспределение файлов и перестроение четности. +Эту опцию можно использовать для полного перераспределения всех файлов, +удаления фрагментации, при этом повторно используя хэши, присутствующие в файле content, +для проверки данных. +Эту опцию можно использовать только с sync. +ВНИМАНИЕ! Эта опция предназначена только для экспертов, и +настоятельно не рекомендуется ее использовать. +У вас НЕТ защиты данных во время операции sync. +
+
+
+
+
+
+-W, --force-realloc-tail РАЗМЕР +
+Работает как -R, --force-realloc, но ограничивается указанной хвостовой +частью (последние РАЗМЕР байт) каждого файла четности. +Принудительно перераспределяет (перемещает) любые фрагменты/блоки файлов, +хранящиеся в данный момент в этой хвостовой части, позволяя разместить +их в любом месте файла(ов) четности, где есть свободное место +(включая существующие пустоты). +Основная цель этого параметра — уменьшить занимаемый на диске +размер файла четности. +Если перераспределение успешно очистит всю хвостовую часть +(в ней не останется блоков), файл четности будет обрезан, высвобождая +неиспользуемое хвостовое пространство. +Можно использовать множители, такие как K, M, G или T (например, +--force-realloc-tail 1G). +Вы можете использовать locate -t, --tail, чтобы заранее узнать +затронутые файлы. +ВНИМАНИЕ! +Этот параметр предназначен только для экспертов, и его настоятельно +не рекомендуется использовать. +Во время операции sync защита данных для затронутых файлов +ОТСУТСТВУЕТ. +
+
+
+
+
+
+-l, --log FILE +
+Записывает подробный журнал в указанный файл. +Если эта опция не указана, непредвиденные ошибки выводятся +на экран, что потенциально может привести к чрезмерному выводу в случае +множества ошибок. Когда указана -l, --log, на +экран выводятся только фатальные ошибки, которые приводят к остановке +SnapRAID. +Если путь начинается с >>, файл открывается +в режиме добавления. Вхождения %D и %T в имени +заменяются датой и временем в формате ГГГГММДД и +ЧЧММСС. В пакетных файлах Windows вы должны удвоить +символ %, например, result-%%D.log. Чтобы использовать >>, вы должны +заключить имя в кавычки, например, ">>result.log". +Для вывода журнала на стандартный вывод или стандартную ошибку, +вы можете использовать ">&1" и ">&2" соответственно. +Описание тегов журнала см. в файле snapraid_log.txt или man-странице. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Устанавливает новый лимит ошибок до остановки выполнения. +По умолчанию SnapRAID останавливается, если обнаруживает более 100 +ошибок ввода/вывода, что указывает на вероятный сбой диска. +Эта опция влияет на sync и scrub, которым разрешено +продолжать работу после первого набора дисковых ошибок, чтобы попытаться +завершить свои операции. +Однако check и fix всегда останавливаются при первой ошибке. +
+
+
+
+
+
+-S, --start BLKSTART +
+Начинает обработку с указанного +номера блока. Это может быть полезно для повторной попытки проверить +или исправить конкретные блоки в случае поврежденного диска. +Эта опция в основном предназначена для расширенного ручного восстановления. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Обрабатывает только указанное количество блоков. +Эта опция в основном предназначена для расширенного ручного восстановления. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Генерирует фиктивный файл конфигурации из существующего +файла content. +Файл конфигурации записывается на стандартный вывод +и не перезаписывает существующий. +Этот файл конфигурации также содержит информацию, +необходимую для восстановления точек монтирования дисков в случае, если вы +потеряете всю систему. +
+
+
+
+
+
+-v, --verbose +
+Печатает больше информации на экран. +Если указана один раз, печатает исключенные файлы +и дополнительную статистику. +Эта опция не влияет на файлы журнала. +
+
+
+
+
+
+-q, --quiet +
+Печатает меньше информации на экран. +Если указана один раз, удаляет индикатор выполнения; дважды, +текущие операции; трижды, информационные +сообщения; четырежды, сообщения о статусе. +Фатальные ошибки всегда выводятся на экран. +Эта опция не влияет на файлы журнала. +
+
+
+
+
+
+-H, --help +
+Печатает краткий экран справки. +
+
+
+
+
+
+-V, --version +
+Печатает версию программы. +
+
+
+
+
+

+Configuration +

+

SnapRAID требует файл конфигурации, чтобы знать, где находится ваш дисковый массив +и где хранить информацию четности. +

В Unix используется файл /usr/local/etc/snapraid.conf, если он существует, +в противном случае /etc/snapraid.conf. +В Windows используется файл snapraid.conf в том же +каталоге, что и snapraid.exe. +

Он должен содержать следующие опции (чувствительные к регистру): +

+

+parity FILE [,FILE] ... +

+

Определяет файлы для использования для хранения информации четности. +Четность обеспечивает защиту от одного сбоя диска, +подобно RAID5. +

Вы можете указать несколько файлов, которые должны быть на разных дисках. +Когда файл больше не может расти, используется следующий. +Общее доступное пространство должно быть по крайней мере таким же большим, как самый большой диск данных в +массиве. +

Вы можете добавить дополнительные файлы четности позже, но вы +не можете переупорядочить или удалить их. +

Сохранение дисков четности зарезервированными для четности гарантирует, что +они не станут фрагментированными, улучшая производительность. +

В Windows 256 МБ остается неиспользованным на каждом диске, чтобы избежать +предупреждения о полных дисках. +

Эта опция является обязательной и может использоваться только один раз. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Определяет файлы для использования для хранения дополнительной информации четности. +

Для каждого указанного уровня четности включается один дополнительный уровень защиты: +

    +
  • +2-parity включает двойную четность RAID6. +
  • +
  • +3-parity включает тройную четность. +
  • +
  • +4-parity включает четверную четность. +
  • +
  • +5-parity включает пятерную четность. +
  • +
  • +6-parity включает шестерную четность. +
  • +
+

Каждый уровень четности требует наличия всех предыдущих уровней четности. +

Применяются те же соображения, что и для опции parity. +

Эти опции являются необязательными и могут использоваться только один раз. +

+
+

+z-parity FILE [,FILE] ... +

+

Определяет альтернативный файл и формат для хранения тройной четности. +

Эта опция является альтернативой 3-parity, в основном предназначенной для +слабых процессоров, таких как ARM или AMD Phenom, Athlon и Opteron, +которые не поддерживают набор инструкций SSSE3. В таких случаях она +обеспечивает лучшую производительность. +

Этот формат похож на тот, который используется ZFS RAIDZ3, но быстрее. +Как и ZFS, он не работает за пределами тройной четности. +

При использовании 3-parity вы будете предупреждены, если рекомендуется использовать +формат z-parity для повышения производительности. +

Возможно преобразование из одного формата в другой путем настройки +файла конфигурации с желаемым файлом z-parity или 3-parity +и использования fix для его воссоздания. +

+
+

+content FILE +

+

Определяет файл для использования для хранения списка и контрольных сумм всех +файлов, присутствующих в вашем дисковом массиве. +

Он может быть размещен на диске, используемом для данных, четности, или +любом другом доступном диске. +Если вы используете диск данных, этот файл автоматически исключается +из процесса sync. +

Эта опция является обязательной и может использоваться несколько раз для сохранения +нескольких копий одного и того же файла. +

Вы должны хранить как минимум одну копию для каждого используемого диска четности +плюс одну. Использование дополнительных копий не повредит. +

+
+

+data NAME DIR +

+

Определяет имя и точку монтирования дисков данных в +массиве. NAME используется для идентификации диска и должно +быть уникальным. DIR — это точка монтирования диска в +файловой системе. +

Вы можете изменять точку монтирования по мере необходимости, пока вы +сохраняете NAME фиксированным. +

Вы должны использовать одну опцию для каждого диска данных в массиве. +

Вы можете переименовать диск позже, изменив NAME непосредственно +в файле конфигурации, а затем запустив команду sync. +В случае переименования, ассоциация выполняется с использованием сохраненного +UUID дисков. +

+
+

+extra NAME DIR +

+

Определяет имя и точку монтирования дополнительных дисков для +мониторинга с помощью команд smart и probe. +

Это полезно для мониторинга дисков, которые не являются частью +массива, но необходимы для функционирования системы, таких как +загрузочный диск. +

Обратите внимание, что такие диски не затрагиваются командами up и +down, так как предполагается, что они всегда вращаются. +

+
+

+nohidden +

+

Исключает все скрытые файлы и каталоги. +В Unix скрытые файлы — это те, которые начинаются с .. +В Windows — это те, у которых есть скрытый атрибут. +

+
+

+exclude/include PATTERN +

+

Определяет шаблоны файлов или каталогов для исключения или включения +в процесс синхронизации. +Все шаблоны обрабатываются в указанном порядке. +

Если первый совпадающий шаблон — это exclude, файл +исключается. Если это include, файл включается. +Если ни один шаблон не совпадает, файл исключается, если последний +указанный шаблон — это include, или включается, если последний шаблон +— это exclude. +

Подробнее о спецификациях шаблонов см. в разделе PATTERN. +

Эту опцию можно использовать несколько раз. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Определяет базовый размер блока в кибибайтах для четности. +Один кибибайт — это 1024 байта. +

Размер блока по умолчанию — 256, что должно работать в большинстве случаев. +

ВНИМАНИЕ! Эта опция предназначена только для экспертов, и +настоятельно не рекомендуется изменять это значение. Чтобы изменить это значение в +будущем, вам потребуется воссоздать всю четность! +

Причина использовать другой размер блока — если у вас много маленьких +файлов, порядка миллионов. +

Для каждого файла, даже если всего несколько байтов, выделяется целый блок четности, +и при большом количестве файлов это может привести к значительным неиспользуемым +пространствам четности. +Когда вы полностью заполните диск четности, вам не будет +разрешено добавлять больше файлов на диски данных. +Однако потерянная четность не накапливается на дисках данных. Потерянное пространство, +возникающее из-за большого числа файлов на диске данных, ограничивает только +объем данных на этом диске данных, а не на других. +

В качестве приближения вы можете предположить, что половина размера блока +теряется для каждого файла. Например, при 100 000 файлов и размере блока 256 КиБ +вы потеряете 12,8 ГБ четности, что может привести к +уменьшению доступного пространства на диске данных на 12,8 ГБ. +

Вы можете проверить количество потерянного пространства на каждом диске с помощью status. +Это количество пространства, которое вы должны оставить свободным на дисках +данных или использовать для файлов, не включенных в массив. +Если это значение отрицательное, это означает, что вы близки к заполнению +четности, и оно представляет пространство, которое вы все еще можете потерять. +

Чтобы избежать этой проблемы, вы можете использовать больший раздел для четности. +Например, если раздел четности на 12,8 ГБ больше, чем диски данных, +у вас есть достаточно дополнительного пространства для обработки до 100 000 +файлов на каждом диске данных без каких-либо потерь пространства. +

Хитрость для получения большего раздела четности в Linux — отформатировать его +командой: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Это приводит к примерно 1,5% дополнительного пространства, приблизительно 60 ГБ для +диска 4 ТБ, что позволяет разместить около 460 000 файлов на каждом диске данных без +каких-либо потерь пространства. +

+
+

+hashsize SIZE_IN_BYTES +

+

Определяет размер хэша в байтах для сохраненных блоков. +

Размер хэша по умолчанию — 16 байт (128 бит), что должно работать +в большинстве случаев. +

ВНИМАНИЕ! Эта опция предназначена только для экспертов, и +настоятельно не рекомендуется изменять это значение. Чтобы изменить это значение в +будущем, вам потребуется воссоздать всю четность! +

Причина использовать другой размер хэша — если ваша система имеет +ограниченную память. Как правило, SnapRAID обычно требует +1 ГиБ ОЗУ на каждые 16 ТБ данных в массиве. +

В частности, для хранения хэшей данных SnapRAID требует +приблизительно TS*(1+HS)/BS байт ОЗУ, +где TS — это общий размер в байтах вашего дискового массива, BS — +размер блока в байтах, и HS — размер хэша в байтах. +

Например, при 8 дисках по 4 ТБ, размере блока 256 КиБ +(1 КиБ = 1024 байта) и размере хэша 16, вы получаете: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
+
+

Переключение на размер хэша 8, вы получаете: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
+
+

Переключение на размер блока 512, вы получаете: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
+
+

Переключение как на размер хэша 8, так и на размер блока 512, вы получаете: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Автоматически сохраняет состояние при синхронизации или проверке после +обработки указанного количества ГБ. +Эта опция полезна, чтобы избежать перезапуска длительных команд sync +с нуля, если они были прерваны сбоем машины или любым другим событием. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Устанавливает максимально допустимую температуру диска в Цельсиях. Если указано, +SnapRAID периодически проверяет температуру всех дисков с помощью +инструмента smartctl. Текущие температуры дисков отображаются во время +работы SnapRAID. Если какой-либо диск превышает этот лимит, все операции +останавливаются, и диски останавливают вращение (переходят в режим ожидания) на время, +определенное опцией temp_sleep. После периода ожидания операции +возобновляются, потенциально снова приостанавливаясь, если лимит температуры +достигается еще раз. +

Во время работы SnapRAID также анализирует кривую нагрева каждого +диска и оценивает долгосрочную установившуюся температуру, которую они, +как ожидается, достигнут, если активность продолжится. Оценка выполняется +только после того, как температура диска увеличилась четыре раза, +что гарантирует наличие достаточного количества данных для установления +надежной тенденции. +Эта прогнозируемая установившаяся температура показывается в скобках рядом с +текущим значением и помогает оценить, достаточно ли +охлаждение системы. Эта оценочная температура предназначена только +для информации и не влияет на поведение SnapRAID. Действия программы +основываются исключительно на фактических измеренных температурах дисков. +

Для выполнения этого анализа SnapRAID требуется эталон для температуры +системы. Сначала он пытается прочитать его из доступных аппаратных +датчиков. Если ни один системный датчик не может быть доступен, он использует +самую низкую температуру диска, измеренную в начале выполнения, в качестве +резервного эталона. +

Обычно SnapRAID показывает только температуру самого горячего диска. +Чтобы отобразить температуру всех дисков, используйте опцию -A или --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Устанавливает время ожидания, в минутах, когда достигается предел температуры. +В течение этого периода диски остаются остановленными. По умолчанию — 5 минут. +

+
+

+pool DIR +

+

Определяет каталог объединения (pooling), где создается виртуальное представление +дискового массива с помощью команды pool. +

Каталог должен уже существовать. +

+
+

+share UNC_DIR +

+

Определяет путь UNC Windows, необходимый для удаленного доступа к дискам. +

Если указана эта опция, символические ссылки, созданные в каталоге pool, +используют этот путь UNC для доступа к дискам. +Без этой опции сгенерированные символические ссылки используют только локальные пути, +что не позволяет предоставлять общий доступ к каталогу pool по сети. +

Символические ссылки формируются с использованием указанного пути UNC, добавлением +имени диска, как указано в опции data, и, наконец, добавлением +каталога и имени файла. +

Эта опция требуется только для Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Определяет пользовательские опции smartctl для получения атрибутов SMART для +каждого диска. Это может потребоваться для контроллеров RAID и некоторых USB-дисков, +которые не могут быть обнаружены автоматически. Заполнитель %s заменяется +именем устройства, но он необязателен для фиксированных устройств, таких как +контроллеры RAID. +

DISK — это то же имя диска, указанное в опции data. +PARITY — это одно из имен четности: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity или z-parity. +

В указанных OPTIONS строка %s заменяется +именем устройства. Для контроллеров RAID устройство, +вероятно, фиксировано, и вам может не потребоваться использовать %s. +

Возможные опции см. в документации smartmontools: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Например: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Игнорирует указанный атрибут SMART при вычислении вероятности +сбоя диска. Эта опция полезна, если диск сообщает необычные или +вводящие в заблуждение значения для конкретного атрибута. +

DISK — это то же имя диска, указанное в опции data. +PARITY — это одно из имен четности: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity или z-parity. +Специальное значение * может использоваться для игнорирования атрибута на всех дисках. +

Например, чтобы игнорировать атрибут Current Pending Sector Count на +всех дисках: +

+smartignore * 197
+
+

Чтобы игнорировать его только на первом диске четности: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Пример типичной конфигурации для Unix: +

+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
+
+

Пример типичной конфигурации для Windows: +

+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
+
+
+
+
+

+Pattern +

+

Шаблоны обеспечивают гибкий способ фильтрации файлов для включения или +исключения. Используя символы подстановки (globbing), вы можете определить правила, +которые соответствуют конкретным именам файлов или целым структурам каталогов без +ручного перечисления каждого пути. +

Вопросительный знак ? соответствует любому одиночному символу, кроме +разделителя каталогов. Это делает его полезным для сопоставления имен файлов с +переменными символами, при этом шаблон ограничивается одним уровнем каталога. +

Одиночная звездочка * соответствует любой последовательности символов, но, как и +вопросительный знак, она никогда не пересекает границы каталогов. Она останавливается на +прямой косой черте, что делает ее подходящей для сопоставления внутри одного +компонента пути. Это стандартное поведение подстановочных знаков, знакомое +по оболочке (shell). +

Двойная звездочка ** более мощная, она соответствует любой последовательности +символов, включая разделители каталогов. Это позволяет шаблонам соответствовать +нескольким уровням каталогов. Когда ** появляется непосредственно в +шаблоне, она может соответствовать нулю или более символам, включая косые черты между +окружающим буквальным текстом. +

Наиболее важным использованием ** является специальная форма /**/. Она соответствует +нулю или более полным уровням каталогов, что позволяет сопоставлять файлы +на любой глубине в дереве каталогов, не зная точной структуры пути. +Например, шаблон src/**/main.js соответствует src/main.js (пропуск +ноля каталогов), src/ui/main.js (пропуск одного каталога) и +src/ui/components/main.js (пропуск двух каталогов). +

Классы символов с использованием квадратных скобок [] соответствуют одному символу из +заданного набора или диапазона. Как и другие односимвольные шаблоны, они +не соответствуют разделителям каталогов. Классы поддерживают диапазоны и отрицание с +использованием восклицательного знака. +

Фундаментальное различие, которое следует помнить, заключается в том, что *, ? и классы +символов соблюдают границы каталогов и соответствуют только внутри одного +компонента пути, в то время как ** — единственный шаблон, который может соответствовать +через разделители каталогов. +

Существует четыре различных типа шаблонов: +

+
+
+FILE +
+Выбирает любой файл с именем FILE. +Этот шаблон применяется только к файлам, но не к директориям. +
+
+
+
+
+
+DIR/ +
+Выбирает любую директорию с именем DIR и все, что находится внутри нее. +Этот шаблон применяется только к директориям, но не к файлам. +
+
+
+
+
+
+/PATH/FILE +
+Выбирает точно указанный путь к файлу. Этот шаблон применяется +только к файлам, но не к директориям. +
+
+
+
+
+
+/PATH/DIR/ +
+Выбирает точно указанный путь к директории и все, что находится +внутри нее. Этот шаблон применяется только к директориям, но не к файлам. +
+
+
+

Когда вы указываете абсолютный путь, начинающийся с /, он применяется к +корневому каталогу массива, а не к корневому каталогу локальной файловой системы. +

В Windows вы можете использовать обратную косую черту \ вместо прямой /. +Системные каталоги Windows, точки соединения, точки монтирования и другие +специальные каталоги Windows рассматриваются как файлы, что означает, что для их +исключения вы должны использовать правило файла, а не каталога. +

Если имя файла содержит символы *, ?, [, +или ], вы должны экранировать их, чтобы избежать их интерпретации как +символов глоббинга. В Unix символом экранирования является \; в Windows — ^. +Когда шаблон находится в командной строке, вы должны удвоить символ +экранирования, чтобы избежать его интерпретации командной оболочкой. +

В файле конфигурации вы можете использовать различные стратегии для фильтрации +файлов для обработки. +Самый простой подход — использовать только правила exclude для удаления всех +файлов и каталогов, которые вы не хотите обрабатывать. Например: +

+# Исключает любой файл с именем *.unrecoverable
+exclude *.unrecoverable
+# Исключает корневой каталог /lost+found
+exclude /lost+found/
+# Исключает любой подкаталог с именем tmp
+exclude tmp/
+
+

Противоположный подход — определить только файлы, которые вы хотите обрабатывать, используя +только правила include. Например: +

+# Включает только некоторые каталоги
+include /movies/
+include /musics/
+include /pictures/
+
+

Конечный подход — смешивать правила exclude и include. В этом случае +порядок правил важен. Более ранние правила имеют +преимущество над более поздними. +Для упрощения вы можете сначала перечислить все правила exclude, а затем +все правила include. Например: +

+# Исключает любой файл с именем *.unrecoverable
+exclude *.unrecoverable
+# Исключает любой подкаталог с именем tmp
+exclude tmp/
+# Включает только некоторые каталоги
+include /movies/
+include /musics/
+include /pictures/
+
+

В командной строке, используя опцию -f, вы можете использовать только шаблоны include. +Например: +

+# Проверяет только файлы .mp3.
+# В Unix используйте кавычки, чтобы избежать расширения глоббинга оболочкой.
+snapraid -f "*.mp3" check
+
+

В Unix при использовании символов глоббинга в командной строке вы должны +заключить их в кавычки, чтобы предотвратить их расширение оболочкой. +

+
+

+Ignore File +

+

В дополнение к глобальным правилам в файле конфигурации, вы можете +размещать файлы .snapraidignore в любом каталоге внутри массива для +определения децентрализованных правил исключения. +

Правила, определенные в .snapraidignore, применяются после правил в +конфигурационном файле. Это означает, что они имеют более высокий приоритет +и могут использоваться для исключения файлов, которые ранее были включены +глобальной конфигурацией. Фактически, если локальное правило совпадает, файл +исключается независимо от глобальных настроек включения. +

Логика шаблонов в .snapraidignore повторяет глобальную конфигурацию, но +привязывает шаблоны к каталогу, в котором находится файл: +

+
+
+FILE +
+Выбирает любой файл с именем FILE в этом каталоге или ниже. +Здесь действуют те же правила подстановки, что и в глобальном шаблоне. +
+
+
+
+
+
+DIR/ +
+Выбирает любой каталог с именем DIR и все его содержимое, +находящееся в этом каталоге или ниже. +
+
+
+
+
+
+/PATH/FILE +
+Выбирает точно указанный файл относительно местоположения +файла .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Выбирает точно указанный каталог и все его содержимое +относительно местоположения файла .snapraidignore. +
+
+
+

В отличие от глобальной конфигурации, файлы .snapraidignore поддерживают +только правила исключения; вы не можете использовать шаблоны include или отрицание (!). +

Например, если у вас есть .snapraidignore в /mnt/disk1/projects/: +

+# Исключает ТОЛЬКО /mnt/disk1/projects/output.bin
+/output.bin
+# Исключает любой каталог с именем build внутри projects/
+build/
+# Исключает любой .tmp файл внутри projects/ или его подпапок
+*.tmp
+
+
+
+

+Content +

+

SnapRAID хранит список и контрольные суммы ваших файлов в файле content. +

Это бинарный файл, который перечисляет все файлы, присутствующие в вашем дисковом массиве, +вместе со всеми контрольными суммами для проверки их целостности. +

Этот файл считывается и записывается командами sync и scrub и +считывается командами fix, check и status. +

+
+

+Parity +

+

SnapRAID хранит информацию четности вашего массива в файлах parity. +

Это бинарные файлы, содержащие вычисленную четность всех +блоков, определенных в файле content. +

Эти файлы считываются и записываются командами sync и fix и +только считываются командами scrub и check. +

+
+

+Encoding +

+

SnapRAID в Unix игнорирует любое кодирование. Он считывает и хранит +имена файлов с тем же кодированием, которое используется файловой системой. +

В Windows все имена, считанные из файловой системы, преобразуются и +обрабатываются в формате UTF-8. +

Чтобы имена файлов печатались правильно, вы должны установить консоль Windows +в режим UTF-8 командой chcp 65001 и использовать +шрифт TrueType, такой как Lucida Console, в качестве шрифта консоли. +Это влияет только на печатаемые имена файлов; если вы +перенаправляете вывод консоли в файл, результирующий файл всегда +в формате UTF-8. +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-sv.html b/beta/manual-sv.html new file mode 100644 index 00000000..07128f84 --- /dev/null +++ b/beta/manual-sv.html @@ -0,0 +1,2080 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Beskrivning +

+

SnapRAID är ett säkerhetskopieringsprogram designat för disk-arrayer, +som lagrar paritetsinformation för dataåterställning vid upp till sex +diskfel. +

SnapRAID är i första hand avsett för hemmamediabibliotek med stora, +sällan ändrade filer, och erbjuder flera funktioner: +

    +
  • +Du kan använda diskar som redan är fyllda med filer utan +att behöva formatera om dem, och du får åtkomst till dem som vanligt. +
  • +
  • +All din data hashberäknas för att säkerställa dataintegritet och +förhindra tyst korruption. +
  • +
  • +När antalet felaktiga diskar överskrider paritetsantalet, +begränsas dataförlusten till de drabbade diskarna; data på +andra diskar förblir åtkomlig. +
  • +
  • +Om du oavsiktligt raderar filer på en disk är återställning +möjlig. +
  • +
  • +Diskar kan ha olika storlekar. +
  • +
  • +Du kan lägga till diskar när som helst. +
  • +
  • +SnapRAID låser inte in din data; du kan sluta använda det +när som helst utan omformatering eller dataflytt. +
  • +
  • +För att få åtkomst till en fil behöver endast en enda disk snurra, +vilket sparar ström och minskar buller. +
  • +
+

För mer information, besök den officiella SnapRAID-webbplatsen: +

+https://www.snapraid.it/
+
+
+
+

+Begränsningar +

+

SnapRAID är en hybrid mellan ett RAID- och ett säkerhetskopieringsprogram, +som syftar till att kombinera de bästa fördelarna med båda. Den har dock +vissa begränsningar som du bör överväga innan du använder den. +

Huvudbegränsningen är att om en disk misslyckas och du inte nyligen har +synkat, kanske du inte kan återställa fullständigt. +Mer specifikt, kanske du inte kan återställa upp till storleken på +de ändrade eller raderade filerna sedan den senaste synkroniseringsoperationen. +Detta inträffar även om de ändrade eller raderade filerna inte finns på +den felaktiga disken. Det är därför SnapRAID passar bättre för +data som sällan ändras. +

Å andra sidan förhindrar nyligen tillagda filer inte återställning av redan +befintliga filer. Du kommer bara att förlora de nyligen tillagda filerna om de +finns på den felaktiga disken. +

Andra SnapRAID-begränsningar är: +

    +
  • +Med SnapRAID har du fortfarande separata filsystem för varje disk. +Med RAID får du ett enda stort filsystem. +
  • +
  • +SnapRAID stripas inte data. +Med RAID får du en hastighetsökning med striping. +
  • +
  • +SnapRAID stöder inte återställning i realtid. +Med RAID behöver du inte sluta arbeta när en disk misslyckas. +
  • +
  • +SnapRAID kan bara återställa data från ett begränsat antal diskfel. +Med en säkerhetskopia kan du återställa från ett fullständigt +fel på hela disk-arrayen. +
  • +
  • +Endast filnamn, tidsstämplar, symboliska länkar och hårda länkar sparas. +Behörigheter, ägarskap och utökade attribut sparas inte. +
  • +
+
+
+

+Kom igång +

+

För att använda SnapRAID måste du först välja en disk i din disk-array +som ska dediceras till parity-information. Med en disk för paritet, +kommer du att kunna återställa från ett enda diskfel, liknande RAID5. +

Om du vill återställa från fler diskfel, liknande RAID6, +måste du reservera ytterligare diskar för paritet. Varje ytterligare +paritetsdisk möjliggör återställning från ett diskfel till. +

Som paritetsdiskar måste du välja de största diskarna i arrayen, +eftersom paritetsinformationen kan växa till storleken av den största +datadisken i arrayen. +

Dessa diskar kommer att dediceras till att lagra parity-filerna. +Du bör inte lagra din data på dem. +

Sedan måste du definiera de data-diskar som du vill skydda +med SnapRAID. Skyddet är mer effektivt om dessa diskar +innehåller data som sällan ändras. Av denna anledning är det bäst att +INTE inkludera Windows C:\-disken eller Unix /home, /var och /tmp +katalogerna. +

Listan över filer sparas i content-filerna, som vanligtvis +lagras på data-, paritets- eller startdiskarna. +Denna fil innehåller detaljerna för din säkerhetskopia, inklusive alla +checksummor för att verifiera dess integritet. +content-filen lagras i flera kopior, och varje kopia måste +finnas på en annan disk för att säkerställa att, även vid flera +diskfel, minst en kopia är tillgänglig. +

Anta till exempel att du bara är intresserad av en paritetsnivå +av skydd, och dina diskar finns på: +

+/mnt/diskp <- vald disk för paritet
+/mnt/disk1 <- första disken att skydda
+/mnt/disk2 <- andra disken att skydda
+/mnt/disk3 <- tredje disken att skydda
+
+

Du måste skapa konfigurationsfilen /etc/snapraid.conf med +följande alternativ: +

+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/
+
+

Om du använder Windows bör du använda Windows sökvägsformat, med +enhetsbeteckningar och omvända snedstreck istället för snedstreck. +

+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\
+
+

Om du har många diskar och får slut på enhetsbeteckningar kan du montera +diskar direkt i undermappar. Se: +

+https://www.google.com/search?q=Windows+mount+point
+
+

Vid denna punkt är du redo att köra kommandot sync för att bygga +paritetsinformationen. +

+snapraid sync
+
+

Denna process kan ta flera timmar första gången, beroende på storleken +på datan som redan finns på diskarna. Om diskarna är tomma är +processen omedelbar. +

Du kan stoppa det när som helst genom att trycka Ctrl+C, och vid nästa körning +återupptas det där det avbröts. +

När detta kommando är klart är din data SÄKER. +

Nu kan du börja använda din array som du vill och periodiskt +uppdatera paritetsinformationen genom att köra kommandot sync. +

+

+Skrubbning (Scrubbing) +

+

För att periodiskt kontrollera data och paritet för fel kan du +köra kommandot scrub. +

+snapraid scrub
+
+

Detta kommando jämför data i din array med den hash som beräknades +under kommandot sync för att verifiera integriteten. +

Varje körning av kommandot kontrollerar ungefär 8% av arrayen, exklusive data +som redan skrubbats under de föregående 10 dagarna. +Du kan använda alternativet -p, --plan för att specificera en annan mängd +och alternativet -o, --older-than för att specificera en annan ålder i dagar. +Till exempel, för att kontrollera 5% av arrayen för block äldre än 20 dagar, använd: +

+snapraid -p 5 -o 20 scrub
+
+

Om tysta eller input/output-fel hittas under processen, +markeras de motsvarande blocken som dåliga i content-filen +och listas i kommandot status. +

+snapraid status
+
+

För att fixa dem kan du använda kommandot fix, filtrera efter dåliga block med +alternativet -e, --filter-error: +

+snapraid -e fix
+
+

Vid nästa scrub kommer felen att försvinna från status-rapporten +om de verkligen är fixade. För att göra det snabbare kan du använda -p bad för att skrubba +endast block markerade som dåliga. +

+snapraid -p bad scrub
+
+

Att köra scrub på en osynkad array kan rapportera fel orsakade av +borttagna eller modifierade filer. Dessa fel rapporteras i scrub- +utdata, men de relaterade blocken markeras inte som dåliga. +

+
+

+Poolning +

+

Obs: Poolningsfunktionen som beskrivs nedan har ersatts av verktyget +mergerfs, som nu är det rekommenderade alternativet för Linux-användare i +SnapRAID-communityt. Mergefs ger ett mer flexibelt och effektivt +sätt att poola flera enheter till en enda enhetlig monteringspunkt, +vilket möjliggör sömlös åtkomst till filer över din array utan att förlita sig +på symboliska länkar. Det integreras väl med SnapRAID för paritetsskydd +och används ofta i installationer som OpenMediaVault (OMV) +eller anpassade NAS-konfigurationer. +

För att visa alla filer i din array i samma katalogträd, +kan du aktivera funktionen pooling. Den skapar en skrivskyddad virtuell +vy av alla filer i din array med hjälp av symboliska länkar. +

Du kan konfigurera pooling-katalogen i konfigurationsfilen med: +

+pool /pool
+
+

eller, om du använder Windows, med: +

+pool C:\pool
+
+

och kör sedan kommandot pool för att skapa eller uppdatera den virtuella vyn. +

+snapraid pool
+
+

Om du använder en Unix-plattform och vill dela denna katalog +över nätverket till antingen Windows- eller Unix-maskiner, bör du lägga till +följande alternativ till din /etc/samba/smb.conf: +

+# I den globala sektionen av smb.conf
+unix extensions = no
+
+
+# I delningssektionen av smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

I Windows kräver delning av symboliska länkar över ett nätverk att klienter +löser dem på distans. För att aktivera detta måste du, förutom att dela pool-katalogen, +även dela alla diskar oberoende, med hjälp av de disk-namn +som definieras i konfigurationsfilen som delningspunkter. Du måste också specificera +i alternativet share i konfigurationsfilen den Windows UNC-sökväg som +fjärrklienter behöver använda för att få åtkomst till dessa delade diskar. +

Till exempel, om du arbetar från en server som heter darkstar, kan du använda +alternativen: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

och dela följande kataloger över nätverket: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

för att tillåta fjärrklienter att få åtkomst till alla filer på \\darkstar\pool. +

Du kan också behöva konfigurera fjärrklienter för att möjliggöra åtkomst till +fjärrsymboliska länkar med kommandot: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Ångra radering (Undeleting) +

+

SnapRAID fungerar mer som ett säkerhetskopieringsprogram än ett RAID-system, och det +kan användas för att återställa eller ångra radering av filer till deras tidigare tillstånd +med hjälp av alternativet -f, --filter: +

+snapraid fix -f FIL
+
+

eller för en katalog: +

+snapraid fix -f KATALOG/
+
+

Du kan också använda det för att återställa endast oavsiktligt raderade filer inuti +en katalog med hjälp av alternativet -m, --filter-missing, som återställer +endast saknade filer, och lämnar alla andra orörda. +

+snapraid fix -m -f KATALOG/
+
+

Eller för att återställa alla raderade filer på alla enheter med: +

+snapraid fix -m
+
+
+
+

+Återställning +

+

Det värsta har hänt, och du har förlorat en eller flera diskar! +

FÅ INTE PANIK! Du kommer att kunna återställa dem! +

Det första du måste göra är att undvika ytterligare ändringar i din disk-array. +Inaktivera alla fjärranslutningar till den och alla schemalagda processer, inklusive +alla schemalagda SnapRAID nattliga sync- eller scrub-körningar. +

Fortsätt sedan med följande steg. +

+

+STEG 1 -> Omkonfigurera +

+

Du behöver lite utrymme för att återställa, helst på ytterligare +reservdiskar, men en extern USB-disk eller fjärrdisk räcker. +

Ändra SnapRAID-konfigurationsfilen för att få alternativet data eller parity +för den felaktiga disken att peka på en plats med tillräckligt tomt +utrymme för att återställa filerna. +

Om till exempel disk d1 har misslyckats, ändra från: +

+data d1 /mnt/disk1/
+
+

till: +

+data d1 /mnt/new_spare_disk/
+
+

Om disken som ska återställas är en paritetsdisk, uppdatera det lämpliga parity- +alternativet. +Om du har flera felaktiga diskar, uppdatera alla deras konfigurationsalternativ. +

+
+

+STEG 2 -> Fixa +

+

Kör kommandot fix och lagra loggen i en extern fil med: +

+snapraid -d NAMN -l fix.log fix
+
+

Där NAMN är namnet på disken, till exempel d1 i vårt tidigare exempel. +Om disken som ska återställas är en paritetsdisk, använd namnen parity, 2-parity, +etc. +Om du har flera felaktiga diskar, använd flera -d-alternativ för att specificera alla +av dem. +

Detta kommando kommer att ta lång tid. +

Se till att du har några gigabyte ledigt för att lagra fix.log-filen. +Kör den från en disk med tillräckligt med ledigt utrymme. +

Nu har du återställt allt som är återställningsbart. Om vissa filer är delvis +eller helt icke-återställningsbara, kommer de att döpas om genom att lägga till tillägget +.unrecoverable. +

Du kan hitta en detaljerad lista över alla icke-återställningsbara block i fix.log-filen +genom att kontrollera alla rader som börjar med unrecoverable:. +

Om du inte är nöjd med återställningen kan du försöka igen hur många +gånger du vill. +

Om du till exempel har tagit bort filer från arrayen efter den senaste +sync, kan detta leda till att vissa filer inte återställs. +I detta fall kan du försöka igen fix med alternativet -i, --import, +specificera var dessa filer nu finns för att inkludera dem igen i +återställningsprocessen. +

Om du är nöjd med återställningen kan du fortsätta, +men notera att efter synkronisering kan du inte försöka igen kommandot fix +längre! +

+
+

+STEG 3 -> Kontrollera +

+

Som en försiktighetsåtgärd kan du nu köra ett check-kommando för att säkerställa att +allt är korrekt på den återställda disken. +

+snapraid -d NAMN -a check
+
+

Där NAMN är namnet på disken, till exempel d1 i vårt tidigare exempel. +

Alternativen -d och -a talar om för SnapRAID att endast kontrollera den specificerade disken +och ignorera all paritetsdata. +

Detta kommando kommer att ta lång tid, men om du inte är alltför försiktig, +kan du hoppa över det. +

+
+

+STEG 4 -> Synkronisera +

+

Kör kommandot sync för att synkronisera arrayen igen med den nya disken. +

+snapraid sync
+
+

Om allt är återställt är detta kommando omedelbart. +

+
+
+
+

+Kommandon +

+

SnapRAID tillhandahåller några enkla kommandon som låter dig: +

    +
  • +Skriva ut statusen för arrayen -> status +
  • +
  • +Kontrollera diskarna -> smart, probe, up, down +
  • +
  • +Göra en säkerhetskopia/ögonblicksbild -> sync +
  • +
  • +Periodiskt kontrollera data -> scrub +
  • +
  • +Återställa den senaste säkerhetskopian/ögonblicksbilden -> fix. +
  • +
+

Kommandon måste skrivas med gemener. +

+

+status +

+

Skriver ut en sammanfattning av tillståndet för disk-arrayen. +

Det inkluderar information om paritetsfragmentering, hur gamla +blocken är utan kontroll, och alla registrerade tysta +fel som påträffats under skrubbning. +

Informationen som presenteras hänvisar till den senaste tidpunkten du +körde sync. Senare modifieringar beaktas inte. +

Om dåliga block upptäcktes, listas deras blocknummer. +För att fixa dem kan du använda kommandot fix -e. +

Det visar också ett diagram som representerar den senaste tidpunkten då varje block +skrubbades eller synkroniserades. Skrubbade block visas med *, +block synkroniserade men ännu inte skrubbade med o. +

Inget ändras. +

+
+

+smart +

+

Skriver ut en SMART-rapport över alla diskar i systemet. +

Det inkluderar en uppskattning av sannolikheten för fel under det kommande +året, vilket gör att du kan planera underhållsersättningar av diskar som visar +misstänkta attribut. +

Denna sannolikhetsuppskattning erhålls genom att korrelera SMART-attributen +för diskarna med Backblaze-data som finns tillgänglig på: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Om SMART rapporterar att en disk håller på att misslyckas, skrivs FAIL eller PREFAIL ut +för den disken, och SnapRAID returnerar med ett fel. +I detta fall rekommenderas omedelbar ersättning av disken starkt. +

Andra möjliga statussträngar är: +

+
+
+logfail +
+Tidigare var vissa attribut lägre än +tröskelvärdet. +
+
+
+
+logerr +
+Enhetens fellogg innehåller fel. +
+
+
+
+selferr +
+Enhetens självtestlogg innehåller fel. +
+
+
+

Om alternativet -v, --verbose specificeras, tillhandahålls en djupare statistisk analys. +Denna analys kan hjälpa dig att bestämma om du behöver mer +eller mindre paritet. +

Detta kommando använder verktyget smartctl och är ekvivalent med att köra +smartctl -a på alla enheter. +

Om dina enheter inte upptäcks automatiskt korrekt kan du specificera +ett anpassat kommando med hjälp av alternativet smartctl i konfigurations- +filen. +

Inget ändras. +

+
+

+probe +

+

Skriver ut STRÖM-tillståndet för alla diskar i systemet. +

Standby betyder att disken inte snurrar. Active betyder +att disken snurrar. +

Detta kommando använder verktyget smartctl och är ekvivalent med att köra +smartctl -n standby -i på alla enheter. +

Om dina enheter inte upptäcks automatiskt korrekt kan du specificera +ett anpassat kommando med hjälp av alternativet smartctl i konfigurations- +filen. +

Inget ändras. +

+
+

+up +

+

Snurrar upp alla diskar i arrayen. +

Du kan snurra upp endast specifika diskar med hjälp av alternativet -d, --filter-disk. +

Att snurra upp alla diskar samtidigt kräver mycket ström. +Se till att din strömförsörjning kan klara det. +

Inget ändras. +

+
+

+down +

+

Snurrar ner alla diskar i arrayen. +

Detta kommando använder verktyget smartctl och är ekvivalent med att köra +smartctl -s standby,now på alla enheter. +

Du kan snurra ner endast specifika diskar med hjälp av alternativet -d, --filter-disk +alternativet. +

För att automatiskt snurra ner vid fel kan du använda alternativet -s, --spin-down-on-error +med alla andra kommandon, vilket är ekvivalent med att köra down manuellt +när ett fel inträffar. +

Inget ändras. +

+
+

+diff +

+

Listar alla filer som modifierats sedan den senaste sync och som behöver få +sin paritetsdata omberäknad. +

Detta kommando kontrollerar inte filens data, utan endast filens tidsstämpel, +storlek och inode. +

Efter att ha listat alla ändrade filer presenteras en sammanfattning av ändringarna, +grupperade efter: +

+
+
+equal +
+Filer oförändrade från tidigare. +
+
+
+
+added +
+Filer tillagda som inte fanns tidigare. +
+
+
+
+removed +
+Filer borttagna. +
+
+
+
+updated +
+Filer med en annan storlek eller tidsstämpel, vilket innebär att de +modifierades. +
+
+
+
+moved +
+Filer flyttade till en annan katalog på samma disk. +De identifieras genom att ha samma namn, storlek, tidsstämpel +och inode, men en annan katalog. +
+
+
+
+copied +
+Filer som kopierats på samma eller en annan disk där +originalfilen fortfarande finns kvar. +De identifieras genom att ha samma namn, storlek och +tidsstämpel. +Om tidsstämpeln för undersekunder är noll måste hela sökvägen +matcha för att identifieras, inte bara namnet. +
+
+
+
+relocated +
+Filer som flyttats på samma eller en annan disk där +originalet har försvunnit. +De identifieras genom att ha samma namn, storlek och +tidsstämpel. +Om tidsstämpeln för undersekunder är noll måste hela sökvägen +matcha för att identifieras. +Till skillnad från 'moved' filer på samma disk har omlokaliserade +filer en annan inode. +
+
+
+
+restored +
+Filer med en annan inode men matchande katalog, namn, +storlek och tidsstämpel. +Dessa är vanligtvis filer som återställts efter att ha raderats. +
+
+
+

Om en sync krävs är processens returkod 2, istället för standard 0. +Returkoden 1 används för ett generiskt feltillstånd. +

Inget ändras. +

+
+

+sync +

+

Uppdaterar paritetsinformationen. Alla modifierade filer +i disk-arrayen läses, och motsvarande paritets- +data uppdateras. +

Du kan stoppa denna process när som helst genom att trycka Ctrl+C, +utan att förlora det arbete som redan utförts. +Vid nästa körning kommer sync-processen att återupptas där +den avbröts. +

Om tysta eller input/output-fel hittas under processen, +markeras de motsvarande blocken som dåliga. +

Filer identifieras med sökväg och/eller inode och kontrolleras med +storlek och tidsstämpel. +Om filstorleken eller tidsstämpeln skiljer sig åt, beräknas paritetsdata +om för hela filen. +Om filen flyttas eller döps om på samma disk, samtidigt som +samma inode behålls, beräknas inte pariteten om. +Om filen flyttas till en annan disk, beräknas pariteten om, +men den tidigare beräknade hash-informationen behålls. +

content- och parity-filerna modifieras vid behov. +Filerna i arrayen modifieras INTE. +

+
+

+scrub +

+

Skrubbar arrayen och söker efter tysta eller input/output-fel i data- +och paritetsdiskar. +

Varje anrop kontrollerar ungefär 8% av arrayen, exklusive +data som redan skrubbats under de senaste 10 dagarna. +Detta innebär att skrubbning en gång i veckan säkerställer att varje bit data kontrolleras +minst en gång var tredje månad. +

Du kan definiera en annan skrubbplan eller mängd med hjälp av alternativet -p, --plan +som accepterar: +bad - Skrubbar block markerade som dåliga. +new - Skrubbar nyligen synkroniserade block som ännu inte skrubbats. +full - Skrubbar allt. +0-100 - Skrubbar den specificerade procentandelen av block. +

Om du specificerar en procentsats kan du också använda alternativet -o, --older-than +för att definiera hur gammalt blocket ska vara. +De äldsta blocken skrubbas först, vilket säkerställer en optimal kontroll. +Om du bara vill skrubba de nyligen synkroniserade blocken som ännu inte skrubbats, +använd alternativet -p new. +

För att få detaljer om skrubbstatusen, använd kommandot status. +

För alla tysta eller input/output-fel som hittas, markeras de motsvarande blocken +som dåliga i content-filen. +Dessa dåliga block listas i status och kan fixas med fix -e. +Efter fixningen, vid nästa skrubb, kommer de att kontrolleras igen, och om de befinns +korrigerade, tas det dåliga märket bort. +För att skrubba endast de dåliga blocken kan du använda kommandot scrub -p bad. +

Det rekommenderas att köra scrub endast på en synkroniserad array för att undvika +rapporterade fel orsakade av osynkad data. Dessa fel känns igen +som att de inte är tysta fel, och blocken markeras inte som dåliga, +men sådana fel rapporteras i kommandots utdata. +

content-filen modifieras för att uppdatera tiden för den senaste kontrollen +för varje block och för att markera dåliga block. +parity-filerna modifieras INTE. +Filerna i arrayen modifieras INTE. +

+
+

+fix +

+

Fixar alla filer och paritetsdata. +

Alla filer och paritetsdata jämförs med ögonblicksbilds- +tillståndet som sparades i den senaste sync. +Om en skillnad hittas, återställs den till det lagrade ögonblicksbildstillståndet. +

VARNING! Kommandot fix skiljer inte mellan fel och +avsiktliga modifieringar. Det återställer ovillkorligen filtillståndet +till den senaste sync. +

Om inget annat alternativ specificeras, behandlas hela arrayen. +Använd filteralternativen för att välja en delmängd av filer eller diskar att arbeta med. +

För att fixa endast blocken markerade som dåliga under sync och scrub, +använd alternativet -e, --filter-error. +Till skillnad från andra filteralternativ tillämpar detta fixar endast på filer som är +oförändrade sedan den senaste sync. +

SnapRAID döper om alla filer som inte kan fixas genom att lägga till tillägget +.unrecoverable. +

Innan fixningen skannas hela arrayen för att hitta alla filer som flyttats +sedan den senaste sync-operationen. +Dessa filer identifieras av deras tidsstämpel, ignorera deras namn +och katalog, och används i återställningsprocessen vid behov. +Om du flyttade några av dem utanför arrayen kan du använda alternativet -i, --import +för att specificera ytterligare kataloger att skanna. +

Filer identifieras endast med sökväg, inte med inode. +

content-filen modifieras INTE. +parity-filerna modifieras vid behov. +Filerna i arrayen modifieras vid behov. +

+
+

+check +

+

Verifierar alla filer och paritetsdata. +

Det fungerar som fix, men det simulerar endast en återställning och inga ändringar +skrivs till arrayen. +

Detta kommando är i första hand avsett för manuell verifiering, +som efter en återställningsprocess eller under andra speciella förhållanden. +För periodiska och schemalagda kontroller, använd scrub. +

Om du använder alternativet -a, --audit-only, kontrolleras endast fil- +datan, och paritetsdatan ignoreras för en +snabbare körning. +

Filer identifieras endast med sökväg, inte med inode. +

Inget ändras. +

+
+

+list +

+

Listar alla filer som finns i arrayen vid tidpunkten för den +senaste sync. +

Med -v eller --verbose visas även undertiden. +

Inget ändras. +

+
+

+dup +

+

Listar alla dubblettfiler. Två filer antas vara lika om deras +hashar matchar. Filens data läses inte; endast de +förberäknade hasharna används. +

Inget ändras. +

+
+

+pool +

+

Skapar eller uppdaterar en virtuell vy av alla +filer i din disk-array i pooling-katalogen. +

Filerna kopieras inte utan länkas med hjälp av +symboliska länkar. +

Vid uppdatering raderas alla befintliga symboliska länkar och tomma +underkataloger och ersätts med den nya +vyn av arrayen. Alla andra vanliga filer lämnas kvar. +

Inget ändras utanför pool-katalogen. +

+
+

+devices +

+

Skriver ut de lågnivåenheter som används av arrayen. +

Detta kommando visar enhetsassociationerna i arrayen +och är främst avsett som ett skriptgränssnitt. +

De två första kolumnerna är lågnivåenhetens ID och sökväg. +De nästa två kolumnerna är högnivåenhetens ID och sökväg. +Den sista kolumnen är diskens namn i arrayen. +

I de flesta fall har du en lågnivåenhet för varje disk i +arrayen, men i vissa mer komplexa konfigurationer kan du ha flera +lågnivåenheter som används av en enda disk i arrayen. +

Inget ändras. +

+
+

+touch +

+

Anger en godtycklig undertidsstämpel för alla filer +som har den satt till noll. +

Detta förbättrar SnapRAIDs förmåga att känna igen flyttade +och kopierade filer, eftersom det gör tidsstämpeln nästan unik, +vilket minskar möjliga dubbletter. +

Mer specifikt, om undertidsstämpeln inte är noll, +identifieras en flyttad eller kopierad fil som sådan om den matchar +namn, storlek och tidsstämpel. Om undertidsstämpeln +är noll, betraktas den som en kopia endast om hela sökvägen, +storlek och tidsstämpel alla matchar. +

Tidsstämpeln med sekundprecision modifieras inte, +så alla datum och tider för dina filer bevaras. +

+
+

+rehash +

+

Schemalägger en omhashning av hela arrayen. +

Detta kommando ändrar den hash-typ som används, vanligtvis vid uppgradering +från ett 32-bitars system till ett 64-bitars system, för att byta från +MurmurHash3 till den snabbare SpookyHash. +

Om du redan använder den optimala hashen, gör detta kommando +ingenting och informerar dig om att ingen åtgärd behövs. +

Omhashningen utförs inte omedelbart utan sker +progressivt under sync och scrub. +

Du kan kontrollera omhashningstillståndet med hjälp av status. +

Under omhashningen bibehåller SnapRAID full funktionalitet, +med det enda undantaget att dup inte kan upptäcka dubbletter +med hjälp av en annan hash. +

+
+

+locate +

+

Lokaliserar filer som lagras på paritetsdiskarna. För varje matchande fil +skrivs dess plats i paritetsfilen och antalet fragment den upptar ut. +

Du kan använda alternativet -t, --tail för att begränsa åtgärden till filer som +upptar den angivna slutdelen (tail) av pariteten. +

Om du vill omallokera dessa filer kan du använda alternativet +-W, --force-realloc-tail. +Var medveten om att sådana filer inte skyddas av paritet under +omallokeringsprocessen. +

+
+
+

+Alternativ +

+

SnapRAID tillhandahåller följande alternativ: +

+
+
+-c, --conf CONFIG +
+Väljer den konfigurationsfil som ska användas. Om den inte specificeras, i Unix +används filen /usr/local/etc/snapraid.conf om den finns, +annars /etc/snapraid.conf. +I Windows används filen snapraid.conf i samma +katalog som snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filtrerar filerna att behandla i check och fix. +Endast filerna som matchar det specificerade mönstret behandlas. +Detta alternativ kan användas flera gånger. +Se avsnittet MÖNSTER för mer information om +mönsterspecifikationer. +I Unix, se till att globbing-tecken citeras om de används. +Detta alternativ kan endast användas med check och fix. +Det kan inte användas med sync och scrub, eftersom de alltid +behandlar hela arrayen. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filtrerar diskarna att behandla i check, fix, up och down. +Du måste specificera ett disk-namn som definieras i konfigurations- +filen. +Du kan också specificera paritetsdiskar med namnen: parity, 2-parity, +3-parity, etc., för att begränsa operationer till en specifik paritetsdisk. +Om du kombinerar flera --filter, --filter-disk och --filter-missing alternativ, +väljs endast filer som matchar alla filter. +Detta alternativ kan användas flera gånger. +Detta alternativ kan endast användas med check, fix, up och down. +Det kan inte användas med sync och scrub, eftersom de alltid +behandlar hela arrayen. +
+
+
+
+
+
+-m, --filter-missing +
+Filtrerar filerna att behandla i check och fix. +Endast filerna som saknas eller har raderats från arrayen behandlas. +När det används med fix, fungerar detta som ett undelete-kommando. +Om du kombinerar flera --filter, --filter-disk och --filter-missing alternativ, +väljs endast filer som matchar alla filter. +Detta alternativ kan endast användas med check och fix. +Det kan inte användas med sync och scrub, eftersom de alltid +behandlar hela arrayen. +
+
+
+
+
+
+-e, --filter-error +
+Behandlar filerna med fel i check och fix. +Det behandlar endast filer som har block markerade med tysta +eller input/output-fel under sync och scrub, som listas i status. +Detta alternativ kan endast användas med check och fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Väljer skrubbplanen. Om PERC är ett numeriskt värde från 0 till 100, +tolkas det som procentandelen av block som ska skrubbas. +Istället för en procentsats kan du specificera en plan: +bad skrubbar dåliga block, new skrubbar block som ännu inte skrubbats, +och full skrubbar allt. +Detta alternativ kan endast användas med scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Väljer den äldsta delen av arrayen att behandla i scrub. +DAYS är den minsta åldern i dagar för ett block att skrubbas; +standard är 10. +Block markerade som dåliga skrubbas alltid oavsett detta alternativ. +Detta alternativ kan endast användas med scrub. +
+
+
+
+
+
+-a, --audit-only +
+I check, verifierar hashen av filerna utan +att kontrollera paritetsdata. +Om du bara är intresserad av att kontrollera filens data, kan detta +alternativ avsevärt påskynda kontrollprocessen. +Detta alternativ kan endast användas med check. +
+
+
+
+
+
+-h, --pre-hash +
+I sync, kör en preliminär hash-fas av all ny data +för ytterligare verifiering innan paritetsberäkningen. +Vanligtvis görs ingen preliminär hashning i sync, och den nya +datan hashberäknas precis innan paritetsberäkningen när den läses +för första gången. +Denna process sker när systemet är under +tung belastning, med alla diskar snurrande och en upptagen CPU. +Detta är ett extremt tillstånd för maskinen, och om den har ett +latent hårdvaruproblem, kan tysta fel gå obemärkt förbi +eftersom datan ännu inte har hashberäknats. +För att undvika denna risk kan du aktivera pre-hash-läget för att få +all data läst två gånger för att säkerställa dess integritet. +Detta alternativ verifierar också filer som flyttats inom arrayen +för att säkerställa att flyttoperationen lyckades och, om nödvändigt, +låter dig köra en fix-operation innan du fortsätter. +Detta alternativ kan endast användas med sync. +
+
+
+
+
+
+-i, --import DIR +
+Importerar från den specificerade katalogen alla filer som raderats +från arrayen efter den senaste sync. +Om du fortfarande har sådana filer, kan de användas av check +och fix för att förbättra återställningsprocessen. +Filerna läses, inklusive i underkataloger, och identifieras +oavsett deras namn. +Detta alternativ kan endast användas med check och fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+Vid något fel, snurrar ner alla hanterade diskar innan den avslutas med +en statuskod som inte är noll. Detta förhindrar att enheterna +förblir aktiva och snurrar efter en avbruten operation, +vilket hjälper till att undvika onödig värmeuppbyggnad och ström- +förbrukning. Använd detta alternativ för att säkerställa att diskar stoppas säkert +även när ett kommando misslyckas. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Tillämpar en global bandbreddsbegränsning för alla diskar. RATE är +antalet byte per sekund. Du kan specificera en multiplikator +som K, M eller G (t.ex. --bw-limit 1G). +
+
+
+
+
+
+-t, --tail STORLEK +
+Begränsa fillistan till de som inte använder mer än den angivna +slutstorleken på paritetsdiskarna. +Du kan använda multiplikatorer som K, M, G eller T (t.ex. --tail 1G). +Detta alternativ är endast giltigt när det används tillsammans med +kommandot locate. +
+
+
+
+
+
+-A, --stats +
+Aktiverar en utökad statusvy som visar ytterligare information. +Skärmen visar två diagram: +Det första diagrammet visar antalet buffrade strippar för varje +disk, tillsammans med filsökvägen för filen som för närvarande används +på den disken. Vanligtvis kommer den långsammaste disken att ha +ingen buffert tillgänglig, vilket bestämmer den maximalt uppnåeliga +bandbredden. +Det andra diagrammet visar procentandelen tid som spenderats i väntan +under de senaste 100 sekunderna. Den långsammaste disken förväntas +orsaka större delen av väntetiden, medan andra diskar bör ha +liten eller ingen väntetid eftersom de kan använda sina buffrade strippar. +Detta diagram visar också den tid som spenderats i väntan på hash- +beräkningar och RAID-beräkningar. +Alla beräkningar körs parallellt med diskoperationer. +Därför, så länge det finns mätbar väntetid för minst en disk, +indikerar det att CPU:n är snabb nog att +hålla jämna steg med arbetsbelastningen. +
+
+
+
+
+
+-Z, --force-zero +
+Tvingar den osäkra operationen att synkronisera en fil med noll +storlek som tidigare var icke-noll. +Om SnapRAID upptäcker ett sådant tillstånd, stoppar det att fortsätta +om du inte specificerar detta alternativ. +Detta gör att du enkelt kan upptäcka när, efter en systemkrasch, +vissa filer som användes trunkerades. +Detta är ett möjligt tillstånd i Linux med filsystemen ext3/ext4. +Detta alternativ kan endast användas med sync. +
+
+
+
+
+
+-E, --force-empty +
+Tvingar den osäkra operationen att synkronisera en disk där alla +ursprungliga filer saknas. +Om SnapRAID upptäcker att alla filer som ursprungligen fanns +på disken saknas eller har skrivits om, stoppar det att fortsätta +om du inte specificerar detta alternativ. +Detta gör att du enkelt kan upptäcka när ett datafilsystem inte är +monterat. +Detta alternativ kan endast användas med sync. +
+
+
+
+
+
+-U, --force-uuid +
+Tvingar den osäkra operationen att synkronisera, kontrollera och fixa +med diskar som har ändrat sin UUID. +Om SnapRAID upptäcker att vissa diskar har ändrat UUID, +stoppar det att fortsätta om du inte specificerar detta alternativ. +Detta gör att du kan upptäcka när dina diskar är monterade på fel +monteringspunkter. +Det är dock tillåtet att ha en enda UUID-ändring med +enkel paritet, och fler med multipel paritet, eftersom detta är +det normala fallet när man byter ut diskar efter en återställning. +Detta alternativ kan endast användas med sync, check eller +fix. +
+
+
+
+
+
+-D, --force-device +
+Tvingar den osäkra operationen att fixa med otillgängliga diskar +eller med diskar på samma fysiska enhet. +Till exempel, om du förlorade två datadisker och har en reservdisk för att återställa +endast den första, kan du ignorera den andra otillgängliga disken. +Eller, om du vill återställa en disk i det lediga utrymme som finns kvar på en +redan använd disk, dela samma fysiska enhet. +Detta alternativ kan endast användas med fix. +
+
+
+
+
+
+-N, --force-nocopy +
+I sync, check och fix, inaktiverar heuristiken för kopieringsdetektering. +Utan detta alternativ antar SnapRAID att filer med samma +attribut, såsom namn, storlek och tidsstämpel, är kopior med +samma data. +Detta möjliggör identifiering av kopierade eller flyttade filer från en disk +till en annan och återanvänder den redan beräknade hash-informationen +för att upptäcka tysta fel eller för att återställa saknade filer. +I vissa sällsynta fall kan detta beteende leda till falska positiva +eller en långsam process på grund av många hash-verifieringar, och detta +alternativ låter dig lösa sådana problem. +Detta alternativ kan endast användas med sync, check och fix. +
+
+
+
+
+
+-F, --force-full +
+I sync, tvingar en fullständig omberäkning av pariteten. +Detta alternativ kan användas när du lägger till en ny paritetsnivå eller om +du återgick till en gammal content-fil med mer aktuell paritetsdata. +Istället för att återskapa pariteten från grunden låter detta dig +återanvända hasharna som finns i content-filen för att validera data +och bibehålla dataskyddet under sync-processen med hjälp av +den befintliga paritetsdatan. +Detta alternativ kan endast användas med sync. +
+
+
+
+
+
+-R, --force-realloc +
+I sync, tvingar en fullständig omallokering av filer och ombyggnad av pariteten. +Detta alternativ kan användas för att helt omallokera alla filer, +ta bort fragmentering, samtidigt som hasharna som finns i content- +filen återanvänds för att validera data. +Detta alternativ kan endast användas med sync. +VARNING! Detta alternativ är endast för experter, och det rekommenderas +starkt att inte använda det. +Du HAR INGET dataskydd under sync-operationen. +
+
+
+
+
+
+-W, --force-realloc-tail STORLEK +
+Fungerar som -R, --force-realloc, men begränsat till den angivna +slutdelen (de sista STORLEK byten) av varje paritetsfil. +Den tvingar omallokering (flytt) av alla filfragment/block som för +närvarande lagras i den slutsektionen, vilket gör att de kan placeras +var som helst i paritetsfilen/filerna där ledigt utrymme finns +(inklusive befintliga hål). +Huvudsyftet med detta alternativ är att minska paritetsfilens storlek +på disken. +Om omallokeringen lyckas rensa hela slutsektionen (inga block är kvar +som använder den), trunkeras paritetsfilen och det oanvända +slututrymmet återtas. +Du kan använda multiplikatorer som K, M, G eller T (t.ex. +--force-realloc-tail 1G). +Du kan använda locate -t, --tail för att i förväg veta vilka filer +som påverkas. +VARNING! +Detta alternativ är endast för experter, och det rekommenderas +starkt att inte använda det. +Du har INGET dataskydd under sync-åtgärden för de berörda filerna. +
+
+
+
+
+
+-l, --log FILE +
+Skriver en detaljerad logg till den specificerade filen. +Om detta alternativ inte specificeras, skrivs oväntade fel ut +på skärmen, vilket potentiellt kan leda till överdriven utdata i händelse av +många fel. När -l, --log specificeras, skrivs endast +fatala fel som får SnapRAID att stoppa ut +på skärmen. +Om sökvägen börjar med >>, öppnas filen +i tilläggsläge. Förekomster av %D och %T i namnet ersätts +med datum och tid i formatet YYYYMMDD respektive +HHMMSS. I Windows batch-filer måste du dubblera +%-tecknet, t.ex. result-%%D.log. För att använda >> måste du +omsluta namnet i citattecken, t.ex. ">>result.log". +För att skicka ut loggen till standardutdata eller standardfel, +kan du använda ">&1" respektive ">&2". +Se filen snapraid_log.txt eller man-sidan för beskrivningar av logg-taggar. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Anger en ny felgräns innan körningen stoppas. +Som standard stoppar SnapRAID om det stöter på mer än 100 +input/output-fel, vilket indikerar att en disk troligen håller på att misslyckas. +Detta alternativ påverkar sync och scrub, som tillåts +att fortsätta efter den första uppsättningen diskfel för att försöka +slutföra sina operationer. +Däremot stoppar check och fix alltid vid det första felet. +
+
+
+
+
+
+-S, --start BLKSTART +
+Börjar behandlingen från det specificerade +blocknumret. Detta kan vara användbart för att försöka igen att kontrollera +eller fixa specifika block i händelse av en skadad disk. +Detta alternativ är främst för avancerad manuell återställning. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Behandlar endast det specificerade antalet block. +Detta alternativ är främst för avancerad manuell återställning. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Genererar en dummy-konfigurationsfil från en befintlig +content-fil. +Konfigurationsfilen skrivs till standardutdata +och skriver inte över en befintlig fil. +Denna konfigurationsfil innehåller också den information +som behövs för att rekonstruera diskmonteringspunkterna om du +förlorar hela systemet. +
+
+
+
+
+
+-v, --verbose +
+Skriver ut mer information på skärmen. +Om det specificeras en gång, skrivs exkluderade filer +och ytterligare statistik ut. +Detta alternativ har ingen effekt på loggfilerna. +
+
+
+
+
+
+-q, --quiet +
+Skriver ut mindre information på skärmen. +Om det specificeras en gång, tas förloppsindikatorn bort; två gånger, +de pågående operationerna; tre gånger, informations- +meddelandena; fyra gånger, statusmeddelandena. +Fatala fel skrivs alltid ut på skärmen. +Detta alternativ har ingen effekt på loggfilerna. +
+
+
+
+
+
+-H, --help +
+Skriver ut en kort hjälpskärm. +
+
+
+
+
+
+-V, --version +
+Skriver ut programversionen. +
+
+
+
+
+

+Konfiguration +

+

SnapRAID kräver en konfigurationsfil för att veta var din disk-array +finns och var paritetsinformationen ska lagras. +

I Unix används filen /usr/local/etc/snapraid.conf om den finns, +annars /etc/snapraid.conf. +I Windows används filen snapraid.conf i samma +katalog som snapraid.exe. +

Den måste innehålla följande alternativ (skiftlägeskänsligt): +

+

+parity FIL [,FIL] ... +

+

Definierar de filer som ska användas för att lagra paritetsinformationen. +Pariteten möjliggör skydd från ett enda disk- +fel, liknande RAID5. +

Du kan specificera flera filer, som måste finnas på olika diskar. +När en fil inte kan växa mer, används nästa fil. +Det totala tillgängliga utrymmet måste vara minst lika stort som den största datadisken i +arrayen. +

Du kan lägga till ytterligare paritetsfiler senare, men du +kan inte ändra ordning på eller ta bort dem. +

Att hålla paritetsdiskarna reserverade för paritet säkerställer att +de inte blir fragmenterade, vilket förbättrar prestandan. +

I Windows lämnas 256 MB oanvänt på varje disk för att undvika +varningen om fulla diskar. +

Detta alternativ är obligatoriskt och kan endast användas en gång. +

+
+

+(2,3,4,5,6)-parity FIL [,FIL] ... +

+

Definierar de filer som ska användas för att lagra extra paritetsinformation. +

För varje paritetsnivå som specificeras aktiveras en ytterligare skyddsnivå: +

    +
  • +2-parity möjliggör RAID6 dubbel paritet. +
  • +
  • +3-parity möjliggör trippel paritet. +
  • +
  • +4-parity möjliggör fyrdubbel (fyra) paritet. +
  • +
  • +5-parity möjliggör penta (fem) paritet. +
  • +
  • +6-parity möjliggör hexa (sex) paritet. +
  • +
+

Varje paritetsnivå kräver närvaro av alla föregående paritets- +nivåer. +

Samma överväganden som för alternativet parity gäller. +

Dessa alternativ är valfria och kan endast användas en gång. +

+
+

+z-parity FIL [,FIL] ... +

+

Definierar en alternativ fil och ett format för att lagra trippel paritet. +

Detta alternativ är ett alternativ till 3-parity, främst avsett för +lågpresterande processorer som ARM eller AMD Phenom, Athlon och Opteron som inte +stöder SSSE3-instruktionsuppsättningen. I sådana fall ger det +bättre prestanda. +

Detta format liknar, men är snabbare än, det som används av ZFS RAIDZ3. +Liksom ZFS fungerar det inte utöver trippel paritet. +

När du använder 3-parity kommer du att varnas om det rekommenderas att använda +formatet z-parity för prestandaförbättring. +

Det är möjligt att konvertera från ett format till ett annat genom att justera +konfigurationsfilen med önskad z-parity eller 3-parity fil +och använda fix för att återskapa den. +

+
+

+content FIL +

+

Definierar den fil som ska användas för att lagra listan och checksummorna för alla +filer som finns i din disk-array. +

Den kan placeras på en disk som används för data, paritet eller +någon annan tillgänglig disk. +Om du använder en datadisk exkluderas denna fil automatiskt +från sync-processen. +

Detta alternativ är obligatoriskt och kan användas flera gånger för att spara +flera kopior av samma fil. +

Du måste lagra minst en kopia för varje paritetsdisk som används +plus en. Att använda ytterligare kopior skadar inte. +

+
+

+data NAMN KATALOG +

+

Definierar namnet och monteringspunkten för datadiskarna i +arrayen. NAMN används för att identifiera disken och måste +vara unikt. KATALOG är monteringspunkten för disken i +filsystemet. +

Du kan ändra monteringspunkten vid behov, så länge +du behåller NAMN fixerat. +

Du bör använda ett alternativ för varje datadisk i arrayen. +

Du kan byta namn på en disk senare genom att ändra NAMN direkt +i konfigurationsfilen och sedan köra ett sync-kommando. +I händelse av namnbyte görs associationen med hjälp av den lagrade +UUID:n för diskarna. +

+
+

+extra NAME DIR +

+

Definierar namn och monteringspunkt för ytterligare diskar som ska +övervakas med kommandona smart och probe. +

Detta är användbart för att övervaka diskar som inte ingår i arrayen +men som krävs för att systemet ska fungera, till exempel +startdisken. +

Observera att sådana diskar inte påverkas av kommandona up och +down eftersom de förväntas alltid snurra. +

+
+

+nohidden +

+

Exkluderar alla dolda filer och kataloger. +I Unix är dolda filer de som börjar med .. +I Windows är de de med det dolda attributet. +

+
+

+exclude/include MÖNSTER +

+

Definierar fil- eller katalogmönstren att exkludera eller inkludera +i sync-processen. +Alla mönster behandlas i den specificerade ordningen. +

Om det första mönstret som matchar är ett exclude-mönster, +exkluderas filen. Om det är ett include-mönster, inkluderas filen. +Om inget mönster matchar, exkluderas filen om det sista mönstret +som specificerats är ett include-mönster, eller inkluderas om det sista mönstret +som specificerats är ett exclude-mönster. +

Se avsnittet MÖNSTER för mer information om mönster- +specifikationer. +

Detta alternativ kan användas flera gånger. +

+
+

+blocksize STORLEK_I_KIBIBYTES +

+

Definierar den grundläggande blockstorleken i kibibytes för pariteten. +En kibibyte är 1024 byte. +

Standard blockstorlek är 256, vilket bör fungera för de flesta fall. +

VARNING! Detta alternativ är endast för experter, och det rekommenderas +starkt att inte ändra detta värde. För att ändra detta värde i framtiden, +kommer du att behöva återskapa hela pariteten! +

En anledning att använda en annan blockstorlek är om du har många små +filer, i storleksordningen miljoner. +

För varje fil, även om den bara är några byte, allokeras ett helt block paritet, +och med många filer kan detta leda till betydande oanvänt paritetsutrymme. +När du helt fyller paritetsdisken, är du inte +tillåten att lägga till fler filer på datadiskarna. +Det bortkastade paritetsutrymmet ackumuleras dock inte över datadiskar. +Bortkastat utrymme som härrör från ett högt antal filer på en datadisk begränsar endast +mängden data på den datadisken, inte andra. +

Som en approximation kan du anta att hälften av blockstorleken är +bortkastad för varje fil. Till exempel, med 100 000 filer och en 256 KiB +blockstorlek, kommer du att slösa 12,8 GB paritet, vilket kan resultera +i 12,8 GB mindre utrymme tillgängligt på datadisken. +

Du kan kontrollera mängden bortkastat utrymme på varje disk med hjälp av status. +Detta är mängden utrymme du måste lämna ledigt på data- +diskarna eller använda för filer som inte ingår i arrayen. +Om detta värde är negativt betyder det att du är nära att fylla +pariteten, och det representerar det utrymme du fortfarande kan slösa. +

För att undvika detta problem kan du använda en större partition för paritet. +Om till exempel paritetspartitionen är 12,8 GB större än datadiskarna, +har du tillräckligt med extra utrymme för att hantera upp till 100 000 +filer på varje datadisk utan något bortkastat utrymme. +

Ett trick för att få en större paritetspartition i Linux är att formatera den +med kommandot: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Detta resulterar i cirka 1,5% extra utrymme, ungefär 60 GB för +en 4 TB-disk, vilket möjliggör cirka 460 000 filer på varje datadisk utan +något bortkastat utrymme. +

+
+

+hashsize STORLEK_I_BYTE +

+

Definierar hash-storleken i byte för de sparade blocken. +

Standard hash-storlek är 16 byte (128 bitar), vilket bör fungera +för de flesta fall. +

VARNING! Detta alternativ är endast för experter, och det rekommenderas +starkt att inte ändra detta värde. För att ändra detta värde i framtiden, +kommer du att behöva återskapa hela pariteten! +

En anledning att använda en annan hash-storlek är om ditt system har +begränsat minne. Som en tumregel kräver SnapRAID vanligtvis +1 GiB RAM för varje 16 TB data i arrayen. +

Specifikt, för att lagra hasharna av datan, kräver SnapRAID +ungefär TS*(1+HS)/BS byte RAM, +där TS är den totala storleken i byte av din disk-array, BS är +blockstorleken i byte och HS är hash-storleken i byte. +

Till exempel, med 8 diskar på 4 TB, en blockstorlek på 256 KiB +(1 KiB = 1024 byte) och en hash-storlek på 16, får du: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1,93 GiB
+
+

Om du byter till en hash-storlek på 8 får du: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1,02 GiB
+
+

Om du byter till en blockstorlek på 512 får du: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0,96 GiB
+
+

Om du byter till både en hash-storlek på 8 och en blockstorlek på 512 får du: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 GiB
+
+
+
+

+autosave STORLEK_I_GIGABYTES +

+

Sparar automatiskt tillståndet vid synkronisering eller skrubbning efter att den +specificerade mängden GB har behandlats. +Detta alternativ är användbart för att undvika att starta om långa sync- +kommandon från början om de avbryts av en maskinkrasch eller någon annan händelse. +

+
+

+temp_limit TEMPERATUR_CELSIUS +

+

Anger den maximalt tillåtna disk-temperaturen i Celsius. När den specificeras, +kontrollerar SnapRAID periodiskt temperaturen på alla diskar med hjälp av +verktyget smartctl. De aktuella disk-temperaturerna visas medan +SnapRAID är igång. Om någon disk överskrider denna gräns, stoppas alla operationer +och diskarna snurras ner (sätts i standby) under den tid +som definieras av alternativet temp_sleep. Efter viloperioden återupptas operationerna, +och kan potentiellt pausas igen om temperaturgränsen nås +ännu en gång. +

Under drift analyserar SnapRAID också värmekurvan för varje +disk och uppskattar den långsiktiga stabila temperaturen de förväntas +nå om aktiviteten fortsätter. Uppskattningen utförs först efter att +disk-temperaturen har ökat fyra gånger, vilket säkerställer att tillräckligt med +datapoäng finns tillgängliga för att fastställa en pålitlig trend. +Denna förutsagda stabila temperatur visas inom parentes bredvid den +aktuella värdet och hjälper till att bedöma om systemets kylning är +tillräcklig. Denna uppskattade temperatur är endast för informationssyfte +och har ingen effekt på SnapRAIDs beteende. Programmens +åtgärder baseras enbart på de faktiska uppmätta disk-temperaturerna. +

För att utföra denna analys behöver SnapRAID en referens för system- +temperaturen. Det försöker först läsa den från tillgängliga hårdvaru- +sensorer. Om ingen system-sensor kan nås, används den lägsta disk- +temperaturen som mättes vid start av körningen som en reservreferens. +

Normalt visar SnapRAID endast temperaturen på den hetaste disken. +För att visa temperaturen på alla diskar, använd alternativet -A eller --stats. +

+
+

+temp_sleep TID_I_MINUTER +

+

Anger standby-tiden, i minuter, när temperaturgränsen har +nåtts. Under denna period förblir diskarna nedsnurrade. Standard +är 5 minuter. +

+
+

+pool KATALOG +

+

Definierar poolningskatalogen där den virtuella vyn av disk- +arrayen skapas med hjälp av kommandot pool. +

Katalogen måste redan existera. +

+
+

+share UNC_KATALOG +

+

Definierar Windows UNC-sökvägen som krävs för att få åtkomst till diskarna på distans. +

Om detta alternativ specificeras, använder de symboliska länkarna som skapats i pool- +katalogen denna UNC-sökväg för att få åtkomst till diskarna. +Utan detta alternativ använder de genererade symboliska länkarna endast lokala sökvägar, +vilket inte tillåter delning av pool-katalogen över nätverket. +

De symboliska länkarna bildas med hjälp av den specificerade UNC-sökvägen, lägger till +disk-namnet som specificeras i data-alternativet, och lägger slutligen till filens +katalog och namn. +

Detta alternativ krävs endast för Windows. +

+
+

+smartctl DISK/PARITY ALTERNATIV... +

+

Definierar anpassade smartctl-alternativ för att få SMART-attributen för +varje disk. Detta kan krävas för RAID-kontroller och vissa USB- +diskar som inte kan upptäckas automatiskt. Platsinnehavaren %s ersätts av +enhetens namn, men är valfri för fixerade enheter som RAID-kontroller. +

DISK är samma disk-namn som specificeras i data-alternativet. +PARITY är ett av paritetsnamnen: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity eller z-parity. +

I de specificerade ALTERNATIVEN ersätts strängen %s med +enhetens namn. För RAID-kontroller är enheten +sannolikt fixerad, och du kanske inte behöver använda %s. +

Se smartmontools dokumentation för möjliga alternativ: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Till exempel: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignorerar det specificerade SMART-attributet vid beräkning av sannolikheten +för diskfel. Detta alternativ är användbart om en disk rapporterar ovanliga eller +vilseledande värden för ett visst attribut. +

DISK är samma disk-namn som specificeras i data-alternativet. +PARITY är ett av paritetsnamnen: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity eller z-parity. +Det speciella värdet * kan användas för att ignorera attributet på alla diskar. +

Till exempel, för att ignorera attributet Current Pending Sector Count på +alla diskar: +

+smartignore * 197
+
+

För att ignorera det endast på den första paritetsdisken: +

+smartignore parity 197
+
+
+
+

+Exempel +

+

Ett exempel på en typisk konfiguration för Unix är: +

+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
+
+

Ett exempel på en typisk konfiguration för Windows är: +

+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
+
+
+
+
+

+Mönster (Pattern) +

+

Mönster ger ett flexibelt sätt att filtrera filer för inkludering eller +exkludering. Genom att använda jokertecken kan du definiera regler som +matchar specifika filnamn eller hela katalogstrukturer utan att +lista varje sökväg manuellt. +

Frågetecknet ? matchar valfritt enskilt tecken utom katalogavgränsaren. +Detta gör det användbart för att matcha filnamn med variabla tecken +samtidigt som mönstret hålls begränsat till en enda katalognivå. +

Den enkla stjärnan * matchar valfri teckensekvens, men precis som +frågetecknet korsar den aldrig kataloggränser. Den stannar vid +snedstrecket, vilket gör den lämplig för matchning inom en enskild +sökvägskomponent. Detta är det standardbeteende för jokertecken som är +bekant från skal-globbing. +

Den dubbla stjärnan ** är mer kraftfull; den matchar valfri teckensekvens +inklusive katalogavgränsare. Detta gör att mönster kan matcha över +flera katalognivåer. När ** förekommer direkt i ett mönster kan det +matcha noll eller fler tecken inklusive snedstreck mellan den +omkringliggande bokstavliga texten. +

Den viktigaste användningen av ** är i den speciella formen /**/. Detta matchar +noll eller flera kompletta katalognivåer, vilket gör det möjligt att matcha filer +på valfritt djup i ett katalogträd utan att känna till den exakta sökvägsstrukturen. +Till exempel matchar mönstret src/**/main.js filerna src/main.js (hoppar över +noll kataloger), src/ui/main.js (hoppar över en katalog) och +src/ui/components/main.js (hoppar över två kataloger). +

Teckenklasser som använder hakparenteser [] matchar ett enskilt tecken från en +angiven uppsättning eller ett intervall. Precis som de andra mönstren för enskilda +tecken matchar de inte katalogavgränsare. Klasser stöder intervall och +negering med ett utropstecken. +

Den grundläggande skillnaden att komma ihåg är att *, ? och teckenklasser +alla respekterar kataloggränser och endast matchar inom en enskild +sökvägskomponent, medan ** är det enda mönstret som kan matcha över +katalogavgränsare. +

Det finns fyra olika typer av mönster: +

+
+
+FILE +
+Väljer valfri fil med namnet FILE. +Detta mönster gäller endast filer, inte kataloger. +
+
+
+
+
+
+DIR/ +
+Väljer valfri katalog med namnet DIR och allt innehåll. +Detta mönster gäller endast kataloger, inte filer. +
+
+
+
+
+
+/PATH/FILE +
+Väljer den exakt angivna filsökvägen. Detta mönster gäller +endast filer, inte kataloger. +
+
+
+
+
+
+/PATH/DIR/ +
+Väljer den exakt angivna katalogsökvägen och allt innehåll. +Detta mönster gäller endast kataloger, inte filer. +
+
+
+

När du specificerar en absolut sökväg som börjar med /, tillämpas den vid +array-rotkatalogen, inte den lokala filsystemets rotkatalog. +

I Windows kan du använda bakåtsnedstrecket \ istället för framåtsnedstrecket /. +Windows systemkataloger, junction points, monteringspunkter och andra Windows +speciella kataloger behandlas som filer, vilket innebär att för att exkludera +dem måste du använda en fil-regel, inte en katalog-regel. +

Om filnamnet innehåller tecknet *, ?, [, +eller ], måste du undvika det för att förhindra att det tolkas som ett +globbing-tecken. I Unix är undvikande-tecknet \; i Windows är det ^. +När mönstret är på kommandoraden måste du dubbla undvikande- +tecknet för att förhindra att det tolkas av kommandoskalet. +

I konfigurationsfilen kan du använda olika strategier för att filtrera +filerna som ska behandlas. +Det enklaste tillvägagångssättet är att endast använda exclude-regler för att ta bort alla +filer och kataloger du inte vill behandla. Till exempel: +

+# Exkluderar alla filer som heter *.unrecoverable
+exclude *.unrecoverable
+# Exkluderar rotkatalogen /lost+found
+exclude /lost+found/
+# Exkluderar alla underkataloger som heter tmp
+exclude tmp/
+
+

Det motsatta tillvägagångssättet är att definiera endast de filer du vill behandla, med +endast include-regler. Till exempel: +

+# Inkluderar endast vissa kataloger
+include /movies/
+include /musics/
+include /pictures/
+
+

Det sista tillvägagångssättet är att blanda exclude- och include-regler. I detta fall +är ordningen på reglerna viktig. Tidigare regler har +företräde framför senare. +För att förenkla kan du lista alla exclude-regler först och sedan +alla include-regler. Till exempel: +

+# Exkluderar alla filer som heter *.unrecoverable
+exclude *.unrecoverable
+# Exkluderar alla underkataloger som heter tmp
+exclude tmp/
+# Inkluderar endast vissa kataloger
+include /movies/
+include /musics/
+include /pictures/
+
+

På kommandoraden, med hjälp av alternativet -f, kan du bara använda include- +mönster. Till exempel: +

+# Kontrollerar endast .mp3-filerna.
+# I Unix, använd citattecken för att undvika globbing-expansion av skalet.
+snapraid -f "*.mp3" check
+
+

I Unix, när du använder globbing-tecken på kommandoraden, måste du +citattecken dem för att förhindra att skalet expanderar dem. +

+
+

+Ignorera filer (Ignore File) +

+

Utöver de globala reglerna i konfigurationsfilen kan du placera +.snapraidignore-filer i vilken katalog som helst i arrayen för att definiera +decentraliserade exkluderingsregler. +

Regler som definieras i .snapraidignore tillämpas efter reglerna i +konfigurationsfilen. Detta innebär att de har högre prioritet och kan +användas för att exkludera filer som tidigare inkluderats av den globala +konfigurationen. I praktiken innebär det att om en lokal regel matchar, så +exkluderas filen oavsett de globala inkluderingsinställningarna. +

Mönsterlogiken i .snapraidignore speglar den globala konfigurationen men +förankrar mönstren till den katalog där filen finns: +

+
+
+FILE +
+Väljer alla filer med namnet FILE i denna katalog eller under. +Detta följer samma globbing-regler som det globala mönstret. +
+
+
+
+
+
+DIR/ +
+Väljer alla kataloger med namnet DIR och allt innehåll, som finns +i denna katalog eller under. +
+
+
+
+
+
+/PATH/FILE +
+Väljer den exakt angivna filen relativt platsen för +.snapraidignore-filen. +
+
+
+
+
+
+/PATH/DIR/ +
+Väljer den exakt angivna katalogen och allt innehåll, relativt +platsen för .snapraidignore-filen. +
+
+
+

Till skillnad från den globala konfigurationen stöder .snapraidignore-filer +endast exkluderingsregler; du kan inte använda include-mönster eller negation (!). +

Till exempel, om du har en .snapraidignore i /mnt/disk1/projects/: +

+# Exkluderar ENDAST /mnt/disk1/projects/output.bin
+/output.bin
+# Exkluderar alla kataloger med namnet build inuti projects/
+build/
+# Exkluderar alla .tmp-filer inuti projects/ eller dess undermappar
+*.tmp
+
+
+
+

+Innehåll (Content) +

+

SnapRAID lagrar listan och checksummorna för dina filer i content-filen. +

Det är en binär fil som listar alla filer som finns i din disk-array, +tillsammans med alla checksummor för att verifiera deras integritet. +

Denna fil läses och skrivs av kommandona sync och scrub och +läses av kommandona fix, check och status. +

+
+

+Paritet (Parity) +

+

SnapRAID lagrar paritetsinformationen för din array i parity- +filerna. +

Dessa är binära filer som innehåller den beräknade pariteten för alla +block definierade i content-filen. +

Dessa filer läses och skrivs av kommandona sync och fix och +läses endast av kommandona scrub och check. +

+
+

+Kodning +

+

SnapRAID i Unix ignorerar all kodning. Det läser och lagrar +filnamnen med samma kodning som används av filsystemet. +

I Windows konverteras alla namn som läses från filsystemet och +behandlas i UTF-8-format. +

För att få filnamn utskrivna korrekt måste du ställa in Windows- +konsolen till UTF-8-läge med kommandot chcp 65001 och använda +ett TrueType-typsnitt som Lucida Console som konsoltypsnitt. +Detta påverkar endast de utskrivna filnamnen; om du +omdirigerar konsolutdata till en fil, är den resulterande filen alltid +i UTF-8-format. +

+
+

+Upphovsrätt (Copyright) +

+

Denna fil är Copyright (C) 2025 Andrea Mazzoleni +

+
+

+Se Även (See Also) +

+

snapraid_log(1), snapraidd(1) +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-uk.html b/beta/manual-uk.html new file mode 100644 index 00000000..f8983236 --- /dev/null +++ b/beta/manual-uk.html @@ -0,0 +1,2287 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Короткий опис +

+
+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 — це програма резервного копіювання, розроблена для +дискових масивів, яка зберігає інформацію парності для +відновлення даних у випадку відмови до шести дисків. +

В першу чергу призначена для домашніх медіацентрів з великими +файлами, що рідко змінюються, SnapRAID пропонує кілька функцій: +

    +
  • +Ви можете використовувати диски, вже заповнені файлами, без +необхідності їх переформатування, отримуючи доступ до них +як зазвичай. +
  • +
  • +Усі ваші дані хешуються для забезпечення цілісності даних +та запобігання прихованому пошкодженню. +
  • +
  • +Коли кількість дисків, що відмовили, перевищує кількість +дисків парності, втрата даних обмежується дисками, що +постраждали; дані на інших дисках залишаються доступними. +
  • +
  • +Якщо ви випадково видалили файли на диску, можливе +відновлення. +
  • +
  • +Диски можуть мати різний розмір. +
  • +
  • +Ви можете додавати диски в будь-який час. +
  • +
  • +SnapRAID не блокує ваші дані; ви можете припинити його +використання в будь-який час без переформатування або +переміщення даних. +
  • +
  • +Для доступу до файлу потрібно розкрутити лише один диск, що +заощаджує електроенергію та зменшує шум. +
  • +
+

Для отримання додаткової інформації відвідайте офіційний сайт +SnapRAID: +

+https://www.snapraid.it/
+
+
+
+

+Обмеження +

+

SnapRAID є гібридом між RAID та програмою резервного копіювання, +прагнучи поєднати найкращі переваги обох. Однак, він має деякі +обмеження, які слід врахувати перед його використанням. +

Основне обмеження полягає в тому, що якщо диск виходить з ладу, +а ви нещодавно не виконували синхронізацію, ви можете не +змогти повністю відновити дані. +Конкретніше, ви можете втратити можливість відновлення даних +обсягом до розміру змінених або видалених файлів з моменту +останньої операції синхронізації. +Це відбувається, навіть якщо змінені або видалені файли не +знаходяться на диску, що вийшов з ладу. Ось чому SnapRAID +краще підходить для даних, які рідко змінюються. +

З іншого боку, щойно додані файли не перешкоджають відновленню +вже існуючих файлів. Ви втратите лише нещодавно додані файли, +якщо вони знаходяться на диску, що вийшов з ладу. +

Інші обмеження SnapRAID: +

    +
  • +З SnapRAID у вас все ще є окремі файлові системи для +кожного диска. З RAID ви отримуєте одну велику файлову +систему. +
  • +
  • +SnapRAID не використовує чергування (striping) даних. +З RAID ви отримуєте прискорення завдяки чергуванню. +
  • +
  • +SnapRAID не підтримує відновлення в реальному часі. +З RAID вам не потрібно припиняти роботу, коли диск +виходить з ладу. +
  • +
  • +SnapRAID може відновлювати дані лише з обмеженої кількості +дисків, що вийшли з ладу. З резервним копіюванням ви +можете відновити дані навіть після повної відмови +всього дискового масиву. +
  • +
  • +Зберігаються лише імена файлів, часові мітки, символічні +та жорсткі посилання. Права доступу, власність та +розширені атрибути не зберігаються. +
  • +
+
+
+

+Початок роботи +

+

Щоб використовувати SnapRAID, спершу потрібно вибрати один диск +у вашому дисковому масиві, щоб присвятити його інформації +парності. З одним диском для парності ви зможете відновити +дані після відмови одного диска, подібно до RAID5. +

Якщо ви хочете відновити дані після більшої кількості +дисків, що відмовили, подібно до RAID6, ви повинні зарезервувати +додаткові диски для парності. Кожен додатковий диск парності +дозволяє відновити дані після відмови ще одного диска. +

Як диски парності ви повинні вибрати найбільші диски в масиві, +оскільки інформація парності може зрости до розміру найбільшого +диска даних у масиві. +

Ці диски будуть присвячені зберіганню файлів парності. Ви +не повинні зберігати на них свої дані. +

Потім ви повинні визначити диски даних, які ви хочете +захистити за допомогою SnapRAID. Захист є більш ефективним, +якщо ці диски містять дані, що рідко змінюються. З цієї причини +краще НЕ включати диск Windows C:\ або каталоги Unix /home, +/var та /tmp. +

Список файлів зберігається у файлах content (вміст), які +зазвичай зберігаються на дисках даних, парності або завантажувальних +дисках. +Цей файл містить деталі вашої резервної копії, включаючи +всі контрольні суми для перевірки її цілісності. +Файл content зберігається в кількох копіях, і кожна копія +повинна бути на окремому диску, щоб гарантувати, що навіть у +разі відмови кількох дисків, принаймні одна копія буде доступна. +

Наприклад, припустимо, вас цікавить лише один рівень захисту +парності, а ваші диски розташовані за адресами: +

+/mnt/diskp <- вибраний диск для парності
+/mnt/disk1 <- перший диск для захисту
+/mnt/disk2 <- другий диск для захисту
+/mnt/disk3 <- третій диск для захисту
+
+

Ви повинні створити конфігураційний файл /etc/snapraid.conf з +наступними опціями: +

+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/
+
+

Якщо ви працюєте в Windows, ви повинні використовувати формат +шляху Windows, з літерами дисків та зворотними скісними рисками +замість прямих. +

+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\
+
+

Якщо у вас багато дисків і закінчилися літери дисків, ви можете +монтувати диски безпосередньо у вкладені папки. Див: +

+https://www.google.com/search?q=Windows+mount+point
+
+

На цьому етапі ви готові запустити команду sync для побудови +інформації парності. +

+snapraid sync
+
+

Цей процес може зайняти кілька годин вперше, залежно від розміру +даних, які вже є на дисках. Якщо диски порожні, процес +відбувається миттєво. +

Ви можете зупинити його в будь-який час, натиснувши Ctrl+C, +і під час наступного запуску він відновить роботу з місця, +де був перерваний. +

Коли ця команда завершиться, ваші дані БЕЗПЕЧНІ. +

Тепер ви можете почати використовувати свій масив як вам подобається +і періодично оновлювати інформацію парності, запускаючи команду sync. +

+

+Скрабування (Scrubbing) +

+

Щоб періодично перевіряти дані та парність на наявність помилок, +ви можете запустити команду scrub. +

+snapraid scrub
+
+

Ця команда порівнює дані у вашому масиві з хешем, обчисленим +під час команди sync, для перевірки цілісності. +

Кожен запуск команди перевіряє приблизно 8% масиву, виключаючи +дані, які вже були скрабовані протягом попередніх 10 днів. +Ви можете використовувати опцію -p, --plan, щоб вказати іншу +кількість, і опцію -o, --older-than, щоб вказати інший вік +у днях. +Наприклад, щоб перевірити 5% масиву на блоки старші за 20 днів, +використовуйте: +

+snapraid -p 5 -o 20 scrub
+
+

Якщо під час процесу виявлено приховані помилки або помилки +введення/виведення, відповідні блоки позначаються як погані у +файлі content і перераховуються у команді status. +

+snapraid status
+
+

Щоб їх виправити, ви можете використовувати команду fix, +фільтруючи погані блоки за допомогою опції -e, --filter-error: +

+snapraid -e fix
+
+

Під час наступного scrub помилки зникнуть зі звіту status, +якщо вони справді виправлені. Щоб зробити це швидше, ви можете +використовувати -p bad, щоб скрабувати лише блоки, позначені +як погані. +

+snapraid -p bad scrub
+
+

Запуск scrub на несинхронізованому масиві може повідомити +про помилки, спричинені видаленими або зміненими файлами. +Ці помилки відображаються у виведенні scrub, але пов'язані +блоки не позначаються як погані. +

+
+

+Об'єднання (Pooling) +

+

Примітка: Функція об'єднання, описана нижче, була замінена +інструментом mergerfs, який тепер є рекомендованою опцією для +користувачів Linux у спільноті SnapRAID. Mergefs забезпечує +більш гнучкий та ефективний спосіб об'єднання кількох дисків +в єдину уніфіковану точку монтування, дозволяючи безперешкодний +доступ до файлів у вашому масиві без використання символічних +посилань. Він добре інтегрується з SnapRAID для захисту +парності і зазвичай використовується в налаштуваннях, таких +як OpenMediaVault (OMV) або користувацьких конфігураціях NAS. +

Щоб відобразити всі файли у вашому масиві в одному дереві +каталогів, ви можете ввімкнути функцію pooling (об'єднання). +Вона створює віртуальне представлення всіх файлів у вашому +масиві лише для читання, використовуючи символічні посилання. +

Ви можете налаштувати каталог pooling у конфігураційному +файлі за допомогою: +

+pool /pool
+
+

або, якщо ви працюєте в Windows, за допомогою: +

+pool C:\pool
+
+

а потім запустити команду pool для створення або оновлення +віртуального представлення. +

+snapraid pool
+
+

Якщо ви використовуєте платформу Unix і хочете надати спільний +доступ до цього каталогу через мережу для машин Windows або +Unix, ви повинні додати наступні опції до вашого +/etc/samba/smb.conf: +

+# У глобальному розділі smb.conf
+unix extensions = no
+
+
+# У розділі спільного доступу smb.conf
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

У Windows спільний доступ до символічних посилань через мережу +вимагає від клієнтів віддаленого їх розпізнавання. Щоб +увімкнути це, окрім спільного доступу до каталогу pool, ви +також повинні надати спільний доступ до всіх дисків незалежно, +використовуючи імена дисків, визначені у конфігураційному +файлі, як точки спільного доступу. Ви також повинні вказати у +опції share конфігураційного файлу шлях Windows UNC, який +потрібен віддаленим клієнтам для доступу до цих спільних дисків. +

Наприклад, працюючи з сервера з іменем darkstar, ви можете +використовувати опції: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

і надати спільний доступ до наступних каталогів через мережу: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

щоб дозволити віддаленим клієнтам отримати доступ до всіх файлів +за адресою \\darkstar\pool. +

Вам також може знадобитися налаштувати віддалені клієнти, щоб +увімкнути доступ до віддалених символічних посилань за допомогою +команди: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Відновлення видалених файлів (Undeleting) +

+

SnapRAID функціонує більше як програма резервного копіювання, +ніж система RAID, і його можна використовувати для відновлення +або повернення файлів до їх попереднього стану за допомогою +опції -f, --filter: +

+snapraid fix -f FILE
+
+

або для каталогу: +

+snapraid fix -f DIR/
+
+

Ви також можете використовувати його для відновлення лише випадково +видалених файлів усередині каталогу за допомогою опції -m, +--filter-missing, яка відновлює лише відсутні файли, +залишаючи всі інші недоторканими. +

+snapraid fix -m -f DIR/
+
+

Або для відновлення всіх видалених файлів на всіх дисках за допомогою: +

+snapraid fix -m
+
+
+
+

+Відновлення (Recovering) +

+

Сталося найгірше, і ви втратили один або кілька дисків! +

НЕ ПАНІКУЙТЕ! Ви зможете їх відновити! +

Перше, що ви повинні зробити, це уникнути подальших змін у +вашому дисковому масиві. Вимкніть будь-які віддалені +підключення до нього та будь-які заплановані процеси, +включаючи будь-яку заплановану нічну синхронізацію або +скрабування SnapRAID. +

Потім виконайте наступні кроки. +

+

+КРОК 1 -> Переналаштування +

+

Вам потрібен деякий простір для відновлення, в ідеалі на +додаткових запасних дисках, але зовнішній USB-диск або +віддалений диск підійде. +

Змініть конфігураційний файл SnapRAID, щоб опція data або +parity диска, що вийшов з ладу, вказувала на місце розташування +з достатньою кількістю вільного місця для відновлення файлів. +

Наприклад, якщо диск d1 вийшов з ладу, змініть з: +

+data d1 /mnt/disk1/
+
+

на: +

+data d1 /mnt/new_spare_disk/
+
+

Якщо диск, який потрібно відновити, є диском парності, оновіть +відповідну опцію parity. +Якщо у вас кілька дисків, що вийшли з ладу, оновіть усі їхні +конфігураційні опції. +

+
+

+КРОК 2 -> Виправлення (Fix) +

+

Запустіть команду fix, зберігаючи журнал у зовнішньому файлі +за допомогою: +

+snapraid -d NAME -l fix.log fix
+
+

Де NAME — це ім'я диска, наприклад d1 у нашому попередньому +прикладі. +Якщо диск, який потрібно відновити, є диском парності, +використовуйте імена parity, 2-parity, тощо. +Якщо у вас кілька дисків, що вийшли з ладу, використовуйте +кілька опцій -d, щоб вказати їх усі. +

Ця команда займе багато часу. +

Переконайтеся, що у вас є кілька гігабайт вільного місця для +зберігання файлу fix.log. +Запустіть її з диска з достатньою кількістю вільного місця. +

Тепер ви відновили все, що можна відновити. Якщо деякі файли +частково або повністю неможливо відновити, вони будуть перейменовані +з додаванням розширення .unrecoverable. +

Ви можете знайти детальний список усіх невідновлюваних блоків +у файлі fix.log, перевіривши всі рядки, що починаються з +unrecoverable:. +

Якщо ви не задоволені відновленням, ви можете повторити його +стільки разів, скільки забажаєте. +

Наприклад, якщо ви видалили файли з масиву після останньої +sync, це може призвести до того, що деякі файли не будуть +відновлені. +У цьому випадку ви можете повторити fix, використовуючи +опцію -i, --import, вказавши, де ці файли знаходяться зараз, +щоб знову включити їх у процес відновлення. +

Якщо ви задоволені відновленням, ви можете продовжити, але +зауважте, що після синхронізації ви більше не зможете повторити +команду fix! +

+
+

+КРОК 3 -> Перевірка (Check) +

+

Як обережну перевірку, ви можете тепер запустити команду +check, щоб переконатися, що на відновленому диску все +правильно. +

+snapraid -d NAME -a check
+
+

Де NAME — це ім'я диска, наприклад d1 у нашому попередньому +прикладі. +

Опції -d та -a вказують SnapRAID перевіряти лише вказаний +диск та ігнорувати всі дані парності. +

Ця команда займе багато часу, але якщо ви не надто обережні, +ви можете її пропустити. +

+
+

+КРОК 4 -> Синхронізація (Sync) +

+

Запустіть команду sync, щоб повторно синхронізувати масив +з новим диском. +

+snapraid sync
+
+

Якщо все відновлено, ця команда виконується миттєво. +

+
+
+
+

+Команди +

+

SnapRAID надає кілька простих команд, які дозволяють: +

    +
  • +Вивести статус масиву -> status +
  • +
  • +Керувати дисками -> smart, probe, up, down +
  • +
  • +Створити резервну копію/знімок -> sync +
  • +
  • +Періодично перевіряти дані -> scrub +
  • +
  • +Відновити останню резервну копію/знімок -> fix. +
  • +
+

Команди повинні бути написані малими літерами. +

+

+status +

+

Виводить зведення стану дискового масиву. +

Включає інформацію про фрагментацію парності, вік блоків без +перевірки та всі записані приховані помилки, виявлені під +час скрабування. +

Представлена інформація стосується останнього часу, коли ви +запустили sync. Пізніші модифікації не враховуються. +

Якщо виявлено погані блоки, перераховуються їхні номери блоків. +Щоб їх виправити, ви можете використовувати команду fix -e. +

Також показує графік, що представляє останній час, коли +кожен блок був скрабований або синхронізований. Скрабовані +блоки позначаються символом *, блоки, синхронізовані, +але ще не скрабовані, - o. +

Нічого не змінюється. +

+
+

+smart +

+

Виводить звіт SMART усіх дисків у системі. +

Включає оцінку ймовірності відмови протягом наступного року, +дозволяючи вам планувати планову заміну дисків, які +виявляють підозрілі атрибути. +

Ця оцінка ймовірності отримана шляхом кореляції атрибутів +SMART дисків з даними Backblaze, доступними за адресою: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

Якщо SMART повідомляє, що диск виходить з ладу, для цього +диска виводиться FAIL або PREFAIL, і SnapRAID повертає +помилку. У цьому випадку настійно рекомендується негайна +заміна диска. +

Інші можливі рядки стану: +

+
+
+logfail +
+У минулому деякі атрибути були нижчими за +поріг. +
+
+
+
+logerr +
+Журнал помилок пристрою містить помилки. +
+
+
+
+selferr +
+Журнал самотестування пристрою містить помилки. +
+
+
+

Якщо вказано опцію -v, --verbose, надається глибший +статистичний аналіз. Цей аналіз може допомогти вам вирішити, +чи потрібна вам більша або менша парність. +

Ця команда використовує інструмент smartctl і еквівалентна +запуску smartctl -a на всіх пристроях. +

Якщо ваші пристрої не виявляються автоматично правильно, ви +можете вказати користувацьку команду, використовуючи опцію +smartctl у конфігураційному файлі. +

Нічого не змінюється. +

+
+

+probe +

+

Виводить стан ЖИВЛЕННЯ всіх дисків у системі. +

Standby означає, що диск не обертається. Active означає, +що диск обертається. +

Ця команда використовує інструмент smartctl і еквівалентна +запуску smartctl -n standby -i на всіх пристроях. +

Якщо ваші пристрої не виявляються автоматично правильно, ви +можете вказати користувацьку команду, використовуючи опцію +smartctl у конфігураційному файлі. +

Нічого не змінюється. +

+
+

+up +

+

Розкручує всі диски масиву. +

Ви можете розкрутити лише певні диски, використовуючи +опцію -d, --filter-disk. +

Одночасне розкручування всіх дисків вимагає багато енергії. +Переконайтеся, що ваш блок живлення може це витримати. +

Нічого не змінюється. +

+
+

+down +

+

Зупиняє всі диски масиву. +

Ця команда використовує інструмент smartctl і еквівалентна +запуску smartctl -s standby,now на всіх пристроях. +

Ви можете зупинити лише певні диски, використовуючи +опцію -d, --filter-disk. +

Для автоматичної зупинки при помилці ви можете +використовувати опцію -s, --spin-down-on-error з будь-якою +іншою командою, що еквівалентно ручному запуску down +при виникненні помилки. +

Нічого не змінюється. +

+
+

+diff +

+

Виводить список усіх файлів, змінених з моменту останньої +sync, для яких необхідно перерахувати дані парності. +

Ця команда не перевіряє дані файлів, а лише часову мітку +файлу, розмір та inode. +

Після перерахування всіх змінених файлів представляється +зведення змін, згруповане за: +

+
+
+equal (рівні) +
+Файли, незмінені з попереднього стану. +
+
+
+
+added (додані) +
+Файли, додані, яких не було раніше. +
+
+
+
+removed (видалені) +
+Файли, видалені. +
+
+
+
+updated (оновлені) +
+Файли з іншим розміром або часовою +міткою, що означає, що вони були змінені. +
+
+
+
+moved (переміщені) +
+Файли, переміщені в інший каталог +на тому ж диску. Вони ідентифікуються за тим же +іменем, розміром, часовою міткою та inode, але іншим +каталогом. +
+
+
+
+copied +
+файли, скопійовані на той самий або інший диск, де +оригінальний файл все ще існує. +Вони ідентифікуються за однаковою назвою, розміром та міткою +часу. +Якщо мітка часу з точністю до часток секунди дорівнює нулю, для +ідентифікації має збігатися повний шлях, а не лише назва. +
+
+
+
+relocated +
+файли, переміщені на той самий або інший диск, де +оригінал зник. +Вони ідентифікуються за однаковою назвою, розміром та міткою +часу. +Якщо мітка часу з точністю до часток секунди дорівнює нулю, для +ідентифікації має збігатися повний шлях. +На відміну від файлів 'moved' на тому ж диску, переміщені файли +мають інший inode. +
+
+
+
+restored +
+файли з іншим inode, але зі збігом каталогу, назви, +розміру та мітки часу. +Зазвичай це файли, відновлені після видалення. +
+
+
+

Якщо потрібна sync, код повернення процесу дорівнює 2, +замість стандартного 0. Код повернення 1 використовується для +загальної умови помилки. +

Нічого не змінюється. +

+
+

+sync +

+

Оновлює інформацію парності. Всі змінені файли у дисковому +масиві зчитуються, і відповідні дані парності оновлюються. +

Ви можете зупинити цей процес у будь-який час, натиснувши +Ctrl+C, не втрачаючи вже виконану роботу. +Під час наступного запуску процес sync відновить роботу +з місця, де був перерваний. +

Якщо під час процесу виявлено приховані помилки або помилки +введення/виведення, відповідні блоки позначаються як погані. +

Файли ідентифікуються за шляхом та/або inode та перевіряються +за розміром та часовою міткою. +Якщо розмір або часова мітка файлу відрізняються, дані +парності перераховуються для всього файлу. +Якщо файл переміщено або перейменовано на тому ж диску, +зберігаючи той самий inode, парність не перераховується. +Якщо файл переміщено на інший диск, парність перераховується, +але раніше обчислена інформація хешу зберігається. +

Файли content та parity змінюються за потреби. +Файли в масиві НЕ змінюються. +

+
+

+scrub +

+

Скрабує масив, перевіряючи на наявність прихованих помилок +або помилок введення/виведення на дисках даних та парності. +

Кожен виклик перевіряє приблизно 8% масиву, виключаючи +дані, які вже були скрабовані протягом останніх 10 днів. +Це означає, що скрабування раз на тиждень забезпечує +перевірку кожного біта даних принаймні раз на три місяці. +

Ви можете визначити інший план скрабування або кількість +за допомогою опції -p, --plan, яка приймає: +bad - Скрабувати блоки, позначені як погані. +new - Скрабувати щойно синхронізовані блоки, які ще не були +

скрабовані. +

+
+
+full +
+Скрабувати все. +
+
+
+
+0-100 +
+Скрабувати вказаний відсоток блоків. +
+
+
+

Якщо ви вказуєте відсоткове значення, ви також можете +використовувати опцію -o, --older-than, щоб визначити, +яким має бути вік блоку. +Найстаріші блоки скрабуються першими, забезпечуючи оптимальну +перевірку. +Якщо ви хочете скрабувати лише щойно синхронізовані блоки, +які ще не були скрабовані, використовуйте опцію -p new. +

Щоб отримати деталі статусу скрабування, використовуйте команду +status. +

Для будь-якої знайденої прихованої помилки або помилки +введення/виведення відповідні блоки позначаються як погані +у файлі content. +Ці погані блоки перераховуються у status і можуть бути +виправлені за допомогою fix -e. +Після виправлення, під час наступного скрабування, вони будуть +повторно перевірені, і якщо виявиться, що вони виправлені, +позначка "поганий" буде видалена. +Щоб скрабувати лише погані блоки, ви можете використовувати +команду scrub -p bad. +

Рекомендується запускати scrub лише на синхронізованому +масиві, щоб уникнути повідомлень про помилки, спричинені +несинхронізованими даними. Ці помилки розпізнаються як +не приховані помилки, і блоки не позначаються як погані, +але такі помилки повідомляються у виведенні команди. +

Файл content змінюється для оновлення часу останньої перевірки +для кожного блоку та для позначення поганих блоків. +Файли parity НЕ змінюються. +Файли в масиві НЕ змінюються. +

+
+

+fix +

+

Виправляє всі файли та дані парності. +

Усі файли та дані парності порівнюються зі станом знімка, +збереженим під час останньої sync. +Якщо знайдено різницю, вона повертається до збереженого знімка. +

УВАГА! Команда fix не розрізняє помилки та навмисні +модифікації. Вона безумовно повертає стан файлу до останньої +sync. +

Якщо не вказано жодної іншої опції, обробляється весь масив. +Використовуйте опції фільтра, щоб вибрати підмножину файлів +або дисків для роботи. +

Щоб виправити лише блоки, позначені як погані під час sync +та scrub, використовуйте опцію -e, --filter-error. +На відміну від інших опцій фільтра, ця застосовує виправлення +лише до файлів, які не змінилися з моменту останньої sync. +

SnapRAID перейменовує всі файли, які не можуть бути виправлені, +додаючи розширення .unrecoverable. +

Перед виправленням сканується весь масив, щоб знайти будь-які +файли, переміщені з моменту останньої sync. +Ці файли ідентифікуються за їхньою часовою міткою, ігноруючи +їхнє ім'я та каталог, і використовуються в процесі відновлення, +якщо це необхідно. +Якщо ви перемістили деякі з них за межі масиву, ви можете +використовувати опцію -i, --import, щоб вказати додаткові +каталоги для сканування. +

Файли ідентифікуються лише за шляхом, а не за inode. +

Файл content НЕ змінюється. +Файли parity змінюються за потреби. +Файли в масиві змінюються за потреби. +

+
+

+check +

+

Перевіряє всі файли та дані парності. +

Працює як fix, але лише імітує відновлення, і жодні зміни +не записуються в масив. +

Ця команда в першу чергу призначена для ручної перевірки, +наприклад, після процесу відновлення або в інших особливих +умовах. Для періодичних та запланованих перевірок використовуйте +scrub. +

Якщо ви використовуєте опцію -a, --audit-only, перевіряється +лише хеш файлів, а дані парності ігноруються для швидшого +запуску. +

Файли ідентифікуються лише за шляхом, а не за inode. +

Нічого не змінюється. +

+
+

+list +

+

Виводить список усіх файлів, що містяться в масиві на момент +останньої sync. +

З -v або --verbose також показується час з точністю до +долі секунди. +

Нічого не змінюється. +

+
+

+dup +

+

Виводить список усіх дублікатів файлів. Два файли вважаються +рівними, якщо їхні хеші збігаються. Дані файлів не +зчитуються; використовуються лише попередньо обчислені хеші. +

Нічого не змінюється. +

+
+

+pool +

+

Створює або оновлює віртуальне представлення всіх файлів +у вашому дисковому масиві в каталозі pooling. +

Файли не копіюються, а пов'язуються за допомогою символічних +посилань. +

Під час оновлення всі існуючі символічні посилання та порожні +підкаталоги видаляються та замінюються новим +представленням масиву. Будь-які інші звичайні файли залишаються +на місці. +

Нічого не змінюється за межами каталогу pool. +

+
+

+devices +

+

Виводить низькорівневі пристрої, які використовуються масивом. +

Ця команда відображає асоціації пристроїв у масиві і в +основному призначена як інтерфейс для сценаріїв. +

Перші два стовпці — це низькорівневий ідентифікатор пристрою +та шлях. +Наступні два стовпці — це високорівневий ідентифікатор пристрою +та шлях. +Останній стовпець — це ім'я диска в масиві. +

У більшості випадків у вас є один низькорівневий пристрій для +кожного диска в масиві, але в деяких складніших конфігураціях +у вас може бути кілька низькорівневих пристроїв, які використовуються +одним диском у масиві. +

Нічого не змінюється. +

+
+

+touch +

+

Встановлює довільну часову мітку з точністю до долі секунди +для всіх файлів, у яких вона встановлена на нуль. +

Це покращує здатність SnapRAID розпізнавати переміщені та +скопійовані файли, оскільки робить часову мітку майже +унікальною, зменшуючи можливі дублікати. +

Зокрема, якщо часова мітка з точністю до долі секунди не +дорівнює нулю, переміщений або скопійований файл ідентифікується +як такий, якщо він збігається з іменем, розміром та часовою +міткою. Якщо часова мітка з точністю до долі секунди дорівнює +нулю, він вважається копією, лише якщо повний шлях, розмір та +часова мітка збігаються. +

Часова мітка з точністю до секунди не змінюється, тому +всі дати та час ваших файлів будуть збережені. +

+
+

+rehash +

+

Планує повторне хешування всього масиву. +

Ця команда змінює тип хешу, що використовується, як правило, +при оновленні з 32-розрядної системи на 64-розрядну, щоб +переключитися з MurmurHash3 на швидший SpookyHash. +

Якщо ви вже використовуєте оптимальний хеш, ця команда +нічого не робить і повідомляє, що жодних дій не потрібно. +

Повторне хешування не виконується негайно, а відбувається +поступово під час sync та scrub. +

Ви можете перевірити стан повторного хешування за допомогою +status. +

Під час повторного хешування SnapRAID зберігає повну +функціональність, за єдиним винятком, що dup не може +виявити дублікати файлів, використовуючи інший хеш. +

+
+

+locate +

+

Знаходить файли, що зберігаються на дисках парності. Для кожного знайденого +файлу виводиться його розташування всередині файлу парності та кількість +фрагментів, які він займає. +

Ви можете використовувати параметр -t, --tail, щоб обмежити операцію файлами, +що займають зазначену кінцеву частину (хвіст) парності. +

Якщо ви хочете перерозподілити ці файли, ви можете скористатися параметром +-W, --force-realloc-tail. +Майте на увазі, що такі файли не будуть захищені парністю під час процесу +перерозподілу. +

+
+
+

+Опції +

+

SnapRAID надає наступні опції: +

+
+
+-c, --conf CONFIG +
+Вибирає конфігураційний файл для використання. Якщо не +вказано, в Unix використовується файл /usr/local/etc/snapraid.conf, +якщо він існує, інакше /etc/snapraid.conf. +У Windows використовується файл snapraid.conf у тому +самому каталозі, що й snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Фільтрує файли для обробки у check та fix. +Обробляються лише файли, що відповідають вказаному +шаблону. Цю опцію можна використовувати кілька разів. +Дивіться розділ PATTERN для отримання додаткової +інформації про специфікації шаблонів. +В Unix переконайтеся, що символи глоббінгу взяті +в лапки, якщо вони використовуються. +Цю опцію можна використовувати лише з check та fix. +Її не можна використовувати з sync та scrub, оскільки +вони завжди обробляють весь масив. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Фільтрує диски для обробки у check, fix, up та down. +Ви повинні вказати ім'я диска, як визначено у +конфігураційному файлі. +Ви також можете вказати диски парності з іменами: +parity, 2-parity, 3-parity, тощо, щоб обмежити +операції певним диском парності. +Якщо ви поєднуєте кілька опцій --filter, --filter-disk +та --filter-missing, вибираються лише файли, що +відповідають усім фільтрам. +Цю опцію можна використовувати кілька разів. +Цю опцію можна використовувати лише з check, fix, +up та down. +Її не можна використовувати з sync та scrub, оскільки +вони завжди обробляють весь масив. +
+
+
+
+
+
+-m, --filter-missing +
+Фільтрує файли для обробки у check та fix. +Обробляються лише файли, що відсутні або видалені з +масиву. При використанні з fix це діє як команда +undelete (відновлення видалених файлів). +Якщо ви поєднуєте кілька опцій --filter, --filter-disk +та --filter-missing, вибираються лише файли, що +відповідають усім фільтрам. +Цю опцію можна використовувати лише з check та fix. +Її не можна використовувати з sync та scrub, оскільки +вони завжди обробляють весь масив. +
+
+
+
+
+
+-e, --filter-error +
+Обробляє файли з помилками у check та fix. +Обробляє лише файли, які мають блоки, позначені +прихованими помилками або помилками введення/виведення +під час sync та scrub, як зазначено у status. +Цю опцію можна використовувати лише з check та fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Вибирає план скрабування. Якщо PERC є числовим +значенням від 0 до 100, воно інтерпретується як відсоток +блоків для скрабування. +Замість відсотка ви можете вказати план: bad +скрабує погані блоки, new скрабує блоки, які ще не +були скрабовані, і full скрабує все. +Цю опцію можна використовувати лише з scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Вибирає найстарішу частину масиву для обробки у scrub. +DAYS — це мінімальний вік у днях для блоку, який +повинен бути скрабований; за замовчуванням 10. +Блоки, позначені як погані, завжди скрабуються +незалежно від цієї опції. +Цю опцію можна використовувати лише з scrub. +
+
+
+
+
+
+-a, --audit-only +
+У check перевіряє хеш файлів без перевірки даних +парності. Якщо вас цікавить лише перевірка даних файлів, +ця опція може значно прискорити процес перевірки. +Цю опцію можна використовувати лише з check. +
+
+
+
+
+
+-h, --pre-hash +
+У sync запускає попередню фазу хешування всіх нових +даних для додаткової перевірки перед обчисленням +парності. Зазвичай у sync не виконується попереднє +хешування, а нові дані хешуються безпосередньо перед +обчисленням парності, коли вони зчитуються вперше. +Цей процес відбувається, коли система знаходиться під +великим навантаженням, усі диски обертаються та ЦП +зайнятий. Це екстремальна умова для машини, і якщо вона +має приховану апаратну проблему, приховані помилки +можуть залишитися невиявленими, оскільки дані ще не +були хешовані. +Щоб уникнути цього ризику, ви можете ввімкнути режим +pre-hash, щоб усі дані були зчитані двічі для +забезпечення їх цілісності. +Ця опція також перевіряє файли, переміщені в межах +масиву, щоб переконатися, що операція переміщення була +успішною, і, якщо необхідно, дозволяє запустити операцію +виправлення перед продовженням. +Цю опцію можна використовувати лише з sync. +
+
+
+
+
+
+-i, --import DIR +
+Імпортує з вказаного каталогу будь-які файли, видалені +з масиву після останньої sync. +Якщо у вас все ще є такі файли, вони можуть бути +використані check та fix для покращення процесу +відновлення. +Файли зчитуються, включаючи підкаталоги, та +ідентифікуються незалежно від їхнього імені. +Цю опцію можна використовувати лише з check та fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+При будь-якій помилці зупиняє всі керовані диски перед +завершенням з ненульовим кодом стану. Це запобігає +тому, щоб диски залишалися активними та оберталися +після перерваної операції, допомагаючи уникнути +зайвого нагрівання та споживання електроенергії. +Використовуйте цю опцію, щоб забезпечити безпечну +зупинку дисків, навіть коли команда завершується +помилкою. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Застосовує глобальне обмеження пропускної здатності +для всіх дисків. RATE — це кількість байтів на секунду. +Ви можете вказати множник, такий як K, M або G (наприклад, +--bw-limit 1G). +
+
+
+
+
+
+-t, --tail РОЗМІР +
+Обмежує список файлів тими, що використовують не більше зазначеного +розміру хвоста дисків парності. +Можна використовувати множники, такі як K, M, G або T (наприклад, --tail 1G). +Цей параметр дійсний лише при використанні разом із командою locate. +
+
+
+
+
+
+-A, --stats +
+Вмикає розширений перегляд стану, який показує +додаткову інформацію. +На екрані відображаються два графіки: +Перший графік показує кількість буферизованих смуг +(stripes) для кожного диска, разом зі шляхом до файлу, +до якого наразі здійснюється доступ на цьому диску. +Зазвичай найповільніший диск не матиме доступного +буфера, що визначає максимально досяжну пропускну +здатність. +Другий графік показує відсоток часу, витраченого на +очікування, за останні 100 секунд. Очікується, що +найповільніший диск спричинить більшу частину часу +очікування, тоді як інші диски повинні мати невеликий +час очікування або зовсім його не мати, оскільки +вони можуть використовувати свої буферизовані смуги. +Цей графік також показує час, витрачений на очікування +обчислення хешу та обчислень RAID. +Усі обчислення виконуються паралельно з операціями +диска. Тому, доки є вимірюваний час очікування +принаймні для одного диска, це вказує на те, що ЦП +достатньо швидкий, щоб справлятися з робочим навантаженням. +
+
+
+
+
+
+-Z, --force-zero +
+Форсує небезпечну операцію синхронізації файлу з +нульовим розміром, який раніше був ненульовим. +Якщо SnapRAID виявляє таку умову, він припиняє +продовження, якщо ви не вкажете цю опцію. +Це дозволяє легко виявити, коли після збою системи +деякі доступні файли були обрізані. +Це можлива умова в Linux з файловими системами +ext3/ext4. +Цю опцію можна використовувати лише з sync. +
+
+
+
+
+
+-E, --force-empty +
+Форсує небезпечну операцію синхронізації диска, на +якому відсутні всі оригінальні файли. +Якщо SnapRAID виявляє, що всі файли, які спочатку +були на диску, відсутні або перезаписані, він +припиняє продовження, якщо ви не вкажете цю опцію. +Це дозволяє легко виявити, коли файлова система +даних не змонтована. +Цю опцію можна використовувати лише з sync. +
+
+
+
+
+
+-U, --force-uuid +
+Форсує небезпечну операцію синхронізації, перевірки +та виправлення з дисками, які змінили свій UUID. +Якщо SnapRAID виявляє, що деякі диски змінили UUID, +він припиняє продовження, якщо ви не вкажете цю опцію. +Це дозволяє виявити, коли ваші диски змонтовані +в неправильних точках монтування. +Однак, дозволено мати одну зміну UUID з однією парністю +і більше з множинною парністю, оскільки це нормальний +випадок при заміні дисків після відновлення. +Цю опцію можна використовувати лише з sync, check +або fix. +
+
+
+
+
+
+-D, --force-device +
+Форсує небезпечну операцію виправлення з недоступними +дисками або з дисками на тому ж фізичному пристрої. +Наприклад, якщо ви втратили два диски даних і маєте +запасний диск для відновлення лише першого, ви можете +ігнорувати другий недоступний диск. +Або, якщо ви хочете відновити диск у вільному місці, +залишеному на вже використовуваному диску, що +використовує той самий фізичний пристрій. +Цю опцію можна використовувати лише з fix. +
+
+
+
+
+
+-N, --force-nocopy +
+У sync, check та fix вимикає евристику +виявлення копій. Без цієї опції SnapRAID припускає, +що файли з однаковими атрибутами, такими як ім'я, +розмір та часова мітка, є копіями з тими ж даними. +Це дозволяє ідентифікувати скопійовані або +переміщені файли з одного диска на інший і повторно +використовує вже обчислену інформацію хешу для +виявлення прихованих помилок або для відновлення +відсутніх файлів. +У деяких рідкісних випадках ця поведінка може +призвести до хибних спрацьовувань або повільного +процесу через багато перевірок хешу, і ця опція +дозволяє вирішити такі проблеми. +Цю опцію можна використовувати лише з sync, check +та fix. +
+
+
+
+
+
+-F, --force-full +
+У sync форсує повне переобчислення парності. +Цю опцію можна використовувати, коли ви додаєте +новий рівень парності або якщо ви повернулися до +старого файлу вмісту, використовуючи більш +нові дані парності. +Замість створення парності з нуля, це дозволяє +повторно використовувати хеші, присутні у файлі +вмісту, для перевірки даних та підтримки захисту +даних під час процесу sync, використовуючи +існуючі дані парності. +Цю опцію можна використовувати лише з sync. +
+
+
+
+
+
+-R, --force-realloc +
+У sync форсує повне перерозподілення файлів +та перебудову парності. +Цю опцію можна використовувати для повного +перерозподілу всіх файлів, усуваючи фрагментацію, +повторно використовуючи хеші, присутні у файлі +вмісту, для перевірки даних. +Цю опцію можна використовувати лише з sync. +УВАГА! Ця опція лише для експертів, і +настійно не рекомендується її використовувати. +Ви НЕ маєте захисту даних під час операції sync. +
+
+
+
+
+
+-W, --force-realloc-tail РОЗМІР +
+Працює як -R, --force-realloc, але обмежується вказаною кінцевою +частиною (останні РОЗМІР байт) кожного файлу парності. +Примусово перерозподіляє (переміщує) будь-які фрагменти/блоки файлів, +що наразі зберігаються в цій кінцевій секції, дозволяючи розмістити +їх будь-де у файлі(ах) парності, де є вільне місце (включно з +наявними пустотами). +Основна мета цього параметра — зменшити розмір файлу парності на диску. +Якщо перерозподіл успішно очистить всю кінцеву секцію (у ній не +залишиться блоків), файл парності буде обрізаний, вивільняючи +невикористаний простір хвоста. +Можна використовувати множники, такі як K, M, G або T (наприклад, +--force-realloc-tail 1G). +Ви можете використовувати locate -t, --tail, щоб заздалегідь дізнатися +про зачеплені файли. +УВАГА! +Цей параметр призначений лише для експертів, і його настійно +не рекомендується використовувати. +Під час операції sync захист даних для зачеплених файлів ВІДСУТНІЙ. +
+
+
+
+
+
+-l, --log FILE +
+Записує детальний журнал у вказаний файл. +Якщо ця опція не вказана, несподівані помилки +виводяться на екран, що потенційно призводить до +надмірного виведення у випадку багатьох помилок. +Коли вказано -l, --log, на екран виводяться лише +фатальні помилки, які спричиняють зупинку SnapRAID. +Якщо шлях починається з >>, файл відкривається +у режимі доповнення. Входження %D та %T в +імені замінюються датою та часом у форматі YYYYMMDD +та HHMMSS. У пакетних файлах Windows ви повинні +подвоїти символ %, наприклад, result-%%D.log. +Щоб використовувати >>, ви повинні взяти ім'я +в лапки, наприклад, ">>result.log". +Щоб вивести журнал на стандартний вивід або +стандартну помилку, ви можете використовувати +">&1" та ">&2" відповідно. +Дивіться файл snapraid_log.txt або man-сторінку +для описів тегів журналу. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Встановлює новий ліміт помилок перед зупинкою +виконання. За замовчуванням SnapRAID зупиняється, +якщо зустрічає більше 100 помилок введення/виведення, +що вказує на ймовірну відмову диска. +Ця опція впливає на sync та scrub, яким +дозволено продовжувати після першого набору +помилок диска, щоб спробувати завершити +свої операції. Однак check та fix завжди +зупиняються при першій помилці. +
+
+
+
+
+
+-S, --start BLKSTART +
+Починає обробку з вказаного номера блоку. +Це може бути корисно для повторної спроби +перевірки або виправлення певних блоків у +випадку пошкодженого диска. +Ця опція в основному для розширеного ручного +відновлення. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Обробляє лише вказану кількість блоків. +Ця опція в основному для розширеного ручного +відновлення. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Генерує фіктивний конфігураційний файл з існуючого +файлу вмісту. +Конфігураційний файл записується на стандартний +вивід і не перезаписує існуючий. +Цей конфігураційний файл також містить інформацію, +необхідну для реконструкції точок монтування диска +у випадку втрати всієї системи. +
+
+
+
+
+
+-v, --verbose +
+Виводить більше інформації на екран. +Якщо вказано один раз, виводить виключені файли +та додаткову статистику. +Ця опція не впливає на файли журналу. +
+
+
+
+
+
+-q, --quiet +
+Виводить менше інформації на екран. +Якщо вказано один раз, видаляє індикатор прогресу; +двічі — поточні операції; тричі — інформаційні +повідомлення; чотири рази — повідомлення про +статус. Фатальні помилки завжди виводяться на +екран. Ця опція не впливає на файли журналу. +
+
+
+
+
+
+-H, --help +
+Виводить короткий довідковий екран. +
+
+
+
+
+
+-V, --version +
+Виводить версію програми. +
+
+
+
+
+

+Конфігурація +

+

SnapRAID вимагає конфігураційний файл, щоб знати, де +розташований ваш дисковий масив і де зберігати інформацію +парності. +

В Unix використовується файл /usr/local/etc/snapraid.conf, +якщо він існує, інакше /etc/snapraid.conf. +У Windows використовується файл snapraid.conf у тому +самому каталозі, що й snapraid.exe. +

Він повинен містити наступні опції (чутливі до регістру): +

+

+parity FILE [,FILE] ... +

+

Визначає файли, які потрібно використовувати для зберігання +інформації парності. Парність забезпечує захист від +відмови одного диска, подібно до RAID5. +

Ви можете вказати кілька файлів, які повинні бути на +різних дисках. Коли файл більше не може зростати, +використовується наступний. +Загальний доступний простір повинен бути принаймні +таким же великим, як найбільший диск даних у масиві. +

Ви можете додати додаткові файли парності пізніше, +але ви не можете їх переупорядковувати або видаляти. +

Збереження дисків парності зарезервованими для парності +забезпечує, що вони не стають фрагментованими, покращуючи +продуктивність. +

У Windows 256 МБ залишається невикористаними на кожному +диску, щоб уникнути попередження про повні диски. +

Ця опція є обов'язковою і може бути використана лише один раз. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Визначає файли, які потрібно використовувати для зберігання +додаткової інформації парності. +

Для кожного вказаного рівня парності вмикається один +додатковий рівень захисту: +

    +
  • +2-parity вмикає подвійну парність RAID6. +
  • +
  • +3-parity вмикає потрійну парність. +
  • +
  • +4-parity вмикає четверну парність. +
  • +
  • +5-parity вмикає п'ятерну парність. +
  • +
  • +6-parity вмикає шестерну парність. +
  • +
+

Кожен рівень парності вимагає наявності всіх попередніх +рівнів парності. +

Застосовуються ті самі міркування, що й для опції parity. +

Ці опції є необов'язковими і можуть бути використані лише +один раз. +

+
+

+z-parity FILE [,FILE] ... +

+

Визначає альтернативний файл та формат для зберігання +потрійної парності. +

Ця опція є альтернативою 3-parity, в першу чергу +призначена для ЦП низького класу, таких як ARM або +AMD Phenom, Athlon та Opteron, які не підтримують +набір інструкцій SSSE3. У таких випадках вона +забезпечує кращу продуктивність. +

Цей формат схожий, але швидший, ніж той, що використовується +ZFS RAIDZ3. Як і ZFS, він не працює далі потрійної парності. +

При використанні 3-parity ви будете попереджені, +якщо рекомендується використовувати формат z-parity +для покращення продуктивності. +

Можна конвертувати з одного формату в інший, налаштувавши +конфігураційний файл з бажаним файлом z-parity або +3-parity та використовуючи fix для його відтворення. +

+
+

+content FILE +

+

Визначає файл, який потрібно використовувати для зберігання +списку та контрольних сум усіх файлів, присутніх у +вашому дисковому масиві. +

Він може бути розміщений на диску, що використовується для +даних, парності або будь-якому іншому доступному диску. +Якщо ви використовуєте диск даних, цей файл автоматично +виключається з процесу sync. +

Ця опція є обов'язковою і може бути використана кілька +разів для збереження кількох копій одного і того ж +файлу. +

Ви повинні зберігати принаймні одну копію для кожного +використаного диска парності плюс одну. Використання +додаткових копій не зашкодить. +

+
+

+data NAME DIR +

+

Визначає ім'я та точку монтування дисків даних у +масиві. NAME використовується для ідентифікації диска +і має бути унікальним. DIR — це точка монтування +диска у файловій системі. +

Ви можете змінювати точку монтування за потреби, +поки ви зберігаєте NAME фіксованим. +

Ви повинні використовувати одну опцію для кожного +диска даних у масиві. +

Ви можете перейменувати диск пізніше, змінивши NAME +безпосередньо у конфігураційному файлі, а потім +запустивши команду sync. У випадку перейменування +асоціація здійснюється за допомогою збереженого +UUID дисків. +

+
+

+extra NAME DIR +

+

Визначає назву та точку монтування додаткових дисків для +моніторингу за допомогою команд smart та probe. +

Це корисно для моніторингу дисків, які не є частиною масиву, але +необхідні для функціонування системи, наприклад, завантажувального +диска. +

Зверніть увагу, що на такі диски не впливають команди up та down, +оскільки очікується, що вони завжди обертаються. +

+
+

+nohidden +

+

Виключає всі приховані файли та каталоги. +В Unix приховані файли — це ті, що починаються з .. +У Windows це ті, що мають прихований атрибут. +

+
+

+exclude/include PATTERN +

+

Визначає шаблони файлів або каталогів для виключення +або включення у процес синхронізації. +Усі шаблони обробляються у вказаному порядку. +

Якщо перший шаблон, який збігається, є exclude (виключити), +файл виключається. Якщо він є include (включити), +файл включається. +Якщо жоден шаблон не збігається, файл виключається, +якщо останній вказаний шаблон є include, або +включається, якщо останній вказаний шаблон є exclude. +

Дивіться розділ PATTERN для отримання додаткової +інформації про специфікації шаблонів. +

Цю опцію можна використовувати кілька разів. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Визначає основний розмір блоку в кібібайтах для парності. +Один кібібайт дорівнює 1024 байтам. +

Розмір блоку за замовчуванням становить 256, що має +працювати для більшості випадків. +

УВАГА! Ця опція лише для експертів, і настійно +не рекомендується змінювати це значення. Щоб змінити +це значення в майбутньому, вам потрібно буде +перестворити всю парність! +

Причина використовувати інший розмір блоку полягає +в тому, якщо у вас є багато невеликих файлів, порядку +мільйонів. +

Для кожного файлу, навіть якщо це лише кілька байтів, +виділяється цілий блок парності, і з багатьма файлами +це може призвести до значного невикористаного місця +парності. Коли ви повністю заповнюєте диск парності, +вам не дозволяється додавати більше файлів на диски +даних. Однак, витрачена парність не накопичується +між дисками даних. Витрачене місце внаслідок великої +кількості файлів на диску даних обмежує лише кількість +даних на цьому диску даних, а не на інших. +

Як наближення, ви можете припустити, що половина +розміру блоку витрачається для кожного файлу. +Наприклад, зі 100 000 файлами та розміром блоку 256 КіБ +ви витратите 12,8 ГБ парності, що може призвести до +того, що на диску даних буде на 12,8 ГБ менше місця. +

Ви можете перевірити кількість витраченого місця на +кожному диску за допомогою status. Це кількість +місця, яку ви повинні залишити вільною на дисках даних +або використовувати для файлів, не включених у масив. +Якщо це значення від'ємне, це означає, що ви +наближаєтеся до заповнення парності, і воно +представляє місце, яке ви ще можете витратити. +

Щоб уникнути цієї проблеми, ви можете використовувати +більший розділ для парності. Наприклад, якщо розділ +парності на 12,8 ГБ більший за диски даних, у вас є +достатньо додаткового місця для обробки до 100 000 +файлів на кожному диску даних без будь-якого +витраченого місця. +

Хитрість, щоб отримати більший розділ парності в +Linux, полягає в тому, щоб відформатувати його +командою: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

Це призводить до приблизно 1,5% додаткового місця, +приблизно 60 ГБ для диска 4 ТБ, що дозволяє +приблизно 460 000 файлів на кожному диску даних +без будь-якого витраченого місця. +

+
+

+hashsize SIZE_IN_BYTES +

+

Визначає розмір хешу в байтах для збережених блоків. +

Розмір хешу за замовчуванням становить 16 байтів +(128 біт), що має працювати для більшості випадків. +

УВАГА! Ця опція лише для експертів, і настійно +не рекомендується змінювати це значення. Щоб змінити +це значення в майбутньому, вам потрібно буде +перестворити всю парність! +

Причина використовувати інший розмір хешу полягає +в тому, якщо ваша система має обмежену пам'ять. +Як правило, SnapRAID зазвичай вимагає 1 ГіБ ОЗП +на кожні 16 ТБ даних у масиві. +

Зокрема, для зберігання хешів даних SnapRAID +вимагає приблизно $TS \times (1+HS) / BS$ байтів +ОЗП, де TS — загальний розмір вашого дискового масиву +у байтах, BS — розмір блоку у байтах, а HS — +розмір хешу у байтах. +

Наприклад, з 8 дисками по 4 ТБ, розміром блоку 256 КіБ +(1 КіБ = 1024 байта) та розміром хешу 16, ви отримуєте: +

+RAM = $(8 \times 4 \times 10^{12}) \times (1+16) / (256 \times 2^{10}) = 1.93$ ГіБ
+
+

Перехід до розміру хешу 8, ви отримуєте: +

+RAM = $(8 \times 4 \times 10^{12}) \times (1+8) / (256 \times 2^{10}) = 1.02$ ГіБ
+
+

Перехід до розміру блоку 512, ви отримуєте: +

+RAM = $(8 \times 4 \times 10^{12}) \times (1+16) / (512 \times 2^{10}) = 0.96$ ГіБ
+
+

Перехід до розміру хешу 8 та розміру блоку 512, ви отримуєте: +

+RAM = $(8 \times 4 \times 10^{12}) \times (1+8) / (512 \times 2^{10}) = 0.51$ ГіБ
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Автоматично зберігає стан під час синхронізації або +скрабування після обробки вказаної кількості ГБ. +Ця опція корисна, щоб уникнути перезапуску довгих +команд sync з нуля, якщо вони були перервані +збоєм машини або будь-якою іншою подією. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Встановлює максимальну дозволену температуру диска +в Цельсіях. Якщо вказано, SnapRAID періодично перевіряє +температуру всіх дисків за допомогою інструменту +smartctl. Поточні температури дисків відображаються +під час роботи SnapRAID. Якщо будь-який диск перевищує +цей ліміт, усі операції зупиняються, і диски +зупиняються (переходять у режим очікування) на час, +визначений опцією temp_sleep. Після періоду +очікування операції відновлюються, потенційно +знову призупиняючись, якщо ліміт температури знову +досягнутий. +

Під час роботи SnapRAID також аналізує криву +нагрівання кожного диска та оцінює довгострокову +стабільну температуру, якої вони, як очікується, +досягнуть, якщо активність продовжиться. +Оцінка виконується лише після того, як температура +диска підвищилася чотири рази, що гарантує наявність +достатньої кількості даних для встановлення +надійного тренду. Ця прогнозована стабільна +температура відображається в дужках поруч із +поточним значенням і допомагає оцінити, чи +достатнє охолодження системи. Ця оцінювана +температура є лише інформаційною і не впливає на +поведінку SnapRAID. Дії програми базуються +виключно на фактично виміряних температурах +дисків. +

Для виконання цього аналізу SnapRAID потрібна +довідкова інформація про температуру системи. +Спочатку він намагається зчитати її з доступних +апаратних датчиків. Якщо до системного датчика +неможливо отримати доступ, він використовує +найнижчу температуру диска, виміряну на початку +запуску, як резервну довідкову інформацію. +

Зазвичай SnapRAID показує лише температуру +найгарячішого диска. Щоб відобразити температуру +всіх дисків, використовуйте опцію -A або --stats. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Встановлює час очікування, у хвилинах, коли +досягнуто ліміту температури. Протягом цього +періоду диски залишаються зупиненими. +За замовчуванням 5 хвилин. +

+
+

+pool DIR +

+

Визначає каталог об'єднання, де створюється +віртуальне представлення дискового масиву за +допомогою команди pool. +

Каталог повинен вже існувати. +

+
+

+share UNC_DIR +

+

Визначає шлях Windows UNC, необхідний для +віддаленого доступу до дисків. +

Якщо ця опція вказана, символічні посилання, +створені в каталозі pool, використовують цей +шлях UNC для доступу до дисків. +Без цієї опції згенеровані символічні посилання +використовують лише локальні шляхи, що не +дозволяє спільно використовувати каталог pool +через мережу. +

Символічні посилання формуються за допомогою +вказаного шляху UNC, додаючи ім'я диска, як +зазначено в опції data, і, нарешті, +додаючи каталог та ім'я файлу. +

Ця опція потрібна лише для Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Визначає користувацькі опції smartctl для +отримання атрибутів SMART для кожного диска. +Це може знадобитися для RAID-контролерів та +деяких USB-дисків, які не можуть бути +автоматично виявлені. Заповнювач %s +замінюється іменем пристрою, але він +необов'язковий для фіксованих пристроїв, +таких як RAID-контролери. +

DISK — це те саме ім'я диска, вказане в опції data. +PARITY — це одне з імен парності: parity, +2-parity, 3-parity, 4-parity, 5-parity, +6-parity або z-parity. +

У вказаних OPTIONS рядок %s замінюється +іменем пристрою. Для RAID-контролерів пристрій +ймовірно фіксований, і вам може не знадобитися +використовувати %s. +

Зверніться до документації smartmontools +для можливих опцій: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

Наприклад: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ігнорує вказаний атрибут SMART при обчисленні +ймовірності відмови диска. Ця опція корисна, +якщо диск повідомляє незвичайні або +оманливі значення для певного атрибута. +

DISK — це те саме ім'я диска, вказане в опції data. +PARITY — це одне з імен парності: parity, +2-parity, 3-parity, 4-parity, 5-parity, +6-parity або z-parity. +Спеціальне значення * можна використовувати +для ігнорування атрибута на всіх дисках. +

Наприклад, щоб ігнорувати атрибут Current Pending Sector Count +на всіх дисках: +

+smartignore * 197
+
+

Щоб ігнорувати його лише на першому диску парності: +

+smartignore parity 197
+
+
+
+

+Приклади +

+

Приклад типової конфігурації для Unix: +

+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
+
+

Приклад типової конфігурації для Windows: +

+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
+
+
+
+
+

+Шаблон (Pattern) +

+

Шаблони забезпечують гнучкий спосіб фільтрації файлів для включення або +виключення. Використовуючи символи підстановки (globbing), ви можете визначити правила, які +відповідають конкретним іменам файлів або цілим структурам каталогів без +ручного перерахування кожного шляху. +

Знак питання ? відповідає будь-якому одному символу, крім роздільника +каталогів. Це робить його корисним для зіставлення імен файлів із змінними +символами, при цьому шаблон обмежується одним рівнем каталогу. +

Одинарна зірочка * відповідає будь-якій послідовності символів, але, як і +знак питання, вона ніколи не перетинає межі каталогів. Вона зупиняється на +прямій косій рисці, що робить її придатною для зіставлення всередині одного +компонента шляху. Це стандартна поведінка підстановочних знаків, знайома +з командної оболонки (shell globbing). +

Подвійна зірочка ** є потужнішою, вона відповідає будь-якій послідовності +символів, включаючи роздільники каталогів. Це дозволяє шаблонам відповідати +кільком рівням каталогів. Коли ** з'являється безпосередньо в шаблоні, +вона може відповідати нулю або більше символам, включаючи косі риски між +оточуючим літеральним текстом. +

Найважливішим використанням ** є спеціальна форма /**/. Вона відповідає +нулю або більше повним рівням каталогів, що дозволяє зіставляти файли +на будь-якій глибині в дереві каталогів, не знаючи точної структури шляху. +Наприклад, шаблон src/**/main.js відповідає src/main.js (пропуск +нуля каталогів), src/ui/main.js (пропуск одного каталогу) та +src/ui/components/main.js (пропуск двох каталогів). +

Класи символів із використанням квадратних дужок [] відповідають одному символу з +визначеного набору або діапазону. Як і інші односимвольні шаблони, вони +не відповідають роздільникам каталогів. Класи підтримують діапазони та заперечення за допомогою +знаку оклику. +

Фундаментальна відмінність, яку слід пам'ятати, полягає в тому, що *, ? та класи символів +усі дотримуються меж каталогів і відповідають лише в межах одного компонента +шляху, тоді як ** — єдиний шаблон, який може відповідати через роздільники +каталогів. +

Існує чотири різні типи шаблонів: +

+
+
+FILE +
+Вибирає будь-який файл з ім'ям FILE. +Цей шаблон застосовується тільки до файлів, а не до директорій. +
+
+
+
+
+
+DIR/ +
+Вибирає будь-яку директорію з ім'ям DIR і все, що знаходиться всередині. +Цей шаблон застосовується тільки до директорій, а не до файлів. +
+
+
+
+
+
+/PATH/FILE +
+Вибирає точно вказаний шлях до файлу. Цей шаблон застосовується +тільки до файлів, а не до директорій. +
+
+
+
+
+
+/PATH/DIR/ +
+Вибирає точно вказаний шлях до директорії і все, що знаходиться +всередині. Цей шаблон застосовується тільки до директорій, а не до файлів. +
+
+
+

Коли ви вказуєте абсолютний шлях, що починається +з /, він застосовується до кореневого каталогу +масиву, а не до кореневого каталогу локальної +файлової системи. +

У Windows ви можете використовувати зворотну +скісну риску \ замість прямої скісної риски /. +Системні каталоги Windows, з'єднання, точки +монтування та інші спеціальні каталоги Windows +розглядаються як файли, що означає, що для +їх виключення ви повинні використовувати правило +файлу, а не правило каталогу. +

Якщо ім'я файлу містить символи *, ?, [, +або ], ви повинні екранувати їх, щоб уникнути +їх інтерпретації як символу глоббінгу. +В Unix символом екранування є \; у Windows — ^. +Коли шаблон знаходиться в командному рядку, +ви повинні подвоїти символ екранування, щоб +запобігти його інтерпретації командною оболонкою. +

У конфігураційному файлі ви можете використовувати +різні стратегії для фільтрації файлів, які потрібно +обробити. +Найпростіший підхід — використовувати лише +правила exclude для видалення всіх файлів та +каталогів, які ви не хочете обробляти. +Наприклад: +

+# Виключає будь-який файл з іменем *.unrecoverable
+exclude *.unrecoverable
+# Виключає кореневий каталог /lost+found
+exclude /lost+found/
+# Виключає будь-який підкаталог з іменем tmp
+exclude tmp/
+
+

Протилежний підхід — визначити лише файли, +які ви хочете обробити, використовуючи лише +правила include. Наприклад: +

+# Включає лише деякі каталоги
+include /movies/
+include /musics/
+include /pictures/
+
+

Останній підхід — змішувати правила exclude +та include. У цьому випадку порядок правил +важливий. Раніші правила мають пріоритет +над пізнішими. +Для спрощення ви можете спочатку перерахувати +всі правила exclude, а потім усі правила include. +Наприклад: +

+# Виключає будь-який файл з іменем *.unrecoverable
+exclude *.unrecoverable
+# Виключає будь-який підкаталог з іменем tmp
+exclude tmp/
+# Включає лише деякі каталоги
+include /movies/
+include /musics/
+include /pictures/
+
+

У командному рядку, використовуючи опцію -f, +ви можете використовувати лише шаблони include. +Наприклад: +

+# Перевіряє лише файли .mp3.
+# В Unix використовуйте лапки, щоб уникнути
+# розширення глоббінгу оболонкою.
+snapraid -f "*.mp3" check
+
+

В Unix, при використанні символів глоббінгу в +командному рядку, ви повинні взяти їх у лапки, +щоб запобігти їх розширенню оболонкою. +

+
+

+Ігнорування файлів (Ignore File) +

+

На додаток до глобальних правил у файлі конфігурації, ви можете розміщувати +файли .snapraidignore в будь-якому каталозі всередині масиву для визначення +децентралізованих правил виключення. +

Правила, визначені в .snapraidignore, застосовуються після правил у файлі +конфігурації. Це означає, що вони мають вищий пріоритет і можуть бути використані +для виключення файлів, які раніше були включені глобальною конфігурацією. +Фактично, якщо локальне правило збігається, файл виключається незалежно від +глобальних налаштувань включення. +

Логіка шаблонів у .snapraidignore повторює глобальну конфігурацію, але +прив'язує шаблони до каталогу, в якому знаходиться файл: +

+
+
+FILE +
+Вибирає будь-який файл із ім'ям FILE у цьому каталозі або нижче. +Це відповідає тим самим правилам підстановки, що і в глобальному шаблоні. +
+
+
+
+
+
+DIR/ +
+Вибирає будь-який каталог із ім'ям DIR та весь його вміст, що +знаходиться в цьому каталозі або нижче. +
+
+
+
+
+
+/PATH/FILE +
+Вибирає точно вказаний файл відносно розташування +файлу .snapraidignore. +
+
+
+
+
+
+/PATH/DIR/ +
+Вибирає точно вказаний каталог та весь його вміст відносно +розташування файлу .snapraidignore. +
+
+
+

На відміну від глобальної конфігурації, файли .snapraidignore підтримують +лише правила виключення; ви не можете використовувати шаблони include або заперечення (!). +

Наприклад, якщо у вас є .snapraidignore у /mnt/disk1/projects/: +

+# Виключає ТІЛЬКИ /mnt/disk1/projects/output.bin
+/output.bin
+# Виключає будь-який каталог із назвою build всередині projects/
+build/
+# Виключає будь-який .tmp файл всередині projects/ або його підпапок
+*.tmp
+
+
+
+

+Вміст (Content) +

+

SnapRAID зберігає список та контрольні суми +ваших файлів у файлі вмісту. +

Це бінарний файл, який перераховує всі файли, +присутні у вашому дисковому масиві, разом з +усіма контрольними сумами для перевірки їх +цілісності. +

Цей файл зчитується та записується командами +sync та scrub та зчитується командами fix, +check та status. +

+
+

+Парність (Parity) +

+

SnapRAID зберігає інформацію парності вашого +масиву у файлах парності. +

Це бінарні файли, що містять обчислену +парність усіх блоків, визначених у файлі +content. +

Ці файли зчитуються та записуються командами +sync та fix і лише зчитуються командами +scrub та check. +

+
+

+Кодування (Encoding) +

+

SnapRAID в Unix ігнорує будь-яке кодування. +Він зчитує та зберігає імена файлів з +тим самим кодуванням, що використовується +файловою системою. +

У Windows усі імена, зчитані з файлової +системи, конвертуються та обробляються +у форматі UTF-8. +

Щоб імена файлів відображалися правильно, +ви повинні встановити консоль Windows +у режим UTF-8 за допомогою команди +chcp 65001 та використовувати шрифт +TrueType, такий як Lucida Console, як +шрифт консолі. +Це впливає лише на надруковані імена +файлів; якщо ви перенаправляєте вивід +консолі у файл, отриманий файл завжди +буде у форматі UTF-8. +

+
+

+Авторське право (Copyright) +

+

Цей файл захищений авторським правом (C) 2025 Andrea Mazzoleni +

+
+

+Див. також (See Also) +

+

snapraid_log(1), snapraidd(1) +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual-zh.html b/beta/manual-zh.html new file mode 100644 index 00000000..5b86a6f6 --- /dev/null +++ b/beta/manual-zh.html @@ -0,0 +1,1891 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID 是一款专为磁盘阵列设计的备份程序,它存储奇偶校验信息, +以在最多六个磁盘发生故障时进行数据恢复。 +

SnapRAID 主要面向拥有大型、不常更改文件的家庭媒体中心,提供以下特性: +

    +
  • +您可以使用已填充文件的磁盘,无需重新格式化,并像往常一样访问它们。 +
  • +
  • +您的所有数据都会被散列,以确保存储完整性并防止静默损坏。 +
  • +
  • +当故障磁盘数量超过奇偶校验数时,数据丢失仅限于受影响的磁盘; +其他磁盘上的数据仍然可访问。 +
  • +
  • +如果您不小心删除了磁盘上的文件,可以进行恢复。 +
  • +
  • +磁盘可以有不同的尺寸。 +
  • +
  • +您可以随时添加磁盘。 +
  • +
  • +SnapRAID 不会锁定您的数据;您可以随时停止使用它,无需重新格式化或移动数据。 +
  • +
  • +访问文件时,只需一个磁盘转动,从而节省电力并降低噪音。 +
  • +
+

欲了解更多信息,请访问 SnapRAID 官方网站: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID 是 RAID 和备份程序之间的混合体,旨在结合两者的优点。 +然而,在使用它之前,您应该考虑一些限制。 +

主要的限制是,如果一个磁盘发生故障而您最近没有进行同步(sync), +您可能无法完全恢复。 +更具体地说,您可能无法恢复自上次同步操作以来已更改或已删除文件的 +大小所对应的部分。 +即使更改或删除的文件不在发生故障的磁盘上,也会发生这种情况。 +这就是为什么 SnapRAID 更适用于很少更改的数据。 +

另一方面,新添加的文件不会阻止对已有文件的恢复。 +您只会丢失位于发生故障磁盘上的最近添加的文件。 +

SnapRAID 的其他限制包括: +

    +
  • +使用 SnapRAID,每个磁盘仍然有单独的文件系统。 +使用 RAID,您可以获得一个单一的大型文件系统。 +
  • +
  • +SnapRAID 不进行数据条带化。 +使用 RAID,您可以通过条带化获得速度提升。 +
  • +
  • +SnapRAID 不支持实时恢复。 +使用 RAID,当磁盘发生故障时,您不必停止工作。 +
  • +
  • +SnapRAID 只能从有限数量的磁盘故障中恢复数据。 +使用备份,您可以从整个磁盘阵列的完全故障中恢复。 +
  • +
  • +仅保存文件名、时间戳、符号链接和硬链接。 +不保存权限、所有权和扩展属性。 +
  • +
+
+
+

+Getting Started +

+

要使用 SnapRAID,您需要首先选择磁盘阵列中的一个磁盘专用于 +parity(奇偶校验)信息。使用一个奇偶校验磁盘, +您将能够从单磁盘故障中恢复,类似于 RAID5。 +

如果您想从更多的磁盘故障中恢复,类似于 RAID6, +您必须预留额外的磁盘用于奇偶校验。每增加一个奇偶校验磁盘, +就可以多恢复一个磁盘故障。 +

作为奇偶校验磁盘,您必须选择阵列中最大的磁盘, +因为奇偶校验信息可能会增长到阵列中最大的数据磁盘的大小。 +

这些磁盘将专门用于存储 parity 文件。 +您不应该在它们上面存储您的数据。 +

然后,您必须定义要使用 SnapRAID 保护的 data(数据)磁盘。 +如果这些磁盘包含很少更改的数据,保护会更有效。因此, +最好**不要**包含 Windows C:\ 磁盘或 Unix 的 /home、/var 和 /tmp 目录。 +

文件列表保存在 content(内容)文件中,通常存储在数据、奇偶校验或 +引导磁盘上。 +该文件包含备份的详细信息,包括所有用于验证其完整性的校验和。 +content 文件存储有多个副本,每个副本必须位于不同的磁盘上, +以确保存储有多个磁盘故障时,至少有一个副本可用。 +

例如,假设您只对一个奇偶校验保护级别感兴趣,并且您的磁盘位于: +

+/mnt/diskp <- 选定的奇偶校验磁盘
+/mnt/disk1 <- 第一个要保护的磁盘
+/mnt/disk2 <- 第二个要保护的磁盘
+/mnt/disk3 <- 第三个要保护的磁盘
+
+

您必须创建配置文件 /etc/snapraid.conf,并包含以下选项: +

+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/
+
+

如果您使用 Windows,您应该使用 Windows 路径格式, +用驱动器号和反斜杠代替斜杠。 +

+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\
+
+

如果您有许多磁盘且驱动器号用尽,您可以将磁盘直接挂载到子文件夹中。请参阅: +

+https://www.google.com/search?q=Windows+mount+point
+
+

此时,您已准备好运行 sync 命令来构建奇偶校验信息。 +

+snapraid sync
+
+

第一次运行此过程可能需要几个小时,具体取决于磁盘上已存在数据的大小。 +如果磁盘是空的,则过程是即时的。 +

您可以随时按 Ctrl+C 停止它,在下次运行时,它将从中断的地方恢复。 +

当此命令完成时,您的数据是**安全的**。 +

现在您可以开始随意使用您的阵列,并定期运行 sync 命令更新奇偶校验信息。 +

+

+Scrubbing +

+

要定期检查数据和奇偶校验的错误,您可以运行 scrub 命令。 +

+snapraid scrub
+
+

此命令将阵列中的数据与 sync 命令期间计算的散列进行比较, +以验证完整性。 +

每次运行该命令会检查大约 8% 的阵列,排除在过去 10 天内 +已被 scrub 的数据。 +您可以使用 -p, --plan 选项来指定不同的量, +并使用 -o, --older-than 选项来指定不同的天数。 +例如,要检查 20 天以上块的 5% 阵列,请使用: +

+snapraid -p 5 -o 20 scrub
+
+

如果在过程中发现静默错误或输入/输出错误, +相应的块会在 content 文件中被标记为坏块,并列在 status 命令中。 +

+snapraid status
+
+

要修复它们,您可以使用 fix 命令,使用 -e, --filter-error 选项过滤坏块: +

+snapraid -e fix
+
+

在下次 scrub 时,如果它们确实被修复了,错误将从 status 报告中消失。 +为了更快,您可以使用 -p bad 来仅 scrub 标记为坏块的块。 +

+snapraid -p bad scrub
+
+

在未同步的阵列上运行 scrub 可能会报告由已删除或已修改文件引起的错误。 +这些错误会在 scrub 输出中报告,但相关块不会被标记为坏块。 +

+
+

+Pooling +

+

注意:下面描述的 pooling 功能已被 mergerfs 工具取代, +mergerfs 现在是 SnapRAID 社区推荐的 Linux 用户选项。 +Mergefs 提供了一种更灵活、更高效的方式,将多个驱动器汇集到一个 +统一的挂载点中,允许跨阵列无缝访问文件,而无需依赖符号链接。 +它与 SnapRAID 很好地集成以提供奇偶校验保护,常用于 +OpenMediaVault (OMV) 或自定义 NAS 配置等设置中。 +

要使阵列中的所有文件显示在同一个目录树中, +您可以启用 pooling 功能。它使用符号链接创建了一个 +阵列中所有文件的只读虚拟视图。 +

您可以在配置文件中使用以下选项配置 pooling 目录: +

+pool /pool
+
+

或者,如果您使用 Windows,则使用: +

+pool C:\pool
+
+

然后运行 pool 命令创建或更新虚拟视图。 +

+snapraid pool
+
+

如果您使用 Unix 平台并希望通过网络将此目录共享给 Windows 或 Unix 机器, +您应该在 /etc/samba/smb.conf 中添加以下选项: +

+# 在 smb.conf 的全局部分
+unix extensions = no
+
+
+# 在 smb.conf 的共享部分
+[pool]
+comment = Pool
+path = /pool
+read only = yes
+guest ok = yes
+wide links = yes
+follow symlinks = yes
+
+

在 Windows 中,通过网络共享符号链接需要客户端远程解析它们。 +要启用此功能,除了共享 pool 目录之外,您还必须独立共享所有磁盘, +使用配置文件中定义的磁盘名称作为共享点。 +您还必须在配置文件的 share 选项中指定远程客户端访问这些 +共享磁盘所需的 Windows UNC 路径。 +

例如,在名为 darkstar 的服务器上操作,您可以使用以下选项: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

并通过网络共享以下目录: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

以允许远程客户端访问 \\darkstar\pool 处的所有文件。 +

您可能还需要配置远程客户端,使用以下命令启用对远程符号链接的访问: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID 的功能更像一个备份程序而不是 RAID 系统, +它可以使用 -f, --filter 选项来恢复或取消删除文件到其以前的状态: +

+snapraid fix -f FILE
+
+

或者对于一个目录: +

+snapraid fix -f DIR/
+
+

您也可以使用 -m, --filter-missing 选项来仅恢复目录内意外删除的文件, +该选项仅恢复丢失的文件,保持所有其他文件不变。 +

+snapraid fix -m -f DIR/
+
+

或者使用以下命令恢复所有驱动器上所有已删除的文件: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

最糟糕的情况发生了,您丢失了一个或多个磁盘! +

**不要惊慌!** 您将能够恢复它们! +

您必须做的第一件事是避免对磁盘阵列进行进一步的更改。 +禁用对其的任何远程连接以及任何计划的进程,包括任何计划的 SnapRAID +夜间同步或 scrub。 +

然后继续执行以下步骤。 +

+

+STEP 1 -> 重新配置 +

+

您需要一些空间来恢复,理想情况下是在额外的备用磁盘上, +但外部 USB 磁盘或远程磁盘也足够。 +

修改 SnapRAID 配置文件,使故障磁盘的 data 或 parity 选项指向 +一个具有足够空闲空间来恢复文件的位置。 +

例如,如果磁盘 d1 发生故障,则从: +

+data d1 /mnt/disk1/
+
+

更改为: +

+data d1 /mnt/new_spare_disk/
+
+

如果需要恢复的磁盘是奇偶校验磁盘,请更新相应的 parity 选项。 +如果您有多个故障磁盘,请更新所有它们的配置选项。 +

+
+

+STEP 2 -> 修复 +

+

运行 fix 命令,并将日志存储在外部文件中: +

+snapraid -d NAME -l fix.log fix
+
+

其中 NAME 是磁盘的名称,例如我们前面例子中的 d1。 +如果需要恢复的磁盘是奇偶校验磁盘,请使用名称 parity、2-parity 等。 +如果您有多个故障磁盘,请使用多个 -d 选项来指定所有它们。 +

此命令将花费很长时间。 +

确保您有几 GB 的可用空间来存储 fix.log 文件。 +在有足够可用空间的磁盘上运行它。 +

现在您已经恢复了所有可恢复的内容。如果有些文件部分或完全不可恢复, +它们将被重命名并添加 .unrecoverable 扩展名。 +

您可以通过检查所有以 unrecoverable: 开头的行,在 fix.log 文件中 +找到所有不可恢复块的详细列表。 +

如果您对恢复不满意,您可以根据需要重试多次。 +

例如,如果您在上次 sync 之后从阵列中删除了文件, +这可能导致某些文件无法恢复。 +在这种情况下,您可以使用 -i, --import 选项重试 fix, +指定这些文件现在在哪里,以便将它们再次包含在恢复过程中。 +

如果您对恢复感到满意,您可以继续进行, +但请注意,在同步之后,您不能再重试 fix 命令了! +

+
+

+STEP 3 -> 检查 +

+

作为一项谨慎的检查,您现在可以运行 check 命令,以确保 +恢复的磁盘上的一切都是正确的。 +

+snapraid -d NAME -a check
+
+

其中 NAME 是磁盘的名称,例如我们前面例子中的 d1。 +

+
+
+-d 和 -a 选项告诉 SnapRAID 只检查指定的磁盘并忽略所有奇偶校验数据。 +
+
+
+
+

此命令将花费很长时间,但如果您不是过于谨慎,可以跳过它。 +

+
+

+STEP 4 -> 同步 +

+

运行 sync 命令以将阵列与新磁盘重新同步。 +

+snapraid sync
+
+

如果所有内容都已恢复,此命令是即时的。 +

+
+
+
+

+Commands +

+

SnapRAID 提供了一些简单的命令,允许您: +

    +
  • +打印阵列的状态 -> status +
  • +
  • +控制磁盘 -> smart、probe、up、down +
  • +
  • +进行备份/快照 -> sync +
  • +
  • +定期检查数据 -> scrub +
  • +
  • +恢复上次备份/快照 -> fix。 +
  • +
+

命令必须用小写字母书写。 +

+

+status +

+

打印磁盘阵列状态的摘要。 +

它包括有关奇偶校验碎片、块未经检查有多久,以及在 scrubbing +期间遇到的所有记录的静默错误的信息。 +

所提供的信息指的是您上次运行 sync 的时间。 +不考虑后来的修改。 +

如果检测到坏块,则会列出它们的块号。 +要修复它们,您可以使用 fix -e 命令。 +

它还会显示一个图表,表示每个块上次被 scrub 或 sync 的时间。 +被 scrub 的块显示为 *,已同步但尚未 scrub 的块显示为 o。 +

不会修改任何内容。 +

+
+

+smart +

+

打印系统中所有磁盘的 SMART 报告。 +

它包括对明年故障概率的估计,允许您计划更换显示 +可疑属性的磁盘进行维护。 +

此概率估计是通过将磁盘的 SMART 属性与 +Backblaze 提供的以下数据进行关联获得的: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

如果 SMART 报告磁盘正在发生故障,则会为该磁盘打印 FAIL 或 PREFAIL, +并且 SnapRAID 返回错误。 +在这种情况下,**强烈建议**立即更换磁盘。 +

其他可能的状态字符串有: +

+
+
+logfail +
+过去,某些属性低于阈值。 +
+
+
+
+logerr +
+设备错误日志包含错误。 +
+
+
+
+selferr +
+设备自检日志包含错误。 +
+
+
+

如果指定了 -v, --verbose 选项,则会提供更深入的统计分析。 +此分析可以帮助您决定是否需要更多或更少的奇偶校验。 +

此命令使用 smartctl 工具,相当于在所有设备上运行 smartctl -a。 +

如果您的设备未正确自动检测,您可以使用配置 +文件中的 smartctl 选项指定自定义命令。 +

不会修改任何内容。 +

+
+

+probe +

+

打印系统中所有磁盘的**电源**状态。 +

Standby(待机)表示磁盘未转动。Active(活动)表示 +磁盘正在转动。 +

此命令使用 smartctl 工具,相当于在所有设备上运行 +smartctl -n standby -i。 +

如果您的设备未正确自动检测,您可以使用配置 +文件中的 smartctl 选项指定自定义命令。 +

不会修改任何内容。 +

+
+

+up +

+

使阵列中的所有磁盘转动起来。 +

您可以使用 -d, --filter-disk 选项只启动特定的磁盘。 +

同时启动所有磁盘需要大量的电力。 +确保您的电源能够承受。 +

不会修改任何内容。 +

+
+

+down +

+

使阵列中的所有磁盘停转。 +

此命令使用 smartctl 工具,相当于在所有设备上运行 +smartctl -s standby,now。 +

您可以使用 -d, --filter-disk 选项只停转特定的磁盘。 +

要在发生错误时自动停转,您可以将 -s, --spin-down-on-error +选项与任何其他命令一起使用,这相当于在发生错误时手动运行 down。 +

不会修改任何内容。 +

+
+

+diff +

+

列出自上次 sync 以来所有已修改、需要重新计算奇偶校验数据的 +文件。 +

此命令不检查文件数据,仅检查文件时间戳、大小和 inode。 +

列出所有更改的文件后,会显示更改的摘要,按以下方式分组: +

+
+
+equal +
+文件与之前相比未更改。 +
+
+
+
+added +
+之前不存在、已添加的文件。 +
+
+
+
+removed +
+已删除的文件。 +
+
+
+
+updated +
+大小或时间戳不同的文件,表示它们已被修改。 +
+
+
+
+moved +
+在同一磁盘上移动到不同目录的文件。 +它们通过具有相同的名称、大小、时间戳和 inode,但目录不同来识别。 +
+
+
+
+copied +
+在相同或不同磁盘上复制的文件,且原始文件仍然存在。 +它们通过具有相同的名称、大小和时间戳进行识别。 +如果亚秒级时间戳为零,则必须完整路径匹配才能识别,而不仅仅是名 +称。 +
+
+
+
+relocated +
+在相同或不同磁盘上移动的文件,且原始文件已消失。 +它们通过具有相同的名称、大小和时间戳进行识别。 +如果亚秒级时间戳为零,则必须完整路径匹配才能识别。 +与同一磁盘上的 'moved' 文件不同,重定位的文件具有不同的 inode。 +
+
+
+
+restored +
+inode 不同但目录、名称、大小和时间戳匹配的文件。 +这些通常是删除后恢复的文件。 +
+
+
+

如果需要 sync,进程返回码为 2,而不是默认的 0。 +返回码 1 用于一般错误情况。 +

不会修改任何内容。 +

+
+

+sync +

+

更新奇偶校验信息。读取磁盘阵列中所有已修改的文件, +并更新相应的奇偶校验数据。 +

您可以随时按 Ctrl+C 停止此过程,而不会丢失已完成的工作。 +在下次运行时,sync 过程将从中断的地方恢复。 +

如果在过程中发现静默错误或输入/输出错误, +相应的块会被标记为坏块。 +

文件通过路径和/或 inode 识别,并检查大小和时间戳。 +如果文件大小或时间戳不同,则会为整个文件重新计算奇偶校验数据。 +如果文件在同一磁盘上被移动或重命名,保持相同的 inode,则不重新计算奇偶校验。 +如果文件移动到另一个磁盘,则重新计算奇偶校验, +但保留以前计算的散列信息。 +

如果需要,会修改 content 和 parity 文件。 +阵列中的文件**不会**被修改。 +

+
+

+scrub +

+

Scrub 阵列,检查数据和奇偶校验磁盘中的静默或输入/输出错误。 +

每次调用检查大约 8% 的阵列,排除在过去 10 天内 +已被 scrub 的数据。 +这意味着每周 scrub 一次可确保每隔三个月至少检查一次数据的每一位。 +

您可以使用 -p, --plan 选项定义不同的 scrub 计划或数量, +该选项接受: +bad - Scrub 标记为坏块的块。 +new - Scrub 刚刚同步但尚未 scrub 的块。 +full - Scrub 所有内容。 +0-100 - Scrub 指定百分比的块。 +

如果指定了百分比数量,您还可以使用 -o, --older-than +选项来定义块应该有多旧。 +最旧的块首先被 scrub,确保最佳检查。 +如果您只想 scrub 刚刚同步但尚未 scrub 的块, +请使用 -p new 选项。 +

要获取 scrub 状态的详细信息,请使用 status 命令。 +

对于发现的任何静默错误或输入/输出错误,相应的块 +会在 content 文件中被标记为坏块。 +这些坏块列在 status 中,可以使用 fix -e 修复。 +修复后,在下次 scrub 时,它们将被重新检查,如果发现已更正, +则会删除坏块标记。 +要仅 scrub 坏块,您可以使用 scrub -p bad 命令。 +

建议仅在已同步的阵列上运行 scrub,以避免 +由未同步数据引起的报告错误。这些错误被识别为不是静默错误, +并且块不会被标记为坏块,但此类错误会在命令的输出中报告。 +

content 文件会被修改以更新每个块上次检查的时间 +并标记坏块。 +parity 文件**不会**被修改。 +阵列中的文件**不会**被修改。 +

+
+

+fix +

+

修复所有文件和奇偶校验数据。 +

所有文件和奇偶校验数据都与上次 sync 中保存的快照 +状态进行比较。 +如果发现差异,则将其恢复到存储的快照。 +

**警告!** fix 命令不区分错误和 +故意修改。它**无条件地**将文件状态恢复到上次 sync。 +

如果未指定其他选项,则处理整个阵列。 +使用过滤选项选择要操作的文件或磁盘的子集。 +

要仅修复在 sync 和 scrub 期间标记为坏块的块, +请使用 -e, --filter-error 选项。 +与其他过滤选项不同,此选项仅对自上次 sync 以来未更改的 +文件应用修复。 +

SnapRAID 会重命名所有无法修复的文件,并添加 +.unrecoverable 扩展名。 +

在修复之前,会扫描整个阵列以查找自上次 sync +操作以来移动的任何文件。 +这些文件通过它们的时间戳识别,忽略它们的名称 +和目录,并在必要时用于恢复过程。 +如果您将其中一些移到了阵列之外,您可以使用 -i, --import +选项指定额外的目录进行扫描。 +

文件仅通过路径识别,而不通过 inode 识别。 +

content 文件**不会**被修改。 +如果需要,parity 文件会被修改。 +如果需要,阵列中的文件会被修改。 +

+
+

+check +

+

验证所有文件和奇偶校验数据。 +

它的工作方式类似于 fix,但它只模拟恢复,**不会**对阵列 +写入任何更改。 +

此命令主要用于手动验证, +例如在恢复过程之后或在其他特殊条件下。 +对于定期和计划的检查,请使用 scrub。 +

如果您使用 -a, --audit-only 选项,则仅检查文件 +数据散列,而忽略奇偶校验数据,以加快运行速度。 +

文件仅通过路径识别,而不通过 inode 识别。 +

不会修改任何内容。 +

+
+

+list +

+

列出上次 sync 时阵列中包含的所有文件。 +

使用 -v 或 --verbose,还会显示亚秒级时间。 +

不会修改任何内容。 +

+
+

+dup +

+

列出所有重复文件。如果两个文件的散列匹配,则认为它们相等。 +不读取文件数据;仅使用预先计算的散列。 +

不会修改任何内容。 +

+
+

+pool +

+

在 pooling 目录中创建或更新磁盘阵列中所有文件 +的虚拟视图。 +

文件不会被复制,而是使用符号链接连接。 +

更新时,所有现有的符号链接和空 +子目录都会被删除,并替换为阵列的新视图。 +任何其他常规文件保留在原位。 +

不会修改 pool 目录之外的任何内容。 +

+
+

+devices +

+

打印阵列使用的低级设备。 +

此命令显示阵列中的设备关联,主要用作脚本接口。 +

前两列是低级设备 ID 和路径。 +接下来的两列是高级设备 ID 和路径。 +最后一列是阵列中的磁盘名称。 +

在大多数情况下,阵列中的每个磁盘都有一个低级设备, +但在一些更复杂的配置中,单个阵列磁盘可能会使用多个 +低级设备。 +

不会修改任何内容。 +

+
+

+touch +

+

为所有亚秒级时间戳设置为零的文件设置一个任意的 +亚秒级时间戳。 +

这提高了 SnapRAID 识别移动和复制文件的能力, +因为它使时间戳几乎独一无二,减少了可能的重复。 +

更具体地说,如果亚秒级时间戳不为零, +则移动或复制的文件在名称、大小和时间戳匹配时被识别为 +此类。如果亚秒级时间戳为零,则仅当完整路径、 +大小和时间戳都匹配时才被视为副本。 +

不会修改秒精度时间戳, +因此会保留文件的所有日期和时间。 +

+
+

+rehash +

+

安排对整个阵列进行重新散列。 +

此命令更改使用的散列类型,通常是在从 32 位系统升级到 64 位系统时, +以从 MurmurHash3 切换到更快的 SpookyHash。 +

如果您已经在使用最佳散列,则此命令不执行任何操作, +并通知您无需执行任何操作。 +

重新散列不会立即执行,而是在 sync 和 scrub 期间 +逐步进行。 +

您可以使用 status 检查重新散列状态。 +

在重新散列期间,SnapRAID 保持完全功能, +唯一的例外是 dup 无法使用不同的散列检测重复的文件。 +

+
+

+locate +

+

查找存储在校验盘中的文件。对于每个匹配的文件,它会打印其在校验文件中的位置 +以及占用的分片数量。 +

您可以使用 -t, --tail 选项将操作限制在占用校验盘指定尾部部分的 +文件上。 +

如果您想重新分配这些文件,可以使用 -W, --force-realloc-tail 选项。 +请注意,在重新分配过程中,此类文件将不受校验保护。 +

+
+
+

+Options +

+

SnapRAID 提供以下选项: +

+
+
+-c, --conf CONFIG +
+选择要使用的配置文件。如果未指定,在 Unix 中, +如果存在,则使用文件 /usr/local/etc/snapraid.conf, +否则使用 /etc/snapraid.conf。 +在 Windows 中,它使用与 snapraid.exe 相同的目录中的文件 snapraid.conf。 +
+
+
+
+
+
+-f, --filter PATTERN +
+过滤要在 check 和 fix 中处理的文件。 +仅处理与指定模式匹配的文件。 +此选项可以多次使用。 +有关模式规范的更多详细信息,请参阅 PATTERN 部分。 +在 Unix 中,如果使用 globbing 字符,请确保它们被引用。 +此选项只能与 check 和 fix 一起使用。 +不能与 sync 和 scrub 一起使用,因为它们总是处理整个阵列。 +
+
+
+
+
+
+-d, --filter-disk NAME +
+过滤要在 check、fix、up 和 down 中处理的磁盘。 +您必须指定配置文件中定义的磁盘名称。 +您也可以指定奇偶校验磁盘的名称:parity、2-parity、 +3-parity 等,以将操作限制到特定的奇偶校验磁盘。 +如果您组合使用多个 --filter、--filter-disk 和 --filter-missing 选项, +则仅选择与所有过滤器匹配的文件。 +此选项可以多次使用。 +此选项只能与 check、fix、up 和 down 一起使用。 +不能与 sync 和 scrub 一起使用,因为它们总是处理整个阵列。 +
+
+
+
+
+
+-m, --filter-missing +
+过滤要在 check 和 fix 中处理的文件。 +仅处理阵列中丢失或已删除的文件。 +与 fix 一起使用时,此选项充当 undelete 命令。 +如果您组合使用多个 --filter、--filter-disk 和 --filter-missing 选项, +则仅选择与所有过滤器匹配的文件。 +此选项只能与 check 和 fix 一起使用。 +不能与 sync 和 scrub 一起使用,因为它们总是处理整个阵列。 +
+
+
+
+
+
+-e, --filter-error +
+处理 check 和 fix 中有错误的文件。 +它仅处理在 sync 和 scrub 期间块被标记为静默或输入/输出错误的 +文件,如 status 中所列。 +此选项只能与 check 和 fix 一起使用。 +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+选择 scrub 计划。如果 PERC 是一个介于 0 到 100 之间的数值, +则将其解释为要 scrub 的块的百分比。 +除了百分比,您还可以指定一个计划: +bad scrub 坏块,new scrub 尚未 scrub 的块, +full scrub 所有内容。 +此选项只能与 scrub 一起使用。 +
+
+
+
+
+
+-o, --older-than DAYS +
+选择要在 scrub 中处理的阵列的最旧部分。 +DAYS 是块被 scrub 的最小天数;默认值为 10。 +无论此选项如何,标记为坏块的块始终会被 scrub。 +此选项只能与 scrub 一起使用。 +
+
+
+
+
+
+-a, --audit-only +
+在 check 中,验证文件的散列而不 +检查奇偶校验数据。 +如果您只对检查文件数据感兴趣,此选项可以显著加快 +检查过程。 +此选项只能与 check 一起使用。 +
+
+
+
+
+
+-h, --pre-hash +
+在 sync 中,运行所有新数据的初步散列阶段, +以便在奇偶校验计算之前进行额外验证。 +通常,在 sync 中,不进行初步散列,并且新 +数据仅在首次读取进行奇偶校验计算之前散列。 +此过程在系统处于 +重负载下发生,所有磁盘都在转动,CPU 也很忙。 +这对机器来说是一种极端情况,如果它有潜在的硬件问题, +静默错误可能无法被检测到,因为数据尚未散列。 +为避免此风险,您可以启用 pre-hash 模式,将 +所有数据读取两次以确保其完整性。 +此选项还会验证阵列内移动的文件, +以确保移动操作成功,并在必要时 +允许您在继续之前运行 fix 操作。 +此选项只能与 sync 一起使用。 +
+
+
+
+
+
+-i, --import DIR +
+从指定目录导入自上次 sync 以来从阵列中删除的任何文件。 +如果您仍然拥有此类文件,它们可用于 check +和 fix 以改进恢复过程。 +读取文件,包括在子目录中,并且无论其名称如何都会被识别。 +此选项只能与 check 和 fix 一起使用。 +
+
+
+
+
+
+-s, --spin-down-on-error +
+在任何错误发生时,在退出并带有非零状态码之前, +将所有托管的磁盘停转。这可以防止驱动器在中止操作后 +保持活动和转动,有助于避免不必要的热量积聚和功耗。 +使用此选项可确保即使命令失败,磁盘也能安全停止。 +
+
+
+
+
+
+-w, --bw-limit RATE +
+对所有磁盘应用全局带宽限制。RATE 是 +每秒的字节数。您可以指定乘数,例如 K、M 或 G +(例如,--bw-limit 1G)。 +
+
+
+
+
+
+-t, --tail 大小 +
+将文件列表限制为那些使用校验盘指定尾部大小以内的文件。 +您可以使用乘数,如 K、M、G 或 T(例如 --tail 1G)。 +此选项仅在与 locate 命令配合使用时有效。 +
+
+
+
+
+
+-A, --stats +
+启用扩展状态视图,显示附加信息。 +屏幕显示两个图表: +第一个图表显示每个磁盘的缓冲条带数,以及 +当前正在该磁盘上访问的文件的文件路径。 +通常,最慢的磁盘将没有可用缓冲区, +这决定了可达到的最大带宽。 +第二个图表显示在过去 100 秒内等待所花费的时间百分比。 +预计最慢的磁盘会导致大部分等待时间, +而其他磁盘应该只有很少或没有等待时间, +因为它们可以使用缓冲条带。 +此图表还显示了等待散列计算和 RAID +计算所花费的时间。 +所有计算都与磁盘操作并行运行。 +因此,只要至少一个磁盘有可测量的等待时间, +就表明 CPU 足够快,能够跟上工作负载。 +
+
+
+
+
+
+-Z, --force-zero +
+强制执行不安全的同步操作:同步大小为零但以前非零的文件。 +如果 SnapRAID 检测到这种情况,它会停止进行, +除非您指定此选项。 +这使您可以轻松检测到在系统崩溃后, +某些访问的文件被截断的情况。 +这在带有 ext3/ext4 文件系统的 Linux 中是一种可能的情况。 +此选项只能与 sync 一起使用。 +
+
+
+
+
+
+-E, --force-empty +
+强制执行不安全的同步操作:同步所有原始文件丢失的磁盘。 +如果 SnapRAID 检测到磁盘上最初存在的所有文件都丢失或被重写, +它会停止进行,除非您指定此选项。 +这使您可以轻松检测到数据文件系统未挂载的情况。 +此选项只能与 sync 一起使用。 +
+
+
+
+
+
+-U, --force-uuid +
+强制执行不安全的同步、检查和修复操作,当磁盘更改了它们的 UUID 时。 +如果 SnapRAID 检测到某些磁盘更改了 UUID, +它会停止进行,除非您指定此选项。 +这使您可以检测到您的磁盘被挂载在 +错误的挂载点的情况。 +但是,允许在单奇偶校验下进行单个 UUID 更改, +在多奇偶校验下进行更多更改,因为这是恢复后更换磁盘时的正常情况。 +此选项只能与 sync、check 或 fix 一起使用。 +
+
+
+
+
+
+-D, --force-device +
+强制执行不安全的修复操作,当磁盘无法访问或位于同一物理设备上时。 +例如,如果您丢失了两个数据磁盘,并且有一个备用磁盘 +只能恢复第一个,您可以忽略第二个无法访问的磁盘。 +或者,如果您想在已使用的磁盘上剩余的可用空间中恢复一个磁盘, +共享同一物理设备。 +此选项只能与 fix 一起使用。 +
+
+
+
+
+
+-N, --force-nocopy +
+在 sync、check 和 fix 中,禁用复制检测启发式。 +如果没有此选项,SnapRAID 假定具有相同属性(例如名称、大小和时间戳) +的文件是具有相同数据的副本。 +这允许识别从一个磁盘移动到另一个磁盘的复制或移动的文件, +并重用已计算的散列信息以检测静默错误或恢复丢失的文件。 +在某些罕见的情况下,此行为可能导致误报 +或由于许多散列验证而导致过程缓慢,此选项允许您解决此类问题。 +此选项只能与 sync、check 和 fix 一起使用。 +
+
+
+
+
+
+-F, --force-full +
+在 sync 中,强制完全重新计算奇偶校验。 +当您添加新的奇偶校验级别或如果使用较新的奇偶校验数据恢复到旧的内容文件时, +可以使用此选项。 +这允许您重用内容文件中存在的散列来验证数据, +并使用现有奇偶校验数据在 sync 过程中保持数据保护, +而不是从头开始重新创建奇偶校验。 +此选项只能与 sync 一起使用。 +
+
+
+
+
+
+-R, --force-realloc +
+在 sync 中,强制完全重新分配文件并重建奇偶校验。 +此选项可用于完全重新分配所有文件, +消除碎片,同时重用内容文件中存在的散列来验证数据。 +此选项只能与 sync 一起使用。 +**警告!** 此选项仅供专家使用,强烈建议不要使用它。 +在 sync 操作期间,您**没有**数据保护。 +
+
+
+
+
+
+-W, --force-realloc-tail 大小 +
+工作方式类似于 -R, --force-realloc,但仅限于每个校验文件的 +指定尾部部分(最后“大小”字节)。 +它会强制重新分配(移动)当前存储在该尾部部分的任何文件分片/块, +允许它们被放置在校验文件中任何有可用空间的地方(包括现有的 +空隙)。 +此选项的主要目的是缩小校验文件的磁盘占用大小。 +如果重新分配成功清空了整个尾部区域(没有块继续使用它), +则校验文件将被截断,回收未使用的尾部空间。 +您可以使用乘数,如 K、M、G 或 T(例如 +--force-realloc-tail 1G)。 +您可以使用 locate -t, --tail 提前了解受影响的文件。 +警告! +此选项仅供专家使用,强烈建议不要使用。 +在执行 sync 操作期间,受影响的文件将没有数据保护。 +
+
+
+
+
+
+-l, --log FILE +
+将详细日志写入指定文件。 +如果未指定此选项,则会将意外错误打印到屏幕, +在出现许多错误的情况下,可能导致输出过多。 +指定 -l, --log 时,仅将导致 SnapRAID 停止的**致命错误**打印到 +屏幕。 +如果路径以 >> 开头,则文件以追加模式打开。 +名称中的 %D 和 %T 出现会被替换为日期和时间,格式分别为 YYYYMMDD 和 +HHMMSS。在 Windows 批处理文件中,您必须双写 % 字符, +例如 result-%%D.log。要使用 >>,您必须将名称括在引号中, +例如 ">>result.log"。 +要将日志输出到标准输出或标准错误, +您可以使用 ">&1" 和 ">&2"。 +有关日志标签描述,请参阅 snapraid_log.txt 文件或 man 页面。 +
+
+
+
+
+
+-L, --error-limit NUMBER +
+设置停止执行前的新错误限制。 +默认情况下,如果 SnapRAID 遇到超过 100 个 +输入/输出错误,它会停止,表明磁盘可能正在发生故障。 +此选项影响 sync 和 scrub,它们被允许在第一组 +磁盘错误后继续,以尝试完成其操作。 +但是,check 和 fix 总是会在第一次错误时停止。 +
+
+
+
+
+
+-S, --start BLKSTART +
+从指定的块号开始处理。 +在磁盘损坏的情况下,这对于重试检查或修复特定块可能很有用。 +此选项主要用于高级手动恢复。 +
+
+
+
+
+
+-B, --count BLKCOUNT +
+仅处理指定数量的块。 +此选项主要用于高级手动恢复。 +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+从现有内容文件生成一个虚拟配置文件。 +配置文件写入标准输出,不会覆盖现有文件。 +此配置文件还包含在您丢失整个系统的情况下 +重建磁盘挂载点所需的信息。 +
+
+
+
+
+
+-v, --verbose +
+向屏幕打印更多信息。 +如果指定一次,它会打印排除的文件 +和附加统计信息。 +此选项对日志文件没有影响。 +
+
+
+
+
+
+-q, --quiet +
+向屏幕打印更少信息。 +如果指定一次,它会删除进度条;两次, +正在运行的操作;三次,信息 +消息;四次,状态消息。 +致命错误始终会打印到屏幕。 +此选项对日志文件没有影响。 +
+
+
+
+
+
+-H, --help +
+打印简短的帮助屏幕。 +
+
+
+
+
+
+-V, --version +
+打印程序版本。 +
+
+
+
+
+

+Configuration +

+

SnapRAID 需要一个配置文件来了解您的磁盘阵列 +位于何处以及在哪里存储奇偶校验信息。 +

在 Unix 中,如果存在,它使用文件 /usr/local/etc/snapraid.conf, +否则使用 /etc/snapraid.conf。 +在 Windows 中,它使用与 snapraid.exe 相同的目录中的文件 snapraid.conf。 +

它必须包含以下选项(区分大小写): +

+

+parity FILE [,FILE] ... +

+

定义用于存储奇偶校验信息的文件。 +奇偶校验可实现针对单个磁盘 +故障的保护,类似于 RAID5。 +

您可以指定多个文件,它们必须位于不同的磁盘上。 +当一个文件不能再增长时,使用下一个文件。 +总可用空间必须至少与阵列中最大的数据磁盘一样大。 +

您可以稍后添加额外的奇偶校验文件,但是您 +不能重新排序或删除它们。 +

将奇偶校验磁盘保留用于奇偶校验可确保它们不会碎片化,从而提高性能。 +

在 Windows 中,每个磁盘会留下 256 MB 未使用空间,以避免 +有关磁盘已满的警告。 +

此选项是强制性的,并且只能使用一次。 +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

定义用于存储额外奇偶校验信息的文件。 +

为指定的每个奇偶校验级别启用一个额外的保护级别: +

    +
  • +2-parity 启用 RAID6 双奇偶校验。 +
  • +
  • +3-parity 启用三奇偶校验。 +
  • +
  • +4-parity 启用四奇偶校验。 +
  • +
  • +5-parity 启用五奇偶校验。 +
  • +
  • +6-parity 启用六奇偶校验。 +
  • +
+

每个奇偶校验级别都需要存在所有先前的奇偶校验级别。 +

与 parity 选项相同的注意事项适用。 +

这些选项是可选的,并且只能使用一次。 +

+
+

+z-parity FILE [,FILE] ... +

+

定义用于存储三奇偶校验的备用文件和格式。 +

此选项是 3-parity 的替代方案,主要面向不支持 +SSSE3 指令集的低端 CPU,如 ARM 或 AMD Phenom、Athlon 和 Opteron。 +在这种情况下,它提供了更好的性能。 +

此格式类似于 ZFS RAIDZ3 使用的格式,但更快。 +与 ZFS 一样,它在三奇偶校验之外不起作用。 +

当使用 3-parity 时,如果建议使用 z-parity 格式以提高性能, +您将收到警告。 +

可以通过调整配置文件中的所需 z-parity 或 3-parity 文件, +并使用 fix 重新创建它,从一种格式转换为另一种格式。 +

+
+

+content FILE +

+

定义用于存储磁盘阵列中所有文件的列表和校验和的文件。 +

它可以放置在用于数据、奇偶校验或 +任何其他可用磁盘上。 +如果您使用数据磁盘,此文件会自动从 sync 过程中排除。 +

此选项是强制性的,并且可以多次使用以保存 +同一文件的多个副本。 +

您必须为使用的每个奇偶校验磁盘存储至少一个副本, +再加上一个。使用额外的副本不会有害。 +

+
+

+data NAME DIR +

+

定义阵列中数据磁盘的名称和挂载点。 +NAME 用于标识磁盘,并且必须是唯一的。 +DIR 是磁盘在文件系统中的挂载点。 +

您可以根据需要更改挂载点,只要保持 NAME 固定即可。 +

您应该为阵列中的每个数据磁盘使用一个选项。 +

您可以通过直接在配置文件中更改 NAME,然后运行 sync 命令来 +稍后重命名磁盘。 +在重命名的情况下,关联是使用存储的磁盘 UUID 完成的。 +

+
+

+extra NAME DIR +

+

定义要通过 smart 和 probe 命令监控的额外磁盘的名称和挂载点。 +

这对于监控不属于阵列但系统运行所必需的磁盘(例如启动盘)非常有用。 +

请注意,此类磁盘不受 up 和 down 命令的影响,因为它们被预期始终处于 +旋转状态。 +

+
+

+nohidden +

+

排除所有隐藏文件和目录。 +在 Unix 中,隐藏文件是以 . 开头的文件。 +在 Windows 中,它们是具有隐藏属性的文件。 +

+
+

+exclude/include PATTERN +

+

定义要从同步过程中排除或包含的文件或目录模式。 +所有模式都按指定的顺序处理。 +

如果匹配的第一个模式是 exclude 模式,则排除该文件。 +如果它是 include 模式,则包含该文件。 +如果没有模式匹配,则如果指定的最后一个模式是 include,则排除该文件, +或者如果指定的最后一个模式是 exclude,则包含该文件。 +

有关模式规范的更多详细信息,请参阅 PATTERN 部分。 +

此选项可以多次使用。 +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

定义奇偶校验的基本块大小(以 KiB 为单位)。 +一 KiB 是 1024 字节。 +

默认的 blocksize 是 256,这应该适用于大多数情况。 +

**警告!** 此选项仅供专家使用,强烈建议不要更改此值。 +将来要更改此值,您将需要重新创建整个奇偶校验! +

使用不同 blocksize 的一个原因是,如果您有许多小型文件, +数量级为数百万。 +

对于每个文件,即使只有几个字节,也会分配一个完整的奇偶校验块, +并且对于许多文件,这可能导致大量的未使用奇偶校验空间。 +当您完全填满奇偶校验磁盘时,不允许向数据磁盘 +添加更多文件。 +但是,浪费的奇偶校验不会跨数据磁盘累积。 +数据磁盘上大量文件导致的浪费空间仅限制该数据磁盘上的数据量, +而不限制其他磁盘上的数据量。 +

作为一个近似值,您可以假设每个文件浪费了半个块大小的空间。 +例如,对于 100,000 个文件和 256 KiB 的块大小,您将浪费 12.8 GB 的奇偶校验空间, +这可能导致数据磁盘上少 12.8 GB 的可用空间。 +

您可以使用 status 检查每个磁盘上浪费的空间量。 +这是您必须在数据磁盘上留出的空闲空间量, +或用于不包含在阵列中的文件的空间量。 +如果此值为负,则表示您即将填满奇偶校验空间, +它表示您仍然可以浪费的空间。 +

为避免此问题,您可以为奇偶校验使用更大的分区。 +例如,如果奇偶校验分区比数据磁盘大 12.8 GB, +则您有足够的额外空间来处理每个数据磁盘上多达 100,000 个 +文件而不会浪费任何空间。 +

在 Linux 中获得更大的奇偶校验分区的一个技巧是使用以下命令格式化它: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

这会导致大约 1.5% 的额外空间,对于 4 TB 磁盘约为 60 GB, +这允许每个数据磁盘上大约 460,000 个文件而不会浪费任何空间。 +

+
+

+hashsize SIZE_IN_BYTES +

+

定义保存块的散列大小(以字节为单位)。 +

默认的 hashsize 是 16 字节(128 位),这应该适用于大多数情况。 +

**警告!** 此选项仅供专家使用,强烈建议不要更改此值。 +将来要更改此值,您将需要重新创建整个奇偶校验! +

使用不同 hashsize 的一个原因是,如果您的系统内存有限。 +根据经验,SnapRAID 通常每 16 TB 的阵列数据需要 1 GiB 的 RAM。 +

具体来说,为了存储数据的散列,SnapRAID 大约需要 +$TS*(1+HS)/BS$ 字节的 RAM, +其中 $TS$ 是您的磁盘阵列的总大小(以字节为单位),$BS$ 是块大小(以字节为单位), +$HS$ 是散列大小(以字节为单位)。 +

例如,对于 8 个 4 TB 磁盘,块大小为 256 KiB +(1 KiB = 1024 字节),散列大小为 16,您将获得: +

+RAM = $(8 * 4 * 10^{12}) * (1+16) / (256 * 2^{10}) = 1.93$ GiB
+
+

切换到散列大小为 8,您将获得: +

+RAM = $(8 * 4 * 10^{12}) * (1+8) / (256 * 2^{10}) = 1.02$ GiB
+
+

切换到块大小为 512,您将获得: +

+RAM = $(8 * 4 * 10^{12}) * (1+16) / (512 * 2^{10}) = 0.96$ GiB
+
+

切换到散列大小为 8 和块大小为 512,您将获得: +

+RAM = $(8 * 4 * 10^{12}) * (1+8) / (512 * 2^{10}) = 0.51$ GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

在同步或 scrub 之后,处理指定数量的 GB 后,自动保存状态。 +此选项有助于避免在机器崩溃或任何其他事件中断时, +从头开始重新启动长时间的 sync 命令。 +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

设置允许的最高磁盘温度(摄氏度)。指定后, +SnapRAID 会使用 smartctl 工具定期检查所有磁盘的温度。 +SnapRAID 运行时会显示当前磁盘温度。 +如果任何磁盘超过此限制,所有操作都会停止, +并在 temp_sleep 选项定义的持续时间内将磁盘停转(置于待机状态)。 +在休眠期过后,操作恢复,如果温度限制再次达到, +可能会再次暂停。 +

在操作期间,SnapRAID 还会分析每个磁盘的加热曲线, +并估计如果活动继续,它们预计将达到的长期稳定温度。 +仅在磁盘温度增加了四次后才执行估计, +以确保有足够的数据点来建立可靠的趋势。 +此预测的稳定温度显示在当前值旁边的括号中, +有助于评估系统的冷却是否足够。 +此估计温度仅供参考,对 SnapRAID 的行为没有影响。 +程序的动作仅基于实际测量的磁盘温度。 +

要执行此分析,SnapRAID 需要一个系统温度的参考。 +它首先尝试从可用的硬件传感器读取。 +如果无法访问系统传感器,它会使用运行时测量的最低磁盘温度 +作为备用参考。 +

通常,SnapRAID 只显示最热磁盘的温度。 +要显示所有磁盘的温度,请使用 -A 或 --stats 选项。 +

+
+

+temp_sleep TIME_IN_MINUTES +

+

设置达到温度限制时的待机时间(以分钟为单位)。 +在此期间,磁盘保持停转状态。默认值为 5 分钟。 +

+
+

+pool DIR +

+

定义 pooling 目录,其中使用 pool 命令创建磁盘 +阵列的虚拟视图。 +

目录必须已经存在。 +

+
+

+share UNC_DIR +

+

定义远程访问磁盘所需的 Windows UNC 路径。 +

如果指定了此选项,则在 pool 目录中创建的符号链接会使用此 UNC 路径 +来访问磁盘。 +如果没有此选项,则生成的符号链接仅使用本地路径, +这不允许通过网络共享 pool 目录。 +

符号链接是使用指定的 UNC 路径,添加在 data 选项中指定的 +磁盘名称,最后添加文件目录和名称形成的。 +

此选项仅在 Windows 中需要。 +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

定义自定义 smartctl 选项以获取每个磁盘的 SMART 属性。 +这对于 RAID 控制器和一些无法自动检测的 USB +磁盘可能需要。%s 占位符会被设备名称替换, +但对于固定的设备(如 RAID 控制器)是可选的。 +

DISK 是在 data 选项中指定的相同磁盘名称。 +PARITY 是奇偶校验名称之一:parity、2-parity、3-parity、 +4-parity、5-parity、6-parity 或 z-parity。 +

在指定的 OPTIONS 中,字符串 %s 被设备名称替换。 +对于 RAID 控制器,设备可能是固定的, +您可能不需要使用 %s。 +

请参阅 smartmontools 文档以了解可能的选项: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

例如: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

在计算磁盘故障概率时忽略指定的 SMART 属性。 +如果磁盘报告了特定属性的不寻常或误导值,此选项很有用。 +

DISK 是在 data 选项中指定的相同磁盘名称。 +PARITY 是奇偶校验名称之一:parity、2-parity、3-parity、 +4-parity、5-parity、6-parity 或 z-parity。 +特殊值 * 可用于在所有磁盘上忽略该属性。 +

例如,要在所有磁盘上忽略 Current Pending Sector Count 属性: +

+smartignore * 197
+
+

要仅在第一个奇偶校验磁盘上忽略它: +

+smartignore parity 197
+
+
+
+

+Examples +

+

Unix 的典型配置示例如下: +

+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
+
+

Windows 的典型配置示例如下: +

+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
+
+
+
+
+

+Pattern +

+

模式提供了一种灵活的方法来过滤要包含或排除的文件。通过使用通配符(globbing), +您可以定义匹配特定文件名或整个目录结构的规则,而无需手动列出每个路径。 +

问号 ? 匹配除目录分隔符以外的任何单个字符。这使得它在匹配具有变量字符 +的文件名时非常有用,同时将模式限制在单个目录层级内。 +

单星号 * 匹配任何字符序列,但与问号一样,它绝不会跨越目录边界。 +它在正斜杠处停止,因此适用于匹配单个路径组件内的内容。 +这是 Shell 通配符中常见的标准行为。 +

双星号 ** 功能更强大,它可以匹配任何字符序列,包括目录分隔符。 +这允许模式匹配跨越多个目录层级。当 ** 直接嵌入在模式中时, +它可以匹配零个或多个字符,包括周围文字文本之间的斜杠。 +

** 最重要的用法是特殊形式 /**/。它可以匹配零个或多个完整的目录层级, +从而可以在不知道确切路径结构的情况下,匹配目录树中任何深度的文件。 +例如,模式 src/**/main.js 匹配 src/main.js(跳过零个目录)、 +src/ui/main.js(跳过一个目录)以及 src/ui/components/main.js +(跳过两个目录)。 +

使用方括号 [] 的字符类匹配指定集合或范围内的单个字符。 +与其他单字符模式一样,它们不匹配目录分隔符。字符类支持使用 +感叹号进行范围指定和否定。 +

需要记住的根本区别是,*、? 和字符类都遵循目录边界, +并且仅在单个路径组件内匹配,而 ** 是唯一可以跨越目录分隔符匹配的模式。 +

有四种不同类型的模式: +

+
+
+FILE +
+选择任何名为 FILE 的文件。 +此模式仅适用于文件,不适用于目录。 +
+
+
+
+
+
+DIR/ +
+选择任何名为 DIR 的目录及其内部的所有内容。 +此模式仅适用于目录,不适用于文件。 +
+
+
+
+
+
+/PATH/FILE +
+选择指定的确切文件路径。此模式仅适用于文件,不适用于目录。 +
+
+
+
+
+
+/PATH/DIR/ +
+选择指定的确切目录路径及其内部的所有内容。此模式仅适用于目录, +不适用于文件。 +
+
+
+

当您指定以 / 开头的绝对路径时,它应用于阵列**根目录**, +而不是本地文件系统根目录。 +

在 Windows 中,您可以使用反斜杠 \ 代替正斜杠 /。 +Windows 系统目录、连接点、挂载点和其他 Windows +特殊目录被视为文件,这意味着要排除它们, +您必须使用文件规则,而不是目录规则。 +

如果文件名包含 *、?、[ +或 ] 字符,您必须对其进行转义,以避免将其解释为 +globbing 字符。在 Unix 中,转义字符是 \;在 Windows 中,它是 ^。 +当模式在命令行上时,您必须双写转义 +字符,以避免命令 shell 对其进行解释。 +

在配置文件中,您可以使用不同的策略来过滤要处理的文件。 +最简单的方法是仅使用 exclude 规则来删除所有您不想处理的 +文件和目录。例如: +

+# 排除任何名为 *.unrecoverable 的文件
+exclude *.unrecoverable
+# 排除根目录 /lost+found
+exclude /lost+found/
+# 排除任何名为 tmp 的子目录
+exclude tmp/
+
+

相反的方法是仅定义您想要处理的文件,仅使用 include 规则。例如: +

+# 仅包含一些目录
+include /movies/
+include /musics/
+include /pictures/
+
+

最后的方法是混合使用 exclude 和 include 规则。在这种情况下, +规则的顺序很重要。较早的规则优先于 +较晚的规则。 +为了简化,您可以先列出所有 exclude 规则,然后 +列出所有 include 规则。例如: +

+# 排除任何名为 *.unrecoverable 的文件
+exclude *.unrecoverable
+# 排除任何名为 tmp 的子目录
+exclude tmp/
+# 仅包含一些目录
+include /movies/
+include /musics/
+include /pictures/
+
+

在命令行上,使用 -f 选项,您只能使用 include +模式。例如: +

+# 仅检查 .mp3 文件。
+# 在 Unix 中,使用引号以避免 shell 扩展 globbing。
+snapraid -f "*.mp3" check
+
+

在 Unix 中,在命令行上使用 globbing 字符时,必须 +引用它们以防止 shell 扩展它们。 +

+
+

+Ignore File +

+

除了配置文件中的全局规则外,您还可以在阵列内的任何目录中放置 +.snapraidignore 文件,以定义分散的排除规则。 +

在 .snapraidignore 中定义的规则会在配置文件中的规则之后应用。 +这意味着它们具有更高的优先级,可用于排除先前由全局配置包含的文件。 +实际上,如果本地规则匹配,则无论全局包含设置如何,该文件都会被排除。 +

.snapraidignore 中的模式逻辑与全局配置相同,但模式锚定在 +该文件所在的目录: +

+
+
+FILE +
+选择此目录或其下方任何名为 FILE 的文件。 +这遵循与全局模式相同的通配符规则。 +
+
+
+
+
+
+DIR/ +
+选择任何名为 DIR 的目录及其内部的所有内容, +位于此目录或其下方。 +
+
+
+
+
+
+/PATH/FILE +
+选择相对于 .snapraidignore 文件位置指定的精确文件。 +
+
+
+
+
+
+/PATH/DIR/ +
+选择相对于 .snapraidignore 文件位置指定的精确目录 +及其内部的所有内容。 +
+
+
+

与全局配置不同,.snapraidignore 文件仅支持排除规则; +您不能使用 include 模式或否定符号 (!)。 +

例如,如果您在 /mnt/disk1/projects/ 中有一个 .snapraidignore: +

+# 仅排除 /mnt/disk1/projects/output.bin
+/output.bin
+# 排除 projects/ 中任何名为 build 的目录
+build/
+# 排除 projects/ 或其子文件夹中任何 .tmp 文件
+*.tmp
+
+
+
+

+Content +

+

SnapRAID 将文件列表和校验和存储在 content 文件中。 +

它是一个二进制文件,列出了磁盘阵列中存在的所有文件, +以及用于验证其完整性的所有校验和。 +

此文件由 sync 和 scrub 命令读取和写入,并由 +fix、check 和 status 命令读取。 +

+
+

+Parity +

+

SnapRAID 将阵列的奇偶校验信息存储在 parity 文件中。 +

这些是二进制文件,包含 content 文件中定义的所有 +块的计算奇偶校验。 +

这些文件由 sync 和 fix 命令读取和写入, +并且仅由 scrub 和 check 命令读取。 +

+
+

+Encoding +

+

SnapRAID 在 Unix 中忽略任何编码。它读取并存储 +文件系统使用的相同编码的文件名。 +

在 Windows 中,从文件系统读取的所有名称都会被转换并 +以 UTF-8 格式处理。 +

要使文件名正确打印,您必须使用命令 chcp 65001 将 Windows +控制台设置为 UTF-8 模式,并使用 TrueType 字体,如 Lucida Console, +作为控制台字体。这仅影响打印的文件名;如果 +您将控制台输出重定向到文件,则生成的文件始终 +采用 UTF-8 格式。 +

+ + +
+
+
+ + + + + + + diff --git a/beta/manual.html b/beta/manual.html new file mode 100644 index 00000000..4a388827 --- /dev/null +++ b/beta/manual.html @@ -0,0 +1,2065 @@ + + + + + + + + SnapRAID CLI Manual + + + + + + + + + + + + + + + + + +
+ +
+ + +
+ + + + +
+ +
+ +
+

+Synopsis +

+
+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]
+
+
+
+

+Description +

+

SnapRAID is a backup program designed for disk arrays, storing +parity information for data recovery in the event of up to six +disk failures. +

Primarily intended for home media centers with large, +infrequently changing files, SnapRAID offers several features: +

    +
  • +You can utilize disks already filled with files without the +need to reformat them, accessing them as usual. +
  • +
  • +All your data is hashed to ensure data integrity and prevent +silent corruption. +
  • +
  • +When the number of failed disks exceeds the parity count, +data loss is confined to the affected disks; data on +other disks remains accessible. +
  • +
  • +If you accidentally delete files on a disk, recovery is +possible. +
  • +
  • +Disks can have different sizes. +
  • +
  • +You can add disks at any time. +
  • +
  • +SnapRAID doesn't lock in your data; you can stop using it +anytime without reformatting or moving data. +
  • +
  • +To access a file, only a single disk needs to spin, saving +power and reducing noise. +
  • +
+

For more information, please visit the official SnapRAID site: +

+https://www.snapraid.it/
+
+
+
+

+Limitations +

+

SnapRAID is a hybrid between a RAID and a backup program, aiming to combine +the best benefits of both. However, it has some limitations that you should +consider before using it. +

The main limitation is that if a disk fails and you haven't recently synced, +you may not be able to fully recover. +More specifically, you may be unable to recover up to the size of +the changed or deleted files since the last sync operation. +This occurs even if the changed or deleted files are not on the +failed disk. This is why SnapRAID is better suited for +data that rarely changes. +

On the other hand, newly added files don't prevent recovery of already +existing files. You will only lose the recently added files if they +are on the failed disk. +

Other SnapRAID limitations are: +

    +
  • +With SnapRAID, you still have separate file systems for each disk. +With RAID, you get a single large file system. +
  • +
  • +SnapRAID doesn't stripe data. +With RAID, you get a speed boost with striping. +
  • +
  • +SnapRAID doesn't support real-time recovery. +With RAID, you do not have to stop working when a disk fails. +
  • +
  • +SnapRAID can recover data only from a limited number of disk failures. +With a backup, you can recover from a complete +failure of the entire disk array. +
  • +
  • +Only file names, timestamps, symlinks, and hardlinks are saved. +Permissions, ownership, and extended attributes are not saved. +
  • +
+
+
+

+Getting Started +

+

To use SnapRAID, you need to first select one disk in your disk array +to dedicate to parity information. With one disk for parity, you +will be able to recover from a single disk failure, similar to RAID5. +

If you want to recover from more disk failures, similar to RAID6, +you must reserve additional disks for parity. Each additional parity +disk allows recovery from one more disk failure. +

As parity disks, you must pick the largest disks in the array, +as the parity information may grow to the size of the largest data +disk in the array. +

These disks will be dedicated to storing the parity files. +You should not store your data on them. +

Then, you must define the data disks that you want to protect +with SnapRAID. The protection is more effective if these disks +contain data that rarely changes. For this reason, it's better to +NOT include the Windows C:\ disk or the Unix /home, /var, and /tmp +directories. +

The list of files is saved in the content files, usually +stored on the data, parity, or boot disks. +This file contains the details of your backup, including all the +checksums to verify its integrity. +The content file is stored in multiple copies, and each copy must +be on a different disk to ensure that, even in case of multiple +disk failures, at least one copy is available. +

For example, suppose you are interested in only one parity level +of protection, and your disks are located at: +

+/mnt/diskp <- selected disk for parity
+/mnt/disk1 <- first disk to protect
+/mnt/disk2 <- second disk to protect
+/mnt/disk3 <- third disk to protect
+
+

You must create the configuration file /etc/snapraid.conf with +the following options: +

+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/
+
+

If you are on Windows, you should use the Windows path format, with drive +letters and backslashes instead of slashes. +

+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\
+
+

If you have many disks and run out of drive letters, you can mount +disks directly in subfolders. See: +

+https://www.google.com/search?q=Windows+mount+point
+
+

At this point, you are ready to run the sync command to build the +parity information. +

+snapraid sync
+
+

This process may take several hours the first time, depending on the size +of the data already present on the disks. If the disks are empty, +the process is immediate. +

You can stop it at any time by pressing Ctrl+C, and at the next run, it +will resume where it was interrupted. +

When this command completes, your data is SAFE. +

Now you can start using your array as you like and periodically +update the parity information by running the sync command. +

+

+Scrubbing +

+

To periodically check the data and parity for errors, you can +run the scrub command. +

+snapraid scrub
+
+

This command compares the data in your array with the hash computed +during the sync command to verify integrity. +

Each run of the command checks approximately 8% of the array, excluding data +already scrubbed in the previous 10 days. +You can use the -p, --plan option to specify a different amount +and the -o, --older-than option to specify a different age in days. +For example, to check 5% of the array for blocks older than 20 days, use: +

+snapraid -p 5 -o 20 scrub
+
+

If silent or input/output errors are found during the process, +the corresponding blocks are marked as bad in the content file +and listed in the status command. +

+snapraid status
+
+

To fix them, you can use the fix command, filtering for bad blocks with +the -e, --filter-error option: +

+snapraid -e fix
+
+

At the next scrub, the errors will disappear from the status report +if they are truly fixed. To make it faster, you can use -p bad to scrub +only blocks marked as bad. +

+snapraid -p bad scrub
+
+

Running scrub on an unsynced array may report errors caused by +removed or modified files. These errors are reported in the scrub +output, but the related blocks are not marked as bad. +

+
+

+Pooling +

+

Note: The pooling feature described below has been superseded by the +mergerfs tool, which is now the recommended option for Linux users in +the SnapRAID community. Mergefs provides a more flexible and efficient +way to pool multiple drives into a single unified mount point, +allowing seamless access to files across your array without relying +on symbolic links. It integrates well with SnapRAID for parity +protection and is commonly used in setups like OpenMediaVault (OMV) +or custom NAS configurations. +

To have all the files in your array shown in the same directory tree, +you can enable the pooling feature. It creates a read-only 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 on Windows, with: +

+pool C:\pool
+
+

and then run the pool command to create or update the virtual view. +

+snapraid pool
+
+

If you are using a Unix platform and want to share this directory +over the network to either Windows or Unix machines, you should add +the following options to your /etc/samba/smb.conf: +

+# 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
+
+

In Windows, sharing symbolic links over a network requires clients to +resolve them remotely. To enable this, besides sharing the pool directory, +you must also share all the disks independently, using the disk names +defined in the configuration file as share points. You must also specify +in the share option of the configuration file the Windows UNC path that +remote clients need to use to access these shared disks. +

For example, operating from a server named darkstar, you can use +the options: +

+data d1 F:\array\
+data d2 G:\array\
+data d3 H:\array\
+pool C:\pool
+share \\darkstar
+
+

and share the following directories over the network: +

+\\darkstar\pool -> C:\pool
+\\darkstar\d1 -> F:\array
+\\darkstar\d2 -> G:\array
+\\darkstar\d3 -> H:\array
+
+

to allow remote clients to access all the files at \\darkstar\pool. +

You may also need to configure remote clients to enable access to remote +symlinks with the command: +

+fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
+
+
+
+

+Undeleting +

+

SnapRAID functions more like a backup program than a RAID system, and it +can be used to restore or undelete files to their previous state using +the -f, --filter option: +

+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, which restores +only missing files, leaving all others untouched. +

+snapraid fix -m -f DIR/
+
+

Or to recover all the deleted files on all drives with: +

+snapraid fix -m
+
+
+
+

+Recovering +

+

The worst has happened, and you have lost one or more disks! +

DO NOT PANIC! You will be able to recover them! +

The first thing you must do is avoid further changes to your disk array. +Disable any remote connections to it and any scheduled processes, including +any scheduled SnapRAID nightly sync or scrub. +

Then proceed with the following steps. +

+

+STEP 1 -> Reconfigure +

+

You need some space to recover, ideally on additional +spare disks, but an external USB disk or remote disk will suffice. +

Modify the SnapRAID configuration file to make the data or parity +option of the failed disk point to a location with enough empty +space to recover the files. +

For example, if disk d1 has failed, change from: +

+data d1 /mnt/disk1/
+
+

to: +

+data d1 /mnt/new_spare_disk/
+
+

If the disk to recover is a parity disk, update the appropriate parity +option. +If you have multiple failed disks, update all their configuration options. +

+
+

+STEP 2 -> Fix +

+

Run the fix command, storing the log in an external file with: +

+snapraid -d NAME -l fix.log fix
+
+

Where NAME is the name of the disk, such as d1 in our previous example. +If the disk to recover is a parity disk, use the names parity, 2-parity, +etc. +If you have multiple failed disks, use multiple -d options to specify all +of them. +

This command will take a long time. +

Ensure you have a few gigabytes free to store the fix.log file. +Run it from a disk with sufficient free space. +

Now you have recovered all that is recoverable. If some files are partially +or totally unrecoverable, they will be renamed by adding the .unrecoverable +extension. +

You can find a detailed list of all unrecoverable blocks in the fix.log file +by checking all lines starting with unrecoverable:. +

If you are not satisfied with the recovery, you can retry it as many +times as you wish. +

For example, if you have removed files from the array after the last +sync, this may result in some files not being recovered. +In this case, you can retry the fix using the -i, --import option, +specifying where these files are now to include them again in the +recovery process. +

If you are satisfied with the recovery, you can proceed further, +but note that after syncing, you cannot retry the fix command +anymore! +

+
+

+STEP 3 -> Check +

+

As a cautious check, you can now run a check command to ensure that +everything is correct on the recovered disk. +

+snapraid -d NAME -a check
+
+

Where NAME is the name of the disk, such as d1 in our previous example. +

The -d and -a options tell SnapRAID to check only the specified disk +and ignore all parity data. +

This command will take a long time, but if you are not overly cautious, +you can skip it. +

+
+

+STEP 4 -> Sync +

+

Run the sync command to resynchronize the array with the new disk. +

+snapraid sync
+
+

If everything is recovered, this command is immediate. +

+
+
+
+

+Commands +

+

SnapRAID provides a few simple commands that allow you to: +

    +
  • +Print the status of the array -> status +
  • +
  • +Control the disks -> smart, probe, up, down +
  • +
  • +Make a backup/snapshot -> sync +
  • +
  • +Periodically check data -> scrub +
  • +
  • +Restore the last backup/snapshot -> fix. +
  • +
+

Commands must be written in lowercase. +

+

+status +

+

Prints a summary of the state of the disk array. +

It includes information about parity fragmentation, how old +the blocks are without checking, and all recorded silent +errors encountered while scrubbing. +

The information presented refers to the latest time you +ran sync. Later modifications are not taken into account. +

If bad blocks were detected, their block numbers are listed. +To fix them, you can use the fix -e command. +

It also shows a graph representing the last time each block +was scrubbed or synced. Scrubbed blocks are shown with *, +blocks synced but not yet scrubbed with o. +

Nothing is modified. +

+
+

+smart +

+

Prints a SMART report of all the disks in the system. +

It includes an estimation of the probability of failure in the next +year, allowing you to plan maintenance replacements of disks that show +suspicious attributes. +

This probability estimation is obtained by correlating the SMART attributes +of the disks with the Backblaze data available at: +

+https://www.backblaze.com/hard-drive-test-data.html
+
+

If SMART reports that a disk is failing, FAIL or PREFAIL is printed +for that disk, and SnapRAID returns with an error. +In this case, immediate replacement of the disk is highly recommended. +

Other possible status strings are: +

+
+
+logfail +
+In the past, some attributes were lower than +the threshold. +
+
+
+
+logerr +
+The device error log contains errors. +
+
+
+
+selferr +
+The device self-test log contains errors. +
+
+
+

If the -v, --verbose option is specified, a deeper statistical analysis +is provided. This analysis can help you decide if you need more +or less parity. +

This command uses the smartctl tool and is equivalent to running +smartctl -a on all devices. +

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

Nothing is modified. +

+
+

+probe +

+

Prints the POWER state of all disks in the system. +

Standby means the disk is not spinning. Active means +the disk is spinning. +

This command uses the smartctl tool and is equivalent to running +smartctl -n standby -i on all devices. +

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

Nothing is modified. +

+
+

+up +

+

Spins up all the disks of the array. +

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

Spinning up all the disks at the same time requires a lot of power. +Ensure that your power supply can sustain it. +

Nothing is modified. +

+
+

+down +

+

Spins down all the disks of the array. +

This command uses the smartctl tool and is equivalent to running +smartctl -s standby,now on all devices. +

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

To automatically spin down on error, you can use the -s, --spin-down-on-error +option with any other command, which is equivalent to running down manually +when an error occurs. +

Nothing is modified. +

+
+

+diff +

+

Lists all the files modified since the last sync that need to have +their parity data recomputed. +

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

After listing all changed files, a summary of the changes is +presented, grouped by: +

+
+
+equal +
+Files unchanged from before. +
+
+
+
+added +
+Files added that were not present before. +
+
+
+
+removed +
+Files removed. +
+
+
+
+updated +
+Files with a different size or timestamp, meaning they +were modified. +
+
+
+
+moved +
+Files moved to a different directory on the same disk. +They are identified by having the same name, size, timestamp, +and inode, but a different directory. +
+
+
+
+copied +
+Files copied on the same or a different disk where the +original file still exists. They are identified by having +the same name, size, and timestamp. If the sub-second +timestamp is zero, the full path must match to be +identified, not just the name. +
+
+
+
+relocated +
+Files moved on the same or a different disk where +the original has disappeared. They are identified by +having the same name, size, and timestamp. If the +sub-second timestamp is zero, the full path must match +to be identified. Unlike 'moved' files on the same disk, +relocated files have a different inode. +
+
+
+
+restored +
+Files with a different inode but matching directory, +name, size, and timestamp. +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 used for a generic error condition. +

Nothing is modified. +

+
+

+sync +

+

Updates the parity information. All modified files +in the disk array are read, and the corresponding parity +data is updated. +

You can stop this process at any time by pressing Ctrl+C, +without losing the work already done. +At the next run, the sync process will resume where +it was interrupted. +

If silent or input/output errors are found during the process, +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 differs, the parity data +is recomputed for the entire file. +If the file is moved or renamed on the same disk, keeping the +same inode, the parity is not recomputed. +If the file is moved to another disk, the parity is recomputed, +but the previously computed hash information is retained. +

The content and parity files are modified if necessary. +The files in the array are NOT modified. +

+
+

+scrub +

+

Scrubs the array, checking for silent or input/output errors in data +and parity disks. +

Each invocation checks approximately 8% of the array, excluding +data already scrubbed in the last 10 days. +This means that scrubbing once a week ensures every bit of data is checked +at least once every three months. +

You can define a different scrub plan or amount using the -p, --plan +option, which accepts: +bad - Scrub blocks marked bad. +new - Scrub just-synced blocks not yet scrubbed. +full - Scrub everything. +0-100 - Scrub the specified percentage of blocks. +

If you specify a percentage amount, you can also use the -o, --older-than +option to define how old the block should be. +The oldest blocks are scrubbed first, ensuring an optimal check. +If you want to scrub only the just-synced blocks not yet scrubbed, +use the -p new option. +

To get details of the scrub status, use the status command. +

For any silent or input/output error found, the corresponding blocks +are marked as bad in the content file. +These bad blocks are listed in status and can be fixed with fix -e. +After the fix, at the next scrub, they will be rechecked, and if found +corrected, the bad mark will be removed. +To scrub only the bad blocks, you can use the scrub -p bad command. +

It's recommended to run scrub only on a synced array to avoid +reported errors caused by unsynced data. These errors are recognized +as not being silent errors, and the blocks are not marked as bad, +but such errors are reported in the output of the command. +

The content file is modified to update the time of the last check +for each block and to mark bad blocks. +The parity files are NOT modified. +The files in the array are NOT modified. +

+
+

+fix +

+

Fixes all the files and the parity data. +

All files and parity data are compared with the snapshot +state saved in the last sync. +If a difference is found, it is reverted to the stored snapshot. +

WARNING! The fix command does not differentiate between errors and +intentional modifications. It unconditionally reverts the file state +to the last sync. +

If no other option is specified, the entire array is processed. +Use the filter options to select a subset of files or disks to operate on. +

To fix only the blocks marked bad during sync and scrub, +use the -e, --filter-error option. +Unlike other filter options, this one applies fixes only to files that are +unchanged since the latest sync. +

SnapRAID renames all files that cannot be fixed by adding the +.unrecoverable extension. +

Before fixing, the entire array is scanned to find any files moved +since the last sync operation. +These files are identified by their timestamp, ignoring their name +and directory, and are used in the recovery 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. +

Files are identified only by path, not by inode. +

The content file is NOT modified. +The parity files are modified if necessary. +The files in the array are modified if necessary. +

+
+

+check +

+

Verifies all the files and the parity data. +

It works like fix, but it only simulates a recovery and no changes +are written to the array. +

This command is primarily intended for manual verification, +such as after a recovery process or in other special conditions. +For periodic and scheduled checks, use scrub. +

If you use the -a, --audit-only option, only the file +data is checked, and the parity data is ignored for a +faster run. +

Files are identified only by path, not by inode. +

Nothing is modified. +

+
+

+list +

+

Lists all the files contained in the array at the time of the +last sync. +

With -v or --verbose, the subsecond time is also shown. +

Nothing is modified. +

+
+

+dup +

+

Lists all duplicate files. Two files are assumed equal if their +hashes match. The file data is not read; only the +precomputed hashes are used. +

Nothing is modified. +

+
+

+pool +

+

Creates or updates a virtual view of all +the files in your disk array in the pooling directory. +

The files are not copied but linked using +symbolic links. +

When updating, all existing symbolic links and empty +subdirectories are deleted and replaced with the new +view of the array. Any other regular files are left in place. +

Nothing is modified outside the pool directory. +

+
+

+devices +

+

Prints the low-level devices used by the array. +

This command displays the device associations in the array +and is mainly intended as a script interface. +

The first two columns are the low-level device ID and path. +The next two columns are the high-level device ID and path. +The last column is the disk name in the array. +

In most cases, you have one low-level device for each disk in the +array, but in some more complex configurations, you may have multiple +low-level devices used by a single disk in the array. +

Nothing is modified. +

+
+

+touch +

+

Sets an arbitrary sub-second timestamp for all files +that have it set to zero. +

This improves SnapRAID's ability to recognize moved +and copied files, as it makes the timestamp almost unique, +reducing 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 the sub-second timestamp +is zero, it is considered a copy only if the full path, +size, and timestamp all match. +

The second-precision timestamp is not modified, +so all the dates and times of your files will be preserved. +

+
+

+rehash +

+

Schedules a rehash of the entire array. +

This command changes the hash kind used, typically when upgrading +from a 32-bit system to a 64-bit one, to switch from +MurmurHash3 to the faster SpookyHash. +

If you are already using the optimal hash, this command +does nothing and informs you that no action is needed. +

The rehash is not performed immediately but takes place +progressively during sync and scrub. +

You can check the rehash state using status. +

During the rehash, SnapRAID maintains full functionality, +with the only exception that dup cannot detect duplicated +files using a different hash. +

+
+

+locate +

+

Locate files stored in the parity disks. For each matching file, it +prints its location within the parity file and the number of fragments +it occupies. +

You can use the -t, --tail option to restrict the operation to files +occupying the specified tail portion of the parity. +

If you want to reallocate these files, you can then use the +-W, --force-realloc-tail option. Be aware that such files will +not be protected by parity during the reallocation process. +

+
+
+

+Options +

+

SnapRAID provides the following options: +

+
+
+-c, --conf CONFIG +
+Selects the configuration file to use. If not specified, in Unix +it uses the file /usr/local/etc/snapraid.conf if it exists, +otherwise /etc/snapraid.conf. +In Windows, it uses the file snapraid.conf in the same +directory as snapraid.exe. +
+
+
+
+
+
+-f, --filter PATTERN +
+Filters the files to process in check and fix. +Only the files matching the specified pattern are processed. +This option can be used multiple times. +See the PATTERN section for more details on +pattern specifications. +In Unix, ensure globbing characters are quoted if used. +This option can be used only with check and fix. +It cannot be used with sync and scrub, as they always +process the entire array. +
+
+
+
+
+
+-d, --filter-disk NAME +
+Filters the disks to process in check, fix, up, and down. +You must specify a disk name as defined in the configuration +file. +You can also specify parity disks with the names: parity, 2-parity, +3-parity, etc., to limit operations to a specific parity disk. +If you combine multiple --filter, --filter-disk, and --filter-missing options, +only files matching all the filters are selected. +This option can be used multiple times. +This option can be used only with check, fix, up, and down. +It cannot be used with sync and scrub, as they always +process the entire array. +
+
+
+
+
+
+-m, --filter-missing +
+Filters the files to process in check and fix. +Only the files missing or deleted from the array are processed. +When used with fix, this acts as an undelete command. +If you combine multiple --filter, --filter-disk, and --filter-missing options, +only files matching all the filters are selected. +This option can be used only with check and fix. +It cannot be used with sync and scrub, as they always +process the entire array. +
+
+
+
+
+
+-e, --filter-error +
+Processes the files with errors in check and fix. +It processes only files that have blocks marked with silent +or input/output errors during sync and scrub, as listed in status. +This option can be used only with check and fix. +
+
+
+
+
+
+-p, --plan PERC|bad|new|full +
+Selects the scrub plan. If PERC is a numeric value from 0 to 100, +it is interpreted as the percentage of blocks to scrub. +Instead of a percentage, you can specify a plan: +bad scrubs bad blocks, new scrubs blocks not yet scrubbed, +and full scrubs everything. +This option can be used only with scrub. +
+
+
+
+
+
+-o, --older-than DAYS +
+Selects the oldest part of the array to process in scrub. +DAYS is the minimum age in days for a block to be scrubbed; +the default is 10. +Blocks marked as bad are always scrubbed regardless of this option. +This option can be used only with scrub. +
+
+
+
+
+
+-a, --audit-only +
+In check, verifies the hash of the files without +checking the parity data. +If you are interested only in checking the file data, this +option can significantly speed up the checking process. +This option can be used only with check. +
+
+
+
+
+
+-h, --pre-hash +
+In sync, runs a preliminary hashing phase of all new data +for additional verification before the parity computation. +Usually, in sync, no preliminary hashing is done, and the new +data is hashed just before the parity computation when it is read +for the first time. +This process occurs when the system is under +heavy load, with all disks spinning and a busy CPU. +This is an extreme condition for the machine, and if it has a +latent hardware problem, silent errors may go undetected +because the data is not yet hashed. +To avoid this risk, you can enable the pre-hash mode to have +all the data read twice to ensure its integrity. +This option also verifies files moved within the array +to ensure the move operation was successful and, if necessary, +allows you to run a fix operation before proceeding. +This option can be used only with sync. +
+
+
+
+
+
+-i, --import DIR +
+Imports from the specified directory any files deleted +from the array after the last sync. +If you still have such files, they can be used by check +and fix to improve the recovery process. +The files are read, including in subdirectories, and are +identified regardless of their name. +This option can be used only with check and fix. +
+
+
+
+
+
+-s, --spin-down-on-error +
+On any error, spins down all managed disks before exiting with +a non-zero status code. This prevents the drives from +remaining active and spinning after an aborted operation, +helping to avoid unnecessary heat buildup and power +consumption. Use this option to ensure disks are safely +stopped even when a command fails. +
+
+
+
+
+
+-w, --bw-limit RATE +
+Applies a global bandwidth limit for all disks. The RATE is +the number of bytes per second. You can specify a multiplier +such as K, M, G, or T (e.g., --bw-limit 1G). +
+
+
+
+
+
+-t, --tail SIZE +
+Limit file listing to those using no more than the specified +tail size of the parity disks. +You can use multipliers such as K, M, G, or T (e.g. --tail 1G). +This option is only valid when used together with the locate +command. +
+
+
+
+
+
+-A, --stats +
+Enables an extended status view that shows additional information. +The screen displays two graphs: +The first graph shows the number of buffered stripes for each +disk, along with the file path of the file currently being +accessed on that disk. Typically, the slowest disk will have +no buffer available, which determines the maximum achievable +bandwidth. +The second graph shows the percentage of time spent waiting +over the past 100 seconds. The slowest disk is expected to +cause most of the wait time, while other disks should have +little or no wait time because they can use their buffered stripes. +This graph also shows the time spent waiting for hash +calculations and RAID computations. +All computations run in parallel with disk operations. +Therefore, as long as there is measurable wait time for at +least one disk, it indicates that the CPU is fast enough to +keep up with the workload. +
+
+
+
+
+
+-Z, --force-zero +
+Forces the insecure operation of syncing a file with zero +size that was previously non-zero. +If SnapRAID detects such a condition, it stops proceeding +unless you specify this option. +This allows you to easily detect when, after a system crash, +some accessed files were truncated. +This is a possible condition in Linux with the ext3/ext4 +file systems. +This option can be used only with sync. +
+
+
+
+
+
+-E, --force-empty +
+Forces the insecure operation of syncing a disk with all +the original files missing. +If SnapRAID detects that all the files originally present +on the disk are missing or rewritten, it stops proceeding +unless you specify this option. +This allows you to easily detect when a data file system is not +mounted. +This option can be used only with sync. +
+
+
+
+
+
+-U, --force-uuid +
+Forces the insecure operation of syncing, checking, and fixing +with disks that have changed their UUID. +If SnapRAID detects that some disks have changed UUID, +it stops proceeding unless you specify this option. +This allows you to detect when your disks are mounted at the +wrong mount points. +It is, however, allowed to have a single UUID change with +single parity, and more with multiple parity, because this is +the normal case when replacing disks after a recovery. +This option can be used only with sync, check, or +fix. +
+
+
+
+
+
+-D, --force-device +
+Forces the insecure operation of fixing with inaccessible disks +or with disks on the same physical device. +For example, if you lost two data disks and have a spare disk to recover +only the first one, you can ignore the second inaccessible disk. +Or, if you want to recover a disk in the free space left on an +already used disk, sharing the same physical device. +This option can be used only with fix. +
+
+
+
+
+
+-N, --force-nocopy +
+In sync, check, and fix, disables the copy detection heuristic. +Without this option, SnapRAID assumes that files with the same +attributes, such as name, size, and timestamp, are copies with the +same data. +This allows identification of copied or moved files from one disk +to another and reuses the already computed hash information +to detect silent errors or to recover missing files. +In some rare cases, this behavior may result in false positives +or a slow process due to many hash verifications, and this +option allows you to resolve such issues. +This option can be used only with sync, check, and fix. +
+
+
+
+
+
+-F, --force-full +
+In sync, forces a full recomputation of the parity. +This option can be used when you add a new parity level or if +you reverted to an old content file using more recent parity data. +Instead of recreating the parity from scratch, this allows +you to reuse the hashes present in the content file to validate data +and maintain data protection during the sync process using +the existing parity data. +This option can be used only with sync. +
+
+
+
+
+
+-R, --force-realloc +
+In sync, forces a full reallocation of files and rebuild of the parity. +This option can be used to completely reallocate all files, +removing fragmentation, while reusing the hashes present in the content +file to validate data. +This option can be used only with sync. +WARNING! This option is for experts only, and it is highly +recommended not to use it. +You DO NOT have data protection during the sync operation. +
+
+
+
+
+
+-W, --force-realloc-tail SIZE +
+Works like -R, --force-realloc, but limited to the specified +tail portion (last SIZE bytes) of each parity file. +It forces reallocation (movement) of any file fragments/blocks +currently stored in that tail section, allowing them to be +placed anywhere in the parity file(s) where free space is +available (including existing holes). +The main purpose of this option is to shrink the on-disk size +of the parity file. If the reallocation successfully clears +the entire tail section (no blocks remain using it), the +parity file is truncated, reclaiming the unused tail space. +You can use multipliers such as K, M, G, or T (e.g. +--force-realloc-tail 1G). +You can use locate -t, --tail to know in advance the affected +files. +WARNING! This option is for experts only, and it is highly +recommended not to use it. +You DO NOT have data protection during the sync operation +for the affected files. +
+
+
+
+
+
+-l, --log FILE +
+Writes a detailed log to the specified file. +If this option is not specified, unexpected errors are printed +to the screen, potentially resulting in excessive output in case of +many errors. When -l, --log is specified, only +fatal errors that cause SnapRAID to stop are printed +to the screen. +If the path starts with >>, the file is opened +in append mode. Occurrences of %D and %T in the name are +replaced with the date and time in the format YYYYMMDD and +HHMMSS. In Windows batch files, you must double +the % character, e.g., result-%%D.log. To use >>, you must +enclose the name in quotes, e.g., ">>result.log". +To output the log to standard output or standard error, +you can use ">&1" and ">&2", respectively. +See the snapraid_log.txt file or man page for log tag descriptions. +
+
+
+
+
+
+-L, --error-limit NUMBER +
+Sets a new error limit before stopping execution. +By default, SnapRAID stops if it encounters more than 100 +input/output errors, indicating that a disk is likely failing. +This option affects sync and scrub, which are allowed +to continue after the first set of disk errors to try +to complete their operations. +However, check and fix always stop at the first error. +
+
+
+
+
+
+-S, --start BLKSTART +
+Starts processing from the specified +block number. This can be useful for retrying to check +or fix specific blocks in case of a damaged disk. +This option is mainly for advanced manual recovery. +
+
+
+
+
+
+-B, --count BLKCOUNT +
+Processes only the specified number of blocks. +This option is mainly for advanced manual recovery. +
+
+
+
+
+
+-C, --gen-conf CONTENT +
+Generates a dummy configuration file from an existing +content file. +The configuration file is written to standard output +and does not overwrite an existing one. +This configuration file also contains the information +needed to reconstruct the disk mount points in case you +lose the entire system. +
+
+
+
+
+
+-v, --verbose +
+Prints more information to the screen. +If specified once, it prints excluded files +and additional statistics. +This option has no effect on the log files. +
+
+
+
+
+
+-q, --quiet +
+Prints less information to the screen. +If specified once, it removes the progress bar; twice, +the running operations; three times, the info +messages; four times, the status messages. +Fatal errors are always printed to the screen. +This option has no effect on the log files. +
+
+
+
+
+
+-H, --help +
+Prints a short help screen. +
+
+
+
+
+
+-V, --version +
+Prints the program version. +
+
+
+
+
+

+Configuration +

+

SnapRAID requires a configuration file to know where your disk array +is located and where to store the parity information. +

In Unix, it uses the file /usr/local/etc/snapraid.conf if it exists, +otherwise /etc/snapraid.conf. +In Windows, it uses the file snapraid.conf in the same +directory as snapraid.exe. +

It must contain the following options (case-sensitive): +

+

+parity FILE [,FILE] ... +

+

Defines the files to use to store the parity information. +The parity enables protection from a single disk +failure, similar to RAID5. +

You can specify multiple files, which must be on different disks. +When a file cannot grow anymore, the next one is used. +The total space available must be at least as large as the largest data disk in +the array. +

You can add additional parity files later, but you +cannot reorder or remove them. +

Keeping the parity disks reserved for parity ensures that +they do not become fragmented, improving performance. +

In Windows, 256 MB is left unused on each disk to avoid the +warning about full disks. +

This option is mandatory and can be used only once. +

+
+

+(2,3,4,5,6)-parity FILE [,FILE] ... +

+

Defines the files to use to store extra parity information. +

For each parity level specified, one additional level of protection +is enabled: +

    +
  • +2-parity enables RAID6 dual parity. +
  • +
  • +3-parity enables triple parity. +
  • +
  • +4-parity enables quad (four) parity. +
  • +
  • +5-parity enables penta (five) parity. +
  • +
  • +6-parity enables hexa (six) parity. +
  • +
+

Each parity level requires the presence of all previous parity +levels. +

The same considerations as for the parity option apply. +

These options are optional and can be used only once. +

+
+

+z-parity FILE [,FILE] ... +

+

Defines an alternate file and format to store triple parity. +

This option is an alternative to 3-parity, primarily intended for +low-end CPUs like ARM or AMD Phenom, Athlon, and Opteron that do not +support the SSSE3 instruction set. In such cases, it provides +better performance. +

This format is similar to but faster than the one used by ZFS RAIDZ3. +Like ZFS, it does not work beyond triple parity. +

When using 3-parity, you will be warned if it is recommended to use +the z-parity format for performance improvement. +

It is possible to convert from one format to another by adjusting +the configuration file with the desired z-parity or 3-parity file +and using fix to recreate it. +

+
+

+content FILE +

+

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

It can be placed on a disk used for data, parity, or +any other disk available. +If you use a data disk, this file is automatically excluded +from the sync process. +

This option is mandatory and can be used multiple times to save +multiple copies of the same file. +

You must store at least one copy for each parity disk used +plus one. Using additional copies does not hurt. +

+
+

+data NAME DIR +

+

Defines the name and mount point of the data disks in +the array. NAME is used to identify the disk and must +be unique. DIR is the mount point of the disk in the +file system. +

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

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

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

+
+

+extra NAME DIR +

+

Defines the name and mount point of additional disks to monitor +with the smart and probe commands. +

This is useful for monitoring disks that are not part of the +array but are required for the system to function, such as +the boot disk. +

Note that such disks are not affected by the up and down commands +because they are expected to be always spinning. +

+
+

+nohidden +

+

Excludes all hidden files and directories. +In Unix, hidden files are those starting with .. +In Windows, they are those with the hidden attribute. +

+
+

+exclude/include PATTERN +

+

Defines the file or directory patterns to exclude or include +in the sync process. +All patterns are processed in the specified order. +

If the first pattern that matches is an exclude one, the file +is excluded. If it is an include one, the file is included. +If no pattern matches, the file is excluded if the last pattern +specified is an include, or included if the last pattern +specified is an exclude. +

See the PATTERN section for more details on pattern +specifications. +

This option can be used multiple times. +

+
+

+blocksize SIZE_IN_KIBIBYTES +

+

Defines the basic block size in kibibytes for the parity. +One kibibyte is 1024 bytes. +

The default blocksize is 256, which should work for most cases. +

WARNING! This option is for experts only, and it is highly +recommended not to change this value. To change this value in the +future, you will need to recreate the entire parity! +

A reason to use a different blocksize is if you have many small +files, on the order of millions. +

For each file, even if only a few bytes, an entire block of parity is allocated, +and with many files, this may result in significant unused parity space. +When you completely fill the parity disk, you are not +allowed to add more files to the data disks. +However, the wasted parity does not accumulate across data disks. Wasted space +resulting from a high number of files on a data disk limits only +the amount of data on that data disk, not others. +

As an approximation, you can assume that half of the block size is +wasted for each file. For example, with 100,000 files and a 256 KiB +block size, you will waste 12.8 GB of parity, which may result +in 12.8 GB less space available on the data disk. +

You can check the amount of wasted space on each disk using status. +This is the amount of space you must leave free on the data +disks or use for files not included in the array. +If this value is negative, it means you are close to filling +the parity, and it represents the space you can still waste. +

To avoid this issue, you can use a larger partition for parity. +For example, if the parity partition is 12.8 GB larger than the data disks, +you have enough extra space to handle up to 100,000 +files on each data disk without any wasted space. +

A trick to get a larger parity partition in Linux is to format it +with the command: +

+mkfs.ext4 -m 0 -T largefile4 DEVICE
+
+

This results in about 1.5% extra space, approximately 60 GB for +a 4 TB disk, which allows about 460,000 files on each data disk without +any wasted space. +

+
+

+hashsize SIZE_IN_BYTES +

+

Defines the hash size in bytes for the saved blocks. +

The default hashsize is 16 bytes (128 bits), which should work +for most cases. +

WARNING! This option is for experts only, and it is highly +recommended not to change this value. To change this value in the +future, you will need to recreate the entire parity! +

A reason to use a different hashsize is if your system has +limited memory. As a rule of thumb, SnapRAID typically requires +1 GiB of RAM for each 16 TB of data in the array. +

Specifically, to store the hashes of the data, SnapRAID requires +approximately TS*(1+HS)/BS bytes of RAM, +where TS is the total size in bytes of your disk array, BS is the +block size in bytes, and HS is the hash size in bytes. +

For example, with 8 disks of 4 TB, a block size of 256 KiB +(1 KiB = 1024 bytes), and a hash size of 16, you get: +

+RAM = (8 * 4 * 10^12) * (1+16) / (256 * 2^10) = 1.93 GiB
+
+

Switching to a hash size of 8, you get: +

+RAM = (8 * 4 * 10^12) * (1+8) / (256 * 2^10) = 1.02 GiB
+
+

Switching to a block size of 512, you get: +

+RAM = (8 * 4 * 10^12) * (1+16) / (512 * 2^10) = 0.96 GiB
+
+

Switching to both a hash size of 8 and a block size of 512, you get: +

+RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
+
+
+
+

+autosave SIZE_IN_GIGABYTES +

+

Automatically saves the state when syncing or scrubbing after the +specified amount of GB processed. +This option is useful to avoid restarting long sync +commands from scratch if interrupted by a machine crash or any other event. +

+
+

+temp_limit TEMPERATURE_CELSIUS +

+

Sets the maximum allowed disk temperature in Celsius. When specified, +SnapRAID periodically checks the temperature of all disks using the +smartctl tool. The current disk temperatures are displayed while +SnapRAID is operating. If any disk exceeds this limit, all operations +stop, and the disks are spun down (put into standby) for the duration +defined by the temp_sleep option. After the sleep period, operations +resume, potentially pausing again if the temperature limit is reached +once more. +

During operation, SnapRAID also analyzes the heating curve of each +disk and estimates the long-term steady temperature they are expected +to reach if activity continues. The estimation is performed only after +the disk temperature has increased four times, ensuring that enough +data points are available to establish a reliable trend. +This predicted steady temperature is shown in parentheses next to the +current value and helps assess whether the system's cooling is +adequate. This estimated temperature is for informational purposes +only and has no effect on the behavior of SnapRAID. The program's +actions are based solely on the actual measured disk temperatures. +

To perform this analysis, SnapRAID needs a reference for the system +temperature. It first attempts to read it from available hardware +sensors. If no system sensor can be accessed, it uses the lowest disk +temperature measured at the start of the run as a fallback reference. +

Normally, SnapRAID shows only the temperature of the hottest disk. +To display the temperature of all disks, use the -A or --stats option. +

+
+

+temp_sleep TIME_IN_MINUTES +

+

Sets the standby time, in minutes, when the temperature limit is +reached. During this period, the disks remain spun down. The default +is 5 minutes. +

+
+

+pool DIR +

+

Defines the pooling directory where the virtual view of the disk +array is created using the pool command. +

The directory must already exist. +

+
+

+share UNC_DIR +

+

Defines the Windows UNC path required to access the disks remotely. +

If this option is specified, the symbolic links created in the pool +directory use this UNC path to access the disks. +Without this option, the symbolic links generated use only local paths, +which does not allow sharing the pool directory over the network. +

The symbolic links are formed using the specified UNC path, adding the +disk name as specified in the data option, and finally adding the +file directory and name. +

This option is required only for Windows. +

+
+

+smartctl DISK/PARITY OPTIONS... +

+

Defines custom smartctl options to obtain the SMART attributes for +each disk. This may be required for RAID controllers and some USB +disks that cannot be auto-detected. The %s placeholder is replaced by +the device name, but it is optional for fixed devices like RAID controllers. +

DISK is the same disk name specified in the data option. +PARITY is one of the parity names: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity, or z-parity. +

In the specified OPTIONS, the %s string is replaced by the +device name. For RAID controllers, the device is +likely fixed, and you may not need to use %s. +

Refer to the smartmontools documentation for possible options: +

+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
+
+

For example: +

+smartctl parity -d sat %s
+
+
+
+

+smartignore DISK/PARITY ATTR [ATTR...] +

+

Ignores the specified SMART attribute when computing the probability +of disk failure. This option is useful if a disk reports unusual or +misleading values for a particular attribute. +

DISK is the same disk name specified in the data option. +PARITY is one of the parity names: parity, 2-parity, 3-parity, +4-parity, 5-parity, 6-parity, or z-parity. +The special value * can be used to ignore the attribute on all disks. +

For example, to ignore the Current Pending Sector Count attribute on +all disks: +

+smartignore * 197
+
+

To ignore it only on the first parity disk: +

+smartignore parity 197
+
+
+
+

+Examples +

+

An example of a typical configuration for Unix is: +

+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
+
+

An example of a typical configuration for Windows is: +

+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
+
+
+
+
+

+Pattern +

+

Patterns are used to select a subset of files to exclude or include in +the process. Globbing characters can be used to match files and paths +in a flexible way. +

The question mark ? matches any single character except the directory +separator. This makes it useful for matching filenames with variable +characters while keeping the pattern confined to a single directory level. +

The single star * matches any sequence of characters, but like the +question mark, it never crosses directory boundaries. It stops at the +forward slash, making it suitable for matching within a single path +component. This is the standard wildcard behavior familiar from shell +globbing. +

The double star ** is more powerful, it matches any sequence of +characters including directory separators. This allows patterns to match +across multiple directory levels. When ** appears embedded directly in +a pattern, it can match zero or more characters including slashes between +the surrounding literal text. +

The most important use of ** is in the special form /**/. This matches +zero or more complete directory levels, making it possible to match files +at any depth in a directory tree without knowing the exact path structure. +For example, the pattern src/**/main.js matches src/main.js (skipping +zero directories), src/ui/main.js (skipping one directory), and +src/ui/components/main.js (skipping two directories). +

Character classes using square brackets match a single character from a +specified set or range. Like the other single character patterns, they do +not match directory separators. Classes support ranges and negation using +an exclamation mark. +

The fundamental distinction to remember is that *, ?, and character +classes all respect directory boundaries and only match within a single path +component, while ** is the only pattern that can match across directory +separators. +

There are four different types of patterns: +

+
+
+FILE +
+Selects any file named FILE. +This pattern applies only to files, not directories. +
+
+
+
+
+
+DIR/ +
+Selects any directory named DIR and everything inside. +This pattern applies only to directories, not files. +
+
+
+
+
+
+/PATH/FILE +
+Selects the exact specified file path. This pattern applies +only to files, not directories. +
+
+
+
+
+
+/PATH/DIR/ +
+Selects the exact specified directory path and everything +inside.    This pattern applies only to directories, not files. +
+
+
+

When you specify an absolute path starting with /, it is applied at +the array root directory, not the local file system root directory. +

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

If the file name contains a *, ?, [, +or ] character, you must escape it to avoid having it interpreted as a +globbing character. In Unix, the escape character is \; in Windows, it is ^. +When the pattern is on the command line, you must double the escape +character to avoid having it interpreted by the command shell. +

In the configuration file, you can use different strategies to filter +the files to process. +The simplest approach is to use only exclude rules to remove all the +files and directories you do not want to process. For example: +

+# Excludes any file named *.unrecoverable
+exclude *.unrecoverable
+# Excludes the root directory /lost+found
+exclude /lost+found/
+# Excludes any subdirectory named tmp
+exclude tmp/
+
+

The opposite approach is to define only the files you want to process, using +only include rules. For example: +

+# Includes only some directories
+include /movies/
+include /musics/
+include /pictures/
+
+

The final approach is to mix exclude and include rules. In this case, +the order of rules is important. Earlier rules take +precedence over later ones. +To simplify, you can list all the exclude rules first and then +all the include rules. For example: +

+# Excludes any file named *.unrecoverable
+exclude *.unrecoverable
+# Excludes any subdirectory named tmp
+exclude tmp/
+# 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.
+# In Unix, use quotes to avoid globbing expansion by the shell.
+snapraid -f "*.mp3" check
+
+

In Unix, when using globbing characters on the command line, you must +quote them to prevent the shell from expanding them. +

+
+

+Ignore File +

+

In addition to the global rules in the configuration file, you can +place .snapraidignore files in any directory within the array to +define decentralized exclusion rules. +

Rules defined in .snapraidignore are applied after the rules in the +configuration file. This means they have a higher priority and can be +used to exclude files that were previously included by the global +configuration. Effectively, if a local rule matches, the file is +excluded regardless of the global include settings. +

The pattern logic in .snapraidignore mirrors the global configuration +but anchors patterns to the directory where the file is located: +

+
+
+FILE +
+Selects any file named FILE in this directory or below. +This follows the same globbing rules as the global pattern. +
+
+
+
+
+
+DIR/ +
+Selects any directory named DIR and everything inside, +residing in this directory or below. +
+
+
+
+
+
+/PATH/FILE +
+Selects the exact specified file relative to the location +of the .snapraidignore file. +
+
+
+
+
+
+/PATH/DIR/ +
+Selects the exact specified directory and everything inside, +relative to the location of the .snapraidignore file. +
+
+
+

Unlike the global configuration, .snapraidignore files only support +exclusion rules; you cannot use include patterns or negation (!). +

For example, if you have a .snapraidignore in /mnt/disk1/projects/: +

+# Excludes ONLY /mnt/disk1/projects/output.bin
+/output.bin
+# Excludes any directory named build inside projects/
+build/
+# Excludes any .tmp file inside projects/ or its subfolders
+*.tmp
+
+
+
+

+Content +

+

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

It is a binary file that lists all the files present in your disk array, +along with all the checksums to verify their integrity. +

This file is read and written by the sync and scrub commands and +read by the fix, check, and status commands. +

+
+

+Parity +

+

SnapRAID stores the parity information of your array in the parity +files. +

These are binary files containing the computed parity of all the +blocks defined in the content file. +

These files are read and written by the sync and fix commands and +only read by the scrub and check commands. +

+
+

+Encoding +

+

SnapRAID in Unix ignores any encoding. It reads and stores the +file names with the same encoding used by the file system. +

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

To have file names printed correctly, you must set the Windows +console to UTF-8 mode with the command chcp 65001 and use +a TrueType font like Lucida Console as the console font. +This affects only the printed file names; if you +redirect the console output to a file, the resulting file is always +in UTF-8 format. +

+ + +
+
+
+ + + + + + + diff --git a/beta/phone-dashboard-light.png b/beta/phone-dashboard-light.png new file mode 100644 index 00000000..80b80ea3 Binary files /dev/null and b/beta/phone-dashboard-light.png differ diff --git a/beta/phone-dashboard.png b/beta/phone-dashboard.png new file mode 100644 index 00000000..d84403ed Binary files /dev/null and b/beta/phone-dashboard.png differ diff --git a/beta/phone-differences-light.png b/beta/phone-differences-light.png new file mode 100644 index 00000000..e3e1f079 Binary files /dev/null and b/beta/phone-differences-light.png differ diff --git a/beta/phone-differences.png b/beta/phone-differences.png new file mode 100644 index 00000000..6bc6aac9 Binary files /dev/null and b/beta/phone-differences.png differ diff --git a/beta/phone-disks-light.png b/beta/phone-disks-light.png new file mode 100644 index 00000000..08048689 Binary files /dev/null and b/beta/phone-disks-light.png differ diff --git a/beta/phone-disks.png b/beta/phone-disks.png new file mode 100644 index 00000000..b1d32a70 Binary files /dev/null and b/beta/phone-disks.png differ diff --git a/beta/phone-menu-light.png b/beta/phone-menu-light.png new file mode 100644 index 00000000..13504e50 Binary files /dev/null and b/beta/phone-menu-light.png differ diff --git a/beta/phone-menu.png b/beta/phone-menu.png new file mode 100644 index 00000000..9bea0ef0 Binary files /dev/null and b/beta/phone-menu.png differ diff --git a/beta/phone-recovery-light.png b/beta/phone-recovery-light.png new file mode 100644 index 00000000..4e8504ee Binary files /dev/null and b/beta/phone-recovery-light.png differ diff --git a/beta/phone-recovery.png b/beta/phone-recovery.png new file mode 100644 index 00000000..5149c0f1 Binary files /dev/null and b/beta/phone-recovery.png differ diff --git a/beta/phone-settings-light.png b/beta/phone-settings-light.png new file mode 100644 index 00000000..93efe10c Binary files /dev/null and b/beta/phone-settings-light.png differ diff --git a/beta/phone-settings.png b/beta/phone-settings.png new file mode 100644 index 00000000..28a7fa11 Binary files /dev/null and b/beta/phone-settings.png differ diff --git a/beta/phone-smart-light.png b/beta/phone-smart-light.png new file mode 100644 index 00000000..dfab2a39 Binary files /dev/null and b/beta/phone-smart-light.png differ diff --git a/beta/phone-smart.png b/beta/phone-smart.png new file mode 100644 index 00000000..c084d479 Binary files /dev/null and b/beta/phone-smart.png differ diff --git a/beta/phone-tasks-light.png b/beta/phone-tasks-light.png new file mode 100644 index 00000000..2f23175b Binary files /dev/null and b/beta/phone-tasks-light.png differ diff --git a/beta/phone-tasks.png b/beta/phone-tasks.png new file mode 100644 index 00000000..3c4500a2 Binary files /dev/null and b/beta/phone-tasks.png differ diff --git a/script.js b/beta/script.js similarity index 100% rename from script.js rename to beta/script.js diff --git a/beta/site.webmanifest b/beta/site.webmanifest new file mode 100644 index 00000000..94d1a969 --- /dev/null +++ b/beta/site.webmanifest @@ -0,0 +1 @@ +{"name":"SnapRAID","short_name":"SnapRAID","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#f8fafc","background_color":"#020617","display":"standalone"} diff --git a/beta/style.css b/beta/style.css new file mode 100644 index 00000000..210e1f69 --- /dev/null +++ b/beta/style.css @@ -0,0 +1,1004 @@ +:root { + /* Color Palette - Deep Dark Mode */ + /* https://htmlcolorcodes.com/color-chart/tailwind-color-chart/ */ + --c-slate-50: #F8FAFC; + --c-slate-100: #F1F5F9; + --c-slate-200: #E2E8F0; + --c-slate-300: #CAD5E2; + --c-slate-400: #90A1B9; + --c-slate-500: #62748E; + --c-slate-600: #45556C; + --c-slate-700: #314158; + --c-slate-800: #1D293D; + --c-slate-900: #0F172B; + --c-slate-950: #020618; + + /* Interpolated */ + --c-slate-905: hsl(224 51% 11%); + --c-slate-910: hsl(224 55% 10%); + --c-slate-915: hsl(225 59% 10%); + --c-slate-920: hsl(225 63% 9%); + --c-slate-925: hsl(226 66% 8%); + --c-slate-930: hsl(227 70% 7%); + --c-slate-935: hsl(227 74% 7%); + --c-slate-940: hsl(228 78% 6%); + --c-slate-945: hsl(228 81% 6%); + + --c-sky-50: #F0F9FF; + --c-sky-100: #DFF2FE; + --c-sky-200: #B8E6FE; + --c-sky-300: #74D4FF; + --c-sky-400: #21BCFF; + --c-sky-500: #34A6F4; + --c-sky-600: #2984D1; + --c-sky-700: #1C69A8; + --c-sky-800: #10598A; + --c-sky-900: #024A70; + --c-sky-950: #052F4A; + + --c-blue-50: #EFF6FF; + --c-blue-100: #DBEAFE; + --c-blue-200: #BEDBFF; + --c-blue-300: #8EC5FF; + --c-blue-400: #51A2FF; + --c-blue-500: #2B7FFF; + --c-blue-600: #155DFC; + --c-blue-700: #1447E6; + --c-blue-800: #193CB8; + --c-blue-900: #1C398E; + --c-blue-950: #162456; + + --c-orange-50: #FFF7ED; + --c-orange-100: #FFEDD4; + --c-orange-200: #FFD6A7; + --c-orange-300: #FFB86A; + --c-orange-400: #FF8904; + --c-orange-500: #FF692A; + --c-orange-600: #F54927; + --c-orange-700: #CA3519; + --c-orange-800: #9F2D01; + --c-orange-900: #7E2A0C; + --c-orange-950: #441306; + + --bg-body: var(--c-slate-950); + --bg-surface: var(--c-slate-910); + --bg-surface-hover: var(--c-slate-800); + --border-color: var(--c-slate-800); + + --header-bg: rgba(2, 6, 23, 0.9); + --overlay-bg: rgba(2, 6, 23, 0.85); + --bg-code: #000000; + + --text-code: #e2e8f0; + + --table-header-bg: rgba(255, 255, 255, 0.02); + --table-row-even-bg: rgba(255, 255, 255, 0.02); + + --text-primary: var(--c-slate-50); + --text-secondary: var(--c-slate-400); + --text-accent: var(--c-sky-400); + + --primary: var(--c-blue-500); + --primary-hover: var(--c-blue-600); + --primary-glow: rgba(59, 130, 246, 0.5); /* --c-blue-500 */ + + --success: #10b981; + --warning: #f59e0b; + --danger: #ef4444; + + /* Spacing & Layout */ + --container-width: 1200px; + --header-height: 70px; + --radius: 8px; + --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; + --font-mono: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace; +} + +:root.light-theme { + --bg-body: var(--c-slate-100); + --bg-surface: #ffffff; + --bg-surface-hover: var(--c-slate-200); + --border-color: var(--c-slate-200); + + --header-bg: rgba(248, 250, 252, 0.9); + --overlay-bg: rgba(248, 250, 252, 0.85); + --bg-code: var(--c-slate-200); + + --text-code: var(--c-slate-900); + + --table-header-bg: rgba(0, 0, 0, 0.05); + --table-row-even-bg: rgba(0, 0, 0, 0.02); + + --text-primary: var(--c-slate-900); + --text-secondary: var(--c-slate-600); + --text-accent: var(--c-sky-500); + + --primary: var(--c-blue-600); + --primary-hover: var(--c-blue-700); + --primary-glow: rgba(37, 99, 235, 0.2); /* --c-blue-600 */ +} + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + background-color: var(--bg-body); + color: var(--text-primary); + font-family: var(--font-main); + line-height: 1.6; + -webkit-font-smoothing: antialiased; +} + +/* --- Layout Utilities --- */ +.container { + max-width: var(--container-width); + margin: 0 auto; + padding: 0 20px; +} + +.grid { + display: grid; + gap: 2rem; +} + +.grid-2-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } +.grid-3-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } +.grid-4-cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } + +.theme-transitioning, +.theme-transitioning *, +.theme-transitioning *::before, +.theme-transitioning *::after { + transition: none !important; +} + +/* --- Typography --- */ +h1, h2, h3, h4 { + font-weight: 700; + line-height: 1.2; + margin-bottom: 1rem; + color: var(--text-primary); +} + +h1 { font-size: 3.5rem; letter-spacing: -0.05em; } +h2 { font-size: 2.25rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; } +h3 { font-size: 1.5rem; color: var(--text-primary); } +p { margin-bottom: 1.5rem; color: var(--text-secondary); } +a { color: var(--primary); text-decoration: none; transition: 0.2s; } +a:hover { color: var(--text-accent); } +.accent-text { color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.875rem; } + +code, pre { + font-family: var(--font-mono); +} + +/* --- Header & Navigation --- */ +header { + height: var(--header-height); + background: var(--header-bg); + backdrop-filter: blur(10px); + border-bottom: 1px solid var(--border-color); + position: sticky; + top: 0; + z-index: 1000; +} + +.nav-container { + display: flex; + justify-content: space-between; + align-items: center; + height: 100%; +} + +.logo { + font-size: 1.5rem; + font-weight: 800; + color: var(--text-primary); + display: flex; + align-items: center; + gap: 10px; +} + +.logo svg { height: 32px; width: 32px; fill: var(--text-primary); } +.logo-accent { fill: var(--primary); } + +nav ul { + display: flex; + list-style: none; + gap: 20px; + align-items: center; +} + +nav a { + font-size: 0.95rem; + color: var(--text-secondary); + font-weight: 500; +} + +nav a:hover, nav a.active { + color: var(--primary); +} + +.nav-cta { + background: var(--primary); + color: white !important; + padding: 0.5rem 1rem; + border-radius: var(--radius); +} + +.nav-cta:hover { + background: var(--primary-hover); +} + +.theme-toggle { + background: transparent; + border: none; + color: var(--text-secondary); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + padding: 0.5rem; + border-radius: var(--radius); + transition: background-color 0.2s, color 0.2s; +} + +.theme-toggle:hover { + background: var(--bg-surface-hover); + color: var(--primary); +} + +.theme-toggle svg { + width: 20px; + height: 20px; +} + +.theme-toggle .sun-icon { + display: none; +} + +:root.light-theme .theme-toggle .sun-icon { + display: block; +} + +:root.light-theme .theme-toggle .moon-icon { + display: none; +} + +/* --- Buttons --- */ +.btn { + display: inline-flex; + align-items: center; + justify-content: center; + gap: 8px; + padding: 0.75rem 1.5rem; + border-radius: var(--radius); + font-weight: 600; + cursor: pointer; + border: none; + transition: all 0.2s ease; + text-decoration: none; +} + +.btn-primary { + background: var(--primary); + color: white; + box-shadow: 0 0 15px var(--primary-glow); +} + +.btn-primary:hover { + background: var(--primary-hover); + transform: translateY(-1px); + color: white; +} + +.btn-secondary { + background: transparent; + border: 1px solid var(--border-color); + color: var(--text-primary); +} + +.btn-secondary:hover { + background: var(--bg-surface); + border-color: var(--text-accent); + color: var(--text-accent); +} + +.btn-block { width: 100%; } + +/* --- Sections --- */ +.hero-section { + padding: 6rem 0; + text-align: center; +} + +.hero-subtext { + font-size: 1.25rem; + max-width: 700px; + margin: 1.5rem auto; +} + +.hero-actions { + display: flex; + justify-content: center; + gap: 1rem; + margin-top: 2.5rem; +} + +.daemon-section { + background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface) 100%); + padding: 5rem 0; + border-top: 1px solid var(--border-color); + border-bottom: 1px solid var(--border-color); +} + +.daemon-layout { + align-items: center; +} + +.feature-list { + list-style: none; + margin-bottom: 2rem; +} + +.feature-list li { + margin-bottom: 10px; + display: flex; + align-items: center; + gap: 10px; + color: var(--text-secondary); +} + +.icon-check { + width: 20px; + height: 20px; + fill: var(--success); +} + +.link-arrow { + font-weight: 600; + display: inline-flex; + align-items: center; +} + +/* --- Terminal Mockup --- */ +.terminal-mockup { + background: #000; + border: 1px solid var(--border-color); + border-radius: var(--radius); + padding: 0; + box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); + font-family: var(--font-mono); + overflow: hidden; +} + +.terminal-header { + background: var(--bg-surface); + padding: 10px 15px; + display: flex; + gap: 8px; + border-bottom: 1px solid var(--border-color); +} + +.dot { width: 10px; height: 10px; border-radius: 50%; } +.red { background: #ef4444; } +.yellow { background: #f59e0b; } +.green { background: #10b981; } + +.terminal-body { + padding: 20px; + color: #e2e8f0; + font-size: 0.85rem; +} + +.term-line { margin-bottom: 4px; } +.term-line.success { color: var(--success); } +.term-line.warning { color: var(--warning); } +.term-line.info { color: var(--text-accent); } +.term-line.separator { color: var(--border-color); margin: 8px 0; } + +/* --- Cards --- */ +.features-section { padding: 5rem 0; } +.section-title { text-align: center; margin-bottom: 3rem; } + +.card { + background: var(--bg-surface); + border: 1px solid var(--border-color); + padding: 2rem; + border-radius: var(--radius); + transition: transform 0.2s, border-color 0.2s; +} + +.card:hover { + border-color: var(--primary); + transform: translateY(-2px); +} + +.card-subtitle { + color: var(--text-accent); + margin-bottom: 0.5rem; + font-style: italic; + font-weight: 500; +} + +.card-icon-wrapper { + width: 48px; + height: 48px; + background: rgba(59, 130, 246, 0.1); + border-radius: 12px; + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 1rem; +} + +.card-icon { width: 24px; height: 24px; fill: var(--primary); } + +/* --- Tables --- */ +.data-table { + width: 100%; + border-collapse: collapse; + margin: 2rem 0; + background: var(--bg-surface); + border-radius: var(--radius); + overflow: hidden; +} + +.data-table th, .data-table td { + text-align: left; + padding: 1rem; + border-bottom: 1px solid var(--border-color); +} + +.data-table th { + color: var(--text-accent); + font-weight: 600; + background: var(--table-header-bg); +} + +.data-table tr:last-child td { border-bottom: none; } +.data-table tr:hover td { background: var(--bg-surface-hover); } + +/* --- Search Input --- */ +.search-input { + width: 100%; + padding: 1rem 1.5rem; + font-size: 1rem; + background: var(--bg-surface); + border: 1px solid var(--border-color); + border-radius: var(--radius); + color: var(--text-primary); + transition: border-color 0.2s, box-shadow 0.2s; + outline: none; + margin-bottom: 2rem; +} + +.search-input:focus { + border-color: var(--primary); + box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); +} + +.search-input::placeholder { + color: var(--text-secondary); +} + +/* --- FAQ Specific Styling --- */ +#faq-content { + max-width: 100%; /* Changed from 900px since it's now in a grid cell */ +} + +.faq-section { + margin-bottom: 4rem; +} + +.faq-section h2 { + margin-top: 1rem; + margin-bottom: 2rem; + color: var(--primary); + border-bottom: 1px solid var(--border-color); + padding-bottom: 0.5rem; + font-size: 2rem; + letter-spacing: -0.02em; + scroll-margin-top: 100px; +} + +.faq-item { + border-bottom: 1px solid var(--border-color); + margin-bottom: 2rem; + padding-bottom: 2rem; +} + +.faq-item:last-child { + border-bottom: none; + margin-bottom: 0; + padding-bottom: 0; +} + +.faq-question { + margin-top: 0; + margin-bottom: 1rem; + font-size: 1.4rem; + color: var(--text-primary); + font-weight: 700; + scroll-margin-top: 100px; /* Offset for sticky header */ +} + +/* The wrapper for the answer content */ +.faq-answer { + padding-left: 1.5rem; + border-left: 3px solid var(--bg-surface-hover); + margin-top: 1rem; +} + +.faq-answer:hover { + border-left-color: var(--primary); +} + +/* Styles for content INSIDE .faq-answer */ +.faq-answer p { + margin-bottom: 1rem; + color: var(--text-secondary); + line-height: 1.7; + background: transparent; + padding: 0; + border: none; +} + +.faq-answer ul, .faq-answer ol { + margin-bottom: 1.5rem; + padding-left: 1.5rem; + color: var(--text-secondary); + list-style-position: outside; +} + +.faq-answer li { + margin-bottom: 0.5rem; + padding-left: 0.5rem; +} + +.faq-answer table { + width: 100%; + border-collapse: collapse; + margin: 1.5rem 0; + font-size: 0.95rem; + background: var(--bg-surface); + border: 1px solid var(--border-color); + border-radius: var(--radius); + display: block; + overflow-x: auto; + white-space: nowrap; +} + +@media (min-width: 768px) { + .faq-answer table { + display: table; + white-space: normal; + } +} + +.faq-answer th, .faq-answer td { + padding: 0.75rem 1rem; + border: 1px solid var(--border-color); + text-align: left; + vertical-align: top; +} + +.faq-answer th { + background: rgba(59, 130, 246, 0.1); + color: var(--text-primary); + font-weight: 600; +} + +.faq-answer td { + background: transparent; +} + +.faq-answer tr:nth-child(even) td { + background: var(--table-row-even-bg); +} + +.faq-answer a { + text-decoration: underline; + text-underline-offset: 2px; +} + +/* --- Footer --- */ +footer { + border-top: 1px solid var(--border-color); + padding: 2rem 0; + margin-top: 4rem; + background: var(--bg-surface); +} + +.footer-content { + display: flex; + justify-content: space-between; + flex-wrap: wrap; + gap: 2rem; +} + +.footer-col h3 { color: var(--text-primary); margin-bottom: 0.5rem; } +.footer-col h4 { color: var(--text-accent); font-size: 0.9rem; text-transform: uppercase; margin-bottom: 1rem; border: none; } +.footer-col ul { list-style: none; } +.footer-col ul li { margin-bottom: 0.5rem; } +.license { font-size: 0.8rem; color: var(--text-secondary); margin-top: 1rem; } + +/* --- Mobile Menu --- */ +#menu-toggle { display: none; } +.menu-icon { display: none; cursor: pointer; color: var(--text-primary); } + +@media (max-width: 768px) { + h1 { font-size: 2.5rem; } + .hero-actions { flex-direction: column; } + .menu-icon { display: block; } + + nav ul { + display: none; + flex-direction: column; + position: absolute; + top: var(--header-height); + left: 0; + width: 100%; + background: var(--bg-surface); + padding: 1rem; + border-bottom: 1px solid var(--border-color); + align-items: flex-start; + } + nav ul li { width: 100%; } + nav a { display: block; padding: 0.5rem 0; } + nav .nav-cta { text-align: center; } + nav .theme-toggle { justify-content: flex-start; padding: 0.5rem 0; } + + #menu-toggle:checked ~ ul { display: flex; } + + .manual-layout, .faq-layout { grid-template-columns: 1fr; } + .manual-sidebar { position: static; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; } +} + +/* --- Specific Page: Manual --- */ +.manual-layout, .faq-layout { + display: grid; + grid-template-columns: 250px 1fr; + gap: 3rem; + padding-top: 2rem; + padding-bottom: 4rem; +} + +.manual-sidebar { + position: sticky; + top: 90px; + height: fit-content; + max-height: calc(100vh - 100px); + overflow-y: auto; + padding-right: 5px; + + /* Hide scrollbar for IE, Edge and Firefox */ + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ +} + +/* Hide scrollbar for Chrome, Safari and Opera */ +.manual-sidebar::-webkit-scrollbar { + display: none; +} + +.manual-sidebar h4 { color: var(--text-primary); margin-bottom: 1rem; } +.manual-sidebar ul { list-style: none; } +.manual-sidebar a { display: block; padding: 0.5rem 0; color: var(--text-secondary); border-left: 2px solid transparent; padding-left: 10px; } +.manual-sidebar a:hover, .manual-sidebar a.current { color: var(--primary); border-left-color: var(--primary); } + +/* Nested TOC for FAQ */ +.manual-sidebar ul ul { + margin-left: 10px; + margin-bottom: 10px; + border-left: 1px solid var(--border-color); +} +.manual-sidebar ul ul a { + font-size: 0.85rem; + padding: 0.25rem 0 0.25rem 10px; + border-left: none; +} +.manual-sidebar ul ul a:hover { + color: var(--text-accent); +} + +/* --- Manual Content Styling (NEW) --- */ +.manual-doc { + font-family: var(--font-main); + color: var(--text-secondary); + line-height: 1.7; + max-width: 900px; +} + +/* Level 1 Sections */ +.manual-section-level-1 { + margin-bottom: 4rem; + padding-bottom: 2rem; + border-bottom: 1px solid var(--border-color); +} +.manual-section-level-1:last-child { + border-bottom: none; +} + +.manual-title-level-1 { + font-size: 2rem; + color: var(--text-primary); + margin-bottom: 1.5rem; + border-bottom: none; + scroll-margin-top: 100px; +} + +/* Level 2 Sections */ +.manual-section-level-2 { + margin-top: 3rem; + margin-left: 1.5rem; + padding-left: 1.5rem; + border-left: 2px solid var(--border-color); +} + +.manual-title-level-2 { + font-size: 1.4rem; + color: var(--text-accent); + margin-bottom: 1rem; + border-bottom: none; + scroll-margin-top: 100px; +} + +/* Level 3 Sections */ +.manual-section-level-3 { + margin-top: 2rem; + margin-left: 1.5rem; + padding-left: 1rem; + border-left: 1px dashed var(--border-color); +} + +.manual-title-level-3 { + font-size: 1.1rem; + color: var(--text-primary); + text-transform: uppercase; + letter-spacing: 0.05em; + margin-bottom: 0.75rem; + scroll-margin-top: 100px; +} + +/* Common Text Elements */ +.manual-doc p { margin-bottom: 1rem; } +.manual-doc ul { margin-bottom: 1.5rem; padding-left: 2rem; list-style-type: disc; } +.manual-doc li { margin-bottom: 0.5rem; } + +.manual-doc b { + font-weight: bold; + font-family: var(--font-mono); + color: var(--text-accent); +} + +/* The Pre Tag */ +.manual-doc pre { + background: var(--bg-code); + color: var(--text-code); + padding: 1.25rem; + border: 1px solid var(--border-color); + border-radius: var(--radius); + font-family: var(--font-mono); + font-size: 0.9rem; + overflow-x: auto; + margin: 1.5rem 0; + white-space: pre; +} + +.manual-indent { + margin-left: 2rem; + border-left: 3px solid var(--primary); +} + +/* Option and Tag Lists (Vertical Layout) */ +.manual-option-list, .manual-tag-list { + display: flex; + flex-direction: column; + gap: 1.5rem; + margin: 1.5rem 0; +} + +.manual-option-entry, .manual-tag-entry { + display: block; +} + +.manual-option-name, .manual-tag-name { + font-family: var(--font-mono); + color: var(--warning); + font-weight: 700; + display: block; + margin-bottom: 0.0rem; + /* word-break: break-all; - Removed to prevent awkward breaking of short words, allow natural flow */ +} + +.manual-option-description, .manual-tag-description { + color: var(--text-secondary); + margin-left: 2.5rem; /* Distinct indentation */ + line-height: 1.6; +} + +/* Compare Grid */ +.compare-container { overflow-x: auto; position: relative; } +.compare-table { min-width: 900px; } +.compare-table th { text-align: center; } +.compare-table td { text-align: center; vertical-align: middle; } +.feature-cell { text-align: left !important; font-weight: 600; color: var(--text-primary); } +.cell-subtext { font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; margin-top: 2px; } +.check { color: var(--success); } +.cross { color: var(--danger); } +.partial { color: var(--warning); } +.snapraid-col { background: rgba(59, 130, 246, 0.1); border-left: 1px solid var(--primary); border-right: 1px solid var(--primary); } +.snapraid-header { color: var(--primary) !important; font-size: 1.2rem; } + +/* Info Button and Popover */ +.info-wrapper { + display: inline-block; + vertical-align: middle; + margin-left: 5px; +} + +.info-btn { + background: none; + border: none; + cursor: pointer; + padding: 0; + color: var(--primary); + display: flex; + align-items: center; + transition: color 0.2s; +} + +.info-btn:hover { + color: var(--text-accent); +} + +.global-popover { + display: none; + position: absolute; + width: 300px; + max-width: 90vw; + background: var(--bg-surface); + border: 1px solid var(--border-color); + padding: 1.25rem; + border-radius: var(--radius); + box-shadow: 0 10px 40px rgba(0,0,0,0.6); + z-index: 2000; + font-size: 0.9rem; + line-height: 1.6; + color: var(--text-secondary); + text-align: left; +} + +.global-popover.active { + display: block; + animation: popIn 0.2s ease-out; +} + +@keyframes popIn { + from { opacity: 0; transform: translateY(10px); } + to { opacity: 1; transform: translateY(0); } +} + +.popover-overlay { + display: none; + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + z-index: 1999; +} + +.popover-overlay.active { + display: block; +} + +/* Support Cards */ +.support-card { display: flex; gap: 1rem; align-items: start; } +.support-icon { min-width: 40px; height: 40px; fill: var(--text-secondary); } + +.donation-card { + background: rgba(245, 158, 11, 0.1); + border: 1px solid var(--warning); + border-radius: 4px; + text-align: center; + color: var(--warning); + padding: 1rem; + margin-bottom: 1.5rem; + } + +.donation-card p { + color: var(--warning); +} + +.donation-card a { + font-weight: bold; + font-size: 1.1rem; +} + +.warning-card { + background: rgba(245, 158, 11, 0.1); + border: 1px solid var(--warning); + color: var(--warning); + padding: 1rem; + border-radius: 4px; + margin-bottom: 1.5rem; + display: flex; + gap: 0.5rem; + align-items: start; +} + +/* UI Gallery */ +.ui-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; } +.ui-phone-gallery { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } +.ui-shot { + border: 1px solid var(--border-color); + border-radius: var(--radius); + overflow: hidden; + height: 280px; + background: #000; + position: relative; + cursor: pointer; +} +.ui-shot img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + transition: transform 0.3s ease; +} +.ui-shot:hover img { + transform: scale(1.25); +} +.ui-shot-caption { + position: absolute; + bottom: 0; + left: 0; + right: 0; + background: rgba(0,0,0,0.8); + color: white; + padding: 0.5rem; + font-size: 0.8rem; + text-align: center; +} + +/* Preview Overlay */ +#ui-preview-overlay { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + background: var(--overlay-bg); + backdrop-filter: blur(8px); + z-index: 2000; + display: flex; + align-items: center; + justify-content: center; + opacity: 0; + pointer-events: none; /* Allows hover events to pass through to underlying elements */ + transition: opacity 0.3s ease; +} + +#ui-preview-overlay.active { + opacity: 1; + pointer-events: auto; /* Enable clicks when active */ + cursor: zoom-out; +} + +#ui-preview-img { + max-width: 90%; + max-height: 90%; + border-radius: var(--radius); + box-shadow: 0 0 50px rgba(0,0,0,0.5); + transform: scale(0.95); + transition: transform 0.3s ease; +} + +#ui-preview-overlay.active #ui-preview-img { + transform: scale(1); +} diff --git a/beta/support.html b/beta/support.html new file mode 100644 index 00000000..df30f475 --- /dev/null +++ b/beta/support.html @@ -0,0 +1,425 @@ + + + + + + + + SnapRAID Support + + + + + + + + + + + + + + + + + +
+ +
+ + +
+

Community Support

+ +
+
+ +
+

GitHub Issues

+

Report bugs and request features for SnapRAID CLI and SnapRAID Daemon.

+
+
+ + + +
+

Reddit r/Snapraid

+

Active community for Q&A, tips, and experience sharing.

+
+
+ + + +
+

SourceForge Forum

+

SourceForge historical Forum for bug reports and discussion.

+
+
+ + + +
+

OpenMediaVault

+

Support for OMV users running the SnapRAID plugin.

+
+
+ + + +
+

UNRAID Plugin

+

Discussion for users running SnapRAID on Unraid.

+
+
+
+ +
+

Community Guides & Tutorials

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformTitlePublishedDescription
LinuxEncrypted SnapRAIDMay 11,
2024
Tutorial for setting up encrypted SnapRAID storage with dm-crypt and LUKS.
Linux(MergerFS + SnapRAID) is the new RAID 5Feb 3,
2023
Explains why MergerFS + SnapRAID offers RAID 5/6-like protection with more flexibility.
LinuxSnapRAID - Perfect Media ServerDec 27,
2023
Overview of SnapRAID for flexible, snapshot-based data backup and parity protection on a Perfect Media Server.
OpenMediaVaultSnapRAID Plugin For OMV7Jan 18,
2025
Guide for installing and configuring the SnapRAID plugin on OpenMediaVault 7 for data protection and recovery.
OpenMediaVaultSnapRAID Upgrade DriveJul 18,
2024
Step-by-step guide to upgrading drives in a SnapRAID array while maintaining data integrity.
MANSA Hybrid NAS Approach with SnapRAID and MergerFSFeb 7,
2024
Guide to building a robust NAS stack with SnapRAID, MergerFS, and Docker for efficient storage and media management.
WindowsElucidateSep 9,
2025
Elucidate is a Windows GUI front-end for the command-line SnapRAID application.
+
+ + + + + +
+

Video Tutorials

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformTitlePublishedDescription
LinuxHow to install and setup SnapraidJun 26,
2023
Step-by-step guide to compiling, installing, and automating SnapRAID parity protection.
LinuxHow to recover a failed drive using SnapraidJul 31,
2023
Demonstrates recovering data from a failed drive in a MergerFS + SnapRAID setup.
LinuxHow to install and setup MergerFSJun 26,
2023
How to install and setup MergerFS for SnapRAID.
LinuxMergerFS + SnapRAID : Forget about RAID 5 in your Home Server !Feb 21,
2023
Explains setting up MergerFS and SnapRAID for home server safety equivalent to RAID 5, with Slack notifications.
LinuxDIY Unraid-like functionalityJun 12,
2025
Builds Unraid-style setup with SnapRAID overview, install, and use starting at 11:26.
LinuxHow to build the Perfect Media Server | Part 1 - The Tech StackApr 22,
2025
Overview of building a media server stack, including SnapRAID integration at 19:28.
LinuxHow to setup a Linux Fileserver with Snapraid and Mergerfs Re-ExportApr 23,
2018
Guides through setting up SnapRAID with MergerFS on Linux for a simple fileserver, including add/remove drives.
Linux (Italian)Il RAID è OBSOLETO: la migliore ALTERNATIVA in ambito domesticoJun 18,
2023
Review di SnapRAID da parte di Morro Linux
OpenMediaVaultSetting up SnapRAID + mergerfs on OpenMediaVaultNov 19,
2023
Tutorial for configuring SnapRAID and MergerFS on OpenMediaVault, including drive additions.
OpenMediaVaultSetting up MergerFS SnapRaid and file server on OpenMediaVaultSep 10,
2023
Guides through creating a protected storage pool and file server with MergerFS and SnapRAID.
WindowsSetting up SnapRAID for Windows (and DrivePool) PART 1Apr 28,
2023
A detailed guide on installing and configuring SnapRAID on Windows, including integration with DrivePool for disk pooling.
WindowsSnapRAID for Windows (and DrivePool) Part 2 - RecoveryMay 12,
2023
The second part of the series, focusing on array modification, data recovery from deletions or corruption, and disk replacement.
WindowsHow to setup Snapraid and DrivePool in WindowsSep 29,
2017
Shows how to set up SnapRAID and DrivePool to create a large volume with parity backup for files.
+
+ + + + +
+ + + + + + + diff --git a/ui.html b/beta/ui.html similarity index 100% rename from ui.html rename to beta/ui.html diff --git a/bitcoin.png b/bitcoin.png new file mode 100644 index 00000000..da76e01d Binary files /dev/null and b/bitcoin.png differ diff --git a/compare.html b/compare.html index 3053f34a..31e60dd3 100644 --- a/compare.html +++ b/compare.html @@ -1,17 +1,17 @@ - + - - - - - Compare SnapRAID - - - - - - + + + + + + + + + + +SnapRAID @@ -36,403 +36,235 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
-

Comparison

- -
-

- SnapRAID is one of many RAID-like solutions available for disk arrays. -

- -

Some well-known alternatives include:

- -
    -
  • - unRAID - - A commercial solution (only the RAID core is GPL2). It uses a modified Linux XFS filesystem with real-time redundancy. Integrity checksums are not natively supported. -
  • - -
  • - ZFS - - An open-source (GPL-incompatible) filesystem with real-time redundancy and integrity checksums. -
  • -
  • - Btrfs - - An open-source (GPL2) Linux filesystem with real-time redundancy. Since Linux 3.9, it supports RAID5/6 redundancy and integrity checksums. - Issues have been identified, and the official wiki as of 2026 warns: - "There are some implementation and design deficiencies that make it unreliable for some corner cases and the feature should not be used in production, only for evaluation or testing." -
  • -
  • - Storage Spaces - - Microsoft’s solution, integrated into Windows 8 and later. Proprietary, with real-time redundancy but no checksum support. It also has several limitations. -
  • -
-
+Number of failures
How many disk failures are supported? 1 for RAID5, 2 for RAID6. +1, 2, 3, 4, 5, 61, 21, 2, 31, 21, 2 -
-

Key Takeaways

-
-
-

Real-time vs Snapshot

-

- -The primary factor for categorizing storage solutions is when redundancy information is updated. This timing determines whether the system acts as a live mirror or a point-in-time recovery tool. -In real-time solutions, parity is updated immediately during every write operation without user action. While this ensures the array is constantly protected against hardware failure, it does not allow for the restoration of an earlier state, meaning accidental deletions are propagated instantly. -In snapshot solutions, parity is updated only upon an explicit request, similar to a backup. This creates a fixed point in time that allows to recover files that were accidentally deleted or modified since the last sync. -

-
-
-

Integrity & Bitrot

-

-Silent data corruption, or bitrot, is a major threat where storage devices return corrupted data without reporting hardware errors. Unlike traditional disk failures, this bit-level degradation remains invisible until the data is accessed or an array reconstruction is attempted. -A primary factor in categorizing storage solutions is their support for integrity checksums to detect and repair this corruption. Advanced systems use hashing to verify data blocks, allowing them to identify silent changes even if timestamps remain unaltered and use parity data to reconstruct the original, uncorrupted information. -

-
-
-
+ -
-

Features comparison

- - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + + - - - - - - - - - + + - - - - - - - - - + + - - - - - - - - - + - - - - - - - - - + + - - - - - - - - - + + - - - - - - - - - + - - - - - - - - +RAID 1987 is the date of the paper: +"A Case for Redundant Arrays of Inexpensive Disks (RAID)", David A. Patterson, Garth A. Gibson and Randy H. Katz +http://www.eecs.berkeley.edu/Pubs/TechRpts/1987/5853.html +--> - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - - -
FeatureSnapRAIDUnraidZFSBtrfsStorage Spaces
- Redundancy Model -
Real-time computes parity in real-time like RAID; snapshot computes parity on request, like backups.
-
SnapshotReal-timeReal-time
Snapshot
Real-time
Snapshot
Real-time
More disk failures
If more disks fail than the supported redundancy model, can data on non-failed disks be recovered?
YesYesNoNoNo
- Integrity -
Whether data is validated with a checksum, and the default checksum type.
-
Yes
SpookyHash
128-bit
- No -
- - -
-
Yes
Fletcher4
256-bit
Yes
CRC32C
32-bit
- No -
- - -
-
Power/Noise
How many disks spin when reading a single file?
OneOneAllAllAll
- Fix Silent Errors -
Whether silent errors are detected and fixed before propagating to parity.
-
Yes - No -
- - -
-
- Yes -
- - -
-
- Yes -
- - -
-
No
Filled disks
Can you start with disks that already contain data?
YesYesNoNoNo
Number of Failures -
How many disk failures are supported? 1 for RAID5, 2 for RAID6.
-
1-61-2 - 1-3 -
- - -
-
1-21-2
Add filled disks
Can data disks that already contain data be added later?
YesNo [4]NoNoNo
- More disk failures -
If more disks fail than the supported redundancy model, can data on non-failed disks be recovered?
-
YesYesNoNoNo
- Power/Noise -
How many disks spin when reading a single file?
-
OneOneAllAllAll
Operating system
Which operating systems are supported?
Linux
Windows
macOS
OpenIndiana
Solaris
BSD
LinuxLinux [6]
macOS
OpenIndiana
Solaris
BSD
LinuxWindows
Filled Disks -
Can you start with disks that already contain data?
-
YesYesNoNoNo
Age
Year of the first official release supporting at least RAID5 redundancy.
201120052005Not yet stable [11]2012
Add Filled Disks -
Can data disks that already contain data be added later?
-
Yes - No -
- - -
-
NoNoNo
Operating System -
Which operating systems are supported?
-
Linux, Win, macOS, BSDLinux - Linux, BSD, macOS -
- - -
-
LinuxWindows
Stable Since -
Year of the first official release supporting at least RAID5 redundancy.
-
201120052005 - Unstable -
- - -
-
2012
License / Price -
Software license and cost.
-
GPL3 / FreeProprietary / SubscriptionCDDL / FreeGPL2 / FreeProprietary / Windows
License/Price
Software license and cost.
Open Source GPL3
Free
Open Source GPL2
$49/$109 +$36 yearly, 219$ lifetime
Open Source CDDL
Free
Open Source GPL2
Free
Proprietary
Included with Windows 8/10
Interface -
Which interface is provided? GUI or command line?
-
CLI / GUI / APIGUI / CLI / API - CLI / GUI -
- - -
-
- CLI / GUI -
- - -
-
GUI
-
+Interface
Which interface is provided? GUI or command line? +Command line
Elucidate GUI,
or plugin for OpenMediaVault +Command line
GUICommand line
GUI/Plugins [7]Command line
GUI [10]GUI -
- - -
-
-
-
-
+ - - +

Notes

+ +

+[1] - unRAID lacks native checksums and ignores silent errors. +Even worse, if a parity mismatch is detected due to a silent error in the data, +the parity is automatically recomputed, making it impossible to recover the silent error, even manually. +Integrity checksum plugins do not help in this case, as they are not integrated into the parity-checking process. +To achieve functionality similar to SnapRAID, you would need to use the Btrfs filesystem for all your data disks. +

+ +

+[3] - ZFS and Btrfs provide bit-rot protection comparable to SnapRAID, always verifying data before use. These three solutions represent the state of the art. +
+One drawback of ZFS is that its default Fletcher checksum prioritizes speed over reliability. Although it is a 256-bit checksum, Fletcher is considered weaker than alternatives. Similarly, Btrfs uses CRC32C by default, which is strong but only 32-bit. Better alternatives are "edonr" for ZFS and "xxhash" for Btrfs. In contrast, SnapRAID uses the 128-bit SpookyHash, which offers state-of-the-art checksum quality without sacrificing speed. +
+ZFS also employs a suboptimal RAID-Z3 algorithm that requires roughly twice the computation compared to SnapRAID’s z-parity. +

+ +

+[4] - unRAID 7.2 claims that it can add data disks to an existing array, but in reality, what it actually does is create a new array and rebuild the parity from scratch. +The key difference is that during this process, the data disks already in the array are not protected. +This is a serious flaw, as a full parity rebuild puts considerable stress on all drives. If any disk is near failure, there’s a high risk it could fail during this operation. +With unRAID, the only safe way to add a new data disk to an existing array is to pre-clear it first. +

+ +

+[6] - ZFS is available on Linux at the kernel level via ZFS on Linux. +

+ +

+[7] - ZFS supports external GUIs, such as Napp-it, and plugins for FreeNAS and NAS4Free. +

+ +

+[8] - unRAID can use integrity checksums via plugins like Dynamix File Integrity, or bunker. +However, these are independent of parity processing and not used to aid recovery. +For example, when recovering a single failed disk with dual parity, checksums can identify additional silent errors to facilitate recovery. +To achieve functionality similar to SnapRAID, you would need to use the Btrfs filesystem for all your data disks. +

+ +

+[9] - Storage Spaces can be used with ReFS, which supports integrity checksums, but not in Parity mode: "Although you may select Simple (no resiliency) or Parity, both options will fail the process." +

+ +

+[10] - Btrfs supports external GUIs, such as Rockstor. +

+ +

+[11] - Btrfs has supported RAID5 since 2013, but serious issues in RAID5/6 support were identified. As of 2025, these remain unresolved. The official wiki states: "There are implementation and design deficiencies that make it unreliable for some corner cases. The feature should not be used in production, only for evaluation or testing." +

+ +

+If you believe any information is incorrect or unfair, please report it in the Forum. +

+ +

+

+ +
+ + diff --git a/design.html b/design.html index 06ce4019..b96179f6 100644 --- a/design.html +++ b/design.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID Design - - - - - - + + + + + + + + + + +SnapRAID @@ -36,160 +36,108 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
-
-

Design Philosophy

-
- Simplicity is prerequisite for reliability -
- - Edsger W. Dijkstra - -
- -
-

- SnapRAID was created following the Unix philosophy: - Write programs that do one thing and do it well. -

-
+

+SnapRAID was created following the Unix philosophy: +Write programs that do one thing and do it well. +

-
- -
-

Reliability

-

- The first design principle was reliability. - The result is a simple architecture and an easy to understand implementation. -

-

- Extensive and automated tests with the runtime checker Valgrind - and with the Google Sanitizers - are done to ensure the correctness of the final application. - The test has a code coverage of over 90%, measured with lcov. -

-

- SnapRAID is also verified with Coverity Scan for both the - CLI and the Daemon. - and clang static analyzers, - and with the American Fuzzy Lop fuzzy tester. -

-
+

+The first design principle was reliability. +The result is a simple architecture and an easy to understand implementation, +following the Dijkstra +quote Simplicity is prerequisite for reliability. +

- -
-

Robustness

-

- The second design principle was robustness. - It supports any kind of problem. Even on kernel panics, power-downs - or any other hard failure at runtime, your redundancy data is in safe hands. -

-

- It uses all the possible storage techniques to ensure to always keep consistent - redundancy even after critical interruptions. -

-
+

+Extensive and automated tests with the runtime checker Valgrind +and with the Google Sanitizers +are done to ensure the correctness of the final application. +The test has a code coverage of over 90%, measured with lcov. +

- -
-

Efficiency

-

- The third design principle was efficiency. - It's a native C application highly optimized to ensure maximum throughput of your disk array. -

-

- Integrity checks use the highly efficient murmur3 - and SpookyHash hashes at 128 bits. -

-

- Redundancy computations use a custom RAID library - (based on Linux Kernel RAID) supporting up to six parity levels. - Internal structures use TommyDS. -

-
-
- -
- -
-

Use of Artificial Intelligence

-

- This project is not "vibe-coded". - Artificial intelligence is used strictly as a - precision tool and a pair programmer, never as a substitute for engineering judgment. All architecture - decisions, core logic, and safety guarantees remain under direct human control and review. -

-

- AI was used selectively to accelerate front-end scaffolding, component layout, and alignment with modern UI - standards. All functional behavior, state management, API integration, and system logic were implemented and - manually validated. -

-

- Development follows a human-led, AI-assisted workflow. The developer defines the architecture and writes - the core implementations. AI contributes by exploring design alternatives, surfacing edge cases, suggesting - optimizations, and helping refine documentation. Any generated output is reviewed, revised where necessary, - and hardened before integration. -

-

- This approach improves development efficiency while preserving strict engineering oversight and reliability. -

-
-
- -
+

+SnapRAID is also verified with the +Coverity Scan +and clang static analyzers, +and with the American Fuzzy Lop fuzzy tester. +

- - +

+The second design principle was robustness. +It supports any kind of problem. Even on kernel panics, power-downs +or any other hard failure at runtime, your redundancy data is in safe hands. +
+It uses all the possible storage techniques to ensure to always keep consistent +redundancy even after critical interruptions. +

+ +

+The third design principle was efficiency. +It's a native C application highly optimized using all the +possible OS services to ensure the maximum throughput of your disk array. +

+

+For integrity checks is used the highly efficient murmur3 +and SpookyHash hashes at 128 bits. +For the redundancy computations we use a +RAID library +written from scratch that supports up to six levels of parity delivering top-notch performance. +The library design is originally based, and also binary compatible, +with the Linux Kernel RAID +library made by H. Peter Anvin. +As internal data base it's used the TommyDS library of data structures. +

+ +

+

+ +
+ + + diff --git a/desk-dashboard-light.png b/desk-dashboard-light.png deleted file mode 100644 index 40aae7b2..00000000 Binary files a/desk-dashboard-light.png and /dev/null differ diff --git a/desk-dashboard.png b/desk-dashboard.png deleted file mode 100644 index bde87353..00000000 Binary files a/desk-dashboard.png and /dev/null differ diff --git a/desk-differences-light.png b/desk-differences-light.png deleted file mode 100644 index ec97e3d7..00000000 Binary files a/desk-differences-light.png and /dev/null differ diff --git a/desk-differences.png b/desk-differences.png deleted file mode 100644 index 1d349e39..00000000 Binary files a/desk-differences.png and /dev/null differ diff --git a/desk-disks-light.png b/desk-disks-light.png deleted file mode 100644 index 9b7d9efe..00000000 Binary files a/desk-disks-light.png and /dev/null differ diff --git a/desk-disks.png b/desk-disks.png deleted file mode 100644 index b4503dc7..00000000 Binary files a/desk-disks.png and /dev/null differ diff --git a/desk-recovery-light.png b/desk-recovery-light.png deleted file mode 100644 index dbd213cd..00000000 Binary files a/desk-recovery-light.png and /dev/null differ diff --git a/desk-recovery.png b/desk-recovery.png deleted file mode 100644 index 03a52de7..00000000 Binary files a/desk-recovery.png and /dev/null differ diff --git a/desk-settings-light.png b/desk-settings-light.png deleted file mode 100644 index 31860e3a..00000000 Binary files a/desk-settings-light.png and /dev/null differ diff --git a/desk-settings.png b/desk-settings.png deleted file mode 100644 index dff5ec87..00000000 Binary files a/desk-settings.png and /dev/null differ diff --git a/desk-smart-light.png b/desk-smart-light.png deleted file mode 100644 index 4b7af5d5..00000000 Binary files a/desk-smart-light.png and /dev/null differ diff --git a/desk-smart.png b/desk-smart.png deleted file mode 100644 index 35f866c9..00000000 Binary files a/desk-smart.png and /dev/null differ diff --git a/desk-tasks-light.png b/desk-tasks-light.png deleted file mode 100644 index d0d0b0b4..00000000 Binary files a/desk-tasks-light.png and /dev/null differ diff --git a/desk-tasks.png b/desk-tasks.png deleted file mode 100644 index bfa1de7b..00000000 Binary files a/desk-tasks.png and /dev/null differ diff --git a/download.html b/download.html index 567d6094..5b382014 100644 --- a/download.html +++ b/download.html @@ -1,17 +1,17 @@ - + - - - - - Download SnapRAID - - - - - - + + + + + + + + + + +SnapRAID @@ -36,231 +36,111 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
-

Download SnapRAID

- -
- -

- SnapRAID CLI v14.0 (Released March 2026). -

-

- SnapRAID Daemon v1.1 (Released March 2026). -

- -

- SnapRAID is a Free Software - application released with the GPLv3 license. -

-
-
- -
-

SnapRAID CLI (Command Line Interface)

-

- The classic command line tool. - See the ChangeLog for the detailed list of changes, - and CheckSums for the SHA256 checksums. -

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PlatformVersionDescriptionDownload
Windows14.0Portable executable for Windowssnapraid-14.0-windows-x64.zip
DEB14.0Package for Ubuntu/Debiansnapraid_14.0-1_amd64.deb
RPM14.0Package for RedHat/Fedorasnapraid-14.0-1.x86_64.rpm
PKG14.0Package for Archsnapraid-14.0-1-x86_64.pkg.tar.zst
TXZ14.0Package for Slackwaresnapraid-14.0-x86_64-1_am.txz
Source Code14.0C source code compatible with all Linux distributions and macOSsnapraid-14.0.tar.gz
-

- Old versions are available on GitHub. -

-
+

+Here you can download SnapRAID. +Take care that it's a command line program, without any GUI interface. +If you like to use a GUI, you can try Elucidate. +

- -
-

SnapRAID Daemon (Automation, Web UI, REST API)

- -
- - Warning:The SnapRAID Daemon for Linux requires SnapRAID CLI 14.0+ to be already installed and configured. In contrast, the Windows installer contains both the SnapRAID CLI and the SnapRAID Daemon. On Windows, if you are already using SnapRAID, ensure you install the daemon in the same directory. -
- -
- - Warning:SnapRAID Daemon is currently available only for Linux and Windows. If you are a Mac developer interested in volunteering your expertise to bring the daemon to macOS as an open-source collaborator, we would love to hear from you! -
+ + + + + +
FileDescription
+snapraid-13.0.tar.gz + +Sources for Linux, Mac OS X, BSD, Solaris, OpenIndiana and any other Unix +
+snapraid-13.0-windows-x64.zip + +Binaries for Windows x64 +
+snapraid-13.0-windows-x86.zip + +Binaries for Windows x86 (legacy Windows versions) +
-

- Includes background service and Web UI. - See the ChangeLog for the detailed list of changes, - and CheckSums for the SHA256 checksums. -

+

+See the ChangeLog for the detailed list of changes, +and CheckSums for the SHA256 checksums. +

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PlatformVersionDescriptionDownload
EXE1.1Windows Installer (If the SmartScreen "Blue Box" appears, select "More Info" and then "Run anyway")snapraid-daemon-1.1.exe
DEB1.1Package for Ubuntu/Debiansnapraid-daemon_1.1-1_amd64.deb
RPM1.1Package for RedHat/Fedorasnapraid-daemon-1.1-1.x86_64.rpm
PKG1.1Package for Archsnapraid-daemon-1.1-1-x86_64.pkg.tar.zst
TXZ1.1Package for Slackwaresnapraid-daemon-1.1-x86_64-1_am.txz
Source Code1.1C source code compatible with all Linux distributionssnapraid-daemon-1.1.tar.gz
-

- Old versions are available on GitHub. -

-
+ - -
-

- - Support the Project - -

-

- If you want to show your appreciation, - you can donate with Paypal, - or you can star SnapRAID CLI and star SnapRAID Daemon on GitHub. -

-

- Donations are used to support SnapRAID development, covering costs such as new hardware, internet services, and AI subscriptions -

- Donate via PayPal -
-
-
- - - + + +

+SnapRAID is a Free Software +application released with the GPLv3 license. +

+ +

+If you want to show your appreciation, +you can donate, +or you can star it on GitHub. +Donations are spent on stuffs related to SnapRAID development like to buy new hardware for my PC and internet bills. +

+ +

+

+ +
+ + + diff --git a/email.png b/email.png new file mode 100644 index 00000000..7f657112 Binary files /dev/null and b/email.png differ diff --git a/faq.html b/faq.html index 0431c435..33404226 100644 --- a/faq.html +++ b/faq.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID FAQ - - - - - - + + + + + + + + + + +SnapRAID @@ -36,82 +36,150 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
-

Frequently Asked Questions

-

Common questions about configuration, recovery, and usage.

+

+Frequently Asked Questions for SnapRAID. +

- - +

General

- -
-
-

-General -

-
-

-What is SnapRAID? -

-
+ + + +

Setup

+ + + + +

Configuration

+ + + + +

Use

+ + + + +

Recover

+ + + + +

Tech

+ + + + +

Performance

+ + + + +

Known Problems

+ + + + +

General

+ +

What is SnapRAID?

SnapRAID is an application that creates a partial backup of your disk array. If some disks in your array fail, even if they are completely broken, you can recover their contents. It provides only a partial backup because it does not allow recovery from a failure of the entire array, but only if the number of failed disks is below a predefined limit.

-
-
-
-

-How is it different from RAID? -

-
+ +

How is it different from RAID?

RAID solutions mirror data and propagate changes immediately to the parity data. In this sense, RAID systems are not backups because they do not allow restoration of an earlier state of the array. @@ -124,45 +192,22 @@ For example, with SnapRAID, if you accidentally delete a file, you can easily re Other advantages over traditional RAID5/6 solutions include:

    -
  • -All your data is hashed to ensure data integrity and prevent silent corruption. -
  • -
  • -If too many disks fail to allow recovery, you lose data only on the failed disks; data on other disks remains safe. -
  • -
  • -If you accidentally delete files on a disk, you can recover them. -
  • -
  • -You can start with already filled disks. -
  • -
  • -Disks can have different sizes. -
  • -
  • -You can add disks at any time. -
  • -
  • -It does not lock in your data. You can stop using SnapRAID at any time without needing to reformat or move data. -
  • -
  • -To access a file, only a single disk needs to spin, saving power and reducing noise. -
  • -
  • -You can have up to six parity levels, compared to one for RAID5 and two for RAID6. -
  • +
  • All your data is hashed to ensure data integrity and prevent silent corruption.
  • +
  • If too many disks fail to allow recovery, you lose data only on the failed disks; data on other disks remains safe.
  • +
  • If you accidentally delete files on a disk, you can recover them.
  • +
  • You can start with already filled disks.
  • +
  • Disks can have different sizes.
  • +
  • You can add disks at any time.
  • +
  • It does not lock in your data. You can stop using SnapRAID at any time without needing to reformat or move data.
  • +
  • To access a file, only a single disk needs to spin, saving power and reducing noise.
  • +
  • You can have up to six parity levels, compared to one for RAID5 and two for RAID6.

RAID has advantages, such as better speed due to data striping. The best choice depends on your specific use case.

-
-
-
-

-How is it different from ZFS/Btrfs snapshots and NTFS Shadow Copy? -

-
+ +

How is it different from ZFS/Btrfs snapshots and NTFS Shadow Copy?

SnapRAID creates a file-system snapshot conceptually similar to other snapshot solutions. However, its primary purpose is to recover a disk to its saved state after a complete disk failure. @@ -172,36 +217,19 @@ SnapRAID is more akin to the RAID-Z/RAID functionality of ZFS/Btrfs. Compared to them, SnapRAID offers the following advantages:

    -
  • -If too many disks fail to allow recovery, you lose data only on the failed disks; data on other disks remains safe. -
  • -
  • -You can start with already filled disks. -
  • -
  • -You can add disks at any time (not possible with ZFS, but possible with Btrfs). -
  • -
  • -It does not lock in your data. You can stop using SnapRAID at any time without needing to reformat or move data. -
  • -
  • -To access a file, only a single disk needs to spin, saving power and reducing noise. -
  • -
  • -You can have up to six parity levels, compared to three for ZFS RAID-Z and two for Btrfs RAID-5/6. -
  • +
  • If too many disks fail to allow recovery, you lose data only on the failed disks; data on other disks remains safe.
  • +
  • You can start with already filled disks.
  • +
  • You can add disks at any time (not possible with ZFS, but possible with Btrfs).
  • +
  • It does not lock in your data. You can stop using SnapRAID at any time without needing to reformat or move data.
  • +
  • To access a file, only a single disk needs to spin, saving power and reducing noise.
  • +
  • You can have up to six parity levels, compared to three for ZFS RAID-Z and two for Btrfs RAID-5/6.

ZFS and Btrfs have advantages, such as being real-time solutions. The best choice depends on your specific use case.

-
-
-
-

-How is it different from other backup solutions? -

-
+ +

How is it different from other backup solutions?

With a typical backup solution, you need as much space as the entire disk array for the backup. With SnapRAID, you need only one additional parity disk to recover from the most common case of a single disk failure. @@ -212,567 +240,294 @@ Note that only a full backup allows recovery from a complete failure of the disk making it the preferred solution if you can afford it. SnapRAID is a good option when a full backup is not feasible.

-
-
-
-

-What are the advantages of SnapRAID compared to similar solutions like unRAID, and Windows Storage Spaces? -

-
+ +

What are the advantages of SnapRAID compared to similar solutions like unRAID, and Windows Storage Spaces?

-Visit the - -Compare - -page to see a comparison with other similar solutions. +Visit the Compare page to see a comparison with other similar solutions.

-A key advantage of SnapRAID is its - -integrity and silent error management - -, which is at the same level as (or better than) +A key advantage of SnapRAID is its integrity and silent error management, which is at the same level as (or better than) ZFS and Btrfs file systems. In contrast, unRAID and Windows Storage Spaces lack integrity checks.

-
-
-
-

-How much does it cost? -

-
+ +

How much does it cost?

-Nothing. SnapRAID is a - -free software - -application released under the GPLv3 license. +Nothing. SnapRAID is a free software application released under the GPLv3 license.

-
-
-
-

-How can I get support? -

-
+ +

How can I get support?

-Visit the - -Support - -page. +Visit the Support page.

-
-
-
-

-Does SnapRAID have a GUI? -

-
+ +

Does SnapRAID have a GUI?

-Yes, SnapRAID Daemon includes a web GUI. -There is also an external GUI called - -Elucidate - -, -and a plugin for - -OpenMediaVault - -. +No, SnapRAID is a command-line application. +However, there is an external GUI called Elucidate, +and a plugin for OpenMediaVault.

-
-
-
-

-Does SnapRAID provide encryption or virtual views/storage pooling? -

-
+ +

Does SnapRAID provide encryption, virtual views/storage pooling, SMART monitoring, or power control?

SnapRAID provides a basic virtual views/storage pooling solution but is also compatible with other pooling solutions.

-For encryption and data recovery, you can use other tools. +For encryption, SMART monitoring, power control, and data recovery, you can use other tools. Here are some suggestions:

+ - - - - - - + - + - - + - - + + + + + + + + + + +
LinuxWindowsMac OS X
- -Linux - -Windows - -Mac OS X -
Encryption -Encryption +dm-crypt/LUKS
+(tutorial)
- - dm-crypt/LUKS - -
-( - - tutorial - -) -
- - VeraCrypt - +VeraCrypt
Virtual views/storage pooling -Virtual views/storage pooling +mergerfs +(tutorial), +Greyhole - - mergerfs - -( - - tutorial - -), - - Greyhole - - - - DrivePool ($) - +DrivePool ($)
-Data recovery +SMART monitoringsmartmontools, +GSmartControl - - ddrescue - -, - - safecopy - -, - - dd_rescue - +smartmontools, +GSmartControl, +CrystalDiskInfo +smartmontools, +GSmartControl, +SMARTReporter
Power controlhdparmhdparm
Data recovery +ddrescue, +safecopy, +dd_rescue
-
-
-
-

-Is SnapRAID suitable for backing up the home/My Documents directory? -

-
+ +

Is SnapRAID suitable for backing up the home/My Documents directory?

No. If you have a limited amount of data that can be easily saved to an external USB drive or an online backup service, using SnapRAID is unnecessary. -SnapRAID is best suited for backing up a - -very large - -amount of data, +SnapRAID is best suited for backing up a very large amount of data, such as many terabytes, where a full backup copy is not feasible.

-
-
-
-

-Is SnapRAID suitable for backing up the boot OS disk? -

-
+ +

Is SnapRAID suitable for backing up the boot OS disk?

No. For the disk used to boot your machine and containing the OS files, it’s better to use another solution, such as RAID1 or a mirror copy. SnapRAID requires an operating system to run and cannot recover the OS if it is missing.

-
-
-
-

-Can SnapRAID hash files without parity computation? -

-
+ +

Can SnapRAID hash files without parity computation?

No, SnapRAID cannot be used solely to hash files. Its hashing is designed to work in combination with parity computation and is not optimized for hashing alone.

For a list of file verification tools, see: - -Wikipedia: Comparison of file verification software - -. +Wikipedia: Comparison of file verification software.

+ +

Setup

+

-For a setup example in Ubuntu 14.04, see - -Zack's SnapRAID tutorial - -. +For a setup example in Ubuntu 14.04, see Zack's SnapRAID tutorial.

-
-
-
-
-

-Setup -

-
-

-Do I need one or more parity disks? -

-
+ +

Do I need one or more parity disks?

As a rule of thumb, use one parity disk (RAID5) for up to four data disks, and then add one parity disk for each group of seven data disks, as shown in the table:

+ + - - + + - - + + - - + + - - + + - - + + - - - - - - + +
ParitiesData disks
-Parities - -Data disks -1/Single Parity/RAID52–4
-1/Single Parity/RAID5 - -2–4 -2/Double Parity/RAID65–14
-2/Double Parity/RAID6 - -5–14 -3/Triple Parity15–21
-3/Triple Parity - -15–21 -4/Quad Parity22–28
-4/Quad Parity - -22–28 -5/Penta Parity29–35
-5/Penta Parity - -29–35 -
-6/Hexa Parity - -36–42 -6/Hexa Parity36–42
+

This table accounts for the fact that more parity levels help recover from an unsynced array and that disk failures may be correlated if all disks are in the same environment.

Multiple failures can occur. The worst case reported in SnapRAID’s history -is a - -four-disk failure, successfully recovered using four parities - -. +is a four-disk failure, successfully recovered using four parities.

For more information on parity levels and disk failure rates, see: - -Why RAID 5 stops working in 2009 - -, - -Why RAID 6 stops working in 2019 - -, - -Does RAID 6 stop working in 2019? - -, - -Triple-Parity RAID and Beyond - -, - -How long do disk drives last? - -. +Why RAID 5 stops working in 2009, +Why RAID 6 stops working in 2019, +Does RAID 6 stop working in 2019?, +Triple-Parity RAID and Beyond, +How long do disk drives last?.

-
-
-
-

-Which file system is recommended for SnapRAID? -

-
+ +

Which file system is recommended for SnapRAID?

For data disks, consider these suggestions:

+ + - - + + - - - - - - + +Note that multiple Btrfs snapshots are not supported. - - + + - - + + - - + +
DataResult
-Data - -Result -AnyOK. You can generally use any file system you prefer, with some exceptions noted below.
-Any - -OK. You can generally use any file system you prefer, with some exceptions noted below. -
-Btrfs - -OK. Ensure SnapRAID is built with the libblkid library for UUID support. +BtrfsOK. Ensure SnapRAID is built with the libblkid library for UUID support. You will be warned at each run if this is not the case. -Note that multiple Btrfs snapshots are not supported. -
-ZFS - -Partial. UUID support is unavailable, but core SnapRAID functionalities remain usable. -Note that multiple ZFS snapshots are not supported. -ZFSPartial. UUID support is unavailable, but core SnapRAID functionalities remain usable. +Note that multiple ZFS snapshots are not supported.
-FAT - -Uncertain. There are - - reports - -of duplicate inode cases. NTFS is significantly faster and recommended instead. -FATUncertain. There are reports +of duplicate inode cases. NTFS is significantly faster and recommended instead.
-ReFS - -No. ReFS uses - - 128-bit inodes - -, -which SnapRAID does not yet support. -ReFSNo. ReFS uses 128-bit inodes, +which SnapRAID does not yet support.
+

For parity disks, consider these suggestions:

+ + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - + +
ParityResult
-Parity - -Result -ext4OK if disks are not larger than 16 TB. The parity is stored in a single large file, and ext4 has a 16 TB file size limit.
-ext4 - -OK if disks are not larger than 16 TB. The parity is stored in a single large file, and ext4 has a 16 TB file size limit. -XFSOK
-XFS - -OK -BtrfsOK. Ensure SnapRAID is built with the libblkid library for UUID support. +You will be warned at each run if this is not the case.
-Btrfs - -OK. Ensure SnapRAID is built with the libblkid library for UUID support. -You will be warned at each run if this is not the case. -JFSNo. It does not support the fallocate() command needed to allocate parity files. +It also does not optimally implement the posix_fadvise() command.
-JFS - -No. It does not support the - - fallocate() - -command needed to allocate parity files. -It also does not optimally implement the - - posix_fadvise() - -command. -NTFSOK in Windows. Not supported in Linux, as it does not support the fallocate() command needed to allocate parity files. +You can use it if the parity disk contains only the parity file.
-NTFS - -OK in Windows. Not supported in Linux, as it does not support the - - fallocate() - -command needed to allocate parity files. -You can use it if the parity disk contains only the parity file. -FATNo. Files larger than 4 GB cannot be stored. It is also not journaled. Use NTFS instead.
-FAT - -No. Files larger than 4 GB cannot be stored. It is also not journaled. Use NTFS instead. -
-HFS+ - -OK -HFS+OK
+

-In Linux, to maximize space for the parity file system, format it with the - --m 0 -T largefile4 - -options, like: +In Linux, to maximize space for the parity file system, format it with the -m 0 -T largefile4 options, like:

mkfs.ext4 -m 0 -T largefile4 DEVICE

On an 8 TB disk, this can save about 400 GB. It is also expected to be as fast as, or faster than, the default.

-
-
-
-

-Which hardware configuration is recommended? -

-
+ +

Which hardware configuration is recommended?

For optimal performance, connect all disks via SATA, not USB.

-See - -Raj's Prototype Builds - +See Raj's Prototype Builds for examples of hardware setups.

-For choosing hard drives, refer to - -Backblaze's What Hard Drive Should I Buy? - -and - -Backblaze's Enterprise Drives: Fact or Fiction? - -. +For choosing hard drives, refer to Backblaze's What Hard Drive Should I Buy? +and Backblaze's Enterprise Drives: Fact or Fiction?.

-
-
-
-

-Is a multi-core CPU recommended? -

-
+ +

Is a multi-core CPU recommended?

No. SnapRAID is typically not CPU-bound; the limiting factor is disk read performance. A single-core CPU is usually sufficient.

-For example, in my system, I achieve a combined read speed of 600 MiB/s, +For example, in my system, I achieve a combined read speed of 400 MiB/s, but SnapRAID can hash at 12,000 MiB/s on a single core.

-
-
-
-

-Is a 64-bit operating system recommended? -

-
+ +

Is a 64-bit operating system recommended?

Yes. SnapRAID performs better on a 64-bit operating system, as it can access more than 4 GiB of memory and use faster hashing and parity algorithms. However, for less than 30 TB of data, it performs well on a 32-bit operating system too.

-
-
-
-

-How much memory does SnapRAID require to run? -

-
+ +

How much memory does SnapRAID require to run?

Approximately, SnapRAID requires 1 GiB of memory for every 16 TB of data.

@@ -788,56 +543,25 @@ However, a larger block size increases wasted space in parity files.

Running with memory swapped to disk is not recommended, as it significantly slows performance.

-
-
-
-

-Should I check the SMART attributes of my disks? -

-
+ +

Should I check the SMART attributes of my disks?

Yes. Approximately 20% of disks fail within four years, as -reported by - -Backblaze's How long do disk drives last? - -. +reported by Backblaze's How long do disk drives last?. Monitoring SMART attributes can help anticipate failures and prevent data loss.

If any of the SMART attributes - -Reallocated_Sector_Ct (5) - -, - -Reported_Uncorrect (187) - -, - -Command_Timeout (188) - -, - -Current_Pending_Sector (197) - -, -or - -Offline_Uncorrectable (198) - +Reallocated_Sector_Ct (5), +Reported_Uncorrect (187), +Command_Timeout (188), +Current_Pending_Sector (197), +or Offline_Uncorrectable (198) are non-zero, replace the disk, as recommended by - -Backblaze's Hard Drive SMART Stats - -. +Backblaze's Hard Drive SMART Stats.

-See also - -Google's Failure trends in a large disk drive population - -, +See also Google's Failure trends in a large disk drive population, which found:

After the first reallocation, drives are
@@ -852,27 +576,11 @@ counts.
21 times higher chances of failure within 60 days than drives without offline reallocations.

-These findings recommend replacing a disk after the first error in the SMART attributes - -Reallocated_Sector_Ct (5) - -, - -Current_Pending_Sector (197) - -, or - -Offline_Uncorrectable (198) - -. +These findings recommend replacing a disk after the first error in the SMART attributes Reallocated_Sector_Ct (5), +Current_Pending_Sector (197), or Offline_Uncorrectable (198).

-
-
-
-

-Is it possible to use SnapRAID in a dual-boot configuration, such as Windows and Linux? -

-
+ +

Is it possible to use SnapRAID in a dual-boot configuration, such as Windows and Linux?

Yes, SnapRAID can be used in a dual-boot configuration, regardless of the OS combination.

@@ -881,18 +589,10 @@ It is recommended to run SnapRAID from only one OS. While it may work if run from both OSes, this scenario is not thoroughly tested and risks issues due to different SnapRAID versions, configurations, or content files.

-
-
-
-
-

-Configuration -

-
-

-What is the SnapRAID 'content' file? -

-
+ +

Configuration

+ +

What is the SnapRAID 'content' file?

The content file stores the list of all files in your array, including their checksums, timestamps, and other necessary information.

@@ -900,26 +600,16 @@ The content file stores the list of all files in your array, including their che This file will be approximately a few GiB in size, depending on the array’s size. For 10 TB of data, the content file will be about 500 MiB.

-
-
-
-

-What are the SnapRAID 'parity' and 'N-parity' files? -

-
+ +

What are the SnapRAID 'parity' and 'N-parity' files?

These files store the parity data used for recovery.

Their size grows to match the largest amount of data stored on any single disk in the array.

-
-
-
-

-How do I configure SAMBA to share the pool directory? -

-
+ +

How do I configure SAMBA to share the pool directory?

To configure SAMBA to share the pool directory (e.g., /pool), add the following options to your /etc/samba/smb.conf: @@ -936,82 +626,32 @@ read only = yes guest ok = yes wide links = yes -

-
-
-

-How can I use more disks than available drive letters in Windows? -

-
+ +

How can I use more disks than available drive letters in Windows?

-Use - -Volume Mount Points - -to mount a disk in a directory without +Use Volume Mount Points to mount a disk in a directory without using a drive letter, similar to Linux.

-
-
-
-
-

-Use -

-
-

-What are the most important steps to prevent data loss? -

-
+ +

Use

+ +

What are the most important steps to prevent data loss?

To minimize the risk of data loss, follow these steps:

    -
  • -Before running the first "sync", test your RAM with a program -like - -MemTest86 - -. -Faulty RAM is the most common cause of data loss with SnapRAID. -
  • -
  • -Run the "sync" command frequently, from once a day to once a week. -
  • -
  • -Run the "scrub" command weekly. -
  • -
  • -Use - -smartmontools - -or a similar utility +
  • Before running the first "sync", test your RAM with a program +like MemTest86. +Faulty RAM is the most common cause of data loss with SnapRAID.
  • +
  • Run the "sync" command frequently, from once a day to once a week.
  • +
  • Run the "scrub" command weekly.
  • +
  • Use smartmontools or a similar utility to monitor SMART attributes. -Replace a disk at the first sign of - -Reallocated_Sector_Ct - -, - -Current_Pending_Sector - -, or - -Offline_Uncorrectable - -, -even if it still functions. -
  • +Replace a disk at the first sign of Reallocated_Sector_Ct, Current_Pending_Sector, or Offline_Uncorrectable, +even if it still functions.
-
-
-
-

-How can I add a data disk to an existing array? -

-
+ +

How can I add a data disk to an existing array?

To add a new data disk to the array, add the new "disk" option in the configuration file, then run a "sync" command: @@ -1022,44 +662,26 @@ snapraid sync

If the disk is empty, the "sync" command will complete immediately.

-
-
-
-

-How can I remove a data disk from an existing array? -

-
+ +

How can I remove a data disk from an existing array?

To remove a data disk from the array, follow these steps:

    -
  • -Change the related "disk" option in the configuration file to point to an empty directory. -
  • -
  • -Remove any "content" option pointing to that disk from the configuration file. -
  • -
  • -Run a "sync" command with the "-E, --force-empty" option: +
  • Change the related "disk" option in the configuration file to point to an empty directory.
  • +
  • Remove any "content" option pointing to that disk from the configuration file.
  • +
  • Run a "sync" command with the "-E, --force-empty" option:
     snapraid sync -E
     
    -The "-E" option allows SnapRAID to proceed even when detecting an empty disk. -
  • -
  • -After the "sync" command completes, remove the "disk" option from the configuration file. -
  • +The "-E" option allows SnapRAID to proceed even when detecting an empty disk. +
  • After the "sync" command completes, remove the "disk" option from the configuration file.

The array will then have no reference to the removed disk.

-
-
-
-

-How can I add or remove a parity disk in an existing array? -

-
+ +

How can I add or remove a parity disk in an existing array?

To add a new parity level, add the appropriate "N-parity" option in the configuration file, then run the "sync" command with the "-F, --force-full" option: @@ -1080,13 +702,8 @@ To remove a parity level, remove the highest "N-parity" option from the configur

Note that after removing a parity file, it cannot be reused, as it becomes outdated after the next "sync" command.

-
-
-
-

-How can I verify a single data disk? -

-
+ +

How can I verify a single data disk?

The "scrub" command verifies the entire array and cannot be limited to a single data disk. To verify only one data disk, use the "check" audit command with the disk specified: @@ -1098,13 +715,8 @@ snapraid check -a -d DISK_NAME This command verifies the checksums of all files on the specified disk. Other data and parity disks are not read or verified.

-
-
-
-

-How can I replace a data disk? -

-
+ +

How can I replace a data disk?

If the disk is lost, refer to the recovery section in the manual. Otherwise, copy all files to the new disk, maintaining the same directory structure and names. @@ -1148,13 +760,8 @@ Finally, run "sync" to update the SnapRAID state. This command will complete alm

 snapraid sync
 
-
-
-
-

-How can I replace a parity disk? -

-
+ +

How can I replace a parity disk?

If the disk is still accessible, ensure the array is synced by running:

@@ -1171,11 +778,7 @@ Run "sync" again to make SnapRAID recognize the new disk. This command will comp snapraid sync

-In Linux, a good copy command is - -ddrescue - -. For example: +In Linux, a good copy command is ddrescue. For example:

 ddrescue /OLD_DISK/parity /NEW_DISK/parity /tmp/copy.log
@@ -1193,71 +796,37 @@ If the parity file is partially damaged or lost, use the "fix" command with the
 
 snapraid fix -d PARITY_NAME
 
-
-
-
-

-How can I safely move files from one disk to another? -

-
+ +

How can I safely move files from one disk to another?

To safely move files between data disks in the array, follow these steps:

    -
  • -Copy the files to the new location. -
  • -
  • -Run a 'diff' command to verify that the copied files are identified as 'copy'. -
  • -
  • -Run a 'sync' command. -
  • -
  • -Delete the files from the original location. -
  • -
  • -Run another 'sync' command. -
  • +
  • Copy the files to the new location.
  • +
  • Run a 'diff' command to verify that the copied files are identified as 'copy'.
  • +
  • Run a 'sync' command.
  • +
  • Delete the files from the original location.
  • +
  • Run another 'sync' command.

This process ensures that, even if disks fail during the sync process, you can recover all data. It also verifies that the hashes of moved files match the originals.

-
-
-
-

-Can I defragment data and parity disks? -

-
+ +

Can I defragment data and parity disks?

Yes, defragmentation does not affect SnapRAID.

-
-
-
-

-How can I make SnapRAID less resource-intensive for other processes? -

-
+ +

How can I make SnapRAID less resource-intensive for other processes?

-In Linux, use the - -ionice - -command with idle priority, like: +In Linux, use the ionice command with idle priority, like:

 ionice -c 3 snapraid sync
 
-
-
-
-

-How can I upgrade to a newer version of SnapRAID? -

-
+ +

How can I upgrade to a newer version of SnapRAID?

To upgrade, replace the old SnapRAID executable with the new one. The new version will use your existing configuration, content, and parity files. @@ -1270,18 +839,10 @@ The content file is updated to the new format the next time it is written, if ne Downgrading to an older SnapRAID version is generally not possible. If the old version cannot read the new content file, you will receive an appropriate message.

-
-
-
-
-

-Recover -

-
-

-How can I undelete a recently deleted file? -

-
+ +

Recover

+ +

How can I undelete a recently deleted file?

Run the "fix" command with a filter for the specified file, like:

@@ -1300,24 +861,14 @@ To undelete all missing files, use:
 snapraid fix -m
 
-
-
-
-

-What happens if I add files and a disk fails before updating parity with "sync"? -

-
+ +

What happens if I add files and a disk fails before updating parity with "sync"?

Files added to the failed disk after the last "sync" command are lost. All other data is safe and can be recovered.

-
-
-
-

-What happens if I delete files and a disk fails before updating parity with "sync"? -

-
+ +

What happens if I delete files and a disk fails before updating parity with "sync"?

In the worst case, files deleted or modified on non-failed disks may prevent recovery of an equivalent amount of data on the failed disk. For example, deleting 10 GB of data may prevent recovery of 10 GB from the failed disk. @@ -1334,25 +885,15 @@ If a disk fails during the "sync", run the "fix" command, specifying the locatio

 snapraid fix -i dir_of_deleted_files
 
-
-
-
-

-What happens if a disk fails during a "sync"? -

-
+ +

What happens if a disk fails during a "sync"?

You can still recover data. In the worst case, you can recover as much data as if the disk failed before the "sync". If the "sync" process has progressed, SnapRAID uses the partially synced data to recover more. Using the "autosave" configuration option saves intermediate content files during the sync process, improving recovery.

-
-
-
-

-What are "data errors" in "sync", and how do I fix them? -

-
+ +

What are "data errors" in "sync", and how do I fix them?

 Syncing...
 309505: Data error for file d4/data/index.db at position 40960
@@ -1372,22 +913,14 @@ snapraid -e fix
 

If errors occur in multiple files, check for hardware issues. -Test your PC’s memory with a tool like - -MemTest86 - -. +Test your PC’s memory with a tool like MemTest86. Also, check disk cabling and CPU temperature.

Another possibility is that a program modified files without updating their timestamps. In Linux, this is rare, except for memory-mapped files not yet closed. In Windows, timestamps are guaranteed to update only after closing a file. -See - -MSDN WriteFile() - -: +See MSDN WriteFile():

 When writing to a file, the last write time is not fully updated until
@@ -1398,11 +931,7 @@ to the file.
 

For memory-mapped files in Windows, the program must manually update the timestamp, as Windows does not do so automatically. -See - -MSDN CreateFileMapping() - -: +See MSDN CreateFileMapping():

 When modifying a file through a mapped view, the last modification timestamp
@@ -1412,13 +941,8 @@ to set the timestamp.
 

To avoid these issues in Windows, run "sync" when no programs are accessing files in the array.

-
-
-
-

-How can I store all messages from a check or fix command in a file? -

-
+ +

How can I store all messages from a check or fix command in a file?

Use the "-l" option to generate a log file:

@@ -1427,85 +951,44 @@ snapraid check -l mylog.log

These log files can be large, potentially several GB. If too large for your editor, -use - -HxD - -. +use HxD.

-
-
-
-

-How can I recover the snapraid.conf file? -

-
+ +

How can I recover the snapraid.conf file?

Use the "-C, --gen-conf" command to generate a template configuration file compatible with your content file. Manual adjustments are needed to set disk mount points, but comments in the file provide guidance:

-snapraid -C snapraid.content > snapraid.conf.new
+snapraid -C snapraid.content > snapraid.conf.new
 
-
-
-
-
-

-Tech -

-
-

-If the SnapRAID "check" command reports everything is OK, is it really OK? -

-
+ +

Tech

+ +

If the SnapRAID "check" command reports everything is OK, is it really OK?

Yes. SnapRAID verifies all files with a 128-bit checksum. If it reports they are correct, they are.

-
-
-
-

-What integrity checksum does SnapRAID use? -

-
+ +

What integrity checksum does SnapRAID use?

-SnapRAID uses - -Murmur3 - -and - -SpookyHash - -128-bit hashes. +SnapRAID uses Murmur3 and SpookyHash 128-bit hashes. Murmur3 is the default on 32-bit platforms, and SpookyHash is the default on 64-bit platforms.

-
-
-
-

-Why are integrity checksums important? -

-
+ +

Why are integrity checksums important?

Integrity checksums detect silent errors when a hard drive returns corrupt data without reporting an error.

For an introduction to this issue, see: - -Data corruption is worse than you know - -. +Data corruption is worse than you know.

For a detailed analysis, see: - -An Analysis of Data Corruption in the Storage Stack - -: +An Analysis of Data Corruption in the Storage Stack:

 A significant number (8% on average) of corruptions
@@ -1513,13 +996,8 @@ are detected during RAID reconstruction, creating the
 possibility of data loss. In this case, protection against
 double disk failures is necessary to prevent data loss.
 
-
-
-
-

-How can SnapRAID recover if a disk fails during a 'sync'? -

-
+ +

How can SnapRAID recover if a disk fails during a 'sync'?

Before starting a sync, SnapRAID saves a special content file describing both the pre- and post-sync states. This allows SnapRAID to attempt two recovery strategies. @@ -1531,13 +1009,8 @@ If this fails, it assumes the parity was not yet updated, ignoring any new files

Using double parity improves recovery when there are overlapping changes in the array.

-
-
-
-

-Can I access data disks during a 'sync'? -

-
+ +

Can I access data disks during a 'sync'?

Yes, you can safely read from data disks during a 'sync'.

@@ -1548,13 +1021,8 @@ the process continues, skipping the written part.

This may affect potential recovery, but it is equivalent to writing just after the 'sync' completes.

-
-
-
-

-Does SnapRAID retry reads or writes if a disk fails? -

-
+ +

Does SnapRAID retry reads or writes if a disk fails?

No, SnapRAID does not retry disk operations. It reports errors and attempts to continue. After 100 errors, it stops execution. @@ -1573,24 +1041,14 @@ For "fix" and "check" commands, you can resume from the point of interruption us

For the "sync" command, the latest state is saved before termination, so restarting it will continue from where it stopped.

-
-
-
-

-What is the snapraid.content.lock file? -

-
+ +

What is the snapraid.content.lock file?

This file is used by SnapRAID to check if another instance is running. It is created where the first content file is stored.

-
-
-
-

-What does the notice about zero sub-second timestamps mean? -

-
+ +

What does the notice about zero sub-second timestamps mean?

In the 'status' command, you may see:

@@ -1608,18 +1066,10 @@ While not a problem, this may limit SnapRAID’s ability to detect moved or copi

You can set sub-second timestamps to a random value using the 'touch' command, which does not modify the second part of the timestamp.

-
-
-
-
-

-Performance -

-
-

-What is the optimal hardware configuration for the best performance? -

-
+ +

Performance

+ +

What is the optimal hardware configuration for the best performance?

The most critical factor is using (E)SATA connections for all disks to avoid controller slowdowns. Avoid USB disks. @@ -1632,26 +1082,16 @@ After a sync, SnapRAID displays statistics with wait times for each disk, helpin Finally, a fast CPU can improve performance with many disks. Check CPU usage during sync operations to determine if it’s a limiting factor.

-
-
-
-

-What is the optimal block size for the best performance? -

-
+ +

What is the optimal block size for the best performance?

The default block size is typically optimal.

Increasing it may not improve performance and could reduce it in some cases.

-
-
-
-

-What is the optimal Linux read-ahead size for the best performance? -

-
+ +

What is the optimal Linux read-ahead size for the best performance?

The default Linux read-ahead size of 128 KiB is optimal for SnapRAID’s default block size of 256 KiB. If using a larger block size, set the read-ahead size to at least half the SnapRAID block size. @@ -1660,51 +1100,13 @@ If using a larger block size, set the read-ahead size to at least half the SnapR For example, with a SnapRAID block size of 512 KiB, configure a read-ahead size of 256 KiB for sdX using:

-echo 256 > /sys/block/sdX/queue/read_ahead_kb
+echo 256 > /sys/block/sdX/queue/read_ahead_kb
 

For a SnapRAID block size smaller than 256 KiB, use the default read-ahead size.

-
-
-
-

-Why are SnapRAID sync and scrub faster than fix and check? -

-
-

-Yes, fix and check are typically slower than sync and scrub in SnapRAID. -

-

-The main reason is how each command accesses and processes the disks. -sync and scrub use a multithreaded implementation, with one thread per data disk (plus handling for parity). -This allows SnapRAID to read from multiple disks in parallel and squeeze out the maximum possible performance from your array. -

-

-Something similar could be done for fix and check, but SnapRAID deliberately takes a more conservative approach here. -When you run fix, you're usually in a recovery situation (bad blocks, missing data, failed disk, silent corruption detected during scrub/sync, etc.). -

-

-Pushing the system (and potentially marginal/failing drives) to maximum I/O limits during an active repair isn't ideal. -It could increase the risk of additional timeouts, errors, or stressing hardware that's already showing issues. -Reliability and safe recovery take priority over raw speed. -

-

-That said, there is still some parallelism in fix and check anyway: SnapRAID provides the operating system with the necessary hints (like read-ahead requests) to allow efficient prefetching of disk data, helping the OS optimize sequential reads where possible. -

-

-In short: sync and scrub are optimized for speed while staying safe. -fix and check are intentionally more cautious to protect your data when it matters most. -

-
-
- -
-

-How fast are the hash and parity computations? -

-
+

How fast are the hash and parity computations?

Murmur3 hash is very fast on 32-bit systems, and SpookyHash is even faster on 64-bit systems. Parity computation is efficient up to double parity, even without SSE support. @@ -1718,8 +1120,8 @@ Check your values with the -T option:

 root@redstar:/root# snapraid -T
-snapraid v14.0 by Andrea Mazzoleni, https://www.snapraid.it
-Compiler gcc 11.2.0
+snapraid v13.0 by Andrea Mazzoleni, http://www.snapraid.it
+Compiler gcc 15.2.0
 CPU GenuineIntel, family 6, model 165, flags sse2 ssse3 crc32 avx2
 Memory is little-endian 64-bit
 Support nanosecond timestamps with futimens()
@@ -1730,47 +1132,39 @@ The reported values are the aggregate bandwidth of all data blocks in MB/s,
 not counting parity blocks.
 
 Memory write speed using the C memset() function:
-  memset   61338
+  memset   61914
 
 CRC used to check the content file integrity:
-   table    1665
-   intel   12488
+   table    1866
+   intel   12741
 
 Hash used to check the data blocks integrity:
-            best murmur3 spooky2   metro museair
-    hash spooky2    6172   18024   20752   29206
+            best murmur3 spooky2   metro
+    hash spooky2    6285   17813   20684
 
 RAID functions used for computing the parity with 'sync':
             best    int8   int32   int64    sse2   sse2e   ssse3  ssse3e    avx2   avx2e
-    gen1    avx2           19147   34378   62743                           78638
-    gen2    avx2            5303    9850   26288   26926                   45010
-    genz   avx2e            3086    4950   14319   13838                           25299
-    gen3   avx2e    1278                                   13042   14120           27155
-    gen4   avx2e     960                                    9895   11008           21764
-    gen5   avx2e     784                                    7960    8713           17174
-    gen6   avx2e     652                                    6502    7502           14638
+    gen1    avx2           24995   46562   62683                           77069
+    gen2    avx2            8243   15879   25788   27292                   44907
+    genz   avx2e            5509   10588   14485   13920                           25175
+    gen3   avx2e    1190                                   13201   14307           27268
+    gen4   avx2e     914                                   10061   11006           21328
+    gen5   avx2e     746                                    7970    8828           17040
+    gen6   avx2e     630                                    6627    7516           14584
 
 RAID functions used for recovering with 'fix':
             best    int8   ssse3    avx2
-    rec1    avx2    1602    3942    4301
-    rec2    avx2     698    1731    2224
-    rec3    avx2     166     908    1391
-    rec4    avx2     108     607     973
-    rec5    avx2      76     421     694
-    rec6    avx2      57     313     532
+    rec1    avx2    1626    3949    4331
+    rec2    avx2     709    1738    2231
+    rec3    avx2     170     922    1414
+    rec4    avx2     110     614     981
+    rec5    avx2      79     426     705
+    rec6    avx2      58     316     539
 
-
-
-
-
-

-Known Problems -

-
-

-Why does my machine reboot or crash while SnapRAID is running? -

-
+ +

Known Problems

+ +

Why does my machine reboot or crash while SnapRAID is running?

SnapRAID pushes the system to extreme conditions, which may expose latent hardware or driver issues, resulting in a system crash or reboot. @@ -1782,37 +1176,16 @@ as SnapRAID is a standard user application that cannot crash or reboot the syste

Check the following:

    -
  • -Test system memory with - - MemTest86 - -. -
  • -
  • -Verify hard drive cabling. -
  • -
  • -Ensure the power supply can support all hard drives spinning simultaneously. -
  • -
  • -Check that the system temperature is not too high. -
  • -
  • -Update storage-related system drivers. -
  • -
  • -Review system logs or Event Viewer for clues about the issue. -
  • +
  • Test system memory with MemTest86.
  • +
  • Verify hard drive cabling.
  • +
  • Ensure the power supply can support all hard drives spinning simultaneously.
  • +
  • Check that the system temperature is not too high.
  • +
  • Update storage-related system drivers.
  • +
  • Review system logs or Event Viewer for clues about the issue.

-
-
-
-

-Why does SnapRAID abort without an error message in Linux? -

-
+ +

Why does SnapRAID abort without an error message in Linux?

This is likely due to insufficient free memory, causing the Linux out-of-memory (OOM) killer to terminate SnapRAID for using too much memory. @@ -1824,13 +1197,8 @@ free -m

If memory is low, install more memory in the machine.

-
-
-
-

-Why do I get the error 'Failed to grow parity file 'xxx' to size xxx due to lack of space' during 'sync'? -

-
+ +

Why do I get the error 'Failed to grow parity file 'xxx' to size xxx due to lack of space' during 'sync'?

This error indicates that SnapRAID needs to expand the parity file to a size that exceeds the available space on the parity disk.

@@ -1847,13 +1215,8 @@ mkfs.ext4 -m 0 -T largefile4 DEVICE

The '-T largefile4' and '-m 0' options provide more space for the parity file.

-
-
-
-

-Why do I get the error 'Internal inode xxx inconsistency...'? -

-
+ +

Why do I get the error 'Internal inode xxx inconsistency...'?

This error occurs when SnapRAID detects two different files using the same inode, a condition that should theoretically never happen but can occur in specific cases. @@ -1864,20 +1227,11 @@ Renaming, deleting, or recreating files during SnapRAID operation can cause inod

If using a FAT file system in Windows, convert to NTFS. -Although inodes (FileIndex) are theoretically - -unique in FAT - -, +Although inodes (FileIndex) are theoretically unique in FAT, this issue has been observed in practice.

-
-
-
-

-Why do I get the error 'Data change at file...' with .xls files? -

-
+ +

Why do I get the error 'Data change at file...' with .xls files?

Excel modifies .xls files upon opening, even without saving, to store the name of the last user who accessed the file. This allows it to warn if another user tries to open the file simultaneously. @@ -1889,52 +1243,44 @@ WARNING! Unexpected data modification of a file without parity!

To work around this, see - -How to prevent Excel from modifying the file on exit? - -, +How to prevent Excel from modifying the file on exit?, or switch to the .xlsx format.

-
-
-
-

-Why are VeraCrypt containers never saved? -

-
+ +

Why are VeraCrypt containers never saved?

-VeraCrypt (a fork of TrueCrypt) has a default option, - -Preserve modification timestamp of file containers - -, +VeraCrypt (a fork of TrueCrypt) has a default option, Preserve modification timestamp of file containers, that prevents SnapRAID and other backup programs from detecting changes to file containers. Disable this option in VeraCrypt.

-
-
-
-
- -
-
+

+

- - +
+ + diff --git a/github.png b/github.png new file mode 100644 index 00000000..c9cb7a38 Binary files /dev/null and b/github.png differ diff --git a/index.html b/index.html index b26e03f9..4001b2b8 100644 --- a/index.html +++ b/index.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID - - - - - - + + + + + + + + + + +SnapRAID @@ -36,304 +36,101 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
- - - -
-
-

Intelligent Redundancy
for Your Disk Array

-

- SnapRAID combines the safety of RAID with the convenience of backups. - Now with real-time health monitoring and automation via the new SnapRAID Daemon. -

- -
-
- - -
-
-
-
-

What is SnapRAID?

-

- SnapRAID is a powerful backup and redundancy program designed for disk arrays. It stores parity information (a special type of mathematical backup) that allows you to fully recover your data even if you experience up to six simultaneous disk failures. -

-

- It is primarily intended for home media centers and large storage arrays containing files that don't change frequently (like movies, music, and photo archives). It offers the high-end protection of a professional server but with the simplicity and flexibility of a home computer. -

-
- -
-
-
-
-
-
-
-
$ snapraid sync
-
Loading state from /db/snapraid.content...
-
Scanning...
-
Initializing...
-
Resizing...
-
Syncing...
-
-
-
-
-
- - - -
-
-

Why Choose SnapRAID?

-

- SnapRAID provides a unique approach to data protection that prioritizes safety, flexibility, and energy efficiency. - It is designed to sit on top of your files as a safety net, ensuring your data is protected without requiring complex - changes to your hardware or operating system. -

- -
- -
-

The "Safety Net" Philosophy

-

SnapRAID acts as a transparent layer of security that protects your data without ever - taking it hostage. It treats your array as a collection of individual assets, providing a - safety net that is both powerful and precise.

- -
    -
  • -
    - -
    -
    - Disaster-Proof Recovery -

    The primary goal is total data reconstruction. Should a hard drive fail, SnapRAID uses its parity data to rebuild the entire contents of the lost disk onto a new one. Because it can handle up to six simultaneous failures, it provides a level of resilience that scales with your needs, ensuring that a hardware crash doesn't mean a data catastrophe.

    -
    -
  • -
  • -
    - -
    -
    - Defense Against the Invisible -

    Physical disk failure isn't the only threat; "bit-rot" or silent errors can corrupt files without warning. SnapRAID proactively defends your archive by hashing every file. It doesn't just wait for a disk to die; it constantly verifies that your data is exactly as you left it, identifying and repairing invisible corruption before it can spread.

    -
    -
  • -
- -
- - -
-

Maximum Freedom, Minimum Risk

-

SnapRAID is designed for the "real world" of home hardware. Most users don't buy ten identical 20TB drives at once.

- -
    -
  • -
    - -
    -
    - Grow as you go -

    You can mix a 4TB drive with a 12TB drive and add a new one whenever you find a sale.

    -
    -
  • -
  • -
    - -
    -
    - No Reformatting -

    You can start protecting disks that are already full of your movies and photos without moving them.

    -
    -
  • -
  • -
    - -
    -
    - Zero Lock-in -

    Your data is never trapped. If you decide to stop using SnapRAID, your disks remain standard drives that can be read by any computer.

    -
    -
  • -
-
-
-
-
+ + +
- -
-
-
-
-

INTRODUCING THE DAEMON

-

Real-Time Monitoring & Web API

-

- The new SnapRAID Daemon bridges the gap between raw parity and proactive protection. - Move from a manual terminal workflow to an "always-on" background intelligence. -

-
    -
  • - - Background scrubbing and health checks -
  • -
  • - - Modern Web UI for dashboard and tasks -
  • -
  • - - REST API for 3rd party integration -
  • -
- See Daemon Features → -
- -
- SnapRAID Daemon Dashboard -
-
-
-
- -
-
-

Feature Spotlight

- - -
-

Resilient Recovery

-
- -
-

Full Recovery

-

Total data reconstruction

-

If your hard disks die, SnapRAID can fully recover all the data from the failed drives, up to the number of parity disks you have assigned (protecting you from up to 6 simultaneous failures).

-
- -
-

Silent Corruption Protection

-

Total data integrity

-

All your data is hashed to ensure integrity and prevent "bit-rot." If a file suffers from silent corruption, SnapRAID detects it and repairs it using your parity information.

-
-
-
- -
-

Surgical Recovery

-

Undelete and restore

-

If you accidentally delete files on a disk, recovery is possible. SnapRAID can reconstruct missing data and even undelete specific folders without affecting the rest of the array.

-
- -
-

Fault Isolation

-

Confined data loss

-

When the number of failed disks exceeds the parity count, data loss is confined only to the affected disks. Data on all other healthy disks remains fully accessible and untouched.

-
-
-
+

+SnapRAID is a backup program designed for disk arrays, storing +parity information for data recovery in the event of up to six +disk failures. +

+

+Primarily intended for home media centers with large, +infrequently changing files, SnapRAID offers several features: +

+
    +
  • You can utilize disks already filled with files without the +need to reformat them, accessing them as usual.
  • +
  • All your data is hashed to ensure data integrity and prevent +silent corruption.
  • +
  • When the number of failed disks exceeds the parity count, +data loss is confined to the affected disks; data on +other disks remains accessible.
  • +
  • If you accidentally delete files on a disk, recovery is +possible.
  • +
  • Disks can have different sizes.
  • +
  • You can add disks at any time.
  • +
  • SnapRAID doesn't lock in your data; you can stop using it +anytime without reformatting or moving data.
  • +
  • To access a file, only a single disk needs to spin, saving +power and reducing noise.
  • +
- -
-

Hardware Freedom

-
- -
-

Maximum Flexibility

-

Mix, match, and grow

-

Disks can have different sizes and different brands. You can add new disks to the array at any time as your storage needs grow, without the need for complex migrations.

-
- -
-

Eco-Friendly Efficiency

-

Power-saving by design

-

To access a file, only a single disk needs to spin. This reduces noise, saves power, and extends the lifespan of your hardware compared to traditional RAID systems that spin every disk for every read.

-
-
-
+

+SnapRAID has also a +SourceForge +and a +GitHub page. +

- -
-

Data Sovereignty

-
- -
-

Non-Locking Integration

-

Access your data, your way

-

You can utilize disks already filled with files without the need to reformat them. Access your files as usual, even without the program running. SnapRAID doesn't lock in your data; you can stop using it anytime without moving a single byte.

-
- -
-

Open Source & Free

-

Transparent, Community-Driven, and Cost-Free

-

SnapRAID is released under the GPLv3 license, ensuring the code remains open for inspection and improvement. There are no licensing fees, no subscriptions, and no hidden "Pro" tiers. You have full ownership of your data protection engine.

-
-
-
+

+If you need help, go to the Support page. +

-
-
+

+Now go to Download. +

- - +

+News! Version 13.0 RELEASED! +

+ +

+

+ +
+ + diff --git a/index.jpg b/index.jpg new file mode 100644 index 00000000..edb1127e Binary files /dev/null and b/index.jpg differ diff --git a/log.html b/log.html new file mode 100644 index 00000000..e9c9c926 --- /dev/null +++ b/log.html @@ -0,0 +1,2677 @@ + + + + + + + + + + + + + +SnapRAID + + + + + + + + + + + + +
+ + + +

+Log Tags Documentation for SnapRAID. +

+ +

1 +Description +

+

This document describes the structured log tags output by SnapRAID, +which are designed to be used by tools monitoring the SnapRAID +processing state. The tags provide information in an easy-to-parse +format, ideal for automation and integration. +

To capture these structured log tags, you must use the `--log` option +with SnapRAID. +

You can direct the output to a specific file, or force the output to +the standard output or standard error using the special arguments +`>&1` or `>&2`. Note that these arguments often need to be quoted on +the command line to prevent the shell from interpreting them. +

Example: +

+
+snapraid status --log ">&2"
+
+
+

The output tags strictly adhere to the following format: +

+NAME:VALUE:VALUE:VALUE...<EOL>
+
+ + + + +
+NAME +
+This is the primary tag identifier, always a lowercase string +without spaces (e.g., `summary`, `block`, `info_time`). +
+VALUE +
+Following the `NAME`, these can be additional sub-identifiers, +descriptive names (like a disk name), or numeric/string data +values. They are separated by a colon `:`. +
+<EOL> +
+Each tag is terminated by an end-of-line character. +
+

This document provides a summary of the tags generated by SnapRAID. +For the most detailed and up-to-date information regarding the meaning +and context of the values, it is recommended to check the source +code's `log_tag()` statements. +

When a path is output, it is always escaped using a backslash (\) as +the escape character. +

The following characters are escaped into sequences: +

+ + + + +
+The colon + +is escaped to \d. +
+The newline + +is escaped to \n. +
+The carriage return + +is escaped to \r. +
+The backslash + +is escaped to \\. +
+

Some tags are output only when the `--gui` option is used. They provide +extra verbose state and runtime progress only useful for a GUI +interface. +

2 +Configuration Tags +

+

These tags report the memory usage and global configuration after +scanning the disk and reading the list of files. +

+ +
+conf:file:<path> +
+Configuration file loaded (escaped). +
+ + +
+conf:missing: +
+Operating without a configuration file. +
+ + +
+blocksize:<bytes> +
+The configured block size in bytes (uint). +
+ + +
+data:<disk_name>:<dir> +
+The data disks as defined in the configuration file. +
+ + + +
+<disk_name> + +The assigned name of the disk. +
+<dir> + +The directory entry point of the disk. +
+ + +
+mode:<raidname> +
+The RAID mode used. One of `par1`, `par2`, `par3`, `par4`, +`par5`, `par6` or `parz`. The number indicates the maximum +number of simultaneous disk failures the array can withstand. +
+ + +
+<parity_level>:<split_index>:<path> +
+The parity files as defined in the configuration file. +
+ + + + +
+<parity_level> + +One of `parity`, `2-parity`, ..., `6-parity`. +This corresponds to the level of redundancy. +
+<split_index> + +The split index (uint). If no +multiple split parity is configured, there is only the +index 0. A split parity configuration distributes parity +blocks across multiple files. +
+<path> + +The path (escaped). +
+ + +
+pool:<dir> +
+The configured dir to the pool mount point (escaped). +This is the optional mount point for the 'pool' feature. +
+ + +
+share:<dir> +
+The configured dir to the pool mount point (escaped). +This is the optional mount point for the 'share' feature. +
+ + +
+autosave:<bytes> +
+If the autosave feature is enabled, and after how many bytes +(uint64). This specifies the interval for content file saving. +
+ + +
+filter:<pattern> +
+All the active filters with their patterns. These patterns +exclude specific files or directories from the SnapRAID array. +
+ + +
+filter:nohidden: +
+If the no-hidden filter is enabled, meaning hidden files/directories +(starting with '.') are excluded from the array. +
+ + +
+content:<path> +
+The absolute path to a content file being used (escaped). +Content files store the metadata (like file hashes and timestamps) +for the array. +
+ + +
+content:<parity_level>:<split_index>:<path>:<uuid>:<size> +
+The parity files as stored in the content file. +
+ + + + + + +
+<parity_level> + +One of `parity`, `2-parity`, ..., `6-parity`. +
+<split_index> + +The split index (uint). If no +multiple split parity is configured, there is only the +index 0. +
+<path> + +The path (escaped). +
+<uuid> + +The UUID of the partition containing the path. +
+<size> + +The size of the parity file. Size is -1 if not yet +fixed, meaning it can grow. This happens for the +latest split. +
+

3 +Diagnostics Tags +

+ + +
+version:<version> +
+The version of SnapRAID run. +
+ + +
+unixtime:<time> +
+The current time in the unix format (uint64), representing +seconds since the epoch. +
+ + +
+time:<YYYY-MM-DD HH:MM:SS> +
+The current time in human format. +
+ + +
+command:<command> +
+The command run. One of `sync`, `scrub`, `check`, `fix`, `status`, ... +
+ + +
+argv:<number>:<argument> +
+All the arguments of the executable command. The 0 one is the +executable run. +
+ + +
+memory:used:<bytes> +
+The total memory currently used by the application in bytes (uint64). +
+ + +
+memory:block:<bytes> +
+Size of the internal `snapraid_block` structure in bytes (uint64). +
+ + +
+memory:extent:<bytes> +
+Size of the internal `snapraid_extent` structure in bytes (uint64). +
+ + +
+memory:file:<bytes> +
+Size of the internal `snapraid_file` structure in bytes (uint64). +
+ + +
+memory:link:<bytes> +
+Size of the internal `snapraid_link` structure in bytes (uint64). +
+ + +
+memory:dir:<bytes> +
+Size of the internal `snapraid_dir` structure in bytes (uint64). +
+

4 +Scan Tags +

+

These tags report detected differences between the filesystem and the +content file. They are output for every discovered change, and +`scan:equal` is only output when the `--gui` option is used. +

+ +
+scan:equal:<disk_name>:<path> +
+A file, link, or directory is equal (unchanged) (GUI only). +No action is required for this item. +
+ + + +
+<disk_name> + +Name of the data disk. +
+<path> + +Path to the file/link/dir relative to the disk mount +(escaped). +
+ + +
+scan:add:<disk_name>:<path> +
+A new file, link, or directory was found that is not in the +content file. This item will be added to the array in a `sync`. +
+ + +
+scan:remove:<disk_name>:<path> +
+A file, link, or directory has been removed from the filesystem +since the last sync. This item will be removed from the +content file in a `sync`. +
+ + +
+scan:update:<disk_name>:<path> +
+A file or link has been updated (size, timestamp, or link target changed). +This item will have its content data blocks re-hashed in a `sync`. +
+ + +
+scan:move:<disk_name>:<old_path>:<new_path> +
+A file was moved on the same disk. This is an efficient operation +that only updates the path metadata without re-hashing blocks. +
+ + + +
+<old_path> + +The old path to the file (escaped). +
+<new_path> + +The new path to the file (escaped). +
+ + +
+scan:copy:<disk_name>:<path>:<source_disk>:<source_path> +
+A new file was found to be a copy of a file from another disk. +This is detected by matching file size and timestamp, and is an +efficient operation that avoids re-hashing all blocks. +
+ + + +
+<source_disk> + +The original file's disk. +
+<source_path> + +The original file's location (escaped). +
+ + +
+scan:restore:<disk_name>:<path> +
+A file's inode has changed but not its date-time and size, +which suggests the file may be restored from backup. +The file won't be re-hashed in `sync` as its precomputed hash +is assumed to be correct. +
+

These tags provide a final count of all detected changes. +

+ +
+summary:equal:<count> +
+Total number of equal (unchanged) files/links/firs found (uint). +
+ + +
+summary:added:<count> +
+Total number of new files/links/dirs found (uint). +
+ + +
+summary:removed:<count> +
+Total number of removed files/links/dirs found (uint). +
+ + +
+summary:updated:<count> +
+Total number of updated files/links found (uint). +
+ + +
+summary:moved:<count> +
+Total number of moved files found (uint). +
+ + +
+summary:copied:<count> +
+Total number of copied files found (uint). +
+ + +
+summary:restored:<count> +
+Total number of restored files found (uint). +
+ + +
+summary:exit:equal +
+A zero-argument tag indicating that no differences were found. +The array is already synchronized. +
+ + +
+summary:exit:diff +
+A zero-argument tag indicating that differences were found. +The array needs a `sync` operation. +
+

5 +General Progress and Execution Tags +

+

These tags are used to report the runtime processing of the commands. +Only produced when `--gui` option is used. +

+ +
+run:begin:<blockstart>:<blockend>:<countmax> +
+A tag indicating the start of the command execution. +
+ + + + +
+<blockstart> + +Starting block index (uint). +
+<blockend> + +Ending block index + 1 (uint). +
+<countmax> + +Number of blocks to process. It may be less +than <blockend> - <blockstart> + 1 if some blocks +are going to be skipped (uint). +
+ + +
+run:end +
+A zero-argument tag indicating the end of the command execution. +
+ + +
+run:pos:<blockpos>:<countpos>:<countsize>:<perc>:<eta>:<size_speed>:<cpu>:<elapsed> +
+Detailed progress information during command execution. +
+ + + + + + + + + +
+<blockpos> + +Current block index position (uint). +
+<countpos> + +Current item count position (uint). +
+<countsize> + +Current size processed (uint64). +
+<perc> + +Percentage complete (uint). +
+<eta> + +Estimated time of arrival in seconds (uint). +
+<size_speed> + +Data processing speed in MiB/s (uint). +
+<cpu> + +CPU usage percentage (uint). +
+<elapsed> + +Elapsed time in seconds (uint64). +
+ + +
+sigint:<blockpos>:<msg> +
+A user interruption (e.g., Ctrl+C) was signaled. The process +is gracefully aborting. +
+ + + +
+<blockpos> + +Current block index position (uint). +
+<msg> + +Text message exactly as it's printed on screen. +
+ + +
+msg:<level>:<msg> +
+Messages printed to the screen. +
+ + + + + + + + + +
+<level> + +One of `fatal`, `error`, `expected`, `status`, +`progress` or `verbose`. +
+fatal + +A fatal error occurred. Program will abort after this +message. +
+error + +A generic error condition that doesn't prevent the +program to continue. +
+expected + +An expected error condition. At present it +happens only when using the `-m` option with files +expected missing. +
+status + +A status message, usually providing context or a summary. +
+progress + +A progress message, often part of an ongoing operation. +
+verbose + +A verbose informative message, only shown in verbose mode. +
+<msg> + +Text message exactly as it's printed on screen. +
+

6 +Thermal Tags +

+

The following tags are produced by the thermal monitoring functions +when SnapRAID is processing, typically during operations that involve +disk access. +

+ +
+thermal:ambient:device:<hwmon_dir>:<name>:<temp_file>:<label>:<temp> +
+Logs a temperature reading found in the system using the Linux +/sys/class/hwmon interface. Only present in Linux. +
+ + + + + + +
+<hwmon_dir> + +The hwmon directory name (e.g., hwmon0). +
+<name> + +The name of the hwmon device (e.g., k10temp). +
+<temp_file> + +The temperature file name (e.g., temp1_input). +
+<label> + +The label associated with the temperature sensor (e.g., Tdie). +
+<temp> + +The temperature reading in degrees Celsius. +
+ + +
+thermal:ambient:candidate:<temp> +
+Reports a temperature reading that is a candidate for the +ambient temperature, used in the heating model calculation. +
+ + +
+<temp> + +The candidate temperature in degrees Celsius. +
+ + +
+thermal:system:candidate:<temp> +
+Logs a temperature reading from a connected disk that is being +considered as a candidate for determining the ambient system +temperature. +
+ + +
+<temp> + +The current temperature read from the disk +(uint, degrees Celsius). +
+ + +
+thermal:system:final:<temp> +
+Logs the final ambient system temperature calculated. This +value is the lowest valid temperature observed among all +candidates, representing the room temperature. +
+ + +
+<temp> + +The calculated ambient temperature in degrees Celsius. +
+ + +
+thermal:current:<disk_name>:<device>:<temp> +
+Logs the most recent temperature reading for a specific disk +device. +
+ + + + +
+<disk_name> + +The configured name of the disk. +
+<device> + +The unique device ID (uint64). +
+<temp> + +The current temperature read from the disk in degrees +Celsius. +
+ + +
+thermal:highest:<temp> +
+Logs the highest temperature observed among all monitored disks +in the current measurement cycle. This is used for thermal +throttling. +
+ + +
+<temp> + +The highest temperature observed in degrees Celsius. +
+ + +
+thermal:heat:<disk_name>:<device>:<count>:<data_points> +
+Logs the entire history of temperature data points collected +so far for a specific disk, used for fitting the heating model. +Only monotone increasing temperatures are included in the history. +
+ + + + + + + +
+<disk_name> + +The configured name of the disk. +
+<device> + +The unique device ID (uint64). +
+<count> + +The total number of collected data points (uint). +
+<data_points> + +A comma-separated list of temperature/time pairs. +Each pair is formatted as <temp>/<time_offset>. +
+<temp> + +Temperature reading in degrees Celsius. +
+<time_offset> + +Time offset from the start of the thermal +monitoring (uint, seconds). +
+ + +
+thermal:params:<disk_name>:<device>:<k_heat>:<t_ambient>:<t_steady>:<rmse>:<r_squared>:<max_error> +
+Logs the estimated parameters for the exponential heating model +(fit using least squares) and associated quality metrics for a +specific disk. +The model is: T(t) = T_steady - (T_steady - T_0) e^(-kt), +where T_0 is the initial temperature. +
+ + + + + + + + + +
+<disk_name> + +The configured name of the disk. +
+<device> + +The unique device ID (uint64). +
+<k_heat> + +The heating rate constant, k (double). +
+<t_ambient> + +The ambient temperature, T_ambient (double). +
+<t_steady> + +The estimated steady-state temperature, T_steady (double), +which is the maximum expected temperature of the disk. +
+<rmse> + +Root Mean Square Error of the fit (double). +
+<r_squared> + +Coefficient of determination (R^2) of the fit (double). +
+<max_error> + +Maximum absolute error of the fit (double). +
+ + +
+thermal:spindown +
+Indicates that the thermal alarm limit has been reached, and +the process is initiating a disk spindown to begin the +cooldown procedure, preventing overheating. +
+ + +
+thermal:cooldown:<sleep_time> +
+Indicates the duration of the cooldown waiting period after +spindown. +
+ + +
+<sleep_time> + +The total time the system will wait for +cooldown (uint, seconds). +
+ + +
+thermal:spinup +
+Indicates that the cooldown period is complete, and the disks +are being spun back up to resume the operation. +
+

7 +Command Status Tags +

+

This section describes the tags output with the `status` command. +

+Summary Tags +

+

These tags provide general information about the array configuration +and overall state. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+summary:block_size:<uint> +
+The size of a block in bytes. This is the unit of parity +protection. +
+summary:parity_block_count:<uint> +
+The total number of blocks allocated for all parity levels +combined. +
+summary:parity_block_total:<name>:<uint> +
+Total blocks available for a specific parity level (e.g., +`parity`, `2-parity`). +
+summary:parity_block_free:<name>:<uint> +
+Free blocks available for a specific parity level. +
+summary:parity_block_free_min:<uint> +
+The minimum number of free blocks across all parity levels. +This determines the maximum size of data that can be added. +
+summary:file_count:<uint> +
+Total number of files in the array. +
+summary:file_block_count:<uint64> +
+Total number of data blocks used by files. +
+summary:fragmented_file_count:<uint> +
+Total number of fragmented files, meaning files whose blocks +are not contiguous. +
+summary:excess_fragment_count:<uint> +
+Total number of excess fragments (one less than the total fragments). +This is a measure of data fragmentation overhead. +
+summary:zerosubsecond_file_count:<uint> +
+Total number of files with a zero sub-second timestamp. This +can occur on certain filesystems and may affect change detection. +
+summary:file_size:<uint64> +
+Total size of all files in bytes. +
+summary:parity_size:<uint64> +
+Total size of allocated parity blocks in bytes. +
+summary:parity_size_max:<uint64> +
+Maximum possible parity size (allocated + min free) in bytes. +This is the effective maximum protection size. +
+summary:hash:<name> +
+The current hash algorithm in use (e.g., `sha256`). +
+summary:prev_hash:<name> +
+The previous hash algorithm used, if a rehash is in progress. +
+summary:best_hash:<name> +
+The best hash algorithm for optimal performance based on +system capabilities. +
+summary:total_wasted:<uint64> +
+Total wasted space (space on data disks exceeding parity +capacity) in bytes. +
+summary:total_used:<uint64> +
+Total used space by data files in bytes. +
+summary:total_free:<uint64> +
+Total free space (usable by data) in bytes, limited by parity +capacity. +
+summary:total_use_percent:<uint> +
+Overall array use percentage. +
+summary:has_unsynced:<uint> +
+Count of blocks that are unsynced (need a sync), meaning their +parity data is out of date. +
+summary:has_unscrubbed:<uint> +
+Count of blocks that are unscrubbed (just synced), meaning they +have never been verified since the last sync. +
+summary:has_rehash:<uint> +
+Count of blocks needing a rehash, usually due to a content file +update or hash algorithm change. +
+summary:has_bad:<count>:<first>:<last> +
+Count of bad blocks, along with the first and last bad block index. +Bad blocks indicate data or parity corruption. +
+summary:scrub_oldest_days:<uint> +
+Days ago the oldest block was last scrubbed. +
+summary:scrub_median_days:<uint> +
+Days ago the median block was last scrubbed. +
+summary:scrub_newest_days:<uint> +
+Days ago the newest block was last scrubbed. +
+

+Per-Disk Tags +

+

These tags provide statistics for individual data disks. <name> +is the disk name. +

+ + + + + + + + + + + + + + + + +
+summary:disk_file_count:<name>:<uint> +
+Number of files on the disk. +
+summary:disk_block_count:<name>:<uint> +
+Number of blocks used by files on the disk. +
+summary:disk_fragmented_file_count:<name>:<uint> +
+Number of fragmented files on the disk. +
+summary:disk_excess_fragment_count:<name>:<uint> +
+Number of excess fragments on the disk. +
+summary:disk_zerosubsecond_file_count:<name>:<uint> +
+Number of files with zero sub-second timestamp on the disk. +
+summary:disk_file_size:<name>:<uint64> +
+Total size of files on the disk in bytes. +
+summary:disk_block_allocated:<name>:<uint> +
+Highest block index used on the disk + 1. +
+summary:disk_block_total:<name>:<uint> +
+Total blocks on the disk (physical size). +
+summary:disk_block_free:<name>:<uint> +
+Free blocks on the disk. +
+summary:disk_block_max_by_space:<name>:<uint> +
+Total blocks by disk space (used + free blocks), representing +the physical limit of the disk. +
+summary:disk_block_max_by_parity:<name>:<uint> +
+Total blocks limited by parity space (parity size + min parity +free blocks). +This is the logical limit imposed by the parity files. +
+summary:disk_block_max:<name>:<uint> +
+Maximum usable blocks (minimum of `..._by_space` and `..._by_parity`). +
+summary:disk_space_wasted:<name>:<int64> +
+Wasted space on the disk in bytes (positive if disk is larger +than usable parity space). +
+summary:disk_used:<name>:<uint64> +
+Used space on the disk in bytes. +
+summary:disk_free:<name>:<uint64> +
+Free usable space on the disk in bytes, limited by `disk_block_max`. +
+summary:disk_use_percent:<name>:<uint> +
+Disk use percentage relative to `disk_block_max`. +
+

+File Timestamp Tags +

+

These tags list files with zero sub-second timestamps. +

+ +
+zerosubsecond:<disk_name>:<file_path> +
+Lists files that have a zero sub-second timestamp. +Up to 50 are logged per disk. +
+

+Block Information Tags +

+

These tags are generated when the GUI option is enabled (`state->opt.gui`). +

+ +
+block_count:<uint> +
+The total number of blocks in the array. +
+ + +
+block:<index>:<time>:<used>:<unsynced>:<bad>:<rehash> +
+Status of a specific block. +
+ + + + + + + +
+<index> + +Block index. +
+<time> + +Last scrub time (Unix timestamp). A value of 0 means +the block has never been scrubbed. +
+<used> + +`used` if the block contains data, otherwise empty. +
+<unsynced> + +`unsynced` if the block needs a sync, otherwise empty. +
+<bad> + +`bad` if the block has errors, otherwise empty. +
+<rehash> + +`rehash` if the block needs a rehash, otherwise empty. +
+ + +
+block_noinfo:<index>:<used>:<unsynced> +
+Status of an unused block (no info recorded) in the content file. +
+ + + + +
+<index> + +Block index. +
+<used> + +`used` if the block contains data, otherwise empty. +
+<unsynced> + +`unsynced` if the block needs a sync, otherwise empty. +
+

+Scrub History Tags +

+

These tags provide details on the scrub/sync time distribution. +

+ +
+info_count:<uint> +
+Total number of info records about past scrub and sync +operations stored in the content file. +
+ + +
+info_time:<time>:<count>:<status> +
+All the info records. +
+ + + + +
+<time> + +Unix timestamp of the scrub/sync. +
+<count> + +Number of blocks processed at this timestamp. +
+<status> + +"scrubbed" (for blocks verified to be correct) or +"new" (for synced blocks that haven't been scrubbed yet). +
+ + +
+scrub_graph_range:<max_columns>:<max_height> +
+Dimensions of the scrub history graph obtained from the +`info_time` records. This provides the boundary for the +precomputed graph data available in the `scrub_graph_bar` tags. +
+ + + +
+<max_columns> + +The number of columns in the graph (constant +GRAPH_COLUMN). +
+<max_height> + +The maximum height (peak count) of blocks found +in any column (the highest sum of scrubbed and new blocks). +
+ + +
+scrub_graph_bar:<index>:<days_ago>:<scrubbed>:<new> +
+Data for a column of the scrub history graph. Each column +represents a time period. +
+ + + + + +
+<index> + +Column index. From 0 to max_columns - 1. +
+<days_ago> + +Days ago for this column's time range. +
+<scrubbed> + +Count of scrubbed blocks in that day range. +
+<new> + +Count of newly synced (unscrubbed) blocks in that day range. +
+

8 +Command Sync/Scrub Tags +

+

Tags specific for the `sync` and `scrub` commands. +Also the error tags are possible. +

+Summary Tags +

+

These tags provide summary statistics at the end of the command. +

+ +
+hash_summary:error_file:<count> +
+Logs the total count of file-related errors that caused a +block to be skipped during the hashing phase. These are often +due to file changes (missing, size/time change) during the +sync operation. This happens only in `sync`. +
+ + +
+<count> + +Total number of file errors (uint). +
+ + +
+summary:error_file:<count> +
+Logs the total count of file-related errors encountered during +the process (e.g., missing files, file attribute changes). +
+ + +
+<count> + +The total number of file errors encountered (uint). +
+ + +
+summary:error_io:<count> +
+Logs the total count of input/output errors encountered on +data or parity disks. +
+ + +
+<count> + +The total number of I/O errors encountered (uint). +
+ + +
+summary:error_data:<count> +
+Logs the total count of "silent data errors" (data blocks +not matching their expected hash) encountered during the sync +process. +
+ + +
+<count> + +The total number of silent data errors encountered (uint). +
+ + +
+summary:exit:<status> +
+Logs the overall exit status of the command. The `status` is +one of the following: +
+ + + +
+ok + +No errors were found. +
+error + +If any errors were found (file, I/O, or data errors). +
+

9 +Command Check/Fix Tags +

+

Tags specific for the `check` and `fix` commands. +Also the error tags are possible. +

+Fixed/Recovered Tags +

+

These tags log successful repairs during fix operations. +

+ +
+fixed:<block_pos>:<disk_name>:<file_path>:<msg> +
+Indicates that a file was successfully fixed using parity data. +
+ + + + + +
+<block_pos> + +The block position being processed (uint). +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the fix +(e.g., `Fixed size`, `Fixed data error at position...`). +
+ + +
+parity_fixed:<block_pos>:<parity>:<msg> +
+Indicates that corrupted parity data was successfully +recomputed and written. +
+ + + + +
+<block_pos> + +The block position being processed (uint). +
+<parity> + +The name of the parity level (e.g., "parity", "2-parity"). +
+<msg> + +A descriptive message indicating the nature of the fix +(e.g., `Fixed data error`). +
+ + +
+empty_fixed:<disk_name>:<file_path>:<msg> +
+Logs successful recreation of a missing or corrupted empty file. +
+ + + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the fix +(e.g., `Fixed empty file`). +
+ + +
+hardlink_fixed:<disk_name>:<link_path>:<msg> +
+Logs successful recreation of a hard link during fix operation. +
+ + + + +
+<disk_name> + +The name of the disk. +
+<link_path> + +The hard link path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the fix +(e.g., `Fixed hardlink error`). +
+ + +
+symlink_fixed:<disk_name>:<link_path>:<msg> +
+Logs successful recreation of a symbolic link during fix operation. +
+ + + + +
+<disk_name> + +The name of the disk. +
+<link_path> + +The symlink path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the fix +(e.g., `Fixed symlink error`). +
+ + +
+dir_fixed:<disk_name>:<dir_path>:<msg> +
+Logs successful recreation of a missing directory during fix +operation. +
+ + + + +
+<disk_name> + +The name of the disk. +
+<dir_path> + +The directory path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the fix +(e.g., `Fixed dir error`). +
+

+Unrecoverable Error Tags +

+

These tags log errors that could not be recovered. +

+ +
+unrecoverable:<block_pos>:<disk_name>:<file_path>:<msg> +
+Indicates that a block error could not be fixed due to +insufficient parity or other recovery limitations. +
+ + + + + +
+<block_pos> + +The block position being processed (uint). +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the problem +(e.g., `Unrecoverable error at position <file_pos>`, +`Unrecoverable unsynced error at position <file_pos>`). +
+ + +
+collision:<disk_name>:<file_path>:<collision_path>:<msg> +
+Logs that the modification time was not set on a recovered file to +avoid inode collision with another file. +
+ + + + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+<collision_path> + +The path of the colliding file (escaped). +
+<msg> + +A descriptive message indicating the nature of the problem +(e.g., `Not setting modification time to avoid inode collision`). +
+

+File Status Tags +

+

These tags log the final status of files after processing. +

+ +
+status:unrecoverable:<disk_name>:<file_path> +
+Indicates that a file has unrecoverable errors and was renamed to +`.unrecoverable` (in fix mode) or cannot be recovered (in check mode). +
+ + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+ + +
+status:recovered:<disk_name>:<file_path> +
+Logs that a file was successfully recovered during fix operation. +
+ + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+ + +
+status:damaged:<disk_name>:<file_path> +
+Indicates that a file is damaged (in audit-only mode, e.g., using `check`). +
+ + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+ + +
+status:recoverable:<disk_name>:<file_path> +
+Logs that a file has errors but could be recovered in fix mode. +
+ + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+ + +
+status:correct:<disk_name>:<file_path> +
+Indicates that a file passed all checks successfully (verbose mode only). +
+ + + +
+<disk_name> + +The name of the disk. +
+<file_path> + +The file path relative to disk root (escaped). +
+

+Summary Tags +

+

These tags provide summary statistics at the end of the command. +

+ +
+summary:error:<error_count> +
+Logs the total number of errors encountered. +
+ + +
+<error_count> + +Total number of errors (uint). +
+ + +
+summary:error_recovered:<recovered_count> +
+Logs the total number of errors successfully recovered (fix mode only). +
+ + +
+<recovered_count> + +Number of recovered errors (uint). +
+ + +
+summary:error_unrecoverable:<unrecoverable_count> +
+Logs the total number of unrecoverable errors (not in audit-only mode). +
+ + +
+<unrecoverable_count> + +Number of unrecoverable errors (uint). +
+ + +
+summary:exit:<status> +
+Logs the overall exit status of the command. The `status` is one of +the following: +
+ + + + + + +
+`ok` + +Indicates that the operation completed with no errors. +
+`recovered` + +Indicates that the operation completed with all +errors successfully recovered (fix mode only). +
+`recoverable` + +Indicates that errors were found but are all +recoverable (check mode only). +
+`unrecoverable` + +Indicates that unrecoverable errors were +found. +
+`error` + +Indicates that errors were found (audit-only mode). +
+

10 +Command List Tags +

+

This section describes the tags output with the `list` command. +

+List Tags +

+

These tags log details about individual files and links processed during +the listing operation. +

+ +
+file:<disk_name>:<subpath>:<size>:<mtime_sec>:<mtime_nsec>:<inode> +
+Logs details for a regular file found on a disk. +
+ + + + + + + +
+<disk_name> + +The configured name of the disk. +
+<subpath> + +The path of the file relative to the disk's root +(escaped). +
+<size> + +The size of the file in bytes (uint64). +
+<mtime_sec> + +The file's modification time in seconds since the +Epoch (int64). +
+<mtime_nsec> + +The file's modification time nanosecond component +(uint). +
+<inode> + +The file's inode number (int64). +
+ + +
+link_<type>:<disk_name>:<subpath>:<linkto> +
+Logs details for a link found on a disk. The `<type>` component +varies based on the kind of link. +
+ + + + + +
+<type> + +The type of link, one of: `hardlink`, `symlink`, +`symdir` (symlink to a directory), `junction` +(Windows-specific reparse point). +
+<disk_name> + +The configured name of the disk (string). +
+<subpath> + +The path of the link relative to the disk's root +(escaped). +
+<linkto> + +The target path of the link (escaped). +
+

+Summary Tags +

+

These tags log final statistics about the entire listing operation. +

+ +
+summary:file_count:<count> +
+Logs the total number of regular files processed. +
+ + +
+<count> + +The total number of files (uint). +
+ + +
+summary:file_size:<size> +
+Logs the total size of all regular files processed. +
+ + +
+<size> + +The cumulative size of all files (uint64, bytes). +
+ + +
+summary:link_count:<count> +
+Logs the total number of links processed (hardlinks, symlinks, +symdirs, junctions). +
+ + +
+<count> + +The total number of links (uint). +
+ + +
+summary:exit:ok +
+Indicates a successful completion of the listing operation. +Note that if a fatal error happens, the program will abort, +and you won't get this tag. +
+

11 +Command Dup Tags +

+

This section describes the tags output with the `dup` command. +

+Duplicate Tags +

+

These tags log information about detected duplicate files and provide +a summary of the duplicate finding process. The content hash of the +whole file is used to determine duplicates. +

+ +
+dup:<diskname1>:<file_path1>:<diskname2>:<file_path2>:<size>: dup +
+Logs the information about a pair of duplicate files found. +The first file listed is the one just processed, and the second +file is the previously processed file that has the same content hash. +
+ + + + + + +
+<diskname1> + +The configured name of the disk containing the +newly processed duplicate file. +
+<file_path1> + +The path of the newly processed duplicate file +relative to its disk's mount point (escaped). +
+<diskname2> + +The configured name of the disk containing the +previously processed file that is the duplicate +of `<file_path1>`. +
+<file_path2> + +The path of the previously processed duplicate file +relative to its disk's mount point (escaped). +
+<size> + +The size of the duplicate file in bytes (uint64). This +size corresponds to the file `<file_path2>`. +
+

+Summary Tags +

+

These tags provide a final summary of the duplicate finding process. +

+ +
+summary:dup_count:<count> +
+Logs the total number of duplicate files found. A file is counted +as a duplicate if its hash matches a hash already seen. +
+ + +
+<count> + +The total count of duplicate files (uint). +
+ + +
+summary:dup_size:<size> +
+Logs the total size of all duplicate files found. This size is +the sum of the sizes of all files considered duplicates. +
+ + +
+<size> + +The total size of duplicate files in gigabytes (uint64). +
+ + +
+summary:exit:unique +
+Logs the final exit status indicating that no duplicate files were +found. This tag is logged if `<count>` is zero. +
+ + +
+summary:exit:dup +
+Logs the final exit status indicating that at least one duplicate +file was found. This tag is logged if `<count>` is greater than +zero. +
+

12 +Command Pool Tags +

+

This section describes the tags output with the `pool` command. +

+ +
+summary:link_count:<count> +
+Logs the total number of links created (symlinks, junctions). +
+ + +
+<count> + +The total number of links (uint). +
+ + +
+summary:exit:ok +
+Indicates a successful completion of the pool operation. +Note that if a fatal error happens, the program will abort, +and you won't get this tag. +
+

13 +Command Rehash Tags +

+

This section describes the tags output with the `rehash` command. +

+Summary Tags +

+

These tags provide a final summary of the rehash scheduling process. +

+ +
+summary:exit:scheduled +
+Logs the final exit status indicating that a rehash operation has +been successfully scheduled. The rehash will be performed +incrementally in future `sync` or `scrub` commands. +
+ + +
+summary:exit:already_in_progress +
+Logs the final exit status indicating that a rehash is already +in progress and cannot be scheduled again. This causes the +program to exit with a fatal error. +
+ + +
+summary:exit:not_required +
+Logs the final exit status indicating that the current hash +algorithm is already the `best hash` for the platform, and thus +a rehash is not required. This causes the program to exit with +a fatal error. +
+

14 +Command Smart Tags +

+

This section describes the tags output with the `smart` command. +

Note that a `<disk_name>` may be associated with more `<device_file>`, +in case the logical disk uses more physical disks. In such a case, +you'll see multiple tags for the same `<disk_name>` but with different +`<device_file>`. +

+SMART Attributes +

+

Tags logging specific disk identification and raw SMART attribute +values. +

+ +
+smart:<device_file>:<disk_name> +
+Logs the start of the SMART report for a device. +
+ + + +
+<device_file> + +The file path of the device (e.g., /dev/sdb). +
+<disk_name> + +The configured name of the disk. +
+ + +
+attr:<device_file>:<disk_name>:serial:<serial_number> +
+Logs the disk's serial number. +
+ + +
+<serial_number> + +The disk's serial number (escaped). +
+ + +
+attr:<device_file>:<disk_name>:vendor:<vendor> +
+Logs the disk's vendor string. +
+ + +
+<vendor> + +The disk's vendor identifier (escaped). +
+ + +
+attr:<device_file>:<disk_name>:model:<model> +
+Logs the disk's model string. +
+ + +
+<model> + +The disk's model identifier (escaped). +
+ + +
+attr:<device_file>:<disk_name>:afr:<afr_value>:<afr_prob> +
+Logs the estimated Annual Failure Rate (AFR) and the +probability of one failure in the next year based on SMART +attributes. The AFR is calculated using the maximum rate +reported by specific SMART attributes (5, 187, 188, 197, 198). +
+ + + +
+<afr_value> + +The computed Annual Failure Rate (double). +
+<afr_prob> + +The probability of one or more failures in the +next year (double). +
+ + +
+attr:<device_file>:<disk_name>:size:<size_bytes> +
+Logs the size of the disk. +
+ + +
+<size_bytes> + +The disk size in bytes (uint64). +
+ + +
+attr:<device_file>:<disk_name>:error:<error_count> +
+Logs the raw value of the total error count (e.g., from SMART +attribute 199, if used for the report). +
+ + +
+<error_count> + +The total error count (uint64). +
+ + +
+attr:<device_file>:<disk_name>:rotationrate:<rate> +
+Logs the disk's rotation rate. A value of 0 indicates an SSD. +
+ + +
+<rate> + +The rotation rate (uint64, RPM). +
+ + +
+attr:<device_file>:<disk_name>:flags:<flags_decimal>:<flags_hex> +
+Logs the SMART status flags from the utility (e.g., smartctl). +
+ + + +
+<flags_decimal> + +The raw flags value (uint64, decimal). +
+<flags_hex> + +The raw flags value (uint64, hexadecimal). +
+ + +
+attr:<device_file>:<disk_name>:<id>:<value_decimal>:<value_hex> +
+Logs the raw value of any assigned SMART attribute. +
+ + + + +
+<id> + +The SMART attribute ID (uint). +
+<value_decimal> + +The raw attribute value (uint64, decimal). +
+<value_hex> + +The raw attribute value (uint64, hexadecimal). +
+

+Summary +

+

Tags logging the overall failure probabilities for the array. +

+ +
+summary:array_failure:<array_afr>:<array_prob> +
+Logs the total estimated failure rate for the entire array +(sum of individual disk AFRs) and the probability of at least +one disk failure in the next year. +
+ + + +
+<array_afr> + +The sum of AFRs of all disks in the array (double). +
+<array_prob> + +The probability of at least one disk failure in +
+
+

the next year (double). +

+

15 +Command Probe Tags +

+

This section describes the tags output with the `probe` command. +

Note that a `<disk_name>` may be associated with more `<device_file>`, +in case the logical disk uses more physical disks. In such a case, +you'll see multiple tags for the same `<disk_name>` but with different +`<device_file>`. +

+Device Power State +

+

Tags used to report the power state of each device. +

+ +
+probe:<device_file>:<disk_name>:<power_state> +
+Logs the detected power state of a device. +
+ + + + +
+<device_file> + +The file path of the device (e.g., /dev/sdb). +
+<disk_name> + +The configured name of the disk. +
+<power_state> + +The numerical power state: 0: Unknown, +1: StandBy, 2: Active. +
+

16 +Error Tags +

+

These tags report specific errors that occur on data disks during the +commands that access files and parities. +

+ +
+error:<block>:<disk_name>:<file>:<msg> +
+Logs file access errors (open, read, file changed) during the +data disk read operation for parity calculation or verification. +
+ + + + + +
+<block> + +The zero-based index of the block where the error occurred (uint). +
+<disk_name> + +The name of the data disk. +
+<file> + +The path (relative to the disk mount point) of the +file containing the block (escaped). +
+<msg> + +A descriptive message indicating the nature of the +error (e.g., `Open/Read/Write EIO error`, `Open/Read/Write error`, +`Data error at position <pos>, diff bits <diff>/<bits>`). +
+ + +
+parity_error:<block>:<level>:<msg> +
+Logs errors during parity disk read or write operations. +
+ + + + +
+<block> + +The zero-based index of the block where the error occurred (uint). +
+<level> + +The configuration name of the parity level (e.g., +`parity`, `2-parity`). +
+<msg> + +A descriptive message indicating the nature of the +error (e.g., `Read/Write EIO error`, `Read/Write error`, +`Data error, diff bits <diff>/<bits>`). +
+ + +
+hardlink_error:<disk_name>:<link_path>:<target_path>:<msg> +
+Indicates an error when attempting to access a hard link. +
+ + + + + +
+<disk_name> + +The name of the disk. +
+<link_path> + +The hard link path relative to disk root (escaped). +
+<target_path> + +The target path of the hard link (escaped). +
+<msg> + +A descriptive message indicating the nature of the +error (e.g., `Hardlink stat error`, +`Hardlink error for not regular file`, `Hardlink to stat error`, +`Hardlink-to error for not regular file`, +`Hardlink mismatch for different inode`). +
+ + +
+symlink_error:<disk_name>:<link_path>:<msg> +
+Indicates an error when attempting to access a symbolic link. +
+ + + + +
+<disk_name> + +The name of the disk. +
+<link_path> + +The symlink path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the +error (e.g., `Symlink read error`, +`Symlink data error '<actual>' instead of '<expected>'`). +
+ + +
+dir_error:<disk_name>:<dir_path>:<msg> +
+Indicates an error when attempting to access a directory. +
+ + + + +
+<disk_name> + +The name of the disk. +
+<dir_path> + +The directory path relative to disk root (escaped). +
+<msg> + +A descriptive message indicating the nature of the +error (e.g., `Dir stat error`, `Dir error for not directory`). +
+ + +
+outofparity:<disk_name>:<file_path> +
+Logs that a file's blocks extend beyond the available parity +space, indicating that the parity files are too small to +protect all data. This occurs when data requires more parity +than is available on the parity disk(s) and is a critical +warning. +
+ + + +
+<disk_name> + +The name of the disk containing the file. +
+<file_path> + +The file path relative to the disk root (escaped). +
+ + +

+

+ +
+ + + + + + diff --git a/manual-de.html b/manual-de.html index 0864582a..1ad55f4f 100644 --- a/manual-de.html +++ b/manual-de.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID ist ein Sicherungsprogramm, das für Festplatten-Arrays entwickelt wurde und Paritätsinformationen zur Datenwiederherstellung bei Ausfall von bis zu sechs Festplatten speichert. @@ -183,14 +128,14 @@ drehen (spinnen), was Strom spart und Geräusche reduziert.

Für weitere Informationen besuchen Sie bitte die offizielle SnapRAID-Website: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID ist ein Hybrid aus einem RAID- und einem Sicherungsprogramm, das darauf abzielt, die besten Vorteile beider zu kombinieren. Es hat jedoch einige Einschränkungen, die Sie vor der Verwendung @@ -199,7 +144,7 @@ berücksichtigen sollten. ausfällt und Sie in letzter Zeit keine Synchronisierung durchgeführt haben, Sie möglicherweise nicht vollständig wiederherstellen können. Genauer gesagt können Sie möglicherweise nicht bis zur Größe der -geänderten oder gelöschten Dateien seit der letzten sync-Operation +geänderten oder gelöschten Dateien seit der letzten `sync`-Operation wiederherstellen. Dies tritt auch dann auf, wenn die geänderten oder gelöschten Dateien sich nicht auf der ausgefallenen Festplatte befinden. Aus diesem Grund ist SnapRAID besser für Daten geeignet, die sich @@ -234,13 +179,11 @@ Hardlinks werden gespeichert. Berechtigungen, Eigentümerschaft und erweiterte Attribute werden nicht gespeichert. -

-
-

+

4 Getting Started -

+

Um SnapRAID zu verwenden, müssen Sie zuerst eine Festplatte in Ihrem -Festplatten-Array auswählen, die für parity-Informationen +Festplatten-Array auswählen, die für `parity`-Informationen reserviert wird. Mit einer Festplatte für Parität können Sie von einem einzelnen Festplattenausfall wiederherstellen, ähnlich wie bei RAID5.

Wenn Sie von mehr Festplattenausfällen wiederherstellen möchten, @@ -250,32 +193,35 @@ Wiederherstellung von einem weiteren Festplattenausfall.

Als Paritätsfestplatten müssen Sie die größten Festplatten im Array auswählen, da die Paritätsinformationen auf die Größe der größten Datenfestplatte im Array anwachsen können. -

Diese Festplatten werden zum Speichern der parity-Dateien +

Diese Festplatten werden zum Speichern der `parity`-Dateien reserviert. Sie sollten Ihre Daten nicht darauf speichern. -

Anschließend müssen Sie die data-Festplatten definieren, die Sie +

Anschließend müssen Sie die `data`-Festplatten definieren, die Sie mit SnapRAID schützen möchten. Der Schutz ist effektiver, wenn diese Festplatten Daten enthalten, die sich selten ändern. Aus diesem Grund ist es besser, die Windows C:\-Festplatte oder die Unix-Verzeichnisse /home, /var und /tmp NICHT einzuschließen. -

Die Liste der Dateien wird in den content-Dateien gespeichert, +

Die Liste der Dateien wird in den `content`-Dateien gespeichert, die normalerweise auf den Daten-, Paritäts- oder Boot-Festplatten gespeichert werden. Diese Datei enthält die Details Ihrer Sicherung, einschließlich aller Prüfsummen zur Überprüfung ihrer Integrität. -Die content-Datei wird in mehreren Kopien gespeichert, und jede Kopie +Die `content`-Datei wird in mehreren Kopien gespeichert, und jede Kopie muss sich auf einer anderen Festplatte befinden, um sicherzustellen, dass selbst bei mehreren Festplattenausfällen mindestens eine Kopie verfügbar ist.

Angenommen, Sie sind nur an einer Paritätsstufe des Schutzes interessiert und Ihre Festplatten befinden sich unter: -

+

+
 /mnt/diskp <- ausgewählte Festplatte für Parität
 /mnt/disk1 <- erste zu schützende Festplatte
 /mnt/disk2 <- zweite zu schützende Festplatte
 /mnt/disk3 <- dritte zu schützende Festplatte
 
+

Sie müssen die Konfigurationsdatei /etc/snapraid.conf mit den folgenden Optionen erstellen: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -284,9 +230,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Wenn Sie Windows verwenden, sollten Sie das Windows-Pfadformat mit Laufwerksbuchstaben und Backslashes anstelle von Slashes verwenden. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -295,17 +243,22 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Wenn Sie viele Festplatten haben und keine Laufwerksbuchstaben mehr verfügbar sind, können Sie Festplatten direkt in Unterordnern einhängen (mounten). Siehe: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

Zu diesem Zeitpunkt sind Sie bereit, den Befehl sync auszuführen, +

+

Zu diesem Zeitpunkt sind Sie bereit, den Befehl `sync` auszuführen, um die Paritätsinformationen zu erstellen. -

+

+
 snapraid sync
 
+

Dieser Vorgang kann beim ersten Mal mehrere Stunden dauern, abhängig von der Größe der bereits auf den Festplatten vorhandenen Daten. Wenn die Festplatten leer sind, ist der Vorgang sofort abgeschlossen. @@ -313,18 +266,19 @@ Wenn die Festplatten leer sind, ist der Vorgang sofort abgeschlossen. nächsten Lauf wird er dort fortgesetzt, wo er unterbrochen wurde.

Wenn dieser Befehl abgeschlossen ist, sind Ihre Daten SICHER.

Jetzt können Sie Ihr Array nach Belieben verwenden und die Paritätsinformationen -regelmäßig durch Ausführen des sync-Befehls aktualisieren. -

-

+regelmäßig durch Ausführen des `sync`-Befehls aktualisieren. +

4.1 Scrubbing -

+

Um die Daten und die Parität regelmäßig auf Fehler zu überprüfen, -können Sie den Befehl scrub ausführen. -

+können Sie den Befehl `scrub` ausführen.
+

+
 snapraid scrub
 
+

Dieser Befehl vergleicht die Daten in Ihrem Array mit dem Hash, -der während des sync-Befehls berechnet wurde, um die Integrität +der während des `sync`-Befehls berechnet wurde, um die Integrität zu überprüfen.

Jeder Lauf des Befehls überprüft ungefähr 8% des Arrays, ausgenommen Daten, die bereits in den letzten 10 Tagen gescrubbed wurden. @@ -332,41 +286,47 @@ Sie können die Option -p, --plan verwenden, um eine andere Menge anzugeben, und die Option -o, --older-than, um ein anderes Alter in Tagen anzugeben. Zum Beispiel, um 5% des Arrays auf Blöcke zu überprüfen, die älter als 20 Tage sind, verwenden Sie: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Wenn während des Vorgangs stille oder Eingabe-/Ausgabefehler gefunden werden, werden die entsprechenden Blöcke in der -content-Datei als fehlerhaft (bad) markiert und im Befehl -status aufgelistet. -

+`content`-Datei als fehlerhaft (bad) markiert und im Befehl
+`status` aufgelistet.
+

+
 snapraid status
 
-

Um sie zu beheben, können Sie den Befehl fix verwenden und dabei +

+

Um sie zu beheben, können Sie den Befehl `fix` verwenden und dabei nach fehlerhaften Blöcken mit der Option -e, --filter-error filtern: -

+

+
 snapraid -e fix
 
-

Beim nächsten scrub verschwinden die Fehler aus dem status-Bericht, +

+

Beim nächsten `scrub` verschwinden die Fehler aus dem `status`-Bericht, wenn sie tatsächlich behoben sind. Um es schneller zu machen, können Sie -p bad verwenden, um nur als fehlerhaft markierte Blöcke zu scrubben. -

+

+
 snapraid -p bad scrub
 
-

Das Ausführen von scrub auf einem nicht synchronisierten Array +

+

Das Ausführen von `scrub` auf einem nicht synchronisierten Array kann Fehler melden, die durch entfernte oder geänderte Dateien -verursacht wurden. Diese Fehler werden in der scrub-Ausgabe +verursacht wurden. Diese Fehler werden in der `scrub`-Ausgabe gemeldet, aber die zugehörigen Blöcke werden nicht als fehlerhaft markiert. -

-
-

+

4.2 Pooling -

+

Hinweis: Die unten beschriebene Pooling-Funktion wurde durch das -Tool mergerfs ersetzt, das jetzt die empfohlene Option für Linux-Benutzer +Tool mergefs ersetzt, das jetzt die empfohlene Option für Linux-Benutzer in der SnapRAID-Community ist. Mergefs bietet eine flexiblere und effizientere Möglichkeit, mehrere Laufwerke zu einem einzigen, vereinheitlichten Einhängepunkt (Mount Point) zusammenzufassen, @@ -376,31 +336,40 @@ Es lässt sich gut mit SnapRAID zum Paritätsschutz integrieren und wird häufig in Setups wie OpenMediaVault (OMV) oder benutzerdefinierten NAS-Konfigurationen verwendet.

Um alle Dateien in Ihrem Array im selben Verzeichnisbaum anzuzeigen, -können Sie die pooling-Funktion aktivieren. Sie erstellt eine +können Sie die `pooling`-Funktion aktivieren. Sie erstellt eine schreibgeschützte virtuelle Ansicht aller Dateien in Ihrem Array mithilfe symbolischer Links. -

Sie können das pooling-Verzeichnis in der Konfigurationsdatei +

Sie können das `pooling`-Verzeichnis in der Konfigurationsdatei mit folgender Option konfigurieren: -

+

+
 pool /pool
 
+

oder, wenn Sie Windows verwenden, mit: -

+

+
 pool C:\pool
 
-

und anschließend den Befehl pool ausführen, um die virtuelle +

+

und anschließend den Befehl `pool` ausführen, um die virtuelle Ansicht zu erstellen oder zu aktualisieren. -

+

+
 snapraid pool
 
+

Wenn Sie eine Unix-Plattform verwenden und dieses Verzeichnis über das Netzwerk für Windows- oder Unix-Maschinen freigeben möchten, sollten Sie die folgenden Optionen zu Ihrer /etc/samba/smb.conf hinzufügen: -

+

+
 # Im globalen Abschnitt von smb.conf
 unix extensions = no
 
+
+
 # Im Freigabe-Abschnitt von smb.conf
 [pool]
@@ -411,112 +380,126 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

In Windows erfordert die Freigabe symbolischer Links über ein Netzwerk, dass Clients diese remote auflösen. Um dies zu ermöglichen, müssen Sie neben der Freigabe des Pool-Verzeichnisses auch alle Festplatten unabhängig freigeben, indem Sie die in der Konfigurationsdatei definierten Festplattennamen als Freigabepunkte verwenden. -Sie müssen auch in der Option share der Konfigurationsdatei +Sie müssen auch in der Option `share` der Konfigurationsdatei den Windows UNC-Pfad angeben, den Remote-Clients benötigen, um auf diese freigegebenen Festplatten zuzugreifen. -

Zum Beispiel, wenn Sie von einem Server namens darkstar aus +

Zum Beispiel, wenn Sie von einem Server namens `darkstar` aus arbeiten, können Sie die Optionen verwenden: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

und die folgenden Verzeichnisse über das Netzwerk freigeben: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

um Remote-Clients den Zugriff auf alle Dateien unter \\darkstar\pool zu ermöglichen.

Möglicherweise müssen Sie auch Remote-Clients konfigurieren, um den Zugriff auf Remote-Symlinks mit dem Befehl zu aktivieren: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID funktioniert eher wie ein Sicherungsprogramm als ein RAID-System und kann verwendet werden, um Dateien in ihren vorherigen Zustand wiederherzustellen oder das Löschen rückgängig zu machen, indem die Option -f, --filter verwendet wird: -

+

+
 snapraid fix -f DATEI
 
+

oder für ein Verzeichnis: -

+

+
 snapraid fix -f VERZEICHNIS/
 
+

Sie können es auch verwenden, um nur versehentlich gelöschte Dateien innerhalb eines Verzeichnisses wiederherzustellen, indem Sie die Option -m, --filter-missing verwenden, die nur fehlende Dateien wiederherstellt und alle anderen unberührt lässt. -

+

+
 snapraid fix -m -f VERZEICHNIS/
 
+

Oder um alle gelöschten Dateien auf allen Laufwerken wiederherzustellen mit: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

Das Schlimmste ist passiert, und Sie haben eine oder mehrere Festplatten verloren!

KEINE PANIK! Sie werden in der Lage sein, sie wiederherzustellen!

Das erste, was Sie tun müssen, ist, weitere Änderungen an Ihrem Festplatten-Array zu vermeiden. Deaktivieren Sie alle Remote-Verbindungen dazu und alle geplanten Prozesse, einschließlich geplanter SnapRAID-nächtlicher -sync- oder scrub-Läufe. +`sync`- oder `scrub`-Läufe.

Fahren Sie dann mit den folgenden Schritten fort. -

-

+

4.4.1 STEP 1 -> Reconfigure -

+

Sie benötigen etwas Platz zur Wiederherstellung, idealerweise auf zusätzlichen Ersatzfestplatten, aber eine externe USB-Festplatte oder eine Remote-Festplatte ist ausreichend. -

Ändern Sie die SnapRAID-Konfigurationsdatei so, dass die data- -oder parity-Option der ausgefallenen Festplatte auf einen Ort mit +

Ändern Sie die SnapRAID-Konfigurationsdatei so, dass die `data`- +oder `parity`-Option der ausgefallenen Festplatte auf einen Ort mit genügend leerem Speicherplatz zur Wiederherstellung der Dateien zeigt. -

Wenn zum Beispiel die Festplatte d1 ausgefallen ist, ändern Sie von: -

+

Wenn zum Beispiel die Festplatte `d1` ausgefallen ist, ändern Sie von: +

+
 data d1 /mnt/disk1/
 
+

zu: -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Wenn die wiederherzustellende Festplatte eine Paritätsfestplatte ist, -aktualisieren Sie die entsprechende parity-Option. +aktualisieren Sie die entsprechende `parity`-Option. Wenn Sie mehrere ausgefallene Festplatten haben, aktualisieren Sie alle ihre Konfigurationsoptionen. -

-
-

+

4.4.2 STEP 2 -> Fix -

-

Führen Sie den fix-Befehl aus und speichern Sie das Protokoll + +

Führen Sie den `fix`-Befehl aus und speichern Sie das Protokoll in einer externen Datei mit: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Wobei NAME der Name der Festplatte ist, wie z.B. d1 in unserem +

+

Wobei NAME der Name der Festplatte ist, wie z.B. `d1` in unserem vorherigen Beispiel. Wenn die wiederherzustellende Festplatte eine -Paritätsfestplatte ist, verwenden Sie die Namen parity, 2-parity, +Paritätsfestplatte ist, verwenden Sie die Namen `parity`, `2-parity`, usw. Wenn Sie mehrere ausgefallene Festplatten haben, verwenden Sie mehrere -d-Optionen, um alle anzugeben.

Dieser Befehl wird lange dauern. @@ -525,100 +508,93 @@ Datei fix.log zu speichern. Führen Sie ihn von einer Festplatte mit ausreichend freiem Speicherplatz aus.

Jetzt haben Sie alles wiederhergestellt, was wiederherstellbar ist. Wenn einige Dateien teilweise oder vollständig nicht wiederherstellbar -sind, werden sie umbenannt, indem die Erweiterung .unrecoverable +sind, werden sie umbenannt, indem die Erweiterung `.unrecoverable` hinzugefügt wird.

Sie finden eine detaillierte Liste aller nicht wiederherstellbaren Blöcke in der Datei fix.log, indem Sie alle Zeilen überprüfen, -die mit unrecoverable: beginnen. +die mit `unrecoverable:` beginnen.

Wenn Sie mit der Wiederherstellung nicht zufrieden sind, können Sie sie so oft wie gewünscht wiederholen. -

Wenn Sie zum Beispiel Dateien nach dem letzten sync aus dem Array +

Wenn Sie zum Beispiel Dateien nach dem letzten `sync` aus dem Array entfernt haben, kann dies dazu führen, dass einige Dateien nicht -wiederhergestellt werden. In diesem Fall können Sie den fix +wiederhergestellt werden. In diesem Fall können Sie den `fix` mithilfe der Option -i, --import wiederholen, wobei Sie angeben, wo sich diese Dateien jetzt befinden, um sie erneut in den Wiederherstellungsprozess einzubeziehen.

Wenn Sie mit der Wiederherstellung zufrieden sind, können Sie fortfahren, aber beachten Sie, dass Sie nach der Synchronisierung -den fix-Befehl nicht mehr wiederholen können! -

-
-

+den `fix`-Befehl nicht mehr wiederholen können! +

4.4.3 STEP 3 -> Check -

-

Als vorsichtige Überprüfung können Sie jetzt einen check-Befehl + +

Als vorsichtige Überprüfung können Sie jetzt einen `check`-Befehl ausführen, um sicherzustellen, dass auf der wiederhergestellten Festplatte alles korrekt ist. -

+

+
 snapraid -d NAME -a check
 
-

Wobei NAME der Name der Festplatte ist, wie z.B. d1 in unserem +

+

Wobei NAME der Name der Festplatte ist, wie z.B. `d1` in unserem vorherigen Beispiel.

Die Optionen -d und -a weisen SnapRAID an, nur die angegebene Festplatte zu überprüfen und alle Paritätsdaten zu ignorieren.

Dieser Befehl wird lange dauern, aber wenn Sie nicht übermäßig vorsichtig sind, können Sie ihn überspringen. -

-
-

+

4.4.4 STEP 4 -> Sync -

-

Führen Sie den sync-Befehl aus, um das Array mit der neuen + +

Führen Sie den `sync`-Befehl aus, um das Array mit der neuen Festplatte zu resynchronisieren. -

+

+
 snapraid sync
 
+

Wenn alles wiederhergestellt ist, ist dieser Befehl sofort. -

-
-
-
-

+

5 Commands -

+

SnapRAID bietet einige einfache Befehle, mit denen Sie:

  • -Den Status des Arrays ausgeben -> status +Den Status des Arrays ausgeben -> `status`
  • -Die Festplatten steuern -> smart, probe, up, down +Die Festplatten steuern -> `smart`, `probe`, `up`, `down`
  • -Eine Sicherung/einen Snapshot erstellen -> sync +Eine Sicherung/einen Snapshot erstellen -> `sync`
  • -Daten regelmäßig überprüfen -> scrub +Daten regelmäßig überprüfen -> `scrub`
  • -Die letzte Sicherung/den letzten Snapshot wiederherstellen -> fix. +Die letzte Sicherung/den letzten Snapshot wiederherstellen -> `fix`.

Befehle müssen in Kleinbuchstaben geschrieben werden. -

-

+

5.1 status -

+

Gibt eine Zusammenfassung des Zustands des Festplatten-Arrays aus.

Es enthält Informationen zur Paritätsfragmentierung, wie alt die Blöcke sind, ohne Überprüfung, und alle aufgezeichneten stillen Fehler, die beim Scrubbing aufgetreten sind.

Die präsentierten Informationen beziehen sich auf den letzten Zeitpunkt, -zu dem Sie sync ausgeführt haben. Spätere Änderungen werden +zu dem Sie `sync` ausgeführt haben. Spätere Änderungen werden nicht berücksichtigt.

Wenn fehlerhafte Blöcke erkannt wurden, werden deren Blocknummern -aufgelistet. Um sie zu beheben, können Sie den Befehl fix -e +aufgelistet. Um sie zu beheben, können Sie den Befehl `fix -e` verwenden.

Es zeigt auch ein Diagramm an, das den letzten Zeitpunkt darstellt, zu dem jeder Block gescrubbed oder synchronisiert wurde. Gescrubbed -Blöcke werden mit *, Blöcke, die synchronisiert, aber noch nicht -gescrubbed wurden, mit o angezeigt. +Blöcke werden mit '*', Blöcke, die synchronisiert, aber noch nicht +gescrubbed wurden, mit 'o' angezeigt.

Es wird nichts geändert. -

-
-

+

5.2 smart -

+

Gibt einen SMART-Bericht aller Festplatten im System aus.

Es enthält eine Schätzung der Ausfallwahrscheinlichkeit im nächsten Jahr, sodass Sie die Wartungsersetzung von Festplatten planen können, @@ -626,191 +602,148 @@ die verdächtige Attribute aufweisen.

Diese Wahrscheinlichkeitsschätzung wird durch Korrelation der SMART-Attribute der Festplatten mit den Backblaze-Daten erhalten, die unter folgender Adresse verfügbar sind: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Wenn SMART meldet, dass eine Festplatte ausfällt, wird FAIL -oder PREFAIL für diese Festplatte gedruckt, und SnapRAID +

+

Wenn SMART meldet, dass eine Festplatte ausfällt, wird `FAIL` +oder `PREFAIL` für diese Festplatte gedruckt, und SnapRAID endet mit einem Fehler. In diesem Fall wird ein sofortiger Austausch der Festplatte dringend empfohlen.

Weitere mögliche Statuszeichenfolgen sind: -

-
-
+

+ + + +
logfail -
+
In der Vergangenheit lagen einige Attribute unter dem Schwellenwert. - - -
-
+
logerr -
+
Das Gerätefehlerprotokoll enthält Fehler. - - -
-
+
selferr -
+
Das Geräte-Selbsttestprotokoll enthält Fehler. - - - +

Wenn die Option -v, --verbose angegeben ist, wird eine tiefere statistische Analyse bereitgestellt. Diese Analyse kann Ihnen bei der Entscheidung helfen, ob Sie mehr oder weniger Parität benötigen. -

Dieser Befehl verwendet das smartctl-Tool und entspricht dem -Ausführen von smartctl -a auf allen Geräten. +

Dieser Befehl verwendet das `smartctl`-Tool und entspricht dem +Ausführen von `smartctl -a` auf allen Geräten.

Wenn Ihre Geräte nicht korrekt automatisch erkannt werden, können Sie -einen benutzerdefinierten Befehl mithilfe der smartctl-Option +einen benutzerdefinierten Befehl mithilfe der `smartctl`-Option in der Konfigurationsdatei angeben.

Es wird nichts geändert. -

-
-

+

5.3 probe -

+

Gibt den POWER-Zustand aller Festplatten im System aus. -

Standby bedeutet, dass die Festplatte nicht dreht. Active +

`Standby` bedeutet, dass die Festplatte nicht dreht. `Active` bedeutet, dass die Festplatte dreht. -

Dieser Befehl verwendet das smartctl-Tool und entspricht dem -Ausführen von smartctl -n standby -i auf allen Geräten. +

Dieser Befehl verwendet das `smartctl`-Tool und entspricht dem +Ausführen von `smartctl -n standby -i` auf allen Geräten.

Wenn Ihre Geräte nicht korrekt automatisch erkannt werden, können Sie -einen benutzerdefinierten Befehl mithilfe der smartctl-Option +einen benutzerdefinierten Befehl mithilfe der `smartctl`-Option in der Konfigurationsdatei angeben.

Es wird nichts geändert. -

-
-

+

5.4 up -

+

Dreht alle Festplatten des Arrays hoch (spins up).

Sie können nur bestimmte Festplatten mithilfe der Option -d, --filter-disk hochdrehen.

Das gleichzeitige Hochdrehen aller Festplatten erfordert viel Strom. Stellen Sie sicher, dass Ihr Netzteil dies aushalten kann.

Es wird nichts geändert. -

-
-

+

5.5 down -

+

Dreht alle Festplatten des Arrays herunter (spins down). -

Dieser Befehl verwendet das smartctl-Tool und entspricht dem -Ausführen von smartctl -s standby,now auf allen Geräten. +

Dieser Befehl verwendet das `smartctl`-Tool und entspricht dem +Ausführen von `smartctl -s standby,now` auf allen Geräten.

Sie können nur bestimmte Festplatten mithilfe der Option -d, --filter-disk herunterdrehen.

Um automatisch bei einem Fehler herunterzufahren, können Sie die Option -s, --spin-down-on-error mit jedem anderen Befehl verwenden, was dem -manuellen Ausführen von down bei Auftreten eines Fehlers +manuellen Ausführen von `down` bei Auftreten eines Fehlers entspricht.

Es wird nichts geändert. -

-
-

+

5.6 diff -

-

Listet alle Dateien auf, die seit dem letzten sync geändert wurden + +

Listet alle Dateien auf, die seit dem letzten `sync` geändert wurden und deren Paritätsdaten neu berechnet werden müssen.

Dieser Befehl überprüft nicht die Dateidaten, sondern nur den Dateizeitstempel, die Größe und die Inode.

Nach dem Auflisten aller geänderten Dateien wird eine Zusammenfassung der Änderungen präsentiert, gruppiert nach: -

-
-
+

+ + + + + + + +
equal -
+
Dateien, die sich seitdem nicht geändert haben. - - -
-
+
added -
+
Neu hinzugefügte Dateien, die vorher nicht vorhanden waren. - - -
-
+
removed -
+
Entfernte Dateien. - - -
-
+
updated -
+
Dateien mit einer anderen Größe oder einem anderen Zeitstempel, was bedeutet, dass sie geändert wurden. - - -
-
+
moved -
+
Auf derselben Festplatte in ein anderes Verzeichnis verschobene Dateien. Sie werden durch denselben Namen, dieselbe Größe, denselben Zeitstempel und dieselbe Inode, aber ein anderes Verzeichnis identifiziert. - - -
-
+
copied -
-Dateien, die auf dieselbe oder eine andere Festplatte -kopiert wurden, wobei die Originaldatei noch vorhanden ist. -Sie werden dadurch identifiziert, dass sie denselben Namen, -dieselbe Größe und denselben Zeitstempel haben. -Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige -Pfad übereinstimmen, um identifiziert zu werden, nicht nur -der Name. -
- -
-
-relocated -
-Dateien, die auf dieselbe oder eine andere Festplatte -verschoben wurden, wobei das Original verschwunden ist. -Sie werden dadurch identifiziert, dass sie denselben Namen, -dieselbe Größe und denselben Zeitstempel haben. -Wenn der Subsekunden-Zeitstempel Null ist, muss der vollständige -Pfad übereinstimmen, um identifiziert zu werden. -Im Gegensatz zu 'moved' Dateien auf derselben Festplatte haben -verschobene Dateien einen anderen Inode. -
-
-
-
+
+Auf dieselbe oder eine andere Festplatte kopierte +Dateien. Beachten Sie, dass wenn sie tatsächlich auf eine +andere Festplatte verschoben werden, sie auch unter `removed` +gezählt werden. Sie werden durch denselben Namen, dieselbe +Größe und denselben Zeitstempel identifiziert. Wenn der +Untersekunden-Zeitstempel Null ist, muss der vollständige +Pfad übereinstimmen, nicht nur der Name. +
restored -
-Dateien mit einem anderen Inode, aber passendem -Verzeichnis, Namen, Größe und Zeitstempel. -Dies sind in der Regel Dateien, die nach dem Löschen -wiederhergestellt wurden. -
- - -

Wenn ein sync erforderlich ist, ist der Rückgabecode des Prozesses 2 +

+Dateien mit einer anderen Inode, aber übereinstimmendem +Namen, Größe und Zeitstempel. Dies sind normalerweise +Dateien, die nach dem Löschen wiederhergestellt wurden. +
+

Wenn ein `sync` erforderlich ist, ist der Rückgabecode des Prozesses 2 anstelle des Standardwerts 0. Der Rückgabecode 1 wird für eine allgemeine Fehlerbedingung verwendet.

Es wird nichts geändert. -

-
-

+

5.7 sync -

+

Aktualisiert die Paritätsinformationen. Alle geänderten Dateien im Festplatten-Array werden gelesen, und die entsprechenden Paritätsdaten werden aktualisiert.

Sie können diesen Vorgang jederzeit durch Drücken von Strg+C anhalten, ohne die bereits geleistete Arbeit zu verlieren. -Beim nächsten Lauf wird der sync-Vorgang dort fortgesetzt, +Beim nächsten Lauf wird der `sync`-Vorgang dort fortgesetzt, wo er unterbrochen wurde.

Wenn während des Vorgangs stille oder Eingabe-/Ausgabefehler gefunden werden, werden die entsprechenden Blöcke als fehlerhaft @@ -825,13 +758,11 @@ berechnet. Wenn die Datei auf eine andere Festplatte verschoben wird, wird die Parität neu berechnet, aber die zuvor berechneten Hash-Informationen werden beibehalten. -

Die content- und parity-Dateien werden bei Bedarf geändert. +

Die `content`- und `parity`-Dateien werden bei Bedarf geändert. Die Dateien im Array werden NICHT geändert. -

-
-

+

5.8 scrub -

+

Scrubbt das Array und überprüft auf stille oder Eingabe-/Ausgabefehler auf Daten- und Paritätsfestplatten.

Jede Ausführung überprüft ungefähr 8% des Arrays, ausgenommen Daten, @@ -842,74 +773,70 @@ jedes Bit an Daten mindestens einmal alle drei Monate überprüft wird. der Option -p, --plan definieren, die Folgendes akzeptiert: bad - Scrubbt als fehlerhaft markierte Blöcke. new - Scrubbt gerade synchronisierte Blöcke, die noch nicht gescrubbed -

wurden. -

-
-
+

+

wurden. +

+ + + +
full -
+
Scrubbt alles. - - -
-
+
0-100 -
+
Scrubbt den angegebenen Prozentsatz der Blöcke. - - - +

Wenn Sie einen Prozentsatz angeben, können Sie auch die Option -o, --older-than verwenden, um festzulegen, wie alt der Block sein soll. Die ältesten Blöcke werden zuerst gescrubbed, um eine optimale Überprüfung zu gewährleisten. Wenn Sie nur die gerade synchronisierten Blöcke scrubben möchten, die noch nicht gescrubbed wurden, -verwenden Sie die Option -p new. +verwenden Sie die Option `-p new`.

Um Details zum Scrub-Status zu erhalten, verwenden Sie den Befehl -status. +`status`.

Für jeden gefundenen stillen oder Eingabe-/Ausgabefehler werden die -entsprechenden Blöcke in der content-Datei als fehlerhaft (bad) -markiert. Diese fehlerhaften Blöcke werden in status aufgelistet -und können mit fix -e behoben werden. Nach der Behebung werden +entsprechenden Blöcke in der `content`-Datei als fehlerhaft (bad) +markiert. Diese fehlerhaften Blöcke werden in `status` aufgelistet +und können mit `fix -e` behoben werden. Nach der Behebung werden sie beim nächsten Scrub erneut überprüft, und wenn sie als korrigiert befunden werden, wird die fehlerhafte Markierung entfernt. Um nur die fehlerhaften Blöcke zu scrubben, können Sie den Befehl -scrub -p bad verwenden. -

Es wird empfohlen, scrub nur auf einem synchronisierten Array +`scrub -p bad` verwenden. +

Es wird empfohlen, `scrub` nur auf einem synchronisierten Array auszuführen, um gemeldete Fehler zu vermeiden, die durch nicht synchronisierte Daten verursacht werden. Diese Fehler werden als keine stillen Fehler erkannt, und die Blöcke werden nicht als fehlerhaft markiert, aber solche Fehler werden in der Ausgabe des Befehls gemeldet. -

Die content-Datei wird geändert, um die Zeit der letzten +

Die `content`-Datei wird geändert, um die Zeit der letzten Überprüfung für jeden Block zu aktualisieren und fehlerhafte Blöcke zu markieren. -Die parity-Dateien werden NICHT geändert. +Die `parity`-Dateien werden NICHT geändert. Die Dateien im Array werden NICHT geändert. -

-
-

+

5.9 fix -

+

Behebt alle Dateien und die Paritätsdaten.

Alle Dateien und Paritätsdaten werden mit dem Snapshot-Zustand -verglichen, der beim letzten sync gespeichert wurde. +verglichen, der beim letzten `sync` gespeichert wurde. Wenn eine Abweichung gefunden wird, wird sie auf den gespeicherten Snapshot zurückgesetzt. -

WARNUNG! Der Befehl fix unterscheidet nicht zwischen Fehlern und +

WARNUNG! Der Befehl `fix` unterscheidet nicht zwischen Fehlern und beabsichtigten Änderungen. Er setzt den Dateizustand bedingungslos -auf den letzten sync zurück. +auf den letzten `sync` zurück.

Wenn keine andere Option angegeben ist, wird das gesamte Array verarbeitet. Verwenden Sie die Filteroptionen, um eine Teilmenge von Dateien oder Festplatten für die Operation auszuwählen. -

Um nur die Blöcke zu beheben, die während sync und scrub als +

Um nur die Blöcke zu beheben, die während `sync` und `scrub` als fehlerhaft markiert wurden, verwenden Sie die Option -e, --filter-error. Im Gegensatz zu anderen Filteroptionen wendet diese Behebungen nur -auf Dateien an, die seit dem letzten sync unverändert sind. +auf Dateien an, die seit dem letzten `sync` unverändert sind.

SnapRAID benennt alle Dateien, die nicht behoben werden können, -durch Hinzufügen der Erweiterung .unrecoverable um. +durch Hinzufügen der Erweiterung `.unrecoverable` um.

Vor dem Beheben wird das gesamte Array gescannt, um alle Dateien -zu finden, die seit der letzten sync-Operation verschoben wurden. +zu finden, die seit der letzten `sync`-Operation verschoben wurden. Diese Dateien werden anhand ihres Zeitstempels identifiziert, wobei Name und Verzeichnis ignoriert werden, und werden bei Bedarf im Wiederherstellungsprozess verwendet. Wenn Sie einige davon außerhalb @@ -917,63 +844,53 @@ des Arrays verschoben haben, können Sie die Option -i, --import verwenden, um zusätzliche Verzeichnisse zum Scannen anzugeben.

Dateien werden nur anhand des Pfads identifiziert, nicht anhand der Inode. -

Die content-Datei wird NICHT geändert. -Die parity-Dateien werden bei Bedarf geändert. +

Die `content`-Datei wird NICHT geändert. +Die `parity`-Dateien werden bei Bedarf geändert. Die Dateien im Array werden bei Bedarf geändert. -

-
-

+

5.10 check -

+

Überprüft alle Dateien und die Paritätsdaten. -

Es funktioniert wie fix, simuliert jedoch nur eine Wiederherstellung, +

Es funktioniert wie `fix`, simuliert jedoch nur eine Wiederherstellung, und es werden keine Änderungen in das Array geschrieben.

Dieser Befehl ist primär für manuelle Überprüfung gedacht, wie z.B. nach einem Wiederherstellungsprozess oder unter anderen speziellen Bedingungen. Für regelmäßige und geplante Überprüfungen verwenden -Sie scrub. +Sie `scrub`.

Wenn Sie die Option -a, --audit-only verwenden, wird nur der Hash der Dateien überprüft, und die Paritätsdaten werden für einen schnelleren Lauf ignoriert.

Dateien werden nur anhand des Pfads identifiziert, nicht anhand der Inode.

Es wird nichts geändert. -

-
-

+

5.11 list -

-

Listet alle Dateien auf, die sich zum Zeitpunkt des letzten sync + +

Listet alle Dateien auf, die sich zum Zeitpunkt des letzten `sync` im Array befanden.

Mit -v oder --verbose wird auch die Untersekundenzeit angezeigt.

Es wird nichts geändert. -

-
-

+

5.12 dup -

+

Listet alle doppelten Dateien auf. Zwei Dateien gelten als gleich, wenn ihre Hashes übereinstimmen. Die Dateidaten werden nicht gelesen; es werden nur die vorab berechneten Hashes verwendet.

Es wird nichts geändert. -

-
-

+

5.13 pool -

+

Erstellt oder aktualisiert eine virtuelle Ansicht aller -Dateien in Ihrem Festplatten-Array im pooling-Verzeichnis. +Dateien in Ihrem Festplatten-Array im `pooling`-Verzeichnis.

Die Dateien werden nicht kopiert, sondern mithilfe symbolischer Links verknüpft.

Beim Aktualisieren werden alle vorhandenen symbolischen Links und leeren Unterverzeichnisse gelöscht und durch die neue Ansicht des Arrays ersetzt. Alle anderen regulären Dateien bleiben erhalten.

Außerhalb des Pool-Verzeichnisses wird nichts geändert. -

-
-

+

5.14 devices -

+

Gibt die Low-Level-Geräte aus, die vom Array verwendet werden.

Dieser Befehl zeigt die Gerätezuordnungen im Array an und ist hauptsächlich als Skriptschnittstelle gedacht. @@ -985,11 +902,9 @@ Festplatte im Array, aber in einigen komplexeren Konfigurationen können mehrere Low-Level-Geräte von einer einzigen Festplatte im Array verwendet werden.

Es wird nichts geändert. -

-
-

+

5.15 touch -

+

Setzt einen beliebigen Untersekunden-Zeitstempel für alle Dateien, deren Untersekunden-Zeitstempel auf Null gesetzt ist.

Dies verbessert die Fähigkeit von SnapRAID, verschobene und @@ -1003,11 +918,9 @@ wenn der vollständige Pfad, die Größe und der Zeitstempel alle übereinstimmen.

Der Zeitstempel mit Sekundenpräzision wird nicht geändert, sodass alle Daten und Zeiten Ihrer Dateien erhalten bleiben. -

-
-

+

5.16 rehash -

+

Plant eine Neu-Hash-Berechnung (rehash) des gesamten Arrays.

Dieser Befehl ändert die verwendete Hash-Art, typischerweise beim Upgrade von einem 32-Bit-System auf ein 64-Bit-System, um von @@ -1015,161 +928,127 @@ MurmurHash3 auf den schnelleren SpookyHash umzuschalten.

Wenn Sie bereits den optimalen Hash verwenden, tut dieser Befehl nichts und informiert Sie darüber, dass keine Aktion erforderlich ist.

Die Neu-Hash-Berechnung wird nicht sofort durchgeführt, sondern -findet schrittweise während sync und scrub statt. -

Sie können den Neu-Hash-Zustand mithilfe von status überprüfen. +findet schrittweise während `sync` und `scrub` statt. +

Sie können den Neu-Hash-Zustand mithilfe von `status` überprüfen.

Während der Neu-Hash-Berechnung behält SnapRAID die volle -Funktionalität bei, mit der einzigen Ausnahme, dass dup keine +Funktionalität bei, mit der einzigen Ausnahme, dass `dup` keine doppelten Dateien mit einem anderen Hash erkennen kann. -

-
-

-locate -

-

Lokalisiert Dateien, die auf den Paritätsfestplatten gespeichert sind. Für jede -übereinstimmende Datei wird deren Position innerhalb der Paritätsdatei und die Anzahl -der belegten Fragmente ausgegeben. -

Sie können die Option -t, --tail verwenden, um den Vorgang auf Dateien zu beschränken, -die den angegebenen Endbereich (Tail) der Parität belegen. -

Wenn Sie diese Dateien neu zuweisen möchten, können Sie die Option --W, --force-realloc-tail verwenden. -Beachten Sie, dass solche Dateien während des Neuzuweisungsprozesses -nicht durch die Parität geschützt sind. -

-
-
-

+

6 Options -

+

SnapRAID bietet die folgenden Optionen: -

-
-
+

+ +
-c, --conf CONFIG -
+
Wählt die zu verwendende Konfigurationsdatei aus. Wenn nicht -angegeben, wird unter Unix die Datei /usr/local/etc/snapraid.conf -verwendet, falls sie existiert, andernfalls /etc/snapraid.conf. -Unter Windows wird die Datei snapraid.conf im selben -Verzeichnis wie snapraid.exe verwendet. - - - -
-
-
+angegeben, wird unter Unix die Datei `/usr/local/etc/snapraid.conf` +verwendet, falls sie existiert, andernfalls `/etc/snapraid.conf`. +Unter Windows wird die Datei `snapraid.conf` im selben +Verzeichnis wie `snapraid.exe` verwendet. +
+ + +
-f, --filter PATTERN -
-Filtert die zu verarbeitenden Dateien in check und fix. +
+Filtert die zu verarbeitenden Dateien in `check` und `fix`. Nur die Dateien, die dem angegebenen Muster entsprechen, werden verarbeitet. Diese Option kann mehrmals verwendet werden. Weitere Details zu Musterspezifikationen finden Sie im Abschnitt PATTERN. Unter Unix stellen Sie sicher, dass Globbing-Zeichen in Anführungszeichen gesetzt werden, wenn sie verwendet werden. -Diese Option kann nur mit check und fix verwendet werden. -Sie kann nicht mit sync und scrub verwendet werden, da +Diese Option kann nur mit `check` und `fix` verwendet werden. +Sie kann nicht mit `sync` und `scrub` verwendet werden, da diese immer das gesamte Array verarbeiten. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtert die zu verarbeitenden Festplatten in check, fix, up -und down. Sie müssen einen Festplattennamen angeben, wie +
+Filtert die zu verarbeitenden Festplatten in `check`, `fix`, `up` +und `down`. Sie müssen einen Festplattennamen angeben, wie in der Konfigurationsdatei definiert. Sie können auch Paritätsfestplatten -mit den Namen parity, 2-parity, 3-parity, usw. angeben, +mit den Namen `parity`, `2-parity`, `3-parity`, usw. angeben, um Vorgänge auf eine bestimmte Paritätsfestplatte zu beschränken. Wenn Sie mehrere --filter, --filter-disk und --filter-missing Optionen kombinieren, werden nur Dateien ausgewählt, die allen Filtern entsprechen. Diese Option kann mehrmals verwendet werden. -Diese Option kann nur mit check, fix, up und down verwendet -werden. Sie kann nicht mit sync und scrub verwendet werden, +Diese Option kann nur mit `check`, `fix`, `up` und `down` verwendet +werden. Sie kann nicht mit `sync` und `scrub` verwendet werden, da diese immer das gesamte Array verarbeiten. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtert die zu verarbeitenden Dateien in check und fix. +
+Filtert die zu verarbeitenden Dateien in `check` und `fix`. Nur die Dateien, die im Array fehlen oder gelöscht wurden, werden -verarbeitet. Bei Verwendung mit fix fungiert dies als -undelete-Befehl (Wiederherstellung von Gelöschtem). +verarbeitet. Bei Verwendung mit `fix` fungiert dies als +`undelete`-Befehl (Wiederherstellung von Gelöschtem). Wenn Sie mehrere --filter, --filter-disk und --filter-missing Optionen kombinieren, werden nur Dateien ausgewählt, die allen -Filtern entsprechen. Diese Option kann nur mit check und fix -verwendet werden. Sie kann nicht mit sync und scrub +Filtern entsprechen. Diese Option kann nur mit `check` und `fix` +verwendet werden. Sie kann nicht mit `sync` und `scrub` verwendet werden, da diese immer das gesamte Array verarbeiten. - - - -
-
-
+
+ + +
-e, --filter-error -
-Verarbeitet die Dateien mit Fehlern in check und fix. -Es verarbeitet nur Dateien, deren Blöcke während sync -und scrub als mit stillen oder Eingabe-/Ausgabefehlern -markiert wurden, wie in status aufgelistet. -Diese Option kann nur mit check und fix verwendet werden. -
- - -
-
-
+
+Verarbeitet die Dateien mit Fehlern in `check` und `fix`. +Es verarbeitet nur Dateien, deren Blöcke während `sync` +und `scrub` als mit stillen oder Eingabe-/Ausgabefehlern +markiert wurden, wie in `status` aufgelistet. +Diese Option kann nur mit `check` und `fix` verwendet werden. +
+ + +
-p, --plan PERC|bad|new|full -
+
Wählt den Scrub-Plan aus. Wenn PERC ein numerischer Wert von 0 bis 100 ist, wird er als Prozentsatz der zu scrubbenden Blöcke interpretiert. Anstelle eines Prozentsatzes können Sie -einen Plan angeben: bad scrubbt fehlerhafte Blöcke, -new scrubbt Blöcke, die noch nicht gescrubbed wurden, -und full scrubbt alles. -Diese Option kann nur mit scrub verwendet werden. - - - -
-
-
+einen Plan angeben: `bad` scrubbt fehlerhafte Blöcke, +`new` scrubbt Blöcke, die noch nicht gescrubbed wurden, +und `full` scrubbt alles. +Diese Option kann nur mit `scrub` verwendet werden. +
+ + +
-o, --older-than DAYS -
-Wählt den ältesten Teil des Arrays aus, der in scrub +
+Wählt den ältesten Teil des Arrays aus, der in `scrub` verarbeitet werden soll. DAYS ist das Mindestalter in Tagen, damit ein Block gescrubbed werden kann; der Standardwert ist 10. Blöcke, die als fehlerhaft markiert sind, werden immer gescrubbed, unabhängig von dieser Option. -Diese Option kann nur mit scrub verwendet werden. - - - -
-
-
+Diese Option kann nur mit `scrub` verwendet werden. +
+ + +
-a, --audit-only -
-Überprüft in check den Hash der Dateien, ohne die Paritätsdaten +
+Überprüft in `check` den Hash der Dateien, ohne die Paritätsdaten zu überprüfen. Wenn Sie nur an der Überprüfung der Dateidaten interessiert sind, kann diese Option den Überprüfungsprozess erheblich beschleunigen. -Diese Option kann nur mit check verwendet werden. - - - -
-
-
+Diese Option kann nur mit `check` verwendet werden. +
+ + +
-h, --pre-hash -
-Führt in sync eine vorläufige Hash-Phase aller neuen Daten +
+Führt in `sync` eine vorläufige Hash-Phase aller neuen Daten zur zusätzlichen Überprüfung vor der Paritätsberechnung durch. -Normalerweise wird in sync keine vorläufige Hash-Berechnung +Normalerweise wird in `sync` keine vorläufige Hash-Berechnung durchgeführt, und die neuen Daten werden unmittelbar vor der Paritätsberechnung gehasht, wenn sie zum ersten Mal gelesen werden. Dieser Vorgang tritt auf, wenn das System unter starker Last @@ -1177,36 +1056,32 @@ steht, wobei alle Festplatten drehen und eine ausgelastete CPU vorliegt. Dies ist ein Extremzustand für die Maschine, und wenn sie ein latentes Hardwareproblem hat, können stille Fehler unentdeckt bleiben, da die Daten noch nicht gehasht sind. -Um dieses Risiko zu vermeiden, können Sie den pre-hash-Modus +Um dieses Risiko zu vermeiden, können Sie den `pre-hash`-Modus aktivieren, um alle Daten zweimal lesen zu lassen und so ihre Integrität sicherzustellen. Diese Option überprüft auch im Array verschobene Dateien, um sicherzustellen, dass die Verschiebeoperation erfolgreich war, und ermöglicht es Ihnen, bei Bedarf eine -fix-Operation durchzuführen, bevor Sie fortfahren. -Diese Option kann nur mit sync verwendet werden. - - - -
-
-
+`fix`-Operation durchzuführen, bevor Sie fortfahren. +Diese Option kann nur mit `sync` verwendet werden. +
+ + +
-i, --import DIR -
+
Importiert aus dem angegebenen Verzeichnis alle Dateien, die -nach dem letzten sync aus dem Array gelöscht wurden. -Wenn Sie solche Dateien noch haben, können sie von check und -fix verwendet werden, um den Wiederherstellungsprozess zu +nach dem letzten `sync` aus dem Array gelöscht wurden. +Wenn Sie solche Dateien noch haben, können sie von `check` und +`fix` verwendet werden, um den Wiederherstellungsprozess zu verbessern. Die Dateien werden gelesen, auch in Unterverzeichnissen, und unabhängig von ihrem Namen identifiziert. -Diese Option kann nur mit check und fix verwendet werden. - - - -
-
-
+Diese Option kann nur mit `check` und `fix` verwendet werden. +
+ + +
-s, --spin-down-on-error -
+
Dreht bei jedem Fehler alle verwalteten Festplatten herunter, bevor mit einem von Null verschiedenen Statuscode beendet wird. Dies verhindert, dass die Laufwerke nach einem abgebrochenen @@ -1214,38 +1089,21 @@ Vorgang aktiv bleiben und drehen, was unnötige Hitzeentwicklung und Stromverbrauch vermeiden hilft. Verwenden Sie diese Option, um sicherzustellen, dass die Festplatten auch bei einem Befehlsfehler sicher gestoppt werden. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Wendet eine globale Bandbreitenbegrenzung für alle Festplatten an. RATE ist die Anzahl der Bytes pro Sekunde. Sie können einen Multiplikator wie K, M oder G angeben (z.B. --bw-limit 1G). - - - -
-
-
--t, --tail GRÖSSE -
-Beschränkt die Dateiliste auf diejenigen, die nicht mehr als die -angegebene Tail-Größe der Paritätsfestplatten belegen. -Sie können Multiplikatoren wie K, M, G oder T verwenden (z. B. --tail 1G). -Diese Option ist nur in Verbindung mit dem Befehl -locate gültig. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Aktiviert eine erweiterte Statusansicht, die zusätzliche Informationen anzeigt. Der Bildschirm zeigt zwei Diagramme an: Das erste Diagramm zeigt die Anzahl der gepufferten Stripes für jede @@ -1262,14 +1120,12 @@ wurde. Alle Berechnungen laufen parallel zu den Festplattenoperationen. Solange für mindestens eine Festplatte eine messbare Wartezeit vorhanden ist, deutet dies daher darauf hin, dass die CPU schnell genug ist, um mit der Arbeitslast Schritt zu halten. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Erzwingt den unsicheren Vorgang der Synchronisierung einer Datei mit Nullgröße, die zuvor nicht Null war. Wenn SnapRAID eine solche Bedingung erkennt, stoppt es den Vorgang, es sei denn, @@ -1277,15 +1133,13 @@ Sie geben diese Option an. Dies ermöglicht es Ihnen, leicht zu erkennen, wann nach einem Systemabsturz einige zugegriffene Dateien abgeschnitten (truncated) wurden. Dies ist eine mögliche Bedingung unter Linux mit den ext3/ext4-Dateisystemen. -Diese Option kann nur mit sync verwendet werden. - - - -
-
-
+Diese Option kann nur mit `sync` verwendet werden. +
+ + +
-E, --force-empty -
+
Erzwingt den unsicheren Vorgang der Synchronisierung einer Festplatte, bei der alle ursprünglichen Dateien fehlen. Wenn SnapRAID erkennt, dass alle ursprünglich auf der Festplatte @@ -1293,15 +1147,13 @@ vorhandenen Dateien fehlen oder überschrieben wurden, stoppt es den Vorgang, es sei denn, Sie geben diese Option an. Dies ermöglicht es Ihnen, leicht zu erkennen, wann ein Daten-Dateisystem nicht gemountet (eingehängt) ist. -Diese Option kann nur mit sync verwendet werden. - - - -
-
-
+Diese Option kann nur mit `sync` verwendet werden. +
+ + +
-U, --force-uuid -
+
Erzwingt den unsicheren Vorgang der Synchronisierung, Überprüfung und Behebung mit Festplatten, deren UUID geändert wurde. Wenn SnapRAID erkennt, dass einige Festplatten ihre UUID @@ -1312,16 +1164,14 @@ Es ist jedoch erlaubt, eine einzelne UUID-Änderung mit einfacher Parität zu haben und mehr mit mehrfacher Parität, da dies der normale Fall beim Austausch von Festplatten nach einer Wiederherstellung ist. -Diese Option kann nur mit sync, check oder fix verwendet +Diese Option kann nur mit `sync`, `check` oder `fix` verwendet werden. - - - -
-
-
+
+ + +
-D, --force-device -
+
Erzwingt den unsicheren Vorgang der Behebung mit unzugänglichen Festplatten oder mit Festplatten auf demselben physischen Gerät. Wenn Sie beispielsweise zwei Datenfestplatten verloren haben und @@ -1331,16 +1181,14 @@ Oder wenn Sie eine Festplatte in dem auf einer bereits verwendeten Festplatte verbleibenden freien Speicherplatz wiederherstellen möchten, wobei sie dasselbe physische Gerät gemeinsam nutzen. -Diese Option kann nur mit fix verwendet werden. - - - -
-
-
+Diese Option kann nur mit `fix` verwendet werden. +
+ + +
-N, --force-nocopy -
-Deaktiviert in sync, check und fix die Kopiererkennungsheuristik. +
+Deaktiviert in `sync`, `check` und `fix` die Kopiererkennungsheuristik. Ohne diese Option geht SnapRAID davon aus, dass Dateien mit den gleichen Attributen, wie Name, Größe und Zeitstempel, Kopien mit denselben Daten sind. Dies ermöglicht die Identifizierung von @@ -1351,214 +1199,160 @@ In einigen seltenen Fällen kann dieses Verhalten zu falsch positiven Ergebnissen oder einem langsamen Vorgang aufgrund vieler Hash-Überprüfungen führen, und diese Option ermöglicht es Ihnen, solche Probleme zu beheben. -Diese Option kann nur mit sync, check und fix verwendet +Diese Option kann nur mit `sync`, `check` und `fix` verwendet werden. - - - -
-
-
+
+ + +
-F, --force-full -
-Erzwingt in sync eine vollständige Neuberechnung der Parität. +
+Erzwingt in `sync` eine vollständige Neuberechnung der Parität. Diese Option kann verwendet werden, wenn Sie eine neue Paritätsstufe hinzufügen oder wenn Sie zu einer alten Content-Datei mit neueren Paritätsdaten zurückgekehrt sind. Anstatt die Parität von Grund auf neu zu erstellen, ermöglicht dies die Wiederverwendung der in der Content-Datei vorhandenen Hashes zur Validierung von Daten und zur Aufrechterhaltung des Datenschutzes während -des sync-Vorgangs unter Verwendung der vorhandenen Paritätsdaten. -Diese Option kann nur mit sync verwendet werden. - - - -
-
-
+des `sync`-Vorgangs unter Verwendung der vorhandenen Paritätsdaten. +Diese Option kann nur mit `sync` verwendet werden. +
+ + +
-R, --force-realloc -
-Erzwingt in sync eine vollständige Neuallokation von Dateien +
+Erzwingt in `sync` eine vollständige Neuallokation von Dateien und eine Wiederherstellung der Parität. Diese Option kann verwendet werden, um alle Dateien vollständig neu zuzuweisen und die Fragmentierung zu entfernen, während die in der Content-Datei vorhandenen Hashes zur Validierung von Daten wiederverwendet werden. -Diese Option kann nur mit sync verwendet werden. +Diese Option kann nur mit `sync` verwendet werden. WARNUNG! Diese Option ist nur für Experten gedacht, und es wird dringend empfohlen, sie nicht zu verwenden. -Sie haben während der sync-Operation KEINEN Datenschutz. - - - -
-
-
--W, --force-realloc-tail GRÖSSE -
-Funktioniert wie -R, --force-realloc, ist jedoch auf den angegebenen -Endbereich (die letzten GRÖSSE Bytes) jeder Paritätsdatei beschränkt. -Erzwingt die Neuzuweisung (Verschiebung) aller Dateifragmente/-blöcke, die -derzeit in diesem Endabschnitt gespeichert sind, sodass sie an beliebiger Stelle -in den Paritätsdateien platziert werden können, wo freier Speicherplatz -verfügbar ist (einschließlich vorhandener Lücken). -Der Hauptzweck dieser Option besteht darin, die Größe der Paritätsdatei -auf der Festplatte zu verringern. -Wenn die Neuzuweisung den gesamten Endabschnitt erfolgreich leert -(keine Blöcke verbleiben dort), wird die Paritätsdatei gekürzt, -wodurch der ungenutzte Endbereich freigegeben wird. -Sie können Multiplikatoren wie K, M, G oder T verwenden (z. B. ---force-realloc-tail 1G). -Sie können locate -t, --tail verwenden, um die betroffenen Dateien -im Voraus zu ermitteln. -WARNUNG! -Diese Option ist nur für Experten gedacht und es wird dringend -empfohlen, sie nicht zu verwenden. -Während des sync-Vorgangs besteht für die betroffenen Dateien -KEIN Datenschutz. -
-
-
-
-
-
+Sie haben während der `sync`-Operation KEINEN Datenschutz. +
+ + +
-l, --log FILE -
+
Schreibt ein detailliertes Protokoll in die angegebene Datei. Wenn diese Option nicht angegeben ist, werden unerwartete Fehler auf dem Bildschirm ausgegeben, was bei vielen Fehlern möglicherweise zu einer übermäßigen Ausgabe führt. Wenn -l, --log angegeben ist, werden nur schwerwiegende Fehler, die SnapRAID zum Stoppen bringen, auf dem Bildschirm ausgegeben. -Wenn der Pfad mit >> beginnt, wird die Datei im Anhängemodus -(append mode) geöffnet. Vorkommen von %D und %T im Namen +Wenn der Pfad mit '>>' beginnt, wird die Datei im Anhängemodus +(append mode) geöffnet. Vorkommen von '%D' und '%T' im Namen werden durch Datum und Uhrzeit im Format YYYYMMDD bzw. HHMMSS -ersetzt. In Windows-Batch-Dateien müssen Sie das %-Zeichen -verdoppeln, z.B. result-%%D.log. Um >> zu verwenden, müssen -Sie den Namen in Anführungszeichen setzen, z.B. ">>result.log". +ersetzt. In Windows-Batch-Dateien müssen Sie das '%'-Zeichen +verdoppeln, z.B. result-%%D.log. Um '>>' zu verwenden, müssen +Sie den Namen in Anführungszeichen setzen, z.B. `">>result.log"`. Um das Protokoll an die Standardausgabe oder den Standardfehler -auszugeben, können Sie ">&1" bzw. ">&2" verwenden. +auszugeben, können Sie `">&1"` bzw. `">&2"` verwenden. Beschreibungen der Protokoll-Tags finden Sie in der Datei snapraid_log.txt oder in der Manpage. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Legt ein neues Fehlerlimit fest, bevor die Ausführung gestoppt wird. Standardmäßig stoppt SnapRAID, wenn es mehr als 100 Eingabe-/Ausgabefehler feststellt, was darauf hindeutet, dass eine Festplatte wahrscheinlich ausfällt. Diese Option wirkt sich -auf sync und scrub aus, denen es gestattet ist, nach dem +auf `sync` und `scrub` aus, denen es gestattet ist, nach dem ersten Satz von Festplattenfehlern fortzufahren, um ihre Vorgänge -abzuschließen. check und fix stoppen jedoch immer beim +abzuschließen. `check` und `fix` stoppen jedoch immer beim ersten Fehler. - - - -
-
-
+
+ + +
-S, --start BLKSTART -
+
Startet die Verarbeitung ab der angegebenen Blocknummer. Dies kann nützlich sein, um die Überprüfung oder Behebung spezifischer Blöcke im Falle einer beschädigten Festplatte zu wiederholen. Diese Option ist hauptsächlich für die erweiterte manuelle Wiederherstellung gedacht. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Verarbeitet nur die angegebene Anzahl von Blöcken. Diese Option ist hauptsächlich für die erweiterte manuelle Wiederherstellung gedacht. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Generiert eine Dummy-Konfigurationsdatei aus einer vorhandenen Content-Datei. Die Konfigurationsdatei wird in die Standardausgabe geschrieben und überschreibt keine vorhandene. Diese Konfigurationsdatei enthält auch die Informationen, die zur Rekonstruktion der Festplatten-Einhängepunkte erforderlich sind, falls Sie das gesamte System verlieren. - - - -
-
-
+
+ + +
-v, --verbose -
+
Gibt mehr Informationen auf dem Bildschirm aus. Wenn einmal angegeben, werden ausgeschlossene Dateien und zusätzliche Statistiken gedruckt. Diese Option hat keine Auswirkung auf die Protokolldateien. - - - -
-
-
+
+ + +
-q, --quiet -
+
Gibt weniger Informationen auf dem Bildschirm aus. Wenn einmal angegeben, wird die Fortschrittsleiste entfernt; zweimal, die laufenden Operationen; dreimal, die Info-Meldungen; viermal, die Statusmeldungen. Schwerwiegende Fehler werden immer auf dem Bildschirm ausgegeben. Diese Option hat keine Auswirkung auf die Protokolldateien. - - - -
-
-
+
+ + +
-H, --help -
+
Gibt eine kurze Hilfeanzeige aus. - - - -
-
-
+
+ + +
-V, --version -
+
Gibt die Programmversion aus. - - - - -
-

+

+

7 Configuration -

+

SnapRAID benötigt eine Konfigurationsdatei, um zu wissen, wo sich Ihr Festplatten-Array befindet und wo die Paritätsinformationen gespeichert werden sollen. -

Unter Unix wird die Datei /usr/local/etc/snapraid.conf verwendet, -falls sie existiert, andernfalls /etc/snapraid.conf. -Unter Windows wird die Datei snapraid.conf im selben -Verzeichnis wie snapraid.exe verwendet. +

Unter Unix wird die Datei `/usr/local/etc/snapraid.conf` verwendet, +falls sie existiert, andernfalls `/etc/snapraid.conf`. +Unter Windows wird die Datei `snapraid.conf` im selben +Verzeichnis wie `snapraid.exe` verwendet.

Sie muss die folgenden Optionen (Groß- und Kleinschreibung beachten) enthalten: -

-

+

7.1 parity FILE [,FILE] ... -

+

Definiert die Dateien, die zum Speichern der Paritätsinformationen verwendet werden sollen. Die Parität ermöglicht den Schutz vor einem einzelnen Festplattenausfall, ähnlich wie bei RAID5. @@ -1574,11 +1368,9 @@ dass sie nicht fragmentiert werden, was die Leistung verbessert.

Unter Windows werden 256 MB auf jeder Festplatte ungenutzt gelassen, um die Warnung vor vollen Festplatten zu vermeiden.

Diese Option ist obligatorisch und kann nur einmal verwendet werden. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Definiert die Dateien, die zum Speichern zusätzlicher Paritätsinformationen verwendet werden sollen.

Für jede angegebene Paritätsstufe wird eine zusätzliche Schutzstufe @@ -1602,46 +1394,40 @@ aktiviert:

Jede Paritätsstufe erfordert die Anwesenheit aller vorherigen Paritätsstufen. -

Die gleichen Überlegungen wie bei der Option parity gelten. +

Die gleichen Überlegungen wie bei der Option 'parity' gelten.

Diese Optionen sind optional und können nur einmal verwendet werden. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Definiert eine alternative Datei und ein alternatives Format zum Speichern von Triple-Parität. -

Diese Option ist eine Alternative zu 3-parity, die primär für +

Diese Option ist eine Alternative zu '3-parity', die primär für Low-End-CPUs wie ARM oder AMD Phenom, Athlon und Opteron gedacht ist, die den SSSE3-Befehlssatz nicht unterstützen. In solchen Fällen bietet sie eine bessere Leistung.

Dieses Format ähnelt dem von ZFS RAIDZ3, ist aber schneller. Wie ZFS funktioniert es nicht jenseits der Triple-Parität. -

Bei Verwendung von 3-parity werden Sie gewarnt, wenn das -z-parity-Format zur Leistungsverbesserung empfohlen wird. +

Bei Verwendung von '3-parity' werden Sie gewarnt, wenn das +'z-parity'-Format zur Leistungsverbesserung empfohlen wird.

Es ist möglich, von einem Format in ein anderes zu konvertieren, indem die Konfigurationsdatei mit der gewünschten z-parity- oder -3-parity-Datei angepasst und fix zur Neuerstellung verwendet wird. -

-
-

+3-parity-Datei angepasst und `fix` zur Neuerstellung verwendet wird. +

7.4 content FILE -

+

Definiert die Datei, die zum Speichern der Liste und Prüfsummen aller im Festplatten-Array vorhandenen Dateien verwendet werden soll.

Sie kann auf einer für Daten, Parität oder einer anderen verfügbaren Festplatte platziert werden. Wenn Sie eine Datenfestplatte verwenden, wird diese Datei automatisch -vom sync-Vorgang ausgeschlossen. +vom `sync`-Vorgang ausgeschlossen.

Diese Option ist obligatorisch und kann mehrmals verwendet werden, um mehrere Kopien derselben Datei zu speichern.

Sie müssen mindestens eine Kopie für jede verwendete Paritätsfestplatte plus eine speichern. Die Verwendung zusätzlicher Kopien schadet nicht. -

-
-

+

7.5 data NAME DIR -

+

Definiert den Namen und den Einhängepunkt (Mount Point) der Datenfestplatten im Array. NAME wird zur Identifizierung der Festplatte verwendet und muss eindeutig sein. DIR ist der @@ -1650,51 +1436,33 @@ Einhängepunkt der Festplatte im Dateisystem. den NAME unverändert lassen.

Sie sollten eine Option für jede Datenfestplatte im Array verwenden.

Sie können eine Festplatte später umbenennen, indem Sie den NAME -direkt in der Konfigurationsdatei ändern und dann einen sync-Befehl +direkt in der Konfigurationsdatei ändern und dann einen `sync`-Befehl ausführen. Im Falle einer Umbenennung erfolgt die Zuordnung mithilfe der gespeicherten UUID der Festplatten. -

-
-

-extra NAME DIR -

-

Definiert den Namen und Einhängepunkt zusätzlicher Festplatten, die mit den -Befehlen smart und probe überwacht werden sollen. -

Dies ist nützlich für die Überwachung von Festplatten, die nicht Teil des -Arrays sind, aber für das Funktionieren des Systems erforderlich sind, wie -z. B. die Boot-Festplatte. -

Beachten Sie, dass solche Festplatten nicht von den Befehlen up und down -betroffen sind, da von ihnen erwartet wird, dass sie sich immer drehen. -

-
-

+

7.6 nohidden -

+

Schließt alle versteckten Dateien und Verzeichnisse aus. -Unter Unix sind versteckte Dateien solche, die mit . beginnen. +Unter Unix sind versteckte Dateien solche, die mit `.` beginnen. Unter Windows sind es solche mit dem versteckten Attribut. -

-
-

+

7.7 exclude/include PATTERN -

-

Definiert die Datei- oder Verzeichnismuster, die im sync-Vorgang + +

Definiert die Datei- oder Verzeichnismuster, die im `sync`-Vorgang ausgeschlossen oder eingeschlossen werden sollen. Alle Muster werden in der angegebenen Reihenfolge verarbeitet. -

Wenn das erste übereinstimmende Muster ein exclude-Muster ist, -wird die Datei ausgeschlossen. Wenn es ein include-Muster ist, +

Wenn das erste übereinstimmende Muster ein `exclude`-Muster ist, +wird die Datei ausgeschlossen. Wenn es ein `include`-Muster ist, wird die Datei eingeschlossen. Wenn kein Muster übereinstimmt, wird die Datei ausgeschlossen, wenn das zuletzt angegebene Muster -ein include ist, oder eingeschlossen, wenn das zuletzt angegebene -Muster ein exclude ist. +ein `include` ist, oder eingeschlossen, wenn das zuletzt angegebene +Muster ein `exclude` ist.

Weitere Details zu Musterspezifikationen finden Sie im Abschnitt PATTERN.

Diese Option kann mehrmals verwendet werden. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Definiert die grundlegende Blockgröße in Kibibytes für die Parität. Ein Kibibyte entspricht 1024 Bytes.

Die Standard-Blockgröße ist 256, was für die meisten Fälle @@ -1719,7 +1487,7 @@ Blockgröße für jede Datei verschwendet wird. Mit beispielsweise Sie 12,8 GB Parität, was zu 12,8 GB weniger verfügbarem Speicherplatz auf der Datenfestplatte führen kann.

Sie können die Menge des verschwendeten Platzes auf jeder Festplatte -mithilfe von status überprüfen. Dies ist die Menge an Platz, die Sie +mithilfe von `status` überprüfen. Dies ist die Menge an Platz, die Sie auf den Datenfestplatten freilassen oder für Dateien verwenden müssen, die nicht im Array enthalten sind. Wenn dieser Wert negativ ist, bedeutet dies, dass Sie kurz davor sind, die Parität zu füllen, @@ -1731,17 +1499,17 @@ zusätzlichen Platz, um bis zu 100.000 Dateien auf jeder Datenfestplatte ohne verschwendeten Platz zu verarbeiten.

Ein Trick, um eine größere Paritätspartition unter Linux zu erhalten, ist die Formatierung mit dem Befehl: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Dies führt zu etwa 1,5% zusätzlichem Speicherplatz, ungefähr 60 GB für eine 4 TB Festplatte, was etwa 460.000 Dateien auf jeder Datenfestplatte ohne verschwendeten Platz ermöglicht. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Definiert die Hash-Größe in Bytes für die gespeicherten Blöcke.

Die Standard-Hash-Größe beträgt 16 Bytes (128 Bit), was für die meisten Fälle ausreichen sollte. @@ -1773,27 +1541,23 @@ von 512 erhalten Sie:

 RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Speichert den Zustand beim Synchronisieren oder Scrubben automatisch nach der angegebenen Menge an verarbeiteten GB. -Diese Option ist nützlich, um zu vermeiden, dass lange sync-Befehle +Diese Option ist nützlich, um zu vermeiden, dass lange `sync`-Befehle von vorne gestartet werden müssen, wenn sie durch einen Maschinenabsturz oder ein anderes Ereignis unterbrochen werden. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Legt die maximal zulässige Festplattentemperatur in Celsius fest. Wenn angegeben, überprüft SnapRAID regelmäßig die Temperatur aller Festplatten mithilfe des smartctl-Tools. Die aktuellen Festplattentemperaturen werden während des Betriebs von SnapRAID angezeigt. Wenn eine Festplatte diesen Grenzwert überschreitet, werden alle Vorgänge gestoppt, und -die Festplatten werden für die durch die Option temp_sleep definierte +die Festplatten werden für die durch die Option `temp_sleep` definierte Dauer heruntergefahren (in den Standby-Modus versetzt). Nach der Schlafperiode werden die Vorgänge fortgesetzt und möglicherweise erneut pausiert, wenn der Temperaturgrenzwert erneut erreicht wird. @@ -1817,27 +1581,21 @@ als Fallback-Referenz verwendet.

Normalerweise zeigt SnapRAID nur die Temperatur der heißesten Festplatte an. Um die Temperatur aller Festplatten anzuzeigen, verwenden Sie die Option -A oder --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Legt die Standby-Zeit in Minuten fest, wenn der Temperaturgrenzwert erreicht wird. Während dieser Zeit bleiben die Festplatten heruntergefahren. Der Standardwert ist 5 Minuten. -

-
-

+

7.13 pool DIR -

+

Definiert das Pooling-Verzeichnis, in dem die virtuelle Ansicht des -Festplatten-Arrays mithilfe des Befehls pool erstellt wird. +Festplatten-Arrays mithilfe des Befehls `pool` erstellt wird.

Das Verzeichnis muss bereits existieren. -

-
-

+

7.14 share UNC_DIR -

+

Definiert den Windows UNC-Pfad, der für den Remote-Zugriff auf die Festplatten erforderlich ist.

Wenn diese Option angegeben ist, verwenden die im Pool-Verzeichnis @@ -1846,64 +1604,67 @@ zuzugreifen. Ohne diese Option verwenden die generierten symbolischen Links nur lokale Pfade, was die Freigabe des Pool-Verzeichnisses über das Netzwerk nicht ermöglicht.

Die symbolischen Links werden unter Verwendung des angegebenen UNC-Pfads -gebildet, wobei der in der data-Option angegebene Festplattenname +gebildet, wobei der in der `data`-Option angegebene Festplattenname und schließlich das Dateiverzeichnis und der Name hinzugefügt werden.

Diese Option ist nur für Windows erforderlich. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Definiert benutzerdefinierte smartctl-Optionen, um die SMART-Attribute für jede Festplatte abzurufen. Dies kann für RAID-Controller und einige USB-Festplatten erforderlich sein, die nicht automatisch erkannt werden können. Der Platzhalter %s wird durch den Gerätenamen ersetzt, ist aber für feste Geräte wie RAID-Controller optional. -

DISK ist derselbe Festplattenname, der in der data-Option angegeben -ist. PARITY ist einer der Paritätsnamen: parity, 2-parity, -3-parity, 4-parity, 5-parity, 6-parity oder z-parity. -

In den angegebenen OPTIONS wird die Zeichenfolge %s durch den +

DISK ist derselbe Festplattenname, der in der `data`-Option angegeben +ist. PARITY ist einer der Paritätsnamen: `parity`, `2-parity`, +`3-parity`, `4-parity`, `5-parity`, `6-parity` oder `z-parity`. +

In den angegebenen OPTIONS wird die Zeichenfolge `%s` durch den Gerätenamen ersetzt. Bei RAID-Controllern ist das Gerät -wahrscheinlich fest, und Sie müssen %s möglicherweise nicht verwenden. +wahrscheinlich fest, und Sie müssen `%s` möglicherweise nicht verwenden.

Weitere mögliche Optionen finden Sie in der smartmontools-Dokumentation: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Zum Beispiel: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignoriert das angegebene SMART-Attribut bei der Berechnung der Wahrscheinlichkeit eines Festplattenausfalls. Diese Option ist nützlich, wenn eine Festplatte ungewöhnliche oder irreführende Werte für ein bestimmtes Attribut meldet. -

DISK ist derselbe Festplattenname, der in der data-Option angegeben -ist. PARITY ist einer der Paritätsnamen: parity, 2-parity, -3-parity, 4-parity, 5-parity, 6-parity oder z-parity. +

DISK ist derselbe Festplattenname, der in der `data`-Option angegeben +ist. PARITY ist einer der Paritätsnamen: `parity`, `2-parity`, +`3-parity`, `4-parity`, `5-parity`, `6-parity` oder `z-parity`. Der Sonderwert * kann verwendet werden, um das Attribut auf allen Festplatten zu ignorieren. -

Um beispielsweise das Attribut Current Pending Sector Count auf allen +

Um beispielsweise das Attribut `Current Pending Sector Count` auf allen Festplatten zu ignorieren: -

+

+
 smartignore * 197
 
+

Um es nur auf der ersten Paritätsfestplatte zu ignorieren: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Ein Beispiel für eine typische Konfiguration für Unix ist: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1917,8 +1678,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Ein Beispiel für eine typische Konfiguration für Windows ist: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1933,84 +1696,52 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

Muster bieten eine flexible Möglichkeit, Dateien für die Einbeziehung oder -den Ausschluss zu filtern. Durch die Verwendung von Globbing-Zeichen können Sie Regeln definieren, -die mit bestimmten Dateinamen oder ganzen Verzeichnisstrukturen übereinstimmen, ohne -jeden Pfad manuell auflisten zu müssen. -

Das Fragezeichen ? entspricht einem beliebigen einzelnen Zeichen außer dem -Verzeichnistrennzeichen. Dies macht es nützlich für den Abgleich von Dateinamen mit variablen -Zeichen, während das Muster auf eine einzelne Verzeichnisebene beschränkt bleibt. -

Der einfache Stern * entspricht einer beliebigen Folge von Zeichen, aber wie das -Fragezeichen überschreitet er niemals Verzeichnisgrenzen. Er stoppt beim -Schrägstrich, was ihn für den Abgleich innerhalb einer einzelnen Pfadkomponente -geeignet macht. Dies ist das Standardverhalten von Wildcards, das vom Shell- -Globbing bekannt ist. -

Der Doppelstern ** ist mächtiger; er entspricht jeder Folge von -Zeichen einschließlich Verzeichnistrennzeichen. Dies ermöglicht es Mustern, über -mehrere Verzeichnisebenen hinweg übereinzustimmen. Wenn ** direkt in -ein Muster eingebettet ist, kann es null oder mehr Zeichen einschließlich Schrägstrichen zwischen -dem umgebenden wörtlichen Text entsprechen. -

Die wichtigste Verwendung von ** ist in der speziellen Form /**/. Dies entspricht -null oder mehr vollständigen Verzeichnisebenen, was es möglich macht, Dateien -in jeder Tiefe eines Verzeichnisbaums abzugleichen, ohne die genaue Pfadstruktur zu kennen. -Zum Beispiel entspricht das Muster src/**/main.js dem Pfad src/main.js (Überspringen -von null Verzeichnissen), src/ui/main.js (Überspringen eines Verzeichnisses) und -src/ui/components/main.js (Überspringen von zwei Verzeichnissen). -

Zeichenklassen mit eckigen Klammern [] entsprechen einem einzelnen Zeichen aus einer -bestimmten Menge oder einem Bereich. Wie die anderen Einzelzeichenmuster -entsprechen sie nicht den Verzeichnistrennzeichen. Klassen unterstützen Bereiche und Negierung durch -ein Ausrufezeichen. -

Der grundlegende Unterschied, den man sich merken sollte, ist, dass *, ? und Zeichenklassen -alle Verzeichnisgrenzen respektieren und nur innerhalb einer einzelnen Pfadkomponente -übereinstimmen, während ** das einzige Muster ist, das über Verzeichnistrennzeichen -hinweg übereinstimmen kann. + +

Muster werden verwendet, um eine Teilmenge von Dateien zum +Ausschließen oder Einschließen in den Prozess auszuwählen.

Es gibt vier verschiedene Arten von Mustern: -

-
-
+

+ +
FILE -
-Wählt jede Datei mit dem Namen FILE aus. -Dieses Muster gilt nur für Dateien, nicht für Verzeichnisse. -
- - -
-
-
+
+Wählt jede Datei namens DATEI aus. Sie können beliebige +Globbing-Zeichen wie * und ? sowie Zeichenklassen wie [a-z] +verwenden. Dieses Muster gilt nur für Dateien, nicht für +Verzeichnisse. +
+ + +
DIR/ -
-Wählt jedes Verzeichnis mit dem Namen DIR und alles darin aus. +
+Wählt jedes Verzeichnis namens VERZ und alles darin aus. +Sie können beliebige Globbing-Zeichen wie * und ? verwenden. Dieses Muster gilt nur für Verzeichnisse, nicht für Dateien. - - - -
-
-
+
+ + +
/PATH/FILE -
-Wählt den exakt angegebenen Dateipfad aus. Dieses Muster gilt -nur für Dateien, nicht für Verzeichnisse. -
- - -
-
-
+
+Wählt den exakt angegebenen Dateipfad aus. Sie können beliebige +Globbing-Zeichen wie * und ? verwenden, aber sie stimmen niemals +mit einem Verzeichnis-Slash überein. +Dieses Muster gilt nur für Dateien, nicht für Verzeichnisse. +
+ + +
/PATH/DIR/ -
-Wählt den exakt angegebenen Verzeichnispfad und alles darin aus. +
+Wählt den exakt angegebenen Verzeichnispfad und alles darin +aus. Sie können beliebige Globbing-Zeichen wie * und ? verwenden, +aber sie stimmen niemals mit einem Verzeichnis-Slash überein. Dieses Muster gilt nur für Verzeichnisse, nicht für Dateien. - - - +

Wenn Sie einen absoluten Pfad angeben, der mit / beginnt, wird er auf das Array-Stammverzeichnis angewendet, nicht auf das lokale Dateisystem-Stammverzeichnis. @@ -2019,185 +1750,128 @@ verwenden. Windows-Systemverzeichnisse, Junctions, Einhängepunkte (Mount Points) und andere spezielle Windows-Verzeichnisse werden als Dateien behandelt, was bedeutet, dass Sie zum Ausschließen eine Dateiregel verwenden müssen, nicht eine Verzeichnisregel. -

Wenn der Dateiname ein Zeichen *, ?, [, oder ] enthält, +

Wenn der Dateiname ein Zeichen '*', '?', '[', oder ']' enthält, müssen Sie es escapen, um zu vermeiden, dass es als Globbing-Zeichen -interpretiert wird. Unter Unix ist das Escape-Zeichen \; unter -Windows ist es ^. Wenn sich das Muster in der Befehlszeile befindet, +interpretiert wird. Unter Unix ist das Escape-Zeichen '\'; unter +Windows ist es '^'. Wenn sich das Muster in der Befehlszeile befindet, müssen Sie das Escape-Zeichen verdoppeln, um zu vermeiden, dass es von der Befehlsshell interpretiert wird.

In der Konfigurationsdatei können Sie verschiedene Strategien zum Filtern der zu verarbeitenden Dateien verwenden. -Der einfachste Ansatz besteht darin, nur exclude-Regeln zu verwenden, +Der einfachste Ansatz besteht darin, nur `exclude`-Regeln zu verwenden, um alle Dateien und Verzeichnisse zu entfernen, die Sie nicht verarbeiten möchten. Zum Beispiel: -

-# Schließt jede Datei namens *.unrecoverable aus
+

+
+# Schließt jede Datei namens `*.unrecoverable` aus
 exclude *.unrecoverable
-# Schließt das Stammverzeichnis /lost+found aus
+# Schließt das Stammverzeichnis `/lost+found` aus
 exclude /lost+found/
-# Schließt jedes Unterverzeichnis namens tmp aus
+# Schließt jedes Unterverzeichnis namens `tmp` aus
 exclude tmp/
 
+

Der gegenteilige Ansatz besteht darin, nur die Dateien zu definieren, -die Sie verarbeiten möchten, indem Sie nur include-Regeln verwenden. +die Sie verarbeiten möchten, indem Sie nur `include`-Regeln verwenden. Zum Beispiel: -

+

+
 # Schließt nur einige Verzeichnisse ein
 include /movies/
 include /musics/
 include /pictures/
 
-

Der letzte Ansatz besteht darin, exclude- und include-Regeln +

+

Der letzte Ansatz besteht darin, `exclude`- und `include`-Regeln zu mischen. In diesem Fall ist die Reihenfolge der Regeln wichtig. Frühere Regeln haben Vorrang vor späteren. -Zur Vereinfachung können Sie zuerst alle exclude-Regeln und -dann alle include-Regeln auflisten. Zum Beispiel: -

-# Schließt jede Datei namens *.unrecoverable aus
+Zur Vereinfachung können Sie zuerst alle `exclude`-Regeln und
+dann alle `include`-Regeln auflisten. Zum Beispiel:
+

+
+# Schließt jede Datei namens `*.unrecoverable` aus
 exclude *.unrecoverable
-# Schließt jedes Unterverzeichnis namens tmp aus
+# Schließt jedes Unterverzeichnis namens `tmp` aus
 exclude tmp/
 # Schließt nur einige Verzeichnisse ein
 include /movies/
 include /musics/
 include /pictures/
 
-

In der Befehlszeile können Sie mit der Option -f nur include-Muster +

+

In der Befehlszeile können Sie mit der Option -f nur `include`-Muster verwenden. Zum Beispiel: -

+

+
 # Überprüft nur die .mp3-Dateien.
 # Unter Unix Anführungszeichen verwenden, um die Globbing-Erweiterung durch die Shell zu vermeiden.
 snapraid -f "*.mp3" check
 
+

Unter Unix müssen Sie Globbing-Zeichen in der Befehlszeile in Anführungszeichen setzen, um zu verhindern, dass die Shell sie erweitert. -

-
-

-Dateien Ignorieren -

-

Zusätzlich zu den globalen Regeln in der Konfigurationsdatei können Sie -.snapraidignore-Dateien in jedem Verzeichnis innerhalb des Arrays platzieren, -um dezentrale Ausschlussregeln zu definieren. -

Regeln, die in .snapraidignore definiert sind, werden nach den Regeln in der -Konfigurationsdatei angewendet. Dies bedeutet, dass sie eine höhere Priorität haben -und verwendet werden können, um Dateien auszuschließen, die zuvor durch die globale -Konfiguration eingeschlossen wurden. Effektiv wird eine Datei ausgeschlossen, wenn -eine lokale Regel zutrifft, unabhängig von den globalen Include-Einstellungen. -

Die Musterlogik in .snapraidignore spiegelt die globale Konfiguration wider, -verankert die Muster jedoch an dem Verzeichnis, in dem sich die Datei befindet: -

-
-
-FILE -
-Wählt jede Datei namens FILE in diesem Verzeichnis oder darunter aus. -Dies folgt denselben Globbing-Regeln wie das globale Muster. -
-
-
-
-
-
-DIR/ -
-Wählt jedes Verzeichnis namens DIR und alles darin aus, das sich -in diesem Verzeichnis oder darunter befindet. -
-
-
-
-
-
-/PATH/FILE -
-Wählt die exakt angegebene Datei relativ zum Speicherort -der .snapraidignore-Datei aus. -
-
-
-
-
-
-/PATH/DIR/ -
-Wählt das exakt angegebene Verzeichnis und alles darin aus, -relativ zum Speicherort der .snapraidignore-Datei. -
-
-
-

Im Gegensatz zur globalen Konfiguration unterstützen .snapraidignore-Dateien nur -Ausschlussregeln; Sie können keine include-Muster oder Negationen (!) verwenden. -

Wenn Sie beispielsweise eine .snapraidignore in /mnt/disk1/projects/ haben: -

-# Schließt NUR /mnt/disk1/projects/output.bin aus
-/output.bin
-# Schließt jedes Verzeichnis namens build innerhalb von projects/ aus
-build/
-# Schließt jede .tmp-Datei innerhalb von projects/ oder deren Unterordnern aus
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID speichert die Liste und Prüfsummen Ihrer Dateien in der Content-Datei.

Es ist eine Binärdatei, die alle im Festplatten-Array vorhandenen Dateien auflistet, zusammen mit allen Prüfsummen zur Überprüfung ihrer Integrität. -

Diese Datei wird von den Befehlen sync und scrub gelesen und -geschrieben und von den Befehlen fix, check und status gelesen. -

-
-

+

Diese Datei wird von den Befehlen `sync` und `scrub` gelesen und +geschrieben und von den Befehlen `fix`, `check` und `status` gelesen. +

10 Parity -

+

SnapRAID speichert die Paritätsinformationen Ihres Arrays in den Paritätsdateien.

Dies sind Binärdateien, die die berechnete Parität aller in der -content-Datei definierten Blöcke enthalten. -

Diese Dateien werden von den Befehlen sync und fix gelesen -und geschrieben und nur von den Befehlen scrub und check gelesen. -

-
-

+`content`-Datei definierten Blöcke enthalten. +

Diese Dateien werden von den Befehlen `sync` und `fix` gelesen +und geschrieben und nur von den Befehlen `scrub` und `check` gelesen. +

11 Encoding -

+

SnapRAID ignoriert unter Unix jede Kodierung. Es liest und speichert die Dateinamen mit derselben Kodierung, die vom Dateisystem verwendet wird.

Unter Windows werden alle vom Dateisystem gelesenen Namen konvertiert und im UTF-8-Format verarbeitet.

Um Dateinamen korrekt auszugeben, müssen Sie die Windows-Konsole -mit dem Befehl chcp 65001 auf den UTF-8-Modus einstellen und -eine TrueType-Schriftart wie Lucida Console als Konsolenschriftart +mit dem Befehl `chcp 65001` auf den UTF-8-Modus einstellen und +eine TrueType-Schriftart wie `Lucida Console` als Konsolenschriftart verwenden. Dies betrifft nur die gedruckten Dateinamen; wenn Sie die Konsolenausgabe in eine Datei umleiten, ist die resultierende Datei immer im UTF-8-Format. -

+

+

+

-
-
-
+
- - + diff --git a/manual-es.html b/manual-es.html index 9775c337..09d6b4d9 100644 --- a/manual-es.html +++ b/manual-es.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID es un programa de copia de seguridad diseñado para arrays de discos, que almacena información de paridad para la recuperación de datos en caso de hasta seis fallos de disco. @@ -184,14 +129,14 @@ ahorrando energía y reduciendo el ruido.

Para más información, visite el sitio oficial de SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID es un híbrido entre un programa RAID y un programa de copia de seguridad, con el objetivo de combinar los mejores beneficios de ambos. Sin embargo, tiene algunas limitaciones que debe considerar @@ -231,13 +176,11 @@ y enlaces duros. Los permisos, la propiedad y los atributos extendidos no se guardan. -

-
-

+

4 Getting Started -

+

Para usar SnapRAID, primero debe seleccionar un disco en su array de -discos para dedicarlo a la información de parity (paridad). Con un +discos para dedicarlo a la información de `parity` (paridad). Con un disco para paridad, podrá recuperarse de un solo fallo de disco, similar a RAID5.

Si desea recuperarse de más fallos de disco, similar a RAID6, @@ -246,31 +189,34 @@ paridad adicional permite la recuperación de un fallo de disco más.

Como discos de paridad, debe elegir los discos más grandes del array, ya que la información de paridad puede crecer hasta el tamaño del disco de datos más grande del array. -

Estos discos estarán dedicados a almacenar los archivos de parity. +

Estos discos estarán dedicados a almacenar los archivos de `parity`. No debe almacenar sus datos en ellos. -

Luego, debe definir los discos de data (datos) que desea proteger +

Luego, debe definir los discos de `data` (datos) que desea proteger con SnapRAID. La protección es más efectiva si estos discos contienen datos que rara vez cambian. Por esta razón, es mejor NO incluir el disco C:\ de Windows o los directorios /home, /var y /tmp de Unix. -

La lista de archivos se guarda en los archivos de content (contenido), +

La lista de archivos se guarda en los archivos de `content` (contenido), generalmente almacenados en los discos de datos, paridad o de arranque. Este archivo contiene los detalles de su copia de seguridad, incluyendo todas las sumas de comprobación para verificar su integridad. -El archivo de content se almacena en múltiples copias, y cada copia +El archivo de `content` se almacena en múltiples copias, y cada copia debe estar en un disco diferente para asegurar que, incluso en caso de múltiples fallos de disco, al menos una copia esté disponible.

Por ejemplo, suponga que solo está interesado en un nivel de paridad de protección, y sus discos están ubicados en: -

+

+
 /mnt/diskp <- disco seleccionado para paridad
 /mnt/disk1 <- primer disco a proteger
 /mnt/disk2 <- segundo disco a proteger
 /mnt/disk3 <- tercer disco a proteger
 
+

Debe crear el archivo de configuración /etc/snapraid.conf con las siguientes opciones: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -279,9 +225,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Si está en Windows, debe usar el formato de ruta de Windows, con letras de unidad y barras invertidas en lugar de barras. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -290,16 +238,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Si tiene muchos discos y se queda sin letras de unidad, puede montar discos directamente en subcarpetas. Consulte: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

En este punto, está listo para ejecutar el comando sync (sincronizar) +

+

En este punto, está listo para ejecutar el comando `sync` (sincronizar) para construir la información de paridad. -

+

+
 snapraid sync
 
+

Este proceso puede llevar varias horas la primera vez, dependiendo del tamaño de los datos ya presentes en los discos. Si los discos están vacíos, el proceso es inmediato. @@ -307,55 +260,62 @@ están vacíos, el proceso es inmediato. siguiente ejecución, se reanudará donde se interrumpió.

Cuando este comando se complete, sus datos estarán SEGUROS.

Ahora puede comenzar a usar su array como desee y periódicamente -actualizar la información de paridad ejecutando el comando sync. -

-

+actualizar la información de paridad ejecutando el comando `sync`. +

4.1 Scrubbing -

+

Para verificar periódicamente los datos y la paridad en busca de -errores, puede ejecutar el comando scrub (fregar/limpiar). -

+errores, puede ejecutar el comando `scrub` (fregar/limpiar).
+

+
 snapraid scrub
 
+

Este comando compara los datos de su array con el hash calculado -durante el comando sync para verificar la integridad. +durante el comando `sync` para verificar la integridad.

Cada ejecución del comando verifica aproximadamente el 8% del array, excluyendo los datos ya fregados en los 10 días anteriores. Puede usar la opción -p, --plan para especificar una cantidad diferente y la opción -o, --older-than para especificar una edad diferente en días. Por ejemplo, para verificar el 5% del array en busca de bloques con más de 20 días, use: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Si se encuentran errores silenciosos o de entrada/salida durante el proceso, los bloques correspondientes se marcan como defectuosos en -el archivo de content y se listan en el comando status. -

+el archivo de `content` y se listan en el comando `status`.
+

+
 snapraid status
 
-

Para corregirlos, puede usar el comando fix (arreglar), filtrando +

+

Para corregirlos, puede usar el comando `fix` (arreglar), filtrando por bloques defectuosos con la opción -e, --filter-error: -

+

+
 snapraid -e fix
 
-

En el siguiente scrub, los errores desaparecerán del informe de -status si realmente se han corregido. Para hacerlo más rápido, +

+

En el siguiente `scrub`, los errores desaparecerán del informe de +`status` si realmente se han corregido. Para hacerlo más rápido, puede usar -p bad para fregar solo los bloques marcados como defectuosos. -

+

+
 snapraid -p bad scrub
 
-

Ejecutar scrub en un array no sincronizado puede reportar errores +

+

Ejecutar `scrub` en un array no sincronizado puede reportar errores causados por archivos eliminados o modificados. Estos errores se -informan en la salida de scrub, pero los bloques relacionados no +informan en la salida de `scrub`, pero los bloques relacionados no se marcan como defectuosos. -

-
-

+

4.2 Pooling -

+

Nota: La función de pooling descrita a continuación ha sido -sustituida por la herramienta mergerfs, que ahora es la opción +sustituida por la herramienta mergefs, que ahora es la opción recomendada para los usuarios de Linux en la comunidad SnapRAID. Mergefs proporciona una forma más flexible y eficiente de agrupar múltiples unidades en un único punto de montaje unificado, @@ -364,29 +324,38 @@ sin depender de enlaces simbólicos. Se integra bien con SnapRAID para la protección de paridad y se usa comúnmente en configuraciones como OpenMediaVault (OMV) o configuraciones NAS personalizadas.

Para que todos los archivos de su array se muestren en el mismo árbol -de directorios, puede habilitar la función de pooling (agrupación). +de directorios, puede habilitar la función de `pooling` (agrupación). Crea una vista virtual de solo lectura de todos los archivos de su array utilizando enlaces simbólicos. -

Puede configurar el directorio de pooling en el archivo de +

Puede configurar el directorio de `pooling` en el archivo de configuración con: -

+

+
 pool /pool
 
+

o, si está en Windows, con: -

+

+
 pool C:\pool
 
-

y luego ejecute el comando pool para crear o actualizar la vista virtual. -

+
+

y luego ejecute el comando `pool` para crear o actualizar la vista virtual. +

+
 snapraid pool
 
+

Si está utilizando una plataforma Unix y desea compartir este directorio a través de la red con máquinas Windows o Unix, debe agregar las siguientes opciones a su /etc/samba/smb.conf: -

+

+
 # En la sección global de smb.conf
 unix extensions = no
 
+
+
 # En la sección de compartir de smb.conf
 [pool]
@@ -397,68 +366,79 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

En Windows, compartir enlaces simbólicos a través de una red requiere que los clientes los resuelvan de forma remota. Para habilitar esto, además de compartir el directorio pool, también debe compartir todos los discos de forma independiente, utilizando los nombres de disco definidos en el archivo de configuración como puntos de recurso -compartido. También debe especificar en la opción share del archivo +compartido. También debe especificar en la opción `share` del archivo de configuración la ruta UNC de Windows que los clientes remotos necesitan usar para acceder a estos discos compartidos. -

Por ejemplo, operando desde un servidor llamado darkstar, puede usar +

Por ejemplo, operando desde un servidor llamado `darkstar`, puede usar las opciones: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

y compartir los siguientes directorios a través de la red: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

para permitir que los clientes remotos accedan a todos los archivos en \\darkstar\pool.

También puede que deba configurar los clientes remotos para habilitar el acceso a enlaces simbólicos remotos con el comando: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID funciona más como un programa de copia de seguridad que como un sistema RAID, y se puede usar para restaurar o recuperar archivos a su estado anterior usando la opción -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

o para un directorio: -

+

+
 snapraid fix -f DIR/
 
+

También puede usarlo para recuperar solo archivos eliminados accidentalmente dentro de un directorio usando la opción -m, --filter-missing, que restaura solo archivos faltantes, dejando todos los demás intactos. -

+

+
 snapraid fix -m -f DIR/
 
+

O para recuperar todos los archivos eliminados en todas las unidades con: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

Ha sucedido lo peor, ¡y ha perdido uno o más discos!

¡NO ENTRE EN PÁNICO! ¡Podrá recuperarlos!

Lo primero que debe hacer es evitar más cambios en su array de discos. @@ -466,40 +446,43 @@ Deshabilite cualquier conexión remota a él y cualquier proceso programado, incluida cualquier sincronización o fregado nocturno programado de SnapRAID.

Luego, proceda con los siguientes pasos. -

-

+

4.4.1 STEP 1 -> Reconfigure -

+

Necesita algo de espacio para recuperarse, idealmente en discos de repuesto adicionales, pero un disco USB externo o un disco remoto serán suficientes.

Modifique el archivo de configuración de SnapRAID para hacer que la -opción data o parity del disco fallido apunte a una ubicación +opción `data` o `parity` del disco fallido apunte a una ubicación con suficiente espacio vacío para recuperar los archivos. -

Por ejemplo, si el disco d1 ha fallado, cambie de: -

+

Por ejemplo, si el disco `d1` ha fallado, cambie de: +

+
 data d1 /mnt/disk1/
 
+

a: -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Si el disco a recuperar es un disco de paridad, actualice la opción -parity apropiada. +`parity` apropiada. Si tiene varios discos fallidos, actualice todas sus opciones de configuración. -

-
-

+

4.4.2 STEP 2 -> Fix -

+

Ejecute el comando fix, almacenando el registro en un archivo externo con: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Donde NAME es el nombre del disco, como d1 en nuestro ejemplo anterior. -Si el disco a recuperar es un disco de paridad, use los nombres parity, -2-parity, etc. +

+

Donde NAME es el nombre del disco, como `d1` en nuestro ejemplo anterior. +Si el disco a recuperar es un disco de paridad, use los nombres `parity`, +`2-parity`, etc. Si tiene varios discos fallidos, use varias opciones -d para especificarlos todos.

Este comando tardará mucho tiempo. @@ -507,280 +490,231 @@ especificarlos todos. fix.log. Ejecútelo desde un disco con suficiente espacio libre.

Ahora ha recuperado todo lo que es recuperable. Si algunos archivos son parcial o totalmente irrecuperables, se les cambiará el nombre agregando -la extensión .unrecoverable. +la extensión `.unrecoverable`.

Puede encontrar una lista detallada de todos los bloques irrecuperables -en el archivo fix.log buscando todas las líneas que comienzan con unrecoverable:. +en el archivo fix.log buscando todas las líneas que comienzan con `unrecoverable:`.

Si no está satisfecho con la recuperación, puede volver a intentarlo tantas veces como desee.

Por ejemplo, si ha eliminado archivos del array después de la última -sync, esto puede resultar en que algunos archivos no se recuperen. -En este caso, puede volver a intentar el fix usando la opción -i, +`sync`, esto puede resultar en que algunos archivos no se recuperen. +En este caso, puede volver a intentar el `fix` usando la opción -i, --import, especificando dónde están esos archivos ahora para incluirlos nuevamente en el proceso de recuperación.

Si está satisfecho con la recuperación, puede continuar, ¡pero tenga en cuenta que después de sincronizar, no puede volver -a intentar el comando fix! -

-
-

+a intentar el comando `fix`! +

4.4.3 STEP 3 -> Check -

-

Como verificación cautelosa, ahora puede ejecutar un comando check + +

Como verificación cautelosa, ahora puede ejecutar un comando `check` (comprobar) para asegurarse de que todo esté correcto en el disco recuperado. -

+

+
 snapraid -d NAME -a check
 
-

Donde NAME es el nombre del disco, como d1 en nuestro ejemplo anterior. +

+

Donde NAME es el nombre del disco, como `d1` en nuestro ejemplo anterior.

Las opciones -d y -a le dicen a SnapRAID que compruebe solo el disco especificado e ignore todos los datos de paridad.

Este comando tardará mucho tiempo, pero si no es demasiado cauteloso, puede omitirlo. -

-
-

+

4.4.4 STEP 4 -> Sync -

-

Ejecute el comando sync para resincronizar el array con el nuevo disco. -

+
+

Ejecute el comando `sync` para resincronizar el array con el nuevo disco. +

+
 snapraid sync
 
+

Si todo se recupera, este comando es inmediato. -

-
-
-
-

+

5 Commands -

+

SnapRAID proporciona algunos comandos simples que le permiten:

  • -Imprimir el estado del array -> status +Imprimir el estado del array -> `status`
  • -Controlar los discos -> smart, probe, up, down +Controlar los discos -> `smart`, `probe`, `up`, `down`
  • -Hacer una copia de seguridad/instantánea -> sync +Hacer una copia de seguridad/instantánea -> `sync`
  • -Comprobar periódicamente los datos -> scrub +Comprobar periódicamente los datos -> `scrub`
  • -Restaurar la última copia de seguridad/instantánea -> fix. +Restaurar la última copia de seguridad/instantánea -> `fix`.

Los comandos deben escribirse en minúsculas. -

-

+

5.1 status -

+

Imprime un resumen del estado del array de discos.

Incluye información sobre la fragmentación de la paridad, la antigüedad de los bloques sin verificar y todos los errores silenciosos registrados encontrados durante el fregado.

La información presentada se refiere a la última vez que ejecutó -sync. Las modificaciones posteriores no se tienen en cuenta. +`sync`. Las modificaciones posteriores no se tienen en cuenta.

Si se detectaron bloques defectuosos, se enumeran sus números de bloque. -Para corregirlos, puede usar el comando fix -e. +Para corregirlos, puede usar el comando `fix -e`.

También muestra un gráfico que representa la última vez que cada bloque fue fregado o sincronizado. Los bloques fregados se muestran -con *, los bloques sincronizados pero aún no fregados con o. +con '*', los bloques sincronizados pero aún no fregados con 'o'.

Nada se modifica. -

-
-

+

5.2 smart -

+

Imprime un informe SMART de todos los discos del sistema.

Incluye una estimación de la probabilidad de fallo en el próximo año, lo que le permite planificar reemplazos de mantenimiento de discos que muestren atributos sospechosos.

Esta estimación de probabilidad se obtiene correlacionando los atributos SMART de los discos con los datos de Backblaze disponibles en: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Si SMART informa que un disco está fallando, se imprime FAIL o -PREFAIL para ese disco, y SnapRAID regresa con un error. +

+

Si SMART informa que un disco está fallando, se imprime `FAIL` o +`PREFAIL` para ese disco, y SnapRAID regresa con un error. En este caso, se recomienda encarecidamente el reemplazo inmediato del disco.

Otras posibles cadenas de estado son: -

-
-
+

+ + + +
logfail -
+
En el pasado, algunos atributos estaban por debajo del umbral. - - -
-
+
logerr -
+
El registro de errores del dispositivo contiene errores. - - -
-
+
selferr -
+
El registro de autoprueba del dispositivo contiene errores. - - - +

Si se especifica la opción -v, --verbose, se proporciona un análisis estadístico más profundo. Este análisis puede ayudarle a decidir si necesita más o menos paridad. -

Este comando utiliza la herramienta smartctl y es equivalente a -ejecutar smartctl -a en todos los dispositivos. +

Este comando utiliza la herramienta `smartctl` y es equivalente a +ejecutar `smartctl -a` en todos los dispositivos.

Si sus dispositivos no se detectan automáticamente correctamente, puede -especificar un comando personalizado utilizando la opción smartctl +especificar un comando personalizado utilizando la opción `smartctl` en el archivo de configuración.

Nada se modifica. -

-
-

+

5.3 probe -

+

Imprime el estado de ENERGÍA de todos los discos del sistema. -

Standby significa que el disco no está girando. Active significa +

`Standby` significa que el disco no está girando. `Active` significa que el disco está girando. -

Este comando utiliza la herramienta smartctl y es equivalente a -ejecutar smartctl -n standby -i en todos los dispositivos. +

Este comando utiliza la herramienta `smartctl` y es equivalente a +ejecutar `smartctl -n standby -i` en todos los dispositivos.

Si sus dispositivos no se detectan automáticamente correctamente, puede -especificar un comando personalizado utilizando la opción smartctl +especificar un comando personalizado utilizando la opción `smartctl` en el archivo de configuración.

Nada se modifica. -

-
-

+

5.4 up -

+

Pone en marcha (gira) todos los discos del array.

Puede poner en marcha solo discos específicos usando la opción -d, --filter-disk.

Poner en marcha todos los discos al mismo tiempo requiere mucha energía. Asegúrese de que su fuente de alimentación pueda soportarlo.

Nada se modifica. -

-
-

+

5.5 down -

+

Detiene (deja de girar) todos los discos del array. -

Este comando utiliza la herramienta smartctl y es equivalente a -ejecutar smartctl -s standby,now en todos los dispositivos. +

Este comando utiliza la herramienta `smartctl` y es equivalente a +ejecutar `smartctl -s standby,now` en todos los dispositivos.

Puede detener solo discos específicos usando la opción -d, --filter-disk.

Para detener automáticamente en caso de error, puede usar la opción -s, --spin-down-on-error con cualquier otro comando, lo cual es -equivalente a ejecutar down manualmente cuando ocurre un error. +equivalente a ejecutar `down` manualmente cuando ocurre un error.

Nada se modifica. -

-
-

+

5.6 diff -

-

Enumera todos los archivos modificados desde el último sync que + +

Enumera todos los archivos modificados desde el último `sync` que necesitan que se vuelva a calcular su información de paridad.

Este comando no verifica los datos del archivo, sino solo la marca de tiempo, el tamaño y el inodo del archivo.

Después de enumerar todos los archivos cambiados, se presenta un resumen de los cambios, agrupados por: -

-
-
+

+ + + + + + + +
equal -
+
Archivos sin cambios desde antes. - - -
-
+
added -
+
Archivos agregados que no estaban presentes antes. - - -
-
+
removed -
+
Archivos eliminados. - - -
-
+
updated -
+
Archivos con un tamaño o marca de tiempo diferente, lo que significa que fueron modificados. - - -
-
+
moved -
+
Archivos movidos a un directorio diferente en el mismo disco. Se identifican por tener el mismo nombre, tamaño, marca de tiempo e inodo, pero un directorio diferente. - - -
-
+
copied -
-Archivos copiados en el mismo disco o en uno diferente -donde el archivo original todavía existe. +
+Archivos copiados en el mismo o un disco diferente. +Tenga en cuenta que si realmente se mueven a un disco +diferente, también se contarán en `removed`. Se identifican por tener el mismo nombre, tamaño y -marca de tiempo. -Si la marca de tiempo de subsegundo es cero, la ruta -completa debe coincidir para ser identificado, no solo el nombre. - - -
-
-relocated -
-Archivos movidos en el mismo disco o en uno -diferente donde el original ha desaparecido. -Se identifican por tener el mismo nombre, tamaño y -marca de tiempo. -Si la marca de tiempo de subsegundo es cero, la ruta -completa debe coincidir para ser identificado. -A diferencia de los archivos moved en el mismo disco, -los archivos reubicados tienen un inodo diferente. -
-
-
-
+marca de tiempo. Si la marca de tiempo de subsegundo es +cero, la ruta completa debe coincidir, no solo el nombre. +
restored -
-Archivos con un inodo diferente pero con directorio, -nombre, tamaño y marca de tiempo coincidentes. -Estos son usualmente archivos restaurados después de -haber sido eliminados. -
- - -

Si se requiere un sync, el código de retorno del proceso es 2, en +

+Archivos con un inodo diferente pero que coinciden +en nombre, tamaño y marca de tiempo. +Estos suelen ser archivos restaurados después de ser +eliminados. +
+

Si se requiere un `sync`, el código de retorno del proceso es 2, en lugar del valor predeterminado 0. El código de retorno 1 se utiliza para una condición de error genérico.

Nada se modifica. -

-
-

+

5.7 sync -

+

Actualiza la información de paridad. Todos los archivos modificados en el array de discos se leen y la información de paridad correspondiente se actualiza.

Puede detener este proceso en cualquier momento presionando Ctrl+C, sin perder el trabajo ya realizado. -En la siguiente ejecución, el proceso sync se reanudará donde +En la siguiente ejecución, el proceso `sync` se reanudará donde se interrumpió.

Si se encuentran errores silenciosos o de entrada/salida durante el proceso, los bloques correspondientes se marcan como defectuosos. @@ -792,13 +726,11 @@ Si el archivo se mueve o se renombra en el mismo disco, manteniendo el mismo inodo, la paridad no se vuelve a calcular. Si el archivo se mueve a otro disco, la paridad se vuelve a calcular, pero la información de hash calculada previamente se mantiene. -

Los archivos content y parity se modifican si es necesario. +

Los archivos `content` y `parity` se modifican si es necesario. Los archivos en el array NO se modifican. -

-
-

+

5.8 scrub -

+

Frota (scrubs) el array, buscando errores silenciosos o de entrada/salida en los discos de datos y paridad.

Cada invocación verifica aproximadamente el 8% del array, excluyendo @@ -816,110 +748,98 @@ full - Fregar todo. Los bloques más antiguos se friegan primero, asegurando una verificación óptima. Si desea fregar solo los bloques recién sincronizados que aún no han -sido fregados, use la opción -p new. -

Para obtener detalles del estado del fregado, use el comando status. +sido fregados, use la opción `-p new`. +

Para obtener detalles del estado del fregado, use el comando `status`.

Para cualquier error silencioso o de entrada/salida encontrado, los bloques correspondientes se marcan como defectuosos en el archivo -content. -Estos bloques defectuosos se enumeran en status y se pueden -corregir con fix -e. +`content`. +Estos bloques defectuosos se enumeran en `status` y se pueden +corregir con `fix -e`. Después de la corrección, en el siguiente fregado, se volverán a verificar y, si se encuentran corregidos, se eliminará la marca de defectuoso. Para fregar solo los bloques defectuosos, puede usar el comando -scrub -p bad. -

Se recomienda ejecutar scrub solo en un array sincronizado para evitar +`scrub -p bad`. +

Se recomienda ejecutar `scrub` solo en un array sincronizado para evitar errores reportados causados por datos no sincronizados. Estos errores se reconocen como no siendo errores silenciosos y los bloques no se marcan como defectuosos, pero tales errores se informan en la salida del comando. -

El archivo content se modifica para actualizar el tiempo de la última +

El archivo `content` se modifica para actualizar el tiempo de la última verificación de cada bloque y para marcar bloques defectuosos. -Los archivos parity NO se modifican. +Los archivos `parity` NO se modifican. Los archivos en el array NO se modifican. -

-
-

+

5.9 fix -

+

Corrige todos los archivos y la información de paridad.

Todos los archivos y la información de paridad se comparan con el -estado de instantánea guardado en el último sync. +estado de instantánea guardado en el último `sync`. Si se encuentra una diferencia, se revierte a la instantánea almacenada. -

¡ADVERTENCIA! El comando fix no diferencia entre errores y +

¡ADVERTENCIA! El comando `fix` no diferencia entre errores y modificaciones intencionales. Revierte incondicionalmente el estado -del archivo al último sync. +del archivo al último `sync`.

Si no se especifica otra opción, se procesa todo el array. Utilice las opciones de filtro para seleccionar un subconjunto de archivos o discos para operar. -

Para corregir solo los bloques marcados como defectuosos durante sync -y scrub, use la opción -e, --filter-error. +

Para corregir solo los bloques marcados como defectuosos durante `sync` +y `scrub`, use la opción -e, --filter-error. A diferencia de otras opciones de filtro, esta aplica correcciones solo -a archivos que no han cambiado desde el último sync. +a archivos que no han cambiado desde el último `sync`.

SnapRAID cambia el nombre de todos los archivos que no se pueden corregir -agregando la extensión .unrecoverable. +agregando la extensión `.unrecoverable`.

Antes de corregir, se escanea todo el array para encontrar cualquier -archivo movido desde la última operación de sync. +archivo movido desde la última operación de `sync`. Estos archivos se identifican por su marca de tiempo, ignorando su nombre y directorio, y se utilizan en el proceso de recuperación si es necesario. Si movió algunos de ellos fuera del array, puede usar la opción -i, --import para especificar directorios adicionales para escanear.

Los archivos se identifican solo por ruta, no por inodo. -

El archivo content NO se modifica. -Los archivos parity se modifican si es necesario. +

El archivo `content` NO se modifica. +Los archivos `parity` se modifican si es necesario. Los archivos en el array se modifican si es necesario. -

-
-

+

5.10 check -

+

Verifica todos los archivos y la información de paridad. -

Funciona como fix, pero solo simula una recuperación y no se +

Funciona como `fix`, pero solo simula una recuperación y no se escriben cambios en el array.

Este comando está destinado principalmente a la verificación manual, como después de un proceso de recuperación o en otras condiciones -especiales. Para comprobaciones periódicas y programadas, use scrub. +especiales. Para comprobaciones periódicas y programadas, use `scrub`.

Si usa la opción -a, --audit-only, solo se verifican los datos del archivo y se ignora la información de paridad para una ejecución más rápida.

Los archivos se identifican solo por ruta, no por inodo.

Nada se modifica. -

-
-

+

5.11 list -

+

Enumera todos los archivos contenidos en el array en el momento del -último sync. +último `sync`.

Con -v o --verbose, también se muestra el tiempo de subsegundo.

Nada se modifica. -

-
-

+

5.12 dup -

+

Enumera todos los archivos duplicados. Se supone que dos archivos son iguales si sus hashes coinciden. Los datos del archivo no se leen; solo se utilizan los hashes precalculados.

Nada se modifica. -

-
-

+

5.13 pool -

+

Crea o actualiza una vista virtual de todos -los archivos de su array de discos en el directorio de pooling. +los archivos de su array de discos en el directorio de `pooling`.

Los archivos no se copian sino que se enlazan usando enlaces simbólicos.

Al actualizar, todos los enlaces simbólicos existentes y los subdirectorios vacíos se eliminan y se reemplazan con la nueva vista del array. Cualquier otro archivo regular se deja en su lugar.

Nada se modifica fuera del directorio pool. -

-
-

+

5.14 devices -

+

Imprime los dispositivos de bajo nivel utilizados por el array.

Este comando muestra las asociaciones de dispositivos en el array y está destinado principalmente como una interfaz de script. @@ -931,11 +851,9 @@ cada disco en el array, pero en algunas configuraciones más complejas, puede tener múltiples dispositivos de bajo nivel utilizados por un solo disco en el array.

Nada se modifica. -

-
-

+

5.15 touch -

+

Establece una marca de tiempo de subsegundo arbitraria para todos los archivos que la tienen establecida en cero.

Esto mejora la capacidad de SnapRAID para reconocer archivos movidos @@ -948,11 +866,9 @@ subsegundo es cero, se considera una copia solo si la ruta completa, el tamaño y la marca de tiempo coinciden.

La marca de tiempo de precisión de segundo no se modifica, por lo que se conservarán todas las fechas y horas de sus archivos. -

-
-

+

5.16 rehash -

+

Programa un nuevo cálculo de hash (rehash) de todo el array.

Este comando cambia el tipo de hash utilizado, típicamente al actualizar de un sistema de 32 bits a uno de 64 bits, para cambiar @@ -960,167 +876,133 @@ de MurmurHash3 al más rápido SpookyHash.

Si ya está utilizando el hash óptimo, este comando no hace nada y le informa que no se necesita ninguna acción.

El nuevo cálculo de hash no se realiza inmediatamente, sino que -tiene lugar progresivamente durante sync y scrub. -

Puede verificar el estado del nuevo cálculo de hash usando status. +tiene lugar progresivamente durante `sync` y `scrub`. +

Puede verificar el estado del nuevo cálculo de hash usando `status`.

Durante el nuevo cálculo de hash, SnapRAID mantiene la funcionalidad -completa, con la única excepción de que dup no puede detectar +completa, con la única excepción de que `dup` no puede detectar archivos duplicados utilizando un hash diferente. -

-
-

-locate -

-

Localiza archivos almacenados en los discos de paridad. Para cada archivo coincidente, -imprime su ubicación dentro del archivo de paridad y el número de fragmentos -que ocupa. -

Puede usar la opción -t, --tail para restringir la operación a los archivos -que ocupan la porción final especificada de la paridad. -

Si desea reasignar estos archivos, puede usar la opción --W, --force-realloc-tail. -Tenga en cuenta que dichos archivos no estarán protegidos por la paridad durante -el proceso de reasignación. -

-
-
-

+

6 Options -

+

SnapRAID proporciona las siguientes opciones: -

-
-
+

+ +
-c, --conf CONFIG -
+
Selecciona el archivo de configuración a usar. Si no se -especifica, en Unix utiliza el archivo /usr/local/etc/snapraid.conf -si existe, de lo contrario /etc/snapraid.conf. -En Windows, utiliza el archivo snapraid.conf en el mismo -directorio que snapraid.exe. - - - -
-
-
+especifica, en Unix utiliza el archivo `/usr/local/etc/snapraid.conf` +si existe, de lo contrario `/etc/snapraid.conf`. +En Windows, utiliza el archivo `snapraid.conf` en el mismo +directorio que `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filtra los archivos a procesar en check y fix. +
+Filtra los archivos a procesar en `check` y `fix`. Solo se procesan los archivos que coinciden con el patrón especificado. Esta opción se puede usar varias veces. Consulte la sección PATTERN para obtener más detalles sobre las especificaciones de patrones. En Unix, asegúrese de que los caracteres globbing estén entre comillas si se usan. -Esta opción solo se puede usar con check y fix. -No se puede usar con sync y scrub, ya que siempre +Esta opción solo se puede usar con `check` y `fix`. +No se puede usar con `sync` y `scrub`, ya que siempre procesan todo el array. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtra los discos a procesar en check, fix, up y down. +
+Filtra los discos a procesar en `check`, `fix`, `up` y `down`. Debe especificar un nombre de disco como se define en el archivo de configuración. También puede especificar discos de paridad con los nombres: -parity, 2-parity, 3-parity, etc., para limitar las +`parity`, `2-parity`, `3-parity`, etc., para limitar las operaciones a un disco de paridad específico. Si combina múltiples opciones --filter, --filter-disk y --filter-missing, solo se seleccionan los archivos que coinciden con todos los filtros. Esta opción se puede usar varias veces. -Esta opción solo se puede usar con check, fix, up y down. -No se puede usar con sync y scrub, ya que siempre +Esta opción solo se puede usar con `check`, `fix`, `up` y `down`. +No se puede usar con `sync` y `scrub`, ya que siempre procesan todo el array. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtra los archivos a procesar en check y fix. +
+Filtra los archivos a procesar en `check` y `fix`. Solo se procesan los archivos faltantes o eliminados del array. -Cuando se usa con fix, esto actúa como un comando de undelete +Cuando se usa con `fix`, esto actúa como un comando de `undelete` (recuperación). Si combina múltiples opciones --filter, --filter-disk y --filter-missing, solo se seleccionan los archivos que coinciden con todos los filtros. -Esta opción solo se puede usar con check y fix. -No se puede usar con sync y scrub, ya que siempre +Esta opción solo se puede usar con `check` y `fix`. +No se puede usar con `sync` y `scrub`, ya que siempre procesan todo el array. - - - -
-
-
+
+ + +
-e, --filter-error -
-Procesa los archivos con errores en check y fix. +
+Procesa los archivos con errores en `check` y `fix`. Solo procesa archivos que tienen bloques marcados con errores -silenciosos o de entrada/salida durante sync y scrub, -según se enumeran en status. -Esta opción solo se puede usar con check y fix. - - - -
-
-
+silenciosos o de entrada/salida durante `sync` y `scrub`, +según se enumeran en `status`. +Esta opción solo se puede usar con `check` y `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Selecciona el plan de fregado (scrub). Si PERC es un valor numérico de 0 a 100, se interpreta como el porcentaje de bloques a fregar. En lugar de un porcentaje, puede especificar un plan: -bad friega bloques defectuosos, new friega bloques aún -no fregados, y full friega todo. -Esta opción solo se puede usar con scrub. - - - -
-
-
+`bad` friega bloques defectuosos, `new` friega bloques aún +no fregados, y `full` friega todo. +Esta opción solo se puede usar con `scrub`. +
+ + +
-o, --older-than DAYS -
-Selecciona la parte más antigua del array para procesar en scrub. +
+Selecciona la parte más antigua del array para procesar en `scrub`. DAYS es la edad mínima en días para que un bloque sea fregado; el valor predeterminado es 10. Los bloques marcados como defectuosos siempre se friegan independientemente de esta opción. -Esta opción solo se puede usar con scrub. - - - -
-
-
+Esta opción solo se puede usar con `scrub`. +
+ + +
-a, --audit-only -
-En check, verifica el hash de los archivos sin +
+En `check`, verifica el hash de los archivos sin verificar la información de paridad. Si solo está interesado en verificar los datos del archivo, esta opción puede acelerar significativamente el proceso de verificación. -Esta opción solo se puede usar con check. - - - -
-
-
+Esta opción solo se puede usar con `check`. +
+ + +
-h, --pre-hash -
-En sync, ejecuta una fase de hash preliminar de todos los +
+En `sync`, ejecuta una fase de hash preliminar de todos los datos nuevos para una verificación adicional antes del cálculo de paridad. -Normalmente, en sync, no se realiza un hash preliminar, +Normalmente, en `sync`, no se realiza un hash preliminar, y los nuevos datos se hashean justo antes del cálculo de paridad cuando se leen por primera vez. Este proceso ocurre cuando el sistema está bajo @@ -1128,37 +1010,33 @@ una gran carga, con todos los discos girando y una CPU ocupada. Esta es una condición extrema para la máquina, y si tiene un problema de hardware latente, los errores silenciosos pueden pasar desapercibidos porque los datos aún no están hasheados. -Para evitar este riesgo, puede habilitar el modo pre-hash +Para evitar este riesgo, puede habilitar el modo `pre-hash` para que todos los datos se lean dos veces para garantizar su integridad. Esta opción también verifica los archivos movidos dentro del array para asegurar que la operación de movimiento fue exitosa y, si es necesario, le permite ejecutar una operación de corrección antes de continuar. -Esta opción solo se puede usar con sync. - - - -
-
-
+Esta opción solo se puede usar con `sync`. +
+ + +
-i, --import DIR -
+
Importa desde el directorio especificado cualquier archivo -eliminado del array después del último sync. -Si aún tiene dichos archivos, check y fix pueden usarlos +eliminado del array después del último `sync`. +Si aún tiene dichos archivos, `check` y `fix` pueden usarlos para mejorar el proceso de recuperación. Los archivos se leen, incluso en subdirectorios, y se identifican independientemente de su nombre. -Esta opción solo se puede usar con check y fix. - - - -
-
-
+Esta opción solo se puede usar con `check` y `fix`. +
+ + +
-s, --spin-down-on-error -
+
En cualquier error, detiene todos los discos gestionados antes de salir con un código de estado distinto de cero. Esto evita que las unidades permanezcan activas y girando después de una @@ -1166,38 +1044,21 @@ operación abortada, lo que ayuda a evitar la acumulación de calor innecesaria y el consumo de energía. Use esta opción para asegurarse de que los discos se detengan de forma segura incluso cuando un comando falla. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Aplica un límite de ancho de banda global para todos los discos. RATE es el número de bytes por segundo. Puede especificar un multiplicador como K, M o G (por ejemplo, --bw-limit 1G). - - - -
-
-
--t, --tail TAMAÑO -
-Limita la lista de archivos a aquellos que no usan más del -tamaño de cola especificado de los discos de paridad. -Puede usar multiplicadores como K, M, G o T (por ejemplo, --tail 1G). -Esta opción solo es válida cuando se usa junto con el comando -locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Habilita una vista de estado extendida que muestra información adicional. La pantalla muestra dos gráficos: El primer gráfico muestra el número de franjas (stripes) @@ -1217,14 +1078,12 @@ operaciones de disco. Por lo tanto, mientras haya un tiempo de espera medible para al menos un disco, indica que la CPU es lo suficientemente rápida para mantenerse al día con la carga de trabajo. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Fuerza la operación insegura de sincronizar un archivo con tamaño cero que antes no era cero. Si SnapRAID detecta tal condición, detiene el procedimiento @@ -1233,15 +1092,13 @@ Esto le permite detectar fácilmente cuando, después de un fallo del sistema, algunos archivos accedidos fueron truncados. Esta es una posible condición en Linux con los sistemas de archivos ext3/ext4. -Esta opción solo se puede usar con sync. - - - -
-
-
+Esta opción solo se puede usar con `sync`. +
+ + +
-E, --force-empty -
+
Fuerza la operación insegura de sincronizar un disco con todos los archivos originales faltantes. Si SnapRAID detecta que todos los archivos originalmente @@ -1252,30 +1109,26 @@ de datos no está montado. Sin embargo, se permite tener un solo cambio de UUID con paridad simple, y más con paridad múltiple, porque este es el caso normal al reemplazar discos después de una recuperación. -Esta opción solo se puede usar con sync. - - - -
-
-
+Esta opción solo se puede usar con `sync`. +
+ + +
-U, --force-uuid -
+
Fuerza la operación insegura de sincronizar, verificar y corregir con discos que han cambiado su UUID. Si SnapRAID detecta que algunos discos han cambiado el UUID, detiene el procedimiento a menos que especifique esta opción. Esto le permite detectar cuando sus discos están montados en los puntos de montaje incorrectos. -Esta opción solo se puede usar con sync, check o fix. - - - -
-
-
+Esta opción solo se puede usar con `sync`, `check` o `fix`. +
+ + +
-D, --force-device -
+
Fuerza la operación insegura de corregir con discos inaccesibles o con discos en el mismo dispositivo físico. Por ejemplo, si perdió dos discos de datos y tiene un disco de @@ -1283,16 +1136,14 @@ repuesto para recuperar solo el primero, puede ignorar el segundo disco inaccesible. O, si desea recuperar un disco en el espacio libre que queda en un disco ya usado, compartiendo el mismo dispositivo físico. -Esta opción solo se puede usar con fix. - - - -
-
-
+Esta opción solo se puede usar con `fix`. +
+ + +
-N, --force-nocopy -
-En sync, check y fix, deshabilita la heurística de +
+En `sync`, `check` y `fix`, deshabilita la heurística de detección de copias. Sin esta opción, SnapRAID asume que los archivos con los mismos atributos, como nombre, tamaño y marca de tiempo, son copias con los mismos datos. @@ -1304,139 +1155,97 @@ En algunos casos raros, este comportamiento puede dar lugar a falsos positivos o a un proceso lento debido a muchas verificaciones de hash, y esta opción le permite resolver tales problemas. -Esta opción solo se puede usar con sync, check y fix. - - - -
-
-
+Esta opción solo se puede usar con `sync`, `check` y `fix`. +
+ + +
-F, --force-full -
-En sync, fuerza un recálculo completo de la paridad. +
+En `sync`, fuerza un recálculo completo de la paridad. Esta opción se puede usar cuando agrega un nuevo nivel de paridad o si revirtió a un archivo de contenido antiguo utilizando datos de paridad más recientes. En lugar de recrear la paridad desde cero, esto le permite reutilizar los hashes presentes en el archivo de contenido para validar los datos y mantener la protección de datos durante -el proceso sync utilizando los datos de paridad existentes. -Esta opción solo se puede usar con sync. - - - -
-
-
+el proceso `sync` utilizando los datos de paridad existentes. +Esta opción solo se puede usar con `sync`. +
+ + +
-R, --force-realloc -
-En sync, fuerza una reasignación completa de archivos y +
+En `sync`, fuerza una reasignación completa de archivos y la reconstrucción de la paridad. Esta opción se puede usar para reasignar completamente todos los archivos, eliminando la fragmentación, mientras se reutilizan los hashes presentes en el archivo de contenido para validar los datos. -Esta opción solo se puede usar con sync. +Esta opción solo se puede usar con `sync`. ¡ADVERTENCIA! Esta opción es solo para expertos y se recomienda encarecidamente no usarla. -NO tiene protección de datos durante la operación sync. - - - -
-
-
--W, --force-realloc-tail TAMAÑO -
-Funciona como -R, --force-realloc, pero limitado a la porción final -especificada (últimos TAMAÑO bytes) de cada archivo de paridad. -Fuerza la reasignación (movimiento) de cualquier fragmento/bloque de archivo -actualmente almacenado en esa sección final, permitiendo que se coloquen -en cualquier lugar de los archivos de paridad donde haya espacio libre -disponible (incluyendo huecos existentes). -El propósito principal de esta opción es reducir el tamaño en disco -del archivo de paridad. -Si la reasignación vacía con éxito toda la sección final -(no quedan bloques usándola), el archivo de paridad se trunca, -recuperando el espacio final no utilizado. -Puede usar multiplicadores como K, M, G o T (por ejemplo, ---force-realloc-tail 1G). -Puede usar locate -t, --tail para conocer de antemano -los archivos afectados. -¡ADVERTENCIA! -Esta opción es solo para expertos y se recomienda -encarecidamente no usarla. -Usted NO tiene protección de datos durante la operación sync -para los archivos afectados. -
-
-
-
-
-
+NO tiene protección de datos durante la operación `sync`. +
+ + +
-l, --log FILE -
+
Escribe un registro detallado en el archivo especificado. Si no se especifica esta opción, los errores inesperados se imprimen en la pantalla, lo que puede resultar en una salida excesiva en caso de muchos errores. Cuando se especifica -l, --log, solo los errores fatales que hacen que SnapRAID se detenga se imprimen en la pantalla. -Si la ruta comienza con >>, el archivo se abre -en modo de anexar. Las ocurrencias de %D y %T en el nombre +Si la ruta comienza con '>>', el archivo se abre +en modo de anexar. Las ocurrencias de '%D' y '%T' en el nombre se reemplazan con la fecha y hora en el formato AAAA MM DD y HH MM SS. En archivos por lotes de Windows, debe duplicar el -carácter %, por ejemplo, resultado-%%D.log. Para usar >>, -debe encerrar el nombre entre comillas, por ejemplo, ">>resultado.log". +carácter '%', por ejemplo, resultado-%%D.log. Para usar '>>', +debe encerrar el nombre entre comillas, por ejemplo, `">>resultado.log"`. Para enviar el registro a la salida estándar o al error -estándar, puede usar ">&1" y ">&2", respectivamente. +estándar, puede usar `">&1"` y `">&2"`, respectivamente. Consulte el archivo snapraid_log.txt o la página del manual para obtener descripciones de las etiquetas de registro. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Establece un nuevo límite de error antes de detener la ejecución. De forma predeterminada, SnapRAID se detiene si encuentra más de 100 errores de entrada/salida, lo que indica que es probable que un disco esté fallando. -Esta opción afecta a sync y scrub, a los que se les +Esta opción afecta a `sync` y `scrub`, a los que se les permite continuar después del primer conjunto de errores de disco para intentar completar sus operaciones. -Sin embargo, check y fix siempre se detienen en el primer error. - - - -
-
-
+Sin embargo, `check` y `fix` siempre se detienen en el primer error. +
+ + +
-S, --start BLKSTART -
+
Comienza a procesar desde el número de bloque especificado. Esto puede ser útil para reintentar verificar o corregir bloques específicos en caso de un disco dañado. Esta opción es principalmente para recuperación manual avanzada. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Procesa solo el número de bloques especificado. Esta opción es principalmente para recuperación manual avanzada. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Genera un archivo de configuración ficticio a partir de un archivo de contenido existente. El archivo de configuración se escribe en la salida estándar @@ -1444,69 +1253,57 @@ y no sobrescribe uno existente. Este archivo de configuración también contiene la información necesaria para reconstruir los puntos de montaje del disco en caso de que pierda todo el sistema. - - - -
-
-
+
+ + +
-v, --verbose -
+
Imprime más información en la pantalla. Si se especifica una vez, imprime archivos excluidos y estadísticas adicionales. Esta opción no tiene efecto en los archivos de registro. - - - -
-
-
+
+ + +
-q, --quiet -
+
Imprime menos información en la pantalla. Si se especifica una vez, elimina la barra de progreso; dos veces, las operaciones en ejecución; tres veces, los mensajes de información; cuatro veces, los mensajes de estado. Los errores fatales siempre se imprimen en la pantalla. Esta opción no tiene efecto en los archivos de registro. - - - -
-
-
+
+ + +
-H, --help -
+
Imprime una pantalla de ayuda corta. - - - -
-
-
+
+ + +
-V, --version -
+
Imprime la versión del programa. - - - - -
-

+

+

7 Configuration -

+

SnapRAID requiere un archivo de configuración para saber dónde se encuentra su array de discos y dónde almacenar la información de paridad. -

En Unix, utiliza el archivo /usr/local/etc/snapraid.conf si existe, -de lo contrario /etc/snapraid.conf. -En Windows, utiliza el archivo snapraid.conf en el mismo -directorio que snapraid.exe. +

En Unix, utiliza el archivo `/usr/local/etc/snapraid.conf` si existe, +de lo contrario `/etc/snapraid.conf`. +En Windows, utiliza el archivo `snapraid.conf` en el mismo +directorio que `snapraid.exe`.

Debe contener las siguientes opciones (distingue entre mayúsculas y minúsculas): -

-

+

7.1 parity FILE [,FILE] ... -

+

Define los archivos a usar para almacenar la información de paridad. La paridad permite la protección contra un solo fallo de disco, similar a RAID5. @@ -1521,11 +1318,9 @@ que no se fragmenten, mejorando el rendimiento.

En Windows, se dejan 256 MB sin usar en cada disco para evitar la advertencia sobre discos llenos.

Esta opción es obligatoria y solo se puede usar una vez. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Define los archivos a usar para almacenar información de paridad adicional.

Para cada nivel de paridad especificado, se habilita un nivel @@ -1549,45 +1344,39 @@ adicional de protección:

Cada nivel de paridad requiere la presencia de todos los niveles de paridad anteriores. -

Se aplican las mismas consideraciones que para la opción parity. +

Se aplican las mismas consideraciones que para la opción 'parity'.

Estas opciones son opcionales y solo se pueden usar una vez. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Define un archivo y un formato alternativos para almacenar paridad triple. -

Esta opción es una alternativa a 3-parity, destinada principalmente +

Esta opción es una alternativa a '3-parity', destinada principalmente a CPU de gama baja como ARM o AMD Phenom, Athlon y Opteron que no admiten el conjunto de instrucciones SSSE3. En tales casos, proporciona un mejor rendimiento.

Este formato es similar pero más rápido que el utilizado por ZFS RAIDZ3. Al igual que ZFS, no funciona más allá de la paridad triple. -

Al usar 3-parity, se le advertirá si se recomienda usar -el formato z-parity para mejorar el rendimiento. +

Al usar '3-parity', se le advertirá si se recomienda usar +el formato 'z-parity' para mejorar el rendimiento.

Es posible convertir de un formato a otro ajustando el archivo de configuración con el archivo z-parity o 3-parity -deseado y usando fix para recrearlo. -

-
-

+deseado y usando 'fix' para recrearlo. +

7.4 content FILE -

+

Define el archivo a usar para almacenar la lista y las sumas de comprobación de todos los archivos presentes en su array de discos.

Se puede colocar en un disco utilizado para datos, paridad o cualquier otro disco disponible. Si usa un disco de datos, este archivo se excluye automáticamente -del proceso sync. +del proceso `sync`.

Esta opción es obligatoria y se puede usar varias veces para guardar múltiples copias del mismo archivo.

Debe almacenar al menos una copia por cada disco de paridad utilizado más uno. Usar copias adicionales no perjudica. -

-
-

+

7.5 data NAME DIR -

+

Define el nombre y el punto de montaje de los discos de datos en el array. NAME se usa para identificar el disco y debe ser único. DIR es el punto de montaje del disco en el @@ -1597,49 +1386,31 @@ mantenga el NAME fijo.

Debe usar una opción para cada disco de datos en el array.

Puede cambiar el nombre de un disco más tarde cambiando el NAME directamente en el archivo de configuración y luego ejecutando un -comando sync. En el caso de cambiar el nombre, la asociación se +comando 'sync'. En el caso de cambiar el nombre, la asociación se realiza utilizando el UUID almacenado de los discos. -

-
-

-extra NAME DIR -

-

Define el nombre y el punto de montaje de discos adicionales para monitorear -con los comandos smart y probe. -

Esto es útil para monitorear discos que no forman parte de la -matriz pero que son necesarios para que el sistema funcione, como -el disco de arranque. -

Tenga en cuenta que dichos discos no se ven afectados por los comandos up y down -porque se espera que estén siempre girando. -

-
-

+

7.6 nohidden -

+

Excluye todos los archivos y directorios ocultos. -En Unix, los archivos ocultos son los que comienzan con .. +En Unix, los archivos ocultos son los que comienzan con `.`. En Windows, son los que tienen el atributo oculto. -

-
-

+

7.7 exclude/include PATTERN -

+

Define los patrones de archivo o directorio a excluir o incluir en el proceso de sincronización. Todos los patrones se procesan en el orden especificado. -

Si el primer patrón que coincide es un exclude, el archivo -se excluye. Si es un include, el archivo se incluye. +

Si el primer patrón que coincide es un `exclude`, el archivo +se excluye. Si es un `include`, el archivo se incluye. Si ningún patrón coincide, el archivo se excluye si el último -patrón especificado es un include, o se incluye si el último -patrón especificado es un exclude. +patrón especificado es un `include`, o se incluye si el último +patrón especificado es un `exclude`.

Consulte la sección PATTERN para obtener más detalles sobre las especificaciones de patrones.

Esta opción se puede usar varias veces. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Define el tamaño de bloque básico en kibibytes para la paridad. Un kibibyte es 1024 bytes.

El tamaño de bloque predeterminado es 256, que debería funcionar @@ -1664,7 +1435,7 @@ y un tamaño de bloque de 256 KiB, desperdiciará 12.8 GB de paridad, lo que puede resultar en 12.8 GB menos de espacio disponible en el disco de datos.

Puede verificar la cantidad de espacio desperdiciado en cada disco -usando status. Este es el espacio que debe dejar libre en los +usando `status`. Este es el espacio que debe dejar libre en los discos de datos o usar para archivos no incluidos en el array. Si este valor es negativo, significa que está cerca de llenar la paridad, y representa el espacio que aún puede desperdiciar. @@ -1675,18 +1446,18 @@ para manejar hasta 100,000 archivos en cada disco de datos sin ningún espacio desperdiciado.

Un truco para obtener una partición de paridad más grande en Linux es formatearla con el comando: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Esto resulta en aproximadamente un 1.5% de espacio extra, aproximadamente 60 GB para un disco de 4 TB, lo que permite alrededor de 460,000 archivos en cada disco de datos sin ningún espacio desperdiciado. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Define el tamaño del hash en bytes para los bloques guardados.

El tamaño de hash predeterminado es de 16 bytes (128 bits), que debería funcionar para la mayoría de los casos. @@ -1718,28 +1489,24 @@ obtiene:

 RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0.51 GiB
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Guarda automáticamente el estado al sincronizar o fregar después de la cantidad especificada de GB procesados. -Esta opción es útil para evitar reiniciar comandos sync largos +Esta opción es útil para evitar reiniciar comandos `sync` largos desde cero si son interrumpidos por un fallo de la máquina o cualquier otro evento. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Establece la temperatura máxima permitida del disco en Celsius. Cuando se especifica, SnapRAID verifica periódicamente la temperatura de todos los discos utilizando la herramienta smartctl. Las temperaturas actuales del disco se muestran mientras SnapRAID está operando. Si algún disco excede este límite, todas las operaciones se detienen y los discos se detienen (se ponen en espera) durante -la duración definida por la opción temp_sleep. Después del +la duración definida por la opción `temp_sleep`. Después del período de espera, las operaciones se reanudan, pausándose potencialmente de nuevo si se alcanza el límite de temperatura una vez más. @@ -1763,27 +1530,21 @@ comienzo de la ejecución como referencia de respaldo.

Normalmente, SnapRAID solo muestra la temperatura del disco más caliente. Para mostrar la temperatura de todos los discos, use la opción -A o --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Establece el tiempo de espera, en minutos, cuando se alcanza el límite de temperatura. Durante este período, los discos permanecen detenidos. El valor predeterminado es de 5 minutos. -

-
-

+

7.13 pool DIR -

+

Define el directorio de agrupación (pooling) donde se crea la vista -virtual del array de discos utilizando el comando pool. +virtual del array de discos utilizando el comando `pool`.

El directorio ya debe existir. -

-
-

+

7.14 share UNC_DIR -

+

Define la ruta UNC de Windows requerida para acceder a los discos de forma remota.

Si se especifica esta opción, los enlaces simbólicos creados en el @@ -1792,64 +1553,67 @@ Sin esta opción, los enlaces simbólicos generados utilizan solo rutas locales, lo que no permite compartir el directorio pool a través de la red.

Los enlaces simbólicos se forman utilizando la ruta UNC especificada, -agregando el nombre del disco como se especifica en la opción data, +agregando el nombre del disco como se especifica en la opción `data`, y finalmente agregando el directorio y el nombre del archivo.

Esta opción solo es necesaria para Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Define opciones personalizadas de smartctl para obtener los atributos SMART de cada disco. Esto puede ser necesario para controladores RAID y algunos discos USB que no se pueden detectar automáticamente. El marcador de posición %s se reemplaza por el nombre del dispositivo, pero es opcional para dispositivos fijos como controladores RAID. -

DISK es el mismo nombre de disco especificado en la opción data. -PARITY es uno de los nombres de paridad: parity, 2-parity, -3-parity, 4-parity, 5-parity, 6-parity o z-parity. -

En las OPCIONES especificadas, la cadena %s se reemplaza por +

DISK es el mismo nombre de disco especificado en la opción `data`. +PARITY es uno de los nombres de paridad: `parity`, `2-parity`, +`3-parity`, `4-parity`, `5-parity`, `6-parity` o `z-parity`. +

En las OPCIONES especificadas, la cadena `%s` se reemplaza por el nombre del dispositivo. Para los controladores RAID, el dispositivo -es probable que sea fijo y es posible que no necesite usar %s. +es probable que sea fijo y es posible que no necesite usar `%s`.

Consulte la documentación de smartmontools para conocer las posibles opciones: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Por ejemplo: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignora el atributo SMART especificado al calcular la probabilidad de fallo del disco. Esta opción es útil si un disco informa valores inusuales o engañosos para un atributo en particular. -

DISK es el mismo nombre de disco especificado en la opción data. -PARITY es uno de los nombres de paridad: parity, 2-parity, -3-parity, 4-parity, 5-parity, 6-parity o z-parity. +

DISK es el mismo nombre de disco especificado en la opción `data`. +PARITY es uno de los nombres de paridad: `parity`, `2-parity`, +`3-parity`, `4-parity`, `5-parity`, `6-parity` o `z-parity`. El valor especial * se puede usar para ignorar el atributo en todos los discos. -

Por ejemplo, para ignorar el atributo Current Pending Sector Count +

Por ejemplo, para ignorar el atributo `Current Pending Sector Count` en todos los discos: -

+

+
 smartignore * 197
 
+

Para ignorarlo solo en el primer disco de paridad: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Un ejemplo de una configuración típica para Unix es: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1863,8 +1627,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Un ejemplo de una configuración típica para Windows es: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1879,84 +1645,51 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

Los patrones proporcionan una forma flexible de filtrar archivos para su inclusión o -exclusión. Al usar caracteres de globbing, puede definir reglas que coincidan con -nombres de archivos específicos o estructuras de directorios completas sin -enumerar cada ruta manualmente. -

El signo de interrogación ? coincide con cualquier carácter individual excepto el -separador de directorios. Esto lo hace útil para hacer coincidir nombres de archivos con -caracteres variables manteniendo el patrón limitado a un solo nivel de directorio. -

El asterisco simple * coincide con cualquier secuencia de caracteres, pero al igual que el -signo de interrogación, nunca cruza los límites de los directorios. Se detiene en la -barra diagonal, lo que lo hace adecuado para buscar coincidencias dentro de un solo -componente de ruta. Este es el comportamiento estándar de los comodines familiar -del globbing de la shell. -

el doble asterisco ** es más potente, coincide con cualquier secuencia de -caracteres, incluidos los separadores de directorios. Esto permite que los patrones coincidan -a través de múltiples niveles de directorio. Cuando ** aparece incrustado directamente en -un patrón, puede coincidir con cero o más caracteres, incluidas las barras diagonales entre -el texto literal circundante. -

El uso más importante de ** es en la forma especial /**/. Esta coincide con -cero o más niveles de directorio completos, lo que permite que los archivos coincidan -a cualquier profundidad en un árbol de directorios sin conocer la estructura exacta de la ruta. -Por ejemplo, el patrón src/**/main.js coincide con src/main.js (saltando -cero directorios), src/ui/main.js (saltando un directorio) y -src/ui/components/main.js (saltando dos directorios). -

Las clases de caracteres que utilizan corchetes [] coinciden con un solo carácter de un -conjunto o rango especificado. Al igual que los otros patrones de un solo carácter, -no coinciden con los separadores de directorios. Las clases admiten rangos y negación mediante -un signo de exclamación. -

La distinción fundamental que debe recordar es que *, ? y las clases de caracteres -respetan los límites de los directorios y solo coinciden dentro de un único -componente de ruta, mientras que ** es el único patrón que puede coincidir a través de -los separadores de directorios. + +

Los patrones se utilizan para seleccionar un subconjunto de archivos +para excluir o incluir en el proceso.

Hay cuatro tipos diferentes de patrones: -

-
-
+

+ +
FILE -
-Selecciona cualquier archivo llamado FILE. -Este patrón se aplica solo a archivos, no a directorios. -
- - -
-
-
+
+Selecciona cualquier archivo llamado FILE. Puede usar +cualquier carácter globbing como * y ?, y clases de caracteres +como [a-z]. Este patrón se aplica solo a archivos, no a directorios. +
+ + +
DIR/ -
-Selecciona cualquier directorio llamado DIR y todo lo que hay dentro. +
+Selecciona cualquier directorio llamado DIR y todo lo que +contiene. Puede usar cualquier carácter globbing como * y ?. Este patrón se aplica solo a directorios, no a archivos. - - - -
-
-
+
+ + +
/PATH/FILE -
-Selecciona la ruta exacta del archivo especificado. Este patrón se aplica -solo a archivos, no a directorios. -
- - -
-
-
+
+Selecciona la ruta de archivo exacta especificada. Puede usar +cualquier carácter globbing como * y ?, pero nunca coinciden +con una barra de directorio. +Este patrón se aplica solo a archivos, no a directorios. +
+ + +
/PATH/DIR/ -
-Selecciona la ruta exacta del directorio especificado y todo lo que hay -dentro. Este patrón se aplica solo a directorios, no a archivos. -
- - +
+Selecciona la ruta de directorio exacta especificada y todo +lo que contiene. Puede usar cualquier carácter globbing como * y ?, +pero nunca coinciden con una barra de directorio. +Este patrón se aplica solo a directorios, no a archivos. +

Cuando especifica una ruta absoluta que comienza con /, se aplica en el directorio raíz del array, no en el directorio raíz del sistema de archivos local. @@ -1965,151 +1698,87 @@ Los directorios del sistema de Windows, las uniones, los puntos de montaje y otros directorios especiales de Windows se tratan como archivos, lo que significa que para excluirlos, debe usar una regla de archivo, no una de directorio. -

Si el nombre del archivo contiene un carácter *, ?, [, -o ], debe escaparlo para evitar que se interprete como un -carácter globbing. En Unix, el carácter de escape es \; -en Windows, es ^. Cuando el patrón está en la línea de comandos, +

Si el nombre del archivo contiene un carácter '*', '?', '[', +o ']', debe escaparlo para evitar que se interprete como un +carácter globbing. En Unix, el carácter de escape es '\'; +en Windows, es '^'. Cuando el patrón está en la línea de comandos, debe duplicar el carácter de escape para evitar que sea interpretado por el shell de comandos.

En el archivo de configuración, puede usar diferentes estrategias para filtrar los archivos a procesar. -El enfoque más simple es usar solo reglas exclude para +El enfoque más simple es usar solo reglas `exclude` para eliminar todos los archivos y directorios que no desea procesar. Por ejemplo: -

-# Excluye cualquier archivo llamado *.unrecoverable
+

+
+# Excluye cualquier archivo llamado `*.unrecoverable`
 exclude *.unrecoverable
-# Excluye el directorio raíz /lost+found
+# Excluye el directorio raíz `/lost+found`
 exclude /lost+found/
-# Excluye cualquier subdirectorio llamado tmp
+# Excluye cualquier subdirectorio llamado `tmp`
 exclude tmp/
 
+

El enfoque opuesto es definir solo los archivos que desea procesar, -utilizando solo reglas include. Por ejemplo: -

+utilizando solo reglas `include`. Por ejemplo:
+

+
 # Incluye solo algunos directorios
 include /movies/
 include /musics/
 include /pictures/
 
-

El enfoque final es mezclar reglas exclude e include. En este +

+

El enfoque final es mezclar reglas `exclude` e `include`. En este caso, el orden de las reglas es importante. Las reglas anteriores tienen precedencia sobre las posteriores. -Para simplificar, puede enumerar todas las reglas exclude primero -y luego todas las reglas include. Por ejemplo: -

-# Excluye cualquier archivo llamado *.unrecoverable
+Para simplificar, puede enumerar todas las reglas `exclude` primero
+y luego todas las reglas `include`. Por ejemplo:
+

+
+# Excluye cualquier archivo llamado `*.unrecoverable`
 exclude *.unrecoverable
-# Excluye cualquier subdirectorio llamado tmp
+# Excluye cualquier subdirectorio llamado `tmp`
 exclude tmp/
 # Incluye solo algunos directorios
 include /movies/
 include /musics/
 include /pictures/
 
+

En la línea de comandos, usando la opción -f, solo puede usar -patrones include. Por ejemplo: -

+patrones `include`. Por ejemplo:
+

+
 # Verifica solo los archivos .mp3.
 # En Unix, use comillas para evitar la expansión globbing por el shell.
 snapraid -f "*.mp3" check
 
+

En Unix, al usar caracteres globbing en la línea de comandos, debe ponerlos entre comillas para evitar que el shell los expanda. -

-
-

-Ignorar Archivos -

-

Además de las reglas globales en el archivo de configuración, puedes -colocar archivos .snapraidignore en cualquier directorio dentro del array -para definir reglas de exclusión descentralizadas. -

Las reglas definidas en .snapraidignore se aplican después de las reglas del -archivo de configuración. Esto significa que tienen una prioridad más alta y pueden -usarse para excluir archivos que fueron incluidos previamente por la configuración -global. Efectivamente, si una regla local coincide, el archivo se excluye -independientemente de los ajustes de inclusión globales. -

La lógica de patrones en .snapraidignore refleja la configuración global -pero ancla los patrones al directorio donde se encuentra el archivo: -

-
-
-FILE -
-Selecciona cualquier archivo llamado FILE en este directorio o por debajo. -Esto sigue las mismas reglas de globbing que el patrón global. -
-
-
-
-
-
-DIR/ -
-Selecciona cualquier directorio llamado DIR y todo su contenido, -ubicado en este directorio o por debajo. -
-
-
-
-
-
-/PATH/FILE -
-Selecciona el archivo exacto especificado relativo a la ubicación -del archivo .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Selecciona el directorio exacto especificado y todo su contenido, -relativo a la ubicación del archivo .snapraidignore. -
-
-
-

A diferencia de la configuración global, los archivos .snapraidignore solo admiten -reglas de exclusión; no se pueden usar patrones include o negación (!). -

Por ejemplo, si tienes un .snapraidignore en /mnt/disk1/projects/: -

-# Excluye SOLO /mnt/disk1/projects/output.bin
-/output.bin
-# Excluye cualquier directorio llamado build dentro de projects/
-build/
-# Excluye cualquier archivo .tmp dentro de projects/ o sus subcarpetas
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID almacena la lista y las sumas de comprobación de sus archivos en el archivo de contenido.

Es un archivo binario que enumera todos los archivos presentes en su array de discos, junto con todas las sumas de comprobación para verificar su integridad. -

Este archivo es leído y escrito por los comandos sync y scrub -y leído por los comandos fix, check y status. -

-
-

+

Este archivo es leído y escrito por los comandos `sync` y `scrub` +y leído por los comandos `fix`, `check` y `status`. +

10 Parity -

+

SnapRAID almacena la información de paridad de su array en los archivos de paridad.

Estos son archivos binarios que contienen la paridad calculada -de todos los bloques definidos en el archivo content. -

Estos archivos son leídos y escritos por los comandos sync y fix -y solo leídos por los comandos scrub y check. -

-
-

+de todos los bloques definidos en el archivo `content`. +

Estos archivos son leídos y escritos por los comandos `sync` y `fix` +y solo leídos por los comandos `scrub` y `check`. +

11 Encoding -

+

SnapRAID en Unix ignora cualquier codificación. Lee y almacena los nombres de archivo con la misma codificación utilizada por el sistema de archivos. @@ -2117,32 +1786,39 @@ de archivos. convierten y procesan en formato UTF-8.

Para que los nombres de archivo se impriman correctamente, debe configurar la consola de Windows en modo UTF-8 con el comando -chcp 65001 y usar una fuente TrueType como Lucida Console +`chcp 65001` y usar una fuente TrueType como `Lucida Console` como fuente de la consola. Esto afecta solo a los nombres de archivo impresos; si redirige la salida de la consola a un archivo, el archivo resultante siempre está en formato UTF-8. -

+

+

+

-
-
-
+
- - + diff --git a/manual-fr.html b/manual-fr.html index 60c72485..49a0c13c 100644 --- a/manual-fr.html +++ b/manual-fr.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter MOTIF] [-d, --filter-disk NOM]
@@ -127,22 +75,20 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-S, --start BLKSTART] [-B, --count BLKCOUNT]
     [-L, --error-limit NOMBRE]
     [-A, --stats]
     [-v, --verbose] [-q, --quiet]
     status|smart|probe|up|down|diff|sync|scrub|fix|check
-    |list|dup|pool|devices|touch|rehash|locate
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENU]
 
-
-
-

+

2 Description -

+

SnapRAID est un programme de sauvegarde conçu pour les baies de disques, stockant les informations de parité pour la récupération des données en cas de défaillance de six disques maximum. @@ -182,14 +128,14 @@ Pour accéder à un fichier, un seul disque doit tourner, ce qui

Pour plus d'informations, veuillez visiter le site officiel de SnapRAID : -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID est un hybride entre un programme RAID et un programme de sauvegarde, visant à combiner les meilleurs avantages des deux. Cependant, il a quelques limitations que vous devriez considérer avant de l'utiliser. @@ -232,13 +178,11 @@ et les liens matériels sont sauvegardés. Les permissions, la propriété et les attributs étendus ne sont pas sauvegardés. -

-
-

+

4 Démarrer -

+

Pour utiliser SnapRAID, vous devez d'abord sélectionner un disque -dans votre baie de disques pour le dédier aux informations de parité. +dans votre baie de disques pour le dédier aux informations de `parité`. Avec un disque pour la parité, vous pourrez récupérer d'une seule défaillance de disque, similaire au RAID5.

Si vous souhaitez récupérer de plus de défaillances de disques, @@ -248,31 +192,34 @@ récupération d'une défaillance de disque de plus.

Comme disques de parité, vous devez choisir les plus grands disques de la baie, car les informations de parité peuvent atteindre la taille du plus grand disque de données de la baie. -

Ces disques seront dédiés au stockage des fichiers de parité. +

Ces disques seront dédiés au stockage des fichiers de `parité`. Vous ne devriez pas y stocker vos données. -

Ensuite, vous devez définir les disques de données que vous souhaitez +

Ensuite, vous devez définir les disques de `données` que vous souhaitez protéger avec SnapRAID. La protection est plus efficace si ces disques contiennent des données qui changent rarement. Pour cette raison, il est préférable de NE PAS inclure le disque C:\ de Windows ou les répertoires /home, /var et /tmp d'Unix. -

La liste des fichiers est enregistrée dans les fichiers content (contenu), +

La liste des fichiers est enregistrée dans les fichiers `content` (contenu), généralement stockés sur les disques de données, de parité ou de démarrage. Ce fichier contient les détails de votre sauvegarde, y compris toutes les sommes de contrôle pour vérifier son intégrité. -Le fichier content est stocké en plusieurs copies, et chaque copie +Le fichier `content` est stocké en plusieurs copies, et chaque copie doit se trouver sur un disque différent pour garantir qu'au moins une copie soit disponible, même en cas de défaillances de disques multiples.

Par exemple, supposons que vous ne soyez intéressé que par un seul niveau de protection de parité, et que vos disques se trouvent à : -

+

+
 /mnt/diskp <- disque sélectionné pour la parité
 /mnt/disk1 <- premier disque à protéger
 /mnt/disk2 <- deuxième disque à protéger
 /mnt/disk3 <- troisième disque à protéger
 
+

Vous devez créer le fichier de configuration /etc/snapraid.conf avec les options suivantes : -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -281,10 +228,12 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Si vous êtes sous Windows, vous devez utiliser le format de chemin Windows, avec des lettres de lecteur et des barres obliques inverses au lieu de barres obliques. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -293,16 +242,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Si vous avez de nombreux disques et manquez de lettres de lecteur, vous pouvez monter les disques directement dans des sous-dossiers. Voir : -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

À ce stade, vous êtes prêt à exécuter la commande sync (synchroniser) +

+

À ce stade, vous êtes prêt à exécuter la commande `sync` (synchroniser) pour construire les informations de parité. -

+

+
 snapraid sync
 
+

Ce processus peut prendre plusieurs heures la première fois, en fonction de la taille des données déjà présentes sur les disques. Si les disques sont vides, le processus est immédiat. @@ -311,56 +265,63 @@ la prochaine exécution, il reprendra là où il a été interrompu.

Lorsque cette commande est terminée, vos données sont EN SÉCURITÉ.

Vous pouvez maintenant commencer à utiliser votre baie comme vous le souhaitez et mettre à jour périodiquement les informations de parité en exécutant -la commande sync. -

-

+la commande `sync`. +

4.1 Nettoyage (Scrubbing) -

+

Pour vérifier périodiquement les données et la parité à la recherche -d'erreurs, vous pouvez exécuter la commande scrub. -

+d'erreurs, vous pouvez exécuter la commande `scrub`.
+

+
 snapraid scrub
 
+

Cette commande compare les données de votre baie avec le hachage calculé -lors de la commande sync pour vérifier l'intégrité. +lors de la commande `sync` pour vérifier l'intégrité.

Chaque exécution de la commande vérifie environ 8 % de la baie, en excluant les données déjà nettoyées au cours des 10 jours précédents. Vous pouvez utiliser l'option -p, --plan pour spécifier une quantité différente et l'option -o, --older-than pour spécifier un âge différent en jours. Par exemple, pour vérifier 5 % de la baie pour les blocs de plus de 20 jours, utilisez : -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Si des erreurs silencieuses ou d'entrée/sortie sont trouvées pendant le processus, les blocs correspondants sont marqués comme mauvais -dans le fichier content et listés dans la commande status. -

+dans le fichier `content` et listés dans la commande `status`.
+

+
 snapraid status
 
-

Pour les corriger, vous pouvez utiliser la commande fix, en filtrant +

+

Pour les corriger, vous pouvez utiliser la commande `fix`, en filtrant les mauvais blocs avec l'option -e, --filter-error : -

+

+
 snapraid -e fix
 
-

Lors du prochain scrub, les erreurs disparaîtront du rapport -status si elles sont réellement corrigées. Pour accélérer, +

+

Lors du prochain `scrub`, les erreurs disparaîtront du rapport +`status` si elles sont réellement corrigées. Pour accélérer, vous pouvez utiliser -p mauvais pour nettoyer uniquement les blocs marqués comme mauvais. -

+

+
 snapraid -p bad scrub
 
-

L'exécution de scrub sur une baie non synchronisée peut signaler +

+

L'exécution de `scrub` sur une baie non synchronisée peut signaler des erreurs causées par des fichiers supprimés ou modifiés. Ces erreurs -sont signalées dans la sortie de scrub, mais les blocs associés +sont signalées dans la sortie de `scrub`, mais les blocs associés ne sont pas marqués comme mauvais. -

-
-

+

4.2 Mise en commun (Pooling) -

+

Note : La fonctionnalité de mise en commun décrite ci-dessous a été -remplacée par l'outil mergerfs, qui est désormais l'option recommandée +remplacée par l'outil mergefs, qui est désormais l'option recommandée pour les utilisateurs Linux de la communauté SnapRAID. Mergefs offre un moyen plus flexible et efficace de regrouper plusieurs disques dans un seul point de montage unifié, permettant un accès transparent @@ -370,30 +331,39 @@ couramment utilisé dans des configurations comme OpenMediaVault (OMV) ou des configurations NAS personnalisées.

Pour que tous les fichiers de votre baie apparaissent dans la même arborescence de répertoires, vous pouvez activer la fonctionnalité -de pooling. Elle crée une vue virtuelle en lecture seule de tous +de `pooling`. Elle crée une vue virtuelle en lecture seule de tous les fichiers de votre baie à l'aide de liens symboliques. -

Vous pouvez configurer le répertoire de pooling dans le fichier +

Vous pouvez configurer le répertoire de `pooling` dans le fichier de configuration avec : -

+

+
 pool /pool
 
+

ou, si vous êtes sous Windows, avec : -

+

+
 pool C:\pool
 
-

puis exécutez la commande pool pour créer ou mettre à jour +

+

puis exécutez la commande `pool` pour créer ou mettre à jour la vue virtuelle. -

+

+
 snapraid pool
 
+

Si vous utilisez une plateforme Unix et souhaitez partager ce répertoire sur le réseau avec des machines Windows ou Unix, vous devez ajouter les options suivantes à votre /etc/samba/smb.conf : -

+

+
 # Dans la section globale de smb.conf
 unix extensions = no
 
+
+
 # Dans la section de partage de smb.conf
 [pool]
@@ -404,73 +374,84 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

Sous Windows, le partage de liens symboliques sur un réseau nécessite que les clients les résolvent à distance. Pour activer cela, en plus de partager le répertoire du pool, vous devez également partager tous les disques indépendamment, en utilisant les noms de disques définis dans le fichier de configuration comme points de partage. Vous devez également -spécifier dans l'option share du fichier de configuration +spécifier dans l'option `share` du fichier de configuration le chemin UNC Windows que les clients distants doivent utiliser pour accéder à ces disques partagés. -

Par exemple, en opérant à partir d'un serveur nommé darkstar, +

Par exemple, en opérant à partir d'un serveur nommé `darkstar`, vous pouvez utiliser les options : -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

et partager les répertoires suivants sur le réseau : -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

pour permettre aux clients distants d'accéder à tous les fichiers à \\darkstar\pool.

Vous pourriez également avoir besoin de configurer les clients distants pour activer l'accès aux liens symboliques distants avec la commande : -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Restauration (Undeleting) -

+

SnapRAID fonctionne davantage comme un programme de sauvegarde qu'un système RAID, et il peut être utilisé pour restaurer ou récupérer des fichiers dans leur état précédent à l'aide de l'option -f, --filter : -

+

+
 snapraid fix -f FICHIER
 
+

ou pour un répertoire : -

+

+
 snapraid fix -f DOSSIER/
 
+

Vous pouvez également l'utiliser pour récupérer uniquement les fichiers accidentellement supprimés à l'intérieur d'un répertoire en utilisant l'option -m, --filter-missing, qui ne restaure que les fichiers manquants, laissant tous les autres intacts. -

+

+
 snapraid fix -m -f DOSSIER/
 
+

Ou pour récupérer tous les fichiers supprimés sur tous les lecteurs avec : -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Récupération -

+

Le pire est arrivé, et vous avez perdu un ou plusieurs disques !

NE PANIQUEZ PAS ! Vous pourrez les récupérer !

La première chose à faire est d'éviter d'autres modifications @@ -478,41 +459,44 @@ sur votre baie de disques. Désactivez toute connexion à distance et tout processus planifié, y compris toute synchronisation ou nettoyage SnapRAID nocturne planifié.

Procédez ensuite aux étapes suivantes. -

-

+

4.4.1 ÉTAPE 1 -> Reconfigurer -

+

Vous avez besoin d'espace pour récupérer, idéalement sur des disques de rechange supplémentaires, mais un disque USB externe ou un disque distant suffira.

Modifiez le fichier de configuration SnapRAID pour que l'option -data ou parity du disque défaillant pointe vers un emplacement +`data` ou `parity` du disque défaillant pointe vers un emplacement avec suffisamment d'espace vide pour récupérer les fichiers. -

Par exemple, si le disque d1 a échoué, passez de : -

+

Par exemple, si le disque `d1` a échoué, passez de : +

+
 data d1 /mnt/disk1/
 
+

à : -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Si le disque à récupérer est un disque de parité, mettez à jour -l'option parity appropriée. +l'option `parity` appropriée. Si vous avez plusieurs disques défaillants, mettez à jour toutes leurs options de configuration. -

-
-

+

4.4.2 ÉTAPE 2 -> Corriger (Fix) -

+

Exécutez la commande fix, en stockant le journal dans un fichier externe avec : -

+

+
 snapraid -d NOM -l fix.log fix
 
-

Où NOM est le nom du disque, tel que d1 dans notre exemple précédent. +

+

Où NOM est le nom du disque, tel que `d1` dans notre exemple précédent. Si le disque à récupérer est un disque de parité, utilisez les noms -parity, 2-parity, etc. +`parity`, `2-parity`, etc. Si vous avez plusieurs disques défaillants, utilisez plusieurs options -d pour les spécifier tous.

Cette commande prendra beaucoup de temps. @@ -520,283 +504,234 @@ options -d pour les spécifier tous. Exécutez-la à partir d'un disque avec suffisamment d'espace libre.

Vous avez maintenant récupéré tout ce qui est récupérable. Si certains fichiers sont partiellement ou totalement irrécupérables, ils seront -renommés en ajoutant l'extension .unrecoverable. +renommés en ajoutant l'extension `.unrecoverable`.

Vous pouvez trouver une liste détaillée de tous les blocs irrécupérables dans le fichier fix.log en vérifiant toutes les lignes commençant par -unrecoverable:. +`unrecoverable:`.

Si la récupération ne vous satisfait pas, vous pouvez réessayer autant de fois que vous le souhaitez.

Par exemple, si vous avez supprimé des fichiers de la baie après le dernier -sync, cela peut entraîner la non-récupération de certains fichiers. -Dans ce cas, vous pouvez réessayer le fix en utilisant l'option +`sync`, cela peut entraîner la non-récupération de certains fichiers. +Dans ce cas, vous pouvez réessayer le `fix` en utilisant l'option -i, --import, en spécifiant où se trouvent maintenant ces fichiers pour les inclure à nouveau dans le processus de récupération.

Si vous êtes satisfait de la récupération, vous pouvez continuer, mais notez qu'après la synchronisation, vous ne pouvez plus réessayer -la commande fix ! -

-
-

+la commande `fix` ! +

4.4.3 ÉTAPE 3 -> Vérifier (Check) -

-

Par précaution, vous pouvez maintenant exécuter une commande check + +

Par précaution, vous pouvez maintenant exécuter une commande `check` pour vous assurer que tout est correct sur le disque récupéré. -

+

+
 snapraid -d NOM -a check
 
-

Où NOM est le nom du disque, tel que d1 dans notre exemple précédent. +

+

Où NOM est le nom du disque, tel que `d1` dans notre exemple précédent.

Les options -d et -a indiquent à SnapRAID de vérifier uniquement le disque spécifié et d'ignorer toutes les données de parité.

Cette commande prendra beaucoup de temps, mais si vous n'êtes pas trop prudent, vous pouvez la sauter. -

-
-

+

4.4.4 ÉTAPE 4 -> Synchroniser (Sync) -

-

Exécutez la commande sync pour resynchroniser la baie avec le nouveau + +

Exécutez la commande `sync` pour resynchroniser la baie avec le nouveau disque. -

+

+
 snapraid sync
 
+

Si tout est récupéré, cette commande est immédiate. -

-
-
-
-

+

5 Commandes -

+

SnapRAID fournit quelques commandes simples qui vous permettent de :

  • -Afficher l'état de la baie de disques -> status +Afficher l'état de la baie de disques -> `status`
  • -Contrôler les disques -> smart, probe, up, down +Contrôler les disques -> `smart`, `probe`, `up`, `down`
  • -Faire une sauvegarde/instantané -> sync +Faire une sauvegarde/instantané -> `sync`
  • -Vérifier périodiquement les données -> scrub +Vérifier périodiquement les données -> `scrub`
  • -Restaurer la dernière sauvegarde/instantané -> fix. +Restaurer la dernière sauvegarde/instantané -> `fix`.

Les commandes doivent être écrites en minuscules. -

-

+

5.1 status -

+

Affiche un résumé de l'état de la baie de disques.

Il comprend des informations sur la fragmentation de la parité, l'âge des blocs sans vérification, et toutes les erreurs silencieuses enregistrées rencontrées lors du nettoyage.

Les informations présentées se réfèrent au dernier moment où vous avez -exécuté sync. Les modifications ultérieures ne sont pas prises en compte. +exécuté `sync`. Les modifications ultérieures ne sont pas prises en compte.

Si des mauvais blocs ont été détectés, leurs numéros de blocs sont listés. -Pour les corriger, vous pouvez utiliser la commande fix -e. +Pour les corriger, vous pouvez utiliser la commande `fix -e`.

Il montre également un graphique représentant la dernière fois que chaque bloc a été nettoyé ou synchronisé. Les blocs nettoyés sont affichés -avec *, les blocs synchronisés mais pas encore nettoyés avec o. +avec '*', les blocs synchronisés mais pas encore nettoyés avec 'o'.

Rien n'est modifié. -

-
-

+

5.2 smart -

+

Affiche un rapport SMART de tous les disques du système.

Il comprend une estimation de la probabilité de défaillance au cours de la prochaine année, vous permettant de planifier les remplacements de maintenance des disques qui présentent des attributs suspects.

Cette estimation de probabilité est obtenue en corrélant les attributs SMART des disques avec les données Backblaze disponibles à : -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Si SMART signale qu'un disque est en panne, FAIL ou PREFAIL est +

+

Si SMART signale qu'un disque est en panne, `FAIL` ou `PREFAIL` est affiché pour ce disque, et SnapRAID retourne une erreur. Dans ce cas, le remplacement immédiat du disque est fortement recommandé.

Les autres chaînes d'état possibles sont : -

-
-
+

+ + + +
logfail -
+
Dans le passé, certains attributs étaient inférieurs au seuil. - - -
-
+
logerr -
+
Le journal d'erreurs du périphérique contient des erreurs. - - -
-
+
selferr -
+
Le journal d'auto-test du périphérique contient des erreurs. - - - +

Si l'option -v, --verbose est spécifiée, une analyse statistique plus approfondie est fournie. Cette analyse peut vous aider à décider si vous avez besoin de plus ou moins de parité. -

Cette commande utilise l'outil smartctl et équivaut à exécuter -smartctl -a sur tous les périphériques. +

Cette commande utilise l'outil `smartctl` et équivaut à exécuter +`smartctl -a` sur tous les périphériques.

Si vos périphériques ne sont pas détectés automatiquement correctement, vous pouvez spécifier une commande personnalisée en utilisant l'option -smartctl dans le fichier de configuration. +`smartctl` dans le fichier de configuration.

Rien n'est modifié. -

-
-

+

5.3 probe -

+

Affiche l'état d'ALIMENTATION de tous les disques du système. -

Standby signifie que le disque ne tourne pas. Active signifie +

`Standby` signifie que le disque ne tourne pas. `Active` signifie que le disque tourne. -

Cette commande utilise l'outil smartctl et équivaut à exécuter -smartctl -n standby -i sur tous les périphériques. +

Cette commande utilise l'outil `smartctl` et équivaut à exécuter +`smartctl -n standby -i` sur tous les périphériques.

Si vos périphériques ne sont pas détectés automatiquement correctement, vous pouvez spécifier une commande personnalisée en utilisant l'option -smartctl dans le fichier de configuration. +`smartctl` dans le fichier de configuration.

Rien n'est modifié. -

-
-

+

5.4 up -

+

Fait tourner (spin up) tous les disques de la baie.

Vous pouvez faire tourner uniquement des disques spécifiques en utilisant l'option -d, --filter-disk.

Faire tourner tous les disques en même temps nécessite beaucoup d'énergie. Assurez-vous que votre alimentation peut le supporter.

Rien n'est modifié. -

-
-

+

5.5 down -

+

Arrête (spin down) tous les disques de la baie. -

Cette commande utilise l'outil smartctl et équivaut à exécuter -smartctl -s standby,now sur tous les périphériques. +

Cette commande utilise l'outil `smartctl` et équivaut à exécuter +`smartctl -s standby,now` sur tous les périphériques.

Vous pouvez arrêter uniquement des disques spécifiques en utilisant l'option -d, --filter-disk.

Pour arrêter automatiquement en cas d'erreur, vous pouvez utiliser l'option -s, --spin-down-on-error avec toute autre commande, -ce qui équivaut à exécuter down manuellement lorsqu'une +ce qui équivaut à exécuter `down` manuellement lorsqu'une erreur se produit.

Rien n'est modifié. -

-
-

+

5.6 diff -

-

Liste tous les fichiers modifiés depuis le dernier sync qui + +

Liste tous les fichiers modifiés depuis le dernier `sync` qui nécessitent la recomputation de leurs données de parité.

Cette commande ne vérifie pas les données des fichiers, mais uniquement l'horodatage, la taille et l'inode du fichier.

Après avoir listé tous les fichiers modifiés, un résumé des modifications est présenté, regroupé par : -

-
-
+

+ + + + + + + +
equal -
+
Fichiers inchangés par rapport à avant. - - -
-
+
added -
+
Fichiers ajoutés qui n'étaient pas présents auparavant. - - -
-
+
removed -
+
Fichiers supprimés. - - -
-
+
updated -
+
Fichiers avec une taille ou un horodatage différent, signifiant qu'ils ont été modifiés. - - -
-
+
moved -
+
Fichiers déplacés vers un répertoire différent sur le même disque. Ils sont identifiés par le même nom, la même taille, le même horodatage et le même inode, mais un répertoire différent. - - -
-
+
copied -
-Fichiers copiés sur le même disque ou sur un disque -différent où le fichier original existe toujours. -Ils sont identifiés par le fait qu'ils ont le même nom, la même -taille et le même horodatage. -Si l'horodatage à la sous-seconde est nul, le chemin complet -doit correspondre pour être identifié, pas seulement le nom. -
- -
-
-relocated -
-Fichiers déplacés sur le même disque ou sur un disque -différent où l'original a disparu. -Ils sont identifiés par le fait qu'ils ont le même nom, la même -taille et le même horodatage. -Si l'horodatage à la sous-seconde est nul, le chemin complet -doit correspondre pour être identifié. -Contrairement aux fichiers 'moved' sur le même disque, les -fichiers relocalisés ont un inode différent. -
-
-
-
+
+Fichiers copiés sur le même disque ou un disque différent. +Notez que s'ils sont vraiment déplacés vers un autre +disque, ils seront également comptés dans `removed`. +Ils sont identifiés par le même nom, la même taille +et le même horodatage. Si l'horodatage en sous-seconde +est zéro, le chemin complet doit correspondre, pas seulement +le nom. +
restored -
-Fichiers avec un inode différent mais dont le -répertoire, le nom, la taille et l'horodatage correspondent. -Il s'agit généralement de fichiers restaurés après avoir été -supprimés. -
- - -

Si un sync est requis, le code de retour du processus est 2, +

+Fichiers avec un inode différent mais correspondant +au nom, à la taille et à l'horodatage. Il s'agit +généralement de fichiers restaurés après avoir été supprimés. +
+

Si un `sync` est requis, le code de retour du processus est 2, au lieu du 0 par défaut. Le code de retour 1 est utilisé pour une condition d'erreur générique.

Rien n'est modifié. -

-
-

+

5.7 sync -

+

Met à jour les informations de parité. Tous les fichiers modifiés dans la baie de disques sont lus, et les données de parité correspondantes sont mises à jour.

Vous pouvez arrêter ce processus à tout moment en appuyant sur Ctrl+C, sans perdre le travail déjà effectué. -Lors de la prochaine exécution, le processus sync reprendra +Lors de la prochaine exécution, le processus `sync` reprendra là où il a été interrompu.

Si des erreurs silencieuses ou d'entrée/sortie sont trouvées pendant le processus, les blocs correspondants sont marqués comme mauvais. @@ -809,13 +744,11 @@ le même inode, la parité n'est pas recomptée. Si le fichier est déplacé vers un autre disque, la parité est recomptée, mais les informations de hachage précédemment calculées sont conservées. -

Les fichiers content et parity sont modifiés si nécessaire. +

Les fichiers `content` et `parity` sont modifiés si nécessaire. Les fichiers dans la baie NE SONT PAS modifiés. -

-
-

+

5.8 scrub -

+

Nettoie la baie, vérifiant les erreurs silencieuses ou d'entrée/sortie dans les disques de données et de parité.

Chaque invocation vérifie environ 8 % de la baie, en excluant @@ -834,49 +767,47 @@ doit avoir. Les blocs les plus anciens sont nettoyés en premier, assurant une vérification optimale. Si vous souhaitez nettoyer uniquement les blocs juste synchronisés -qui n'ont pas encore été nettoyés, utilisez l'option -p new. +qui n'ont pas encore été nettoyés, utilisez l'option `-p new`.

Pour obtenir des détails sur l'état du nettoyage, utilisez la commande -status. +`status`.

Pour toute erreur silencieuse ou d'entrée/sortie trouvée, les blocs -correspondants sont marqués comme mauvais dans le fichier content. -Ces mauvais blocs sont listés dans status et peuvent être corrigés -avec fix -e. +correspondants sont marqués comme mauvais dans le fichier `content`. +Ces mauvais blocs sont listés dans `status` et peuvent être corrigés +avec `fix -e`. Après la correction, lors du prochain nettoyage, ils seront revérifiés, et s'ils sont jugés corrigés, la marque "mauvais" sera supprimée. Pour nettoyer uniquement les mauvais blocs, vous pouvez utiliser la -commande scrub -p bad. -

Il est recommandé d'exécuter scrub uniquement sur une baie +commande `scrub -p bad`. +

Il est recommandé d'exécuter `scrub` uniquement sur une baie synchronisée pour éviter les erreurs signalées causées par des données non synchronisées. Ces erreurs sont reconnues comme n'étant pas des erreurs silencieuses, et les blocs ne sont pas marqués comme mauvais, mais de telles erreurs sont signalées dans la sortie de la commande. -

Le fichier content est modifié pour mettre à jour l'heure de la dernière +

Le fichier `content` est modifié pour mettre à jour l'heure de la dernière vérification de chaque bloc et pour marquer les mauvais blocs. -Les fichiers parity NE SONT PAS modifiés. +Les fichiers `parity` NE SONT PAS modifiés. Les fichiers dans la baie NE SONT PAS modifiés. -

-
-

+

5.9 fix -

+

Corrige tous les fichiers et les données de parité.

Tous les fichiers et les données de parité sont comparés à l'état -de l'instantané enregistré lors du dernier sync. +de l'instantané enregistré lors du dernier `sync`. Si une différence est trouvée, elle est rétablie à l'instantané stocké. -

AVERTISSEMENT ! La commande fix ne fait pas de distinction entre +

AVERTISSEMENT ! La commande `fix` ne fait pas de distinction entre les erreurs et les modifications intentionnelles. Elle rétablit -inconditionnellement l'état du fichier au dernier sync. +inconditionnellement l'état du fichier au dernier `sync`.

Si aucune autre option n'est spécifiée, l'intégralité de la baie est traitée. Utilisez les options de filtre pour sélectionner un sous-ensemble de fichiers ou de disques sur lesquels opérer. -

Pour corriger uniquement les blocs marqués mauvais pendant sync et scrub, +

Pour corriger uniquement les blocs marqués mauvais pendant `sync` et `scrub`, utilisez l'option -e, --filter-error. Contrairement aux autres options de filtre, celle-ci applique des corrections -uniquement aux fichiers qui sont inchangés depuis le dernier sync. +uniquement aux fichiers qui sont inchangés depuis le dernier `sync`.

SnapRAID renomme tous les fichiers qui ne peuvent pas être corrigés -en ajoutant l'extension .unrecoverable. +en ajoutant l'extension `.unrecoverable`.

Avant de corriger, l'intégralité de la baie est scannée pour trouver -tout fichier déplacé depuis la dernière opération sync. +tout fichier déplacé depuis la dernière opération `sync`. Ces fichiers sont identifiés par leur horodatage, ignorant leur nom et leur répertoire, et sont utilisés dans le processus de récupération si nécessaire. @@ -884,51 +815,43 @@ Si vous en avez déplacé certains en dehors de la baie, vous pouvez utiliser l'option -i, --import pour spécifier des répertoires supplémentaires à scanner.

Les fichiers sont identifiés uniquement par chemin, pas par inode. -

Le fichier content N'EST PAS modifié. -Les fichiers parity sont modifiés si nécessaire. +

Le fichier `content` N'EST PAS modifié. +Les fichiers `parity` sont modifiés si nécessaire. Les fichiers dans la baie sont modifiés si nécessaire. -

-
-

+

5.10 check -

+

Vérifie tous les fichiers et les données de parité. -

Il fonctionne comme fix, mais il simule seulement une récupération +

Il fonctionne comme `fix`, mais il simule seulement une récupération et aucune modification n'est écrite sur la baie.

Cette commande est principalement destinée à la vérification manuelle, comme après un processus de récupération ou dans d'autres conditions spéciales. Pour les vérifications périodiques et planifiées, utilisez -scrub. +`scrub`.

Si vous utilisez l'option -a, --audit-only, seules les données des fichiers sont vérifiées, et les données de parité sont ignorées pour une exécution plus rapide.

Les fichiers sont identifiés uniquement par chemin, pas par inode.

Rien n'est modifié. -

-
-

+

5.11 list -

+

Liste tous les fichiers contenus dans la baie au moment du dernier -sync. +`sync`.

Avec -v ou --verbose, l'heure en sous-seconde est également affichée.

Rien n'est modifié. -

-
-

+

5.12 dup -

+

Liste tous les fichiers en double. Deux fichiers sont considérés comme égaux si leurs hachages correspondent. Les données des fichiers ne sont pas lues ; seuls les hachages précalculés sont utilisés.

Rien n'est modifié. -

-
-

+

5.13 pool -

+

Crée ou met à jour une vue virtuelle de tous -les fichiers de votre baie de disques dans le répertoire pooling. +les fichiers de votre baie de disques dans le répertoire `pooling`.

Les fichiers ne sont pas copiés mais liés à l'aide de liens symboliques.

Lors de la mise à jour, tous les liens symboliques et les @@ -936,11 +859,9 @@ sous-répertoires vides existants sont supprimés et remplacés par la nouvelle vue de la baie. Tout autre fichier ordinaire est laissé en place.

Rien n'est modifié en dehors du répertoire du pool. -

-
-

+

5.14 devices -

+

Affiche les périphériques de bas niveau utilisés par la baie.

Cette commande affiche les associations de périphériques dans la baie et est principalement destinée à être une interface de script. @@ -953,11 +874,9 @@ pour chaque disque de la baie, mais dans certaines configurations plus complexes, vous pouvez avoir plusieurs périphériques de bas niveau utilisés par un seul disque de la baie.

Rien n'est modifié. -

-
-

+

5.15 touch -

+

Définit un horodatage arbitraire en sous-seconde pour tous les fichiers qui l'ont défini à zéro.

Cela améliore la capacité de SnapRAID à reconnaître les fichiers @@ -971,11 +890,9 @@ complet, la taille et l'horodatage correspondent tous.

L'horodatage à la seconde près n'est pas modifié, de sorte que toutes les dates et heures de vos fichiers seront préservées. -

-
-

+

5.16 rehash -

+

Planifie un nouveau hachage de toute la baie.

Cette commande change le type de hachage utilisé, généralement lors de la mise à niveau d'un système 32 bits vers un système 64 bits, @@ -983,168 +900,134 @@ pour passer de MurmurHash3 au plus rapide SpookyHash.

Si vous utilisez déjà le hachage optimal, cette commande ne fait rien et vous informe qu'aucune action n'est nécessaire.

Le nouveau hachage n'est pas effectué immédiatement, mais a lieu -progressivement pendant sync et scrub. -

Vous pouvez vérifier l'état du nouveau hachage en utilisant status. +progressivement pendant `sync` et `scrub`. +

Vous pouvez vérifier l'état du nouveau hachage en utilisant `status`.

Pendant le nouveau hachage, SnapRAID conserve toutes ses -fonctionnalités, à la seule exception que dup ne peut pas +fonctionnalités, à la seule exception que `dup` ne peut pas détecter les fichiers en double utilisant un hachage différent. -

-
-

-locate -

-

Localise les fichiers stockés sur les disques de parité. Pour chaque fichier -correspondant, il affiche son emplacement dans le fichier de parité et le nombre -de fragments qu'il occupe. -

Vous pouvez utiliser l'option -t, --tail pour restreindre l'opération aux fichiers -occupant la partie terminale spécifiée de la parité. -

Si vous souhaitez réallouer ces fichiers, vous pouvez alors utiliser l'option --W, --force-realloc-tail. -Sachez que ces fichiers ne seront pas protégés par la parité pendant le processus -de réallocation. -

-
-
-

+

6 Options -

+

SnapRAID fournit les options suivantes : -

-
-
+

+ +
-c, --conf CONFIG -
+
Sélectionne le fichier de configuration à utiliser. S'il n'est pas -spécifié, sous Unix, il utilise le fichier /usr/local/etc/snapraid.conf -s'il existe, sinon /etc/snapraid.conf. -Sous Windows, il utilise le fichier snapraid.conf dans le même -répertoire que snapraid.exe. - - - -
-
-
+spécifié, sous Unix, il utilise le fichier `/usr/local/etc/snapraid.conf` +s'il existe, sinon `/etc/snapraid.conf`. +Sous Windows, il utilise le fichier `snapraid.conf` dans le même +répertoire que `snapraid.exe`. +
+ + +
-f, --filter MOTIF -
-Filtre les fichiers à traiter dans check et fix. +
+Filtre les fichiers à traiter dans `check` et `fix`. Seuls les fichiers correspondant au motif spécifié sont traités. Cette option peut être utilisée plusieurs fois. Voir la section MOTIF pour plus de détails sur les spécifications de motifs. Sous Unix, assurez-vous que les caractères de globbing sont entre guillemets s'ils sont utilisés. -Cette option ne peut être utilisée qu'avec check et fix. -Elle ne peut pas être utilisée avec sync et scrub, car ils +Cette option ne peut être utilisée qu'avec `check` et `fix`. +Elle ne peut pas être utilisée avec `sync` et `scrub`, car ils traitent toujours l'intégralité de la baie. - - - -
-
-
+
+ + +
-d, --filter-disk NOM -
-Filtre les disques à traiter dans check, fix, up et down. +
+Filtre les disques à traiter dans `check`, `fix`, `up` et `down`. Vous devez spécifier un nom de disque tel que défini dans le fichier de configuration. Vous pouvez également spécifier des disques de parité avec les noms : -parity, 2-parity, 3-parity, etc., pour limiter les opérations +`parity`, `2-parity`, `3-parity`, etc., pour limiter les opérations à un disque de parité spécifique. Si vous combinez plusieurs options --filter, --filter-disk et --filter-missing, seuls les fichiers correspondant à tous les filtres sont sélectionnés. Cette option peut être utilisée plusieurs fois. -Cette option ne peut être utilisée qu'avec check, fix, up -et down. -Elle ne peut pas être utilisée avec sync et scrub, car ils +Cette option ne peut être utilisée qu'avec `check`, `fix`, `up` +et `down`. +Elle ne peut pas être utilisée avec `sync` et `scrub`, car ils traitent toujours l'intégralité de la baie. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtre les fichiers à traiter dans check et fix. +
+Filtre les fichiers à traiter dans `check` et `fix`. Seuls les fichiers manquants ou supprimés de la baie sont traités. -Lorsqu'elle est utilisée avec fix, cela agit comme une commande -undelete (restaurer). +Lorsqu'elle est utilisée avec `fix`, cela agit comme une commande +`undelete` (restaurer). Si vous combinez plusieurs options --filter, --filter-disk et --filter-missing, seuls les fichiers correspondant à tous les filtres sont sélectionnés. -Cette option ne peut être utilisée qu'avec check et fix. -Elle ne peut pas être utilisée avec sync et scrub, car ils +Cette option ne peut être utilisée qu'avec `check` et `fix`. +Elle ne peut pas être utilisée avec `sync` et `scrub`, car ils traitent toujours l'intégralité de la baie. - - - -
-
-
+
+ + +
-e, --filter-error -
-Traite les fichiers avec des erreurs dans check et fix. +
+Traite les fichiers avec des erreurs dans `check` et `fix`. Il ne traite que les fichiers qui ont des blocs marqués avec des erreurs -silencieuses ou d'entrée/sortie pendant sync et scrub, tels -que listés dans status. -Cette option ne peut être utilisée qu'avec check et fix. - - - -
-
-
+silencieuses ou d'entrée/sortie pendant `sync` et `scrub`, tels +que listés dans `status`. +Cette option ne peut être utilisée qu'avec `check` et `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Sélectionne le plan de nettoyage. Si PERC est une valeur numérique de 0 à 100, elle est interprétée comme le pourcentage de blocs à nettoyer. Au lieu d'un pourcentage, vous pouvez spécifier un plan : -bad nettoie les mauvais blocs, new nettoie les blocs -qui n'ont pas encore été nettoyés, et full nettoie tout. -Cette option ne peut être utilisée qu'avec scrub. - - - -
-
-
+`bad` nettoie les mauvais blocs, `new` nettoie les blocs +qui n'ont pas encore été nettoyés, et `full` nettoie tout. +Cette option ne peut être utilisée qu'avec `scrub`. +
+ + +
-o, --older-than JOURS -
-Sélectionne la partie la plus ancienne de la baie à traiter dans scrub. +
+Sélectionne la partie la plus ancienne de la baie à traiter dans `scrub`. JOURS est l'âge minimum en jours pour qu'un bloc soit nettoyé ; la valeur par défaut est 10. Les blocs marqués comme mauvais sont toujours nettoyés, quelle que soit cette option. -Cette option ne peut être utilisée qu'avec scrub. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `scrub`. +
+ + +
-a, --audit-only -
-Dans check, vérifie le hachage des fichiers sans +
+Dans `check`, vérifie le hachage des fichiers sans vérifier les données de parité. Si vous êtes intéressé uniquement par la vérification des données des fichiers, cette option peut accélérer considérablement le processus de vérification. -Cette option ne peut être utilisée qu'avec check. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `check`. +
+ + +
-h, --pre-hash -
-Dans sync, exécute une phase de hachage préliminaire de toutes +
+Dans `sync`, exécute une phase de hachage préliminaire de toutes les nouvelles données pour une vérification supplémentaire avant le calcul de la parité. -Habituellement, dans sync, aucun hachage préliminaire n'est +Habituellement, dans `sync`, aucun hachage préliminaire n'est effectué, et les nouvelles données sont hachées juste avant le calcul de la parité lorsqu'elles sont lues pour la première fois. Ce processus se produit lorsque le système est soumis à @@ -1154,37 +1037,33 @@ Il s'agit d'une condition extrême pour la machine, et si elle présente un problème matériel latent, des erreurs silencieuses peuvent passer inaperçues car les données ne sont pas encore hachées. -Pour éviter ce risque, vous pouvez activer le mode pre-hash +Pour éviter ce risque, vous pouvez activer le mode `pre-hash` pour que toutes les données soient lues deux fois afin de garantir leur intégrité. Cette option vérifie également les fichiers déplacés au sein de la baie pour s'assurer que l'opération de déplacement a réussi et, si nécessaire, vous permet d'exécuter une opération fix avant de continuer. -Cette option ne peut être utilisée qu'avec sync. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `sync`. +
+ + +
-i, --import DOSSIER -
+
Importe à partir du répertoire spécifié tous les fichiers supprimés -de la baie après le dernier sync. +de la baie après le dernier `sync`. Si vous avez toujours de tels fichiers, ils peuvent être utilisés -par check et fix pour améliorer le processus de récupération. +par `check` et `fix` pour améliorer le processus de récupération. Les fichiers sont lus, y compris dans les sous-répertoires, et sont identifiés quel que soit leur nom. -Cette option ne peut être utilisée qu'avec check et fix. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `check` et `fix`. +
+ + +
-s, --spin-down-on-error -
+
En cas d'erreur, arrête (spin down) tous les disques gérés avant de quitter avec un code d'état non nul. Cela empêche les lecteurs de rester actifs et en rotation après une opération @@ -1192,38 +1071,21 @@ interrompue, aidant à éviter une accumulation inutile de chaleur et une consommation d'énergie. Utilisez cette option pour vous assurer que les disques sont arrêtés en toute sécurité même lorsqu'une commande échoue. - - - -
-
-
+
+ + +
-w, --bw-limit DÉBIT -
+
Applique une limite de bande passante globale pour tous les disques. Le DÉBIT est le nombre d'octets par seconde. Vous pouvez spécifier un multiplicateur tel que K, M ou G (par exemple, --bw-limit 1G). - - - -
-
-
--t, --tail TAILLE -
-Limite la liste des fichiers à ceux n'utilisant pas plus que la -taille de queue spécifiée des disques de parité. -Vous pouvez utiliser des multiplicateurs tels que K, M, G ou T (ex: --tail 1G). -Cette option n'est valide que lorsqu'elle est utilisée avec la -commande locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Active une vue d'état étendue qui affiche des informations supplémentaires. L'écran affiche deux graphiques : @@ -1243,14 +1105,12 @@ Tous les calculs s'exécutent en parallèle avec les opérations de disque. Par conséquent, tant qu'il y a un temps d'attente mesurable pour au moins un disque, cela indique que le processeur est suffisamment rapide pour suivre la charge de travail. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Force l'opération non sécurisée de synchronisation d'un fichier de taille zéro qui était auparavant non nul. Si SnapRAID détecte une telle condition, il arrête de @@ -1259,15 +1119,13 @@ Cela vous permet de détecter facilement quand, après un plantage du système, certains fichiers accédés ont été tronqués. C'est une condition possible sous Linux avec les systèmes de fichiers ext3/ext4. -Cette option ne peut être utilisée qu'avec sync. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `sync`. +
+ + +
-E, --force-empty -
+
Force l'opération non sécurisée de synchronisation d'un disque avec tous les fichiers originaux manquants. Si SnapRAID détecte que tous les fichiers initialement présents @@ -1275,15 +1133,13 @@ sur le disque sont manquants ou réécrits, il arrête de procéder à moins que vous ne spécifiiez cette option. Cela vous permet de détecter facilement lorsqu'un système de fichiers de données n'est pas monté. -Cette option ne peut être utilisée qu'avec sync. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `sync`. +
+ + +
-U, --force-uuid -
+
Force l'opération non sécurisée de synchronisation, vérification et correction avec des disques qui ont changé leur UUID. Si SnapRAID détecte que certains disques ont changé d'UUID, @@ -1294,16 +1150,14 @@ Il est cependant autorisé d'avoir un seul changement d'UUID avec une seule parité, et plus avec une parité multiple, car c'est le cas normal lors du remplacement des disques après une récupération. -Cette option ne peut être utilisée qu'avec sync, check ou -fix. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `sync`, `check` ou +`fix`. +
+ + +
-D, --force-device -
+
Force l'opération non sécurisée de correction avec des disques inaccessibles ou avec des disques sur le même périphérique physique. Par exemple, si vous avez perdu deux disques de données et que @@ -1312,16 +1166,14 @@ vous pouvez ignorer le deuxième disque inaccessible. Ou, si vous souhaitez récupérer un disque dans l'espace libre restant sur un disque déjà utilisé, partageant le même périphérique physique. -Cette option ne peut être utilisée qu'avec fix. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `fix`. +
+ + +
-N, --force-nocopy -
-Dans sync, check et fix, désactive l'heuristique de détection +
+Dans `sync`, `check` et `fix`, désactive l'heuristique de détection de copie. Sans cette option, SnapRAID suppose que les fichiers ayant les mêmes attributs, tels que le nom, la taille et l'horodatage, sont des copies @@ -1333,143 +1185,101 @@ manquants. Dans de rares cas, ce comportement peut entraîner des faux positifs ou un processus lent en raison de nombreuses vérifications de hachage, et cette option vous permet de résoudre de tels problèmes. -Cette option ne peut être utilisée qu'avec sync, check et fix. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `sync`, `check` et `fix`. +
+ + +
-F, --force-full -
-Dans sync, force un recomptage complet de la parité. +
+Dans `sync`, force un recomptage complet de la parité. Cette option peut être utilisée lorsque vous ajoutez un nouveau niveau de parité ou si vous êtes revenu à un ancien fichier de contenu utilisant des données de parité plus récentes. Au lieu de recréer la parité à partir de zéro, cela vous permet de réutiliser les hachages présents dans le fichier de contenu pour valider les données et maintenir la protection des données -pendant le processus sync en utilisant les données de parité +pendant le processus `sync` en utilisant les données de parité existantes. -Cette option ne peut être utilisée qu'avec sync. - - - -
-
-
+Cette option ne peut être utilisée qu'avec `sync`. +
+ + +
-R, --force-realloc -
-Dans sync, force une réallocation complète des fichiers et +
+Dans `sync`, force une réallocation complète des fichiers et une reconstruction de la parité. Cette option peut être utilisée pour réallouer complètement tous les fichiers, en supprimant la fragmentation, tout en réutilisant les hachages présents dans le fichier de contenu pour valider les données. -Cette option ne peut être utilisée qu'avec sync. +Cette option ne peut être utilisée qu'avec `sync`. AVERTISSEMENT ! Cette option est réservée aux experts, et il est fortement recommandé de ne pas l'utiliser. -Vous N'AVEZ AUCUNE protection des données pendant l'opération sync. - - - -
-
-
--W, --force-realloc-tail TAILLE -
-Fonctionne comme -R, --force-realloc, maar limité à la partie terminale -spécifiée (les derniers TAILLE octets) de chaque fichier de parité. -Force la réallocation (déplacement) de tout fragment/bloc de fichier -actuellement stocké dans cette section terminale, leur permettant d'être -placés n'importe où dans le(s) fichier(s) de parité où de l'espace libre -est disponible (y compris les trous existants). -Le but principal de cette option est de réduire la taille sur disque -du fichier de parité. -Si la réallocation réussit à vider toute la section terminale -(plus aucun bloc ne l'utilise), le fichier de parité est tronqué, -récupérant l'espace terminal inutilisé. -Vous pouvez utiliser des multiplicateurs tels que K, M, G ou T (ex: ---force-realloc-tail 1G). -Vous pouvez utiliser locate -t, --tail pour connaître à l'avance -les fichiers affectés. -AVERTISSEMENT ! -Cette option est réservée aux experts et il est fortement -recommandé de ne pas l'utiliser. -Vous n'avez PAS de protection des données pendant l'opération sync -pour les fichiers affectés. -
-
-
-
-
-
+Vous N'AVEZ AUCUNE protection des données pendant l'opération `sync`. +
+ + +
-l, --log FICHIER -
+
Écrit un journal détaillé dans le fichier spécifié. Si cette option n'est pas spécifiée, les erreurs inattendues sont imprimées à l'écran, ce qui peut entraîner une sortie excessive en cas de nombreuses erreurs. Lorsque -l, --log est spécifié, seules les erreurs fatales qui entraînent l'arrêt de SnapRAID sont imprimées à l'écran. -Si le chemin commence par >>, le fichier est ouvert -en mode ajout. Les occurrences de %D et %T dans le nom sont +Si le chemin commence par '>>', le fichier est ouvert +en mode ajout. Les occurrences de '%D' et '%T' dans le nom sont remplacées par la date et l'heure au format YYYYMMDD et HHMMSS. Dans les fichiers batch Windows, vous devez doubler -le caractère %, par exemple, result-%%D.log. Pour utiliser ->>, vous devez encadrer le nom de guillemets, par exemple, -">>result.log". +le caractère '%', par exemple, result-%%D.log. Pour utiliser +'>>', vous devez encadrer le nom de guillemets, par exemple, +`">>result.log"`. Pour sortir le journal sur la sortie standard ou l'erreur -standard, vous pouvez utiliser ">&1" et ">&2", +standard, vous pouvez utiliser `">&1"` et `">&2"`, respectivement. Consultez le fichier ou la page de manuel snapraid_log.txt pour les descriptions des balises de journal. - - - -
-
-
+
+ + +
-L, --error-limit NOMBRE -
+
Définit une nouvelle limite d'erreurs avant d'arrêter l'exécution. Par défaut, SnapRAID s'arrête s'il rencontre plus de 100 erreurs d'entrée/sortie, indiquant qu'un disque est probablement en panne. -Cette option affecte sync et scrub, qui sont autorisés +Cette option affecte `sync` et `scrub`, qui sont autorisés à continuer après le premier ensemble d'erreurs de disque pour essayer de terminer leurs opérations. -Cependant, check et fix s'arrêtent toujours à la première erreur. - - - -
-
-
+Cependant, `check` et `fix` s'arrêtent toujours à la première erreur. +
+ + +
-S, --start BLKSTART -
+
Commence le traitement à partir du numéro de bloc spécifié. Cela peut être utile pour réessayer de vérifier ou de corriger des blocs spécifiques en cas de disque endommagé. Cette option est principalement destinée à la récupération manuelle avancée. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Ne traite que le nombre de blocs spécifié. Cette option est principalement destinée à la récupération manuelle avancée. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENU -
+
Génère un fichier de configuration factice à partir d'un fichier de contenu existant. Le fichier de configuration est écrit sur la sortie standard @@ -1477,69 +1287,57 @@ et n'écrase pas un fichier existant. Ce fichier de configuration contient également les informations nécessaires pour reconstruire les points de montage du disque au cas où vous perdriez l'intégralité du système. - - - -
-
-
+
+ + +
-v, --verbose -
+
Affiche plus d'informations à l'écran. S'il est spécifié une fois, il affiche les fichiers exclus et des statistiques supplémentaires. Cette option n'a aucun effet sur les fichiers journaux. - - - -
-
-
+
+ + +
-q, --quiet -
+
Affiche moins d'informations à l'écran. S'il est spécifié une fois, il supprime la barre de progression ; deux fois, les opérations en cours ; trois fois, les messages d'information ; quatre fois, les messages d'état. Les erreurs fatales sont toujours imprimées à l'écran. Cette option n'a aucun effet sur les fichiers journaux. - - - -
-
-
+
+ + +
-H, --help -
+
Affiche un écran d'aide court. - - - -
-
-
+
+ + +
-V, --version -
+
Affiche la version du programme. - - - - -
-

+

+

7 Configuration -

+

SnapRAID nécessite un fichier de configuration pour savoir où se trouve votre baie de disques et où stocker les informations de parité. -

Sous Unix, il utilise le fichier /usr/local/etc/snapraid.conf s'il existe, -sinon /etc/snapraid.conf. -Sous Windows, il utilise le fichier snapraid.conf dans le même -répertoire que snapraid.exe. +

Sous Unix, il utilise le fichier `/usr/local/etc/snapraid.conf` s'il existe, +sinon `/etc/snapraid.conf`. +Sous Windows, il utilise le fichier `snapraid.conf` dans le même +répertoire que `snapraid.exe`.

Il doit contenir les options suivantes (sensibles à la casse) : -

-

+

7.1 parity FICHIER [,FICHIER] ... -

+

Définit les fichiers à utiliser pour stocker les informations de parité. La parité permet une protection contre une seule défaillance de disque, similaire au RAID5. @@ -1555,11 +1353,9 @@ ne deviennent pas fragmentés, améliorant les performances.

Sous Windows, 256 Mo sont laissés inutilisés sur chaque disque pour éviter l'avertissement concernant les disques pleins.

Cette option est obligatoire et ne peut être utilisée qu'une seule fois. -

-
-

+

7.2 (2,3,4,5,6)-parity FICHIER [,FICHIER] ... -

+

Définit les fichiers à utiliser pour stocker les informations de parité supplémentaires.

Pour chaque niveau de parité spécifié, un niveau de protection @@ -1583,46 +1379,40 @@ supplémentaire est activé :

Chaque niveau de parité nécessite la présence de tous les niveaux de parité précédents. -

Les mêmes considérations que pour l'option parity s'appliquent. +

Les mêmes considérations que pour l'option 'parity' s'appliquent.

Ces options sont facultatives et ne peuvent être utilisées qu'une seule fois. -

-
-

+

7.3 z-parity FICHIER [,FICHIER] ... -

+

Définit un fichier et un format alternatifs pour stocker la triple parité. -

Cette option est une alternative à 3-parity, principalement destinée +

Cette option est une alternative à '3-parity', principalement destinée aux processeurs bas de gamme comme ARM ou AMD Phenom, Athlon et Opteron qui ne prennent pas en charge l'ensemble d'instructions SSSE3. Dans de tels cas, elle offre de meilleures performances.

Ce format est similaire mais plus rapide que celui utilisé par ZFS RAIDZ3. Comme ZFS, il ne fonctionne pas au-delà de la triple parité. -

Lors de l'utilisation de 3-parity, vous serez averti s'il est -recommandé d'utiliser le format z-parity pour une amélioration des +

Lors de l'utilisation de '3-parity', vous serez averti s'il est +recommandé d'utiliser le format 'z-parity' pour une amélioration des performances.

Il est possible de convertir d'un format à l'autre en ajustant le fichier de configuration avec le fichier z-parity ou 3-parity souhaité -et en utilisant fix pour le recréer. -

-
-

+et en utilisant 'fix' pour le recréer. +

7.4 content FICHIER -

+

Définit le fichier à utiliser pour stocker la liste et les sommes de contrôle de tous les fichiers présents dans votre baie de disques.

Il peut être placé sur un disque utilisé pour les données, la parité, ou tout autre disque disponible. Si vous utilisez un disque de données, ce fichier est automatiquement -exclu du processus sync. +exclu du processus `sync`.

Cette option est obligatoire et peut être utilisée plusieurs fois pour enregistrer plusieurs copies du même fichier.

Vous devez stocker au moins une copie pour chaque disque de parité utilisé plus un. L'utilisation de copies supplémentaires ne nuit pas. -

-
-

+

7.5 data NOM DOSSIER -

+

Définit le nom et le point de montage des disques de données dans la baie. NOM est utilisé pour identifier le disque et doit être unique. DOSSIER est le point de montage du disque dans le @@ -1632,50 +1422,32 @@ vous gardez le NOM fixe.

Vous devriez utiliser une option pour chaque disque de données de la baie.

Vous pouvez renommer un disque plus tard en changeant le NOM directement -dans le fichier de configuration, puis en exécutant une commande sync. +dans le fichier de configuration, puis en exécutant une commande 'sync'. Dans le cas d'un renommage, l'association est faite en utilisant l'UUID stocké des disques. -

-
-

-extra NAME DIR -

-

Définit le nom et le point de montage de disques supplémentaires à -surveiller avec les commandes smart et probe. -

Ceci est utile pour surveiller des disques qui ne font pas partie de -la grappe mais qui sont nécessaires au fonctionnement du système, -comme le disque de démarrage. -

Notez que ces disques ne sont pas affectés par les commandes up et -down car ils sont censés toujours être en rotation. -

-
-

+

7.6 nohidden -

+

Exclut tous les fichiers et répertoires cachés. -Sous Unix, les fichiers cachés sont ceux commençant par .. +Sous Unix, les fichiers cachés sont ceux commençant par `.`. Sous Windows, ce sont ceux avec l'attribut caché. -

-
-

+

7.7 exclude/include MOTIF -

+

Définit les motifs de fichiers ou de répertoires à exclure ou à inclure dans le processus de synchronisation. Tous les motifs sont traités dans l'ordre spécifié. -

Si le premier motif qui correspond est un exclude (exclure), le fichier -est exclu. S'il s'agit d'un include (inclure), le fichier est inclus. +

Si le premier motif qui correspond est un `exclude` (exclure), le fichier +est exclu. S'il s'agit d'un `include` (inclure), le fichier est inclus. Si aucun motif ne correspond, le fichier est exclu si le dernier motif -spécifié est un include, ou inclus si le dernier motif -spécifié est un exclude. +spécifié est un `include`, ou inclus si le dernier motif +spécifié est un `exclude`.

Voir la section MOTIF pour plus de détails sur les spécifications de motifs.

Cette option peut être utilisée plusieurs fois. -

-
-

+

7.8 blocksize TAILLE_EN_KIBIOCTETS -

+

Définit la taille de bloc de base en kibioctets pour la parité. Un kibioctet est de 1024 octets.

La taille de bloc par défaut est de 256, ce qui devrait fonctionner @@ -1700,7 +1472,7 @@ taille de bloc est gaspillée pour chaque fichier. Par exemple, avec 12,8 Go de parité, ce qui peut entraîner 12,8 Go d'espace en moins disponible sur le disque de données.

Vous pouvez vérifier la quantité d'espace gaspillé sur chaque disque -en utilisant status. +en utilisant `status`. C'est la quantité d'espace que vous devez laisser libre sur les disques de données ou utiliser pour les fichiers non inclus dans la baie. Si cette valeur est négative, cela signifie que vous êtes près de @@ -1713,17 +1485,17 @@ supplémentaire pour gérer jusqu'à 100 000 fichiers sur chaque disque de données sans aucun espace gaspillé.

Une astuce pour obtenir une partition de parité plus grande sous Linux est de la formater avec la commande : -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Cela se traduit par environ 1,5 % d'espace supplémentaire, environ 60 Go pour un disque de 4 To, ce qui permet environ 460 000 fichiers sur chaque disque de données sans aucun espace gaspillé. -

-
-

+

7.9 hashsize TAILLE_EN_OCTETS -

+

Définit la taille du hachage en octets pour les blocs enregistrés.

La taille de hachage par défaut est de 16 octets (128 bits), ce qui devrait fonctionner dans la plupart des cas. @@ -1755,28 +1527,24 @@ bloc de 512, vous obtenez :

 RAM = (8 * 4 * 10^12) * (1+8) / (512 * 2^10) = 0,51 Gio
 
-
-
-

+

7.10 autosave TAILLE_EN_GIGAOCTETS -

+

Enregistre automatiquement l'état lors de la synchronisation ou du nettoyage après la quantité spécifiée de Go traités. Cette option est utile pour éviter de redémarrer de longues commandes -sync à partir de zéro si elles sont interrompues par un plantage +`sync` à partir de zéro si elles sont interrompues par un plantage de la machine ou tout autre événement. -

-
-

+

7.11 temp_limit TEMPÉRATURE_CELSIUS -

+

Définit la température maximale autorisée du disque en Celsius. Lorsqu'elle est spécifiée, SnapRAID vérifie périodiquement la température de tous les disques à l'aide de l'outil smartctl. Les températures actuelles des disques sont affichées pendant que SnapRAID fonctionne. Si un disque dépasse cette limite, toutes les opérations s'arrêtent et les disques sont arrêtés (mis en veille) -pendant la durée définie par l'option temp_sleep. Après la période +pendant la durée définie par l'option `temp_sleep`. Après la période de veille, les opérations reprennent, pouvant s'arrêter à nouveau si la limite de température est de nouveau atteinte.

Pendant le fonctionnement, SnapRAID analyse également la courbe de @@ -1799,27 +1567,21 @@ au début de l'exécution comme référence de secours.

Normalement, SnapRAID n'affiche que la température du disque le plus chaud. Pour afficher la température de tous les disques, utilisez l'option -A ou --stats. -

-
-

+

7.12 temp_sleep TEMPS_EN_MINUTES -

+

Définit le temps de veille, en minutes, lorsque la limite de température est atteinte. Pendant cette période, les disques restent arrêtés. La valeur par défaut est de 5 minutes. -

-
-

+

7.13 pool DOSSIER -

+

Définit le répertoire de mise en commun où la vue virtuelle de la -baie de disques est créée à l'aide de la commande pool. +baie de disques est créée à l'aide de la commande `pool`.

Le répertoire doit déjà exister. -

-
-

+

7.14 share CHEMIN_UNC -

+

Définit le chemin UNC Windows requis pour accéder aux disques à distance.

Si cette option est spécifiée, les liens symboliques créés dans le répertoire du pool utilisent ce chemin UNC pour accéder aux disques. @@ -1827,64 +1589,67 @@ Sans cette option, les liens symboliques générés utilisent uniquement des chemins locaux, ce qui ne permet pas de partager le répertoire du pool sur le réseau.

Les liens symboliques sont formés en utilisant le chemin UNC spécifié, -en ajoutant le nom du disque tel que spécifié dans l'option data, +en ajoutant le nom du disque tel que spécifié dans l'option `data`, et en ajoutant enfin le répertoire et le nom du fichier.

Cette option est requise uniquement pour Windows. -

-
-

+

7.15 smartctl DISQUE/PARITÉ OPTIONS... -

+

Définit les options smartctl personnalisées pour obtenir les attributs SMART de chaque disque. Cela peut être nécessaire pour les contrôleurs RAID et certains disques USB qui ne peuvent pas être détectés automatiquement. Le placeholder %s est remplacé par le nom du périphérique, mais il est facultatif pour les périphériques fixes comme les contrôleurs RAID. -

DISQUE est le même nom de disque spécifié dans l'option data. -PARITÉ est l'un des noms de parité : parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity ou z-parity. -

Dans les OPTIONS spécifiées, la chaîne %s est remplacée par le +

DISQUE est le même nom de disque spécifié dans l'option `data`. +PARITÉ est l'un des noms de parité : `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` ou `z-parity`. +

Dans les OPTIONS spécifiées, la chaîne `%s` est remplacée par le nom du périphérique. Pour les contrôleurs RAID, le périphérique est -probablement fixe, et vous n'aurez peut-être pas besoin d'utiliser %s. +probablement fixe, et vous n'aurez peut-être pas besoin d'utiliser `%s`.

Consultez la documentation smartmontools pour les options possibles : -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Par exemple : -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISQUE/PARITÉ ATTR [ATTR...] -

+

Ignore l'attribut SMART spécifié lors du calcul de la probabilité de défaillance du disque. Cette option est utile si un disque signale des valeurs inhabituelles ou trompeuses pour un attribut particulier. -

DISQUE est le même nom de disque spécifié dans l'option data. -PARITÉ est l'un des noms de parité : parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity ou z-parity. +

DISQUE est le même nom de disque spécifié dans l'option `data`. +PARITÉ est l'un des noms de parité : `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` ou `z-parity`. La valeur spéciale * peut être utilisée pour ignorer l'attribut sur tous les disques. -

Par exemple, pour ignorer l'attribut Current Pending Sector Count +

Par exemple, pour ignorer l'attribut `Current Pending Sector Count` sur tous les disques : -

+

+
 smartignore * 197
 
+

Pour l'ignorer uniquement sur le premier disque de parité : -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Exemples -

+

Un exemple de configuration typique pour Unix est : -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1898,8 +1663,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Un exemple de configuration typique pour Windows est : -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1914,84 +1681,54 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Motif (Pattern) -

-

Les motifs offrent un moyen flexible de filtrer les fichiers à inclure ou -à exclure. En utilisant des caractères de "globbing", vous pouvez définir des règles qui -correspondent à des noms de fichiers spécifiques ou à des structures de répertoires entières sans -lister chaque chemin manuellement. -

Le point d'interrogation ? correspond à n'importe quel caractère unique, sauf le -séparateur de répertoire. Cela le rend utile pour faire correspondre des noms de fichiers avec des -caractères variables tout en limitant le motif à un seul niveau de répertoire. -

L'étoile simple * correspond à n'importe quelle séquence de caractères, mais comme le -point d'interrogation, elle ne traverse jamais les frontières des répertoires. Elle s'arrête à la -barre oblique, ce qui la rend adaptée à la recherche de correspondances au sein d'un seul -composant de chemin. Il s'agit du comportement standard des jokers familier du -"globbing" shell. -

La double étoile ** est plus puissante, elle correspond à n'importe quelle séquence de -caractères, y compris les séparateurs de répertoires. Cela permet aux motifs de correspondre -sur plusieurs niveaux de répertoires. Lorsque ** apparaît directement intégré dans -un motif, il peut correspondre à zéro ou plusieurs caractères, y compris les barres obliques entre -le texte littéral environnant. -

L'utilisation la plus importante de ** est sous la forme spéciale /**/. Celle-ci correspond à -zéro ou plusieurs niveaux de répertoires complets, ce qui permet de faire correspondre des fichiers -à n'importe quelle profondeur dans une arborescence de répertoires sans connaître la structure exacte du chemin. -Par exemple, le motif src/**/main.js correspond à src/main.js (saut de -zéro répertoire), src/ui/main.js (saut d'un répertoire), et -src/ui/components/main.js (saut de deux répertoires). -

Les classes de caractères utilisant des crochets [] correspondent à un seul caractère d'un -ensemble ou d'une plage spécifiés. Comme les autres motifs à caractère unique, elles -ne correspondent pas aux séparateurs de répertoires. Les classes supportent les plages et la négation à l'aide -d'un point d'exclamation. -

La distinction fondamentale à retenir est que *, ? et les classes de caractères -respectent tous les limites des répertoires et ne correspondent qu'au sein d'un seul -composant de chemin, alors que ** est le seul motif qui peut correspondre à travers -les séparateurs de répertoires. + +

Les motifs sont utilisés pour sélectionner un sous-ensemble de fichiers +à exclure ou à inclure dans le processus.

Il existe quatre types de motifs différents : -

-
-
-FILE -
-Sélectionne n'importe quel fichier nommé FILE. +

+ +
+FICHIER +
+Sélectionne tout fichier nommé FICHIER. Vous pouvez utiliser +tous les caractères de globbing comme * et ?, et les classes de +caractères comme [a-z]. Ce motif s'applique uniquement aux fichiers, pas aux répertoires. - - - -
-
-
-DIR/ -
-Sélectionne n'importe quel répertoire nommé DIR et tout son contenu. +
+ + +
+DOSSIER/ +
+Sélectionne tout répertoire nommé DOSSIER et tout ce qu'il +contient. Vous pouvez utiliser tous les caractères de globbing +comme * et ?. Ce motif s'applique uniquement aux répertoires, pas aux fichiers. - - - -
-
-
-/PATH/FILE -
-Sélectionne le chemin exact du fichier spécifié. Ce motif s'applique -uniquement aux fichiers, pas aux répertoires. -
-
-
-
-
-
-/PATH/DIR/ -
-Sélectionne le chemin exact du répertoire spécifié et tout son contenu. +
+ + +
+/CHEMIN/FICHIER +
+Sélectionne le chemin de fichier exact spécifié. Vous pouvez +utiliser tous les caractères de globbing comme * et ?, mais +ils ne correspondent jamais à une barre oblique de répertoire. +Ce motif s'applique uniquement aux fichiers, pas aux répertoires. +
+ + +
+/CHEMIN/DOSSIER/ +
+Sélectionne le chemin de répertoire exact spécifié et tout ce qu'il +contient. Vous pouvez utiliser tous les caractères de globbing +comme * et ?, mais ils ne correspondent jamais à une barre +oblique de répertoire. Ce motif s'applique uniquement aux répertoires, pas aux fichiers. - - - +

Lorsque vous spécifiez un chemin absolu commençant par /, il est appliqué à la racine de la baie, et non à la racine du système de fichiers local. @@ -2001,200 +1738,139 @@ Les répertoires système Windows, les jonctions, les points de montage et les autres répertoires spéciaux Windows sont traités comme des fichiers, ce qui signifie que pour les exclure, vous devez utiliser une règle de fichier, pas une règle de répertoire. -

Si le nom de fichier contient un caractère *, ?, [, -ou ], vous devez l'échapper pour éviter qu'il ne soit interprété +

Si le nom de fichier contient un caractère '*', '?', '[', +ou ']', vous devez l'échapper pour éviter qu'il ne soit interprété comme un caractère de globbing. Sous Unix, le caractère d'échappement -est \ ; sous Windows, c'est ^. +est '\' ; sous Windows, c'est '^'. Lorsque le motif est sur la ligne de commande, vous devez doubler le caractère d'échappement pour éviter qu'il ne soit interprété par le shell de commande.

Dans le fichier de configuration, vous pouvez utiliser différentes stratégies pour filtrer les fichiers à traiter. L'approche la plus simple consiste à n'utiliser que des règles -exclude pour supprimer tous les fichiers et répertoires que vous +`exclude` pour supprimer tous les fichiers et répertoires que vous ne voulez pas traiter. Par exemple : -

-# Exclut tout fichier nommé *.unrecoverable
+

+
+# Exclut tout fichier nommé `*.unrecoverable`
 exclude *.unrecoverable
-# Exclut le répertoire racine /lost+found
+# Exclut le répertoire racine `/lost+found`
 exclude /lost+found/
-# Exclut tout sous-répertoire nommé tmp
+# Exclut tout sous-répertoire nommé `tmp`
 exclude tmp/
 
+

L'approche opposée consiste à ne définir que les fichiers que vous -souhaitez traiter, en n'utilisant que des règles include. Par exemple : -

+souhaitez traiter, en n'utilisant que des règles `include`. Par exemple :
+

+
 # Inclut uniquement certains répertoires
 include /movies/
 include /musics/
 include /pictures/
 
-

L'approche finale consiste à mélanger les règles exclude et include. +

+

L'approche finale consiste à mélanger les règles `exclude` et `include`. Dans ce cas, l'ordre des règles est important. Les règles antérieures ont préséance sur les règles ultérieures. -Pour simplifier, vous pouvez lister toutes les règles exclude -d'abord, puis toutes les règles include. Par exemple : -

-# Exclut tout fichier nommé *.unrecoverable
+Pour simplifier, vous pouvez lister toutes les règles `exclude`
+d'abord, puis toutes les règles `include`. Par exemple :
+

+
+# Exclut tout fichier nommé `*.unrecoverable`
 exclude *.unrecoverable
-# Exclut tout sous-répertoire nommé tmp
+# Exclut tout sous-répertoire nommé `tmp`
 exclude tmp/
 # Inclut uniquement certains répertoires
 include /movies/
 include /musics/
 include /pictures/
 
+

Sur la ligne de commande, en utilisant l'option -f, vous ne pouvez -utiliser que des motifs include. Par exemple : -

+utiliser que des motifs `include`. Par exemple :
+

+
 # Vérifie uniquement les fichiers .mp3.
 # Sous Unix, utilisez des guillemets pour éviter l'expansion
 # du globbing par le shell.
 snapraid -f "*.mp3" check
 
+

Sous Unix, lorsque vous utilisez des caractères de globbing sur la ligne de commande, vous devez les mettre entre guillemets pour empêcher le shell de les développer. -

-
-

-Ignorer des Fichiers (Ignore Files) -

-

En plus des règles globales du fichier de configuration, vous pouvez -placer des fichiers .snapraidignore dans n'importe quel répertoire de la grappe -pour définir des règles d'exclusion décentralisées. -

Les règles définies dans .snapraidignore sont appliquées après les règles du -fichier de configuration. Cela signifie qu'elles ont une priorité plus élevée et peuvent -être utilisées pour exclure des fichiers qui étaient précédemment inclus par la -configuration globale. En pratique, si une règle locale correspond, le fichier est -exclu quels que soient les paramètres d'inclusion globaux. -

La logique des motifs dans .snapraidignore reflète la configuration globale -mais ancre les motifs au répertoire où se trouve le fichier : -

-
-
-FILE -
-Sélectionne n'importe quel fichier nommé FILE dans ce répertoire ou en dessous. -Cela suit les mêmes règles de globbing que le motif global. -
-
-
-
-
-
-DIR/ -
-Sélectionne n'importe quel répertoire nommé DIR et tout son contenu, -résidant dans ce répertoire ou en dessous. -
-
-
-
-
-
-/PATH/FILE -
-Sélectionne le fichier exact spécifié par rapport à l'emplacement -du fichier .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Sélectionne le répertoire exact spécifié et tout son contenu, -par rapport à l'emplacement du fichier .snapraidignore. -
-
-
-

Contrairement à la configuration globale, les fichiers .snapraidignore ne prennent -en charge que les règles d'exclusion ; vous ne pouvez pas utiliser de motifs include ou de négation (!). -

Par exemple, si vous avez un .snapraidignore dans /mnt/disk1/projects/ : -

-# Exclut UNIQUEMENT /mnt/disk1/projects/output.bin
-/output.bin
-# Exclut tout répertoire nommé build dans projects/
-build/
-# Exclut tout fichier .tmp dans projects/ ou ses sous-dossiers
-*.tmp
-
-
-
-

+

9 Contenu (Content) -

+

SnapRAID stocke la liste et les sommes de contrôle de vos fichiers dans le fichier de contenu.

Il s'agit d'un fichier binaire qui répertorie tous les fichiers présents dans votre baie de disques, ainsi que toutes les sommes de contrôle pour vérifier leur intégrité. -

Ce fichier est lu et écrit par les commandes sync et scrub et -lu par les commandes fix, check et status. -

-
-

+

Ce fichier est lu et écrit par les commandes `sync` et `scrub` et +lu par les commandes `fix`, `check` et `status`. +

10 Parité (Parity) -

+

SnapRAID stocke les informations de parité de votre baie dans les fichiers de parité.

Ce sont des fichiers binaires contenant la parité calculée de tous les -blocs définis dans le fichier content. -

Ces fichiers sont lus et écrits par les commandes sync et fix et -lus uniquement par les commandes scrub et check. -

-
-

+blocs définis dans le fichier `content`. +

Ces fichiers sont lus et écrits par les commandes `sync` et `fix` et +lus uniquement par les commandes `scrub` et `check`. +

11 Encodage -

+

SnapRAID sous Unix ignore tout encodage. Il lit et stocke les noms de fichiers avec le même encodage utilisé par le système de fichiers.

Sous Windows, tous les noms lus à partir du système de fichiers sont convertis et traités au format UTF-8.

Pour que les noms de fichiers soient imprimés correctement, vous devez -définir la console Windows en mode UTF-8 avec la commande chcp 65001 -et utiliser une police TrueType comme Lucida Console comme police +définir la console Windows en mode UTF-8 avec la commande `chcp 65001` +et utiliser une police TrueType comme `Lucida Console` comme police de console. Cela n'affecte que les noms de fichiers imprimés ; si vous redirigez la sortie de la console vers un fichier, le fichier résultant est toujours au format UTF-8. -

-
-

+

12 Droits d'auteur (Copyright) -

+

Ce fichier est Copyright (C) 2025 Andrea Mazzoleni -

-
-

+

13 Voir aussi (See Also) -

-

snapraid_log(1), snapraidd(1) -

+ +

snapraid_log(1), rsync(1) +

+

+

-
-
-
+
- - + diff --git a/manual-it.html b/manual-it.html index 05043e5f..9cb07a0e 100644 --- a/manual-it.html +++ b/manual-it.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Sinossi -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Descrizione -

+

SnapRAID è un programma di backup progettato per array di dischi, che memorizza informazioni di parità per il recupero dati in caso di guasto fino a sei dischi. @@ -183,14 +128,14 @@ risparmiando energia e riducendo il rumore.

Per maggiori informazioni, si prega di visitare il sito ufficiale SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitazioni -

+

SnapRAID è un ibrido tra un programma RAID e un programma di backup, che mira a combinare i migliori vantaggi di entrambi. Tuttavia, ha alcune limitazioni che si dovrebbero considerare prima di usarlo. @@ -230,13 +175,11 @@ Vengono salvati solo nomi di file, timestamp, symlink e hardlink. Permessi, proprietà e attributi estesi non vengono salvati. -

-
-

+

4 Iniziare -

+

Per usare SnapRAID, è necessario prima selezionare un disco nell'array -di dischi da dedicare alle informazioni di parity (parità). Con un +di dischi da dedicare alle informazioni di `parity` (parità). Con un disco per la parità, si sarà in grado di recuperare da un singolo guasto del disco, in modo simile a RAID5.

Se si desidera recuperare da più guasti del disco, in modo simile a RAID6, @@ -245,31 +188,34 @@ parità aggiuntivo consente il recupero da un guasto in più del disco.

Come dischi di parità, è necessario scegliere i dischi più grandi dell'array, poiché le informazioni di parità possono crescere fino alle dimensioni del più grande disco dati nell'array. -

Questi dischi saranno dedicati alla memorizzazione dei file di parity. +

Questi dischi saranno dedicati alla memorizzazione dei file di `parity`. Non si dovrebbero memorizzare i propri dati su di essi. -

Quindi, è necessario definire i dischi data (dati) che si desidera +

Quindi, è necessario definire i dischi `data` (dati) che si desidera proteggere con SnapRAID. La protezione è più efficace se questi dischi contengono dati che cambiano raramente. Per questo motivo, è meglio NON includere il disco C:\ di Windows o le directory Unix /home, /var, e /tmp. -

L'elenco dei file viene salvato nei file content (contenuto), di solito +

L'elenco dei file viene salvato nei file `content` (contenuto), di solito memorizzati sui dischi dati, di parità o di avvio. Questo file contiene i dettagli del backup, inclusi tutti i checksum per verificarne l'integrità. -Il file content viene memorizzato in più copie e ogni copia deve +Il file `content` viene memorizzato in più copie e ogni copia deve essere su un disco diverso per garantire che, anche in caso di guasti multipli del disco, sia disponibile almeno una copia.

Ad esempio, supponiamo di essere interessati a un solo livello di protezione con parità e che i dischi si trovino in: -

+

+
 /mnt/diskp <- disco selezionato per la parità
 /mnt/disk1 <- primo disco da proteggere
 /mnt/disk2 <- secondo disco da proteggere
 /mnt/disk3 <- terzo disco da proteggere
 
+

È necessario creare il file di configurazione /etc/snapraid.conf con le seguenti opzioni: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -278,9 +224,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Se si è su Windows, si dovrebbe usare il formato del percorso di Windows, con lettere di unità e backslash invece di slash. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -289,16 +237,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Se si hanno molti dischi e si esauriscono le lettere di unità, è possibile montare i dischi direttamente nelle sottocartelle. Vedi: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

A questo punto, si è pronti per eseguire il comando sync per costruire +

+

A questo punto, si è pronti per eseguire il comando `sync` per costruire le informazioni di parità. -

+

+
 snapraid sync
 
+

Questo processo può richiedere diverse ore la prima volta, a seconda delle dimensioni dei dati già presenti sui dischi. Se i dischi sono vuoti, il processo è immediato. @@ -306,18 +259,19 @@ vuoti, il processo è immediato. prossima esecuzione, riprenderà da dove è stato interrotto.

Quando questo comando è completato, i dati sono SICURI.

Ora è possibile iniziare a usare l'array come si desidera e aggiornare -periodicamente le informazioni di parità eseguendo il comando sync. -

-

+periodicamente le informazioni di parità eseguendo il comando `sync`. +

4.1 Scrubbing -

+

Per controllare periodicamente i dati e la parità per gli errori, è -possibile eseguire il comando scrub. -

+possibile eseguire il comando `scrub`.
+

+
 snapraid scrub
 
+

Questo comando confronta i dati nell'array con l'hash calcolato -durante il comando sync per verificarne l'integrità. +durante il comando `sync` per verificarne l'integrità.

Ogni esecuzione del comando controlla circa l'8% dell'array, escludendo i dati già sottoposti a scrub nei 10 giorni precedenti. È possibile utilizzare l'opzione -p, --plan per specificare un importo @@ -325,38 +279,44 @@ diverso e l'opzione -o, --older-than per specificare un'età diversa in giorni. Ad esempio, per controllare il 5% dell'array per blocchi più vecchi di 20 giorni, usare: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Se vengono trovati errori silenti o di input/output durante il processo, i blocchi corrispondenti vengono contrassegnati come bad (cattivi) nel -file content ed elencati nel comando status. -

+file `content` ed elencati nel comando `status`.
+

+
 snapraid status
 
-

Per correggerli, è possibile utilizzare il comando fix, filtrando +

+

Per correggerli, è possibile utilizzare il comando `fix`, filtrando i blocchi bad con l'opzione -e, --filter-error: -

+

+
 snapraid -e fix
 
-

Al prossimo scrub, gli errori scompariranno dal report status +

+

Al prossimo `scrub`, gli errori scompariranno dal report `status` se sono stati veramente corretti. Per renderlo più veloce, è possibile utilizzare -p bad per eseguire lo scrub solo dei blocchi contrassegnati come bad. -

+

+
 snapraid -p bad scrub
 
-

L'esecuzione di scrub su un array non sincronizzato può riportare +

+

L'esecuzione di `scrub` su un array non sincronizzato può riportare errori causati da file rimossi o modificati. Questi errori sono riportati -nell'output di scrub, ma i blocchi correlati non sono contrassegnati +nell'output di `scrub`, ma i blocchi correlati non sono contrassegnati come bad. -

-
-

+

4.2 Pooling -

+

Nota: La funzionalità di pooling descritta di seguito è stata -sostituita dallo strumento mergerfs, che è ora l'opzione consigliata +sostituita dallo strumento mergefs, che è ora l'opzione consigliata per gli utenti Linux nella comunità SnapRAID. Mergefs fornisce un modo più flessibile ed efficiente per raggruppare più unità in un singolo punto di montaggio unificato, consentendo un accesso trasparente ai @@ -365,30 +325,39 @@ simbolici. Si integra bene con SnapRAID per la protezione della parità ed è comunemente usato in configurazioni come OpenMediaVault (OMV) o NAS personalizzati.

Per avere tutti i file nell'array mostrati nello stesso albero di -directory, è possibile abilitare la funzionalità di pooling. Crea +directory, è possibile abilitare la funzionalità di `pooling`. Crea una vista virtuale di sola lettura di tutti i file nell'array utilizzando collegamenti simbolici. -

È possibile configurare la directory di pooling nel file di +

È possibile configurare la directory di `pooling` nel file di configurazione con: -

+

+
 pool /pool
 
+

o, se si è su Windows, con: -

+

+
 pool C:\pool
 
-

e quindi eseguire il comando pool per creare o aggiornare la +

+

e quindi eseguire il comando `pool` per creare o aggiornare la vista virtuale. -

+

+
 snapraid pool
 
+

Se si sta utilizzando una piattaforma Unix e si desidera condividere questa directory sulla rete con macchine Windows o Unix, è necessario aggiungere le seguenti opzioni al file /etc/samba/smb.conf: -

+

+
 # Nella sezione globale di smb.conf
 unix extensions = no
 
+
+
 # Nella sezione di condivisione di smb.conf
 [pool]
@@ -399,392 +368,355 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

In Windows, la condivisione di collegamenti simbolici su una rete richiede che i client li risolvano da remoto. Per abilitare questo, oltre a condividere la directory pool, è necessario condividere anche tutti i dischi in modo indipendente, utilizzando i nomi dei dischi definiti nel file di configurazione come punti di condivisione. È inoltre necessario -specificare nell'opzione share del file di configurazione il percorso +specificare nell'opzione `share` del file di configurazione il percorso UNC di Windows che i client remoti devono utilizzare per accedere a questi dischi condivisi. -

Ad esempio, operando da un server chiamato darkstar, è possibile +

Ad esempio, operando da un server chiamato `darkstar`, è possibile utilizzare le opzioni: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

e condividere le seguenti directory sulla rete: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

per consentire ai client remoti di accedere a tutti i file in \\darkstar\pool.

Potrebbe anche essere necessario configurare i client remoti per abilitare l'accesso ai symlink remoti con il comando: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Annullamento Eliminazione -

+

SnapRAID funziona più come un programma di backup che come un sistema RAID e può essere utilizzato per ripristinare o annullare l'eliminazione dei file al loro stato precedente utilizzando l'opzione -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

o per una directory: -

+

+
 snapraid fix -f DIR/
 
+

È anche possibile usarlo per recuperare solo i file eliminati accidentalmente all'interno di una directory utilizzando l'opzione -m, --filter-missing, che ripristina solo i file mancanti, lasciando tutti gli altri intatti. -

+

+
 snapraid fix -m -f DIR/
 
+

O per recuperare tutti i file eliminati su tutte le unità con: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recupero -

+

È successo il peggio e si è perso uno o più dischi!

NON FARSI PRENDERE DAL PANICO! Sarà possibile recuperarli!

La prima cosa da fare è evitare ulteriori modifiche all'array di dischi. Disabilitare qualsiasi connessione remota ad esso e qualsiasi processo pianificato, incluso qualsiasi sync o scrub notturno pianificato di SnapRAID.

Quindi procedere con i seguenti passaggi. -

-

+

4.4.1 PASSO 1 -> Riconfigurazione -

+

È necessario un po' di spazio per recuperare, idealmente su dischi di riserva aggiuntivi, ma un disco USB esterno o un disco remoto saranno sufficienti.

Modificare il file di configurazione SnapRAID per far puntare l'opzione -data o parity del disco guasto a una posizione con spazio vuoto +`data` o `parity` del disco guasto a una posizione con spazio vuoto sufficiente per recuperare i file. -

Ad esempio, se il disco d1 è guasto, cambiare da: -

+

Ad esempio, se il disco `d1` è guasto, cambiare da: +

+
 data d1 /mnt/disk1/
 
+

a: -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Se il disco da recuperare è un disco di parità, aggiornare l'opzione -parity appropriata. +`parity` appropriata. Se si hanno più dischi guasti, aggiornare tutte le loro opzioni di configurazione. -

-
-

+

4.4.2 PASSO 2 -> Correzione (Fix) -

+

Eseguire il comando fix, memorizzando il log in un file esterno con: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Dove NAME è il nome del disco, come d1 nel nostro esempio precedente. -Se il disco da recuperare è un disco di parità, usare i nomi parity, -2-parity, ecc. +

+

Dove NAME è il nome del disco, come `d1` nel nostro esempio precedente. +Se il disco da recuperare è un disco di parità, usare i nomi `parity`, +`2-parity`, ecc. Se si hanno più dischi guasti, usare più opzioni -d per specificarli tutti.

Questo comando richiederà molto tempo.

Assicurarsi di avere alcuni gigabyte liberi per memorizzare il file fix.log. Eseguirlo da un disco con spazio libero sufficiente.

Ora si è recuperato tutto ciò che è recuperabile. Se alcuni file sono parzialmente o totalmente irrecuperabili, verranno rinominati aggiungendo -l'estensione .unrecoverable. +l'estensione `.unrecoverable`.

È possibile trovare un elenco dettagliato di tutti i blocchi irrecuperabili nel file fix.log controllando tutte le righe che iniziano -con unrecoverable:. +con `unrecoverable:`.

Se non si è soddisfatti del recupero, è possibile riprovare tutte le volte che si desidera. -

Ad esempio, se si sono rimossi file dall'array dopo l'ultimo sync, +

Ad esempio, se si sono rimossi file dall'array dopo l'ultimo `sync`, questo può comportare che alcuni file non vengano recuperati. -In questo caso, è possibile riprovare il fix usando l'opzione -i, +In questo caso, è possibile riprovare il `fix` usando l'opzione -i, --import, specificando dove si trovano ora questi file per includerli di nuovo nel processo di recupero.

Se si è soddisfatti del recupero, è possibile procedere oltre, ma notare che dopo la sincronizzazione, non è più possibile riprovare -il comando fix! -

-
-

+il comando `fix`! +

4.4.3 PASSO 3 -> Controllo (Check) -

-

Come controllo cauto, è ora possibile eseguire un comando check per + +

Come controllo cauto, è ora possibile eseguire un comando `check` per assicurarsi che tutto sia corretto sul disco recuperato. -

+

+
 snapraid -d NAME -a check
 
-

Dove NAME è il nome del disco, come d1 nel nostro esempio precedente. +

+

Dove NAME è il nome del disco, come `d1` nel nostro esempio precedente.

Le opzioni -d e -a dicono a SnapRAID di controllare solo il disco specificato e di ignorare tutti i dati di parità.

Questo comando richiederà molto tempo, ma se non si è eccessivamente cauti, è possibile saltarlo. -

-
-

+

4.4.4 PASSO 4 -> Sincronizzazione (Sync) -

-

Eseguire il comando sync per risincronizzare l'array con il nuovo disco. -

+
+

Eseguire il comando `sync` per risincronizzare l'array con il nuovo disco. +

+
 snapraid sync
 
+

Se tutto è recuperato, questo comando è immediato. -

-
-
-
-

+

5 Comandi -

+

SnapRAID fornisce alcuni semplici comandi che consentono di:

  • -Stampare lo stato dell'array -> status +Stampare lo stato dell'array -> `status`
  • -Controllare i dischi -> smart, probe, up, down +Controllare i dischi -> `smart`, `probe`, `up`, `down`
  • -Effettuare un backup/snapshot -> sync +Effettuare un backup/snapshot -> `sync`
  • -Controllare periodicamente i dati -> scrub +Controllare periodicamente i dati -> `scrub`
  • -Ripristinare l'ultimo backup/snapshot -> fix. +Ripristinare l'ultimo backup/snapshot -> `fix`.

I comandi devono essere scritti in minuscolo. -

-

+

5.1 status -

+

Stampa un riepilogo dello stato dell'array di dischi.

Include informazioni sulla frammentazione della parità, quanto sono vecchi i blocchi senza essere controllati e tutti gli errori silenti registrati incontrati durante lo scrubbing.

Le informazioni presentate si riferiscono all'ultima volta che si è -eseguito sync. Le modifiche successive non vengono prese in +eseguito `sync`. Le modifiche successive non vengono prese in considerazione.

Se sono stati rilevati blocchi bad, vengono elencati i loro numeri -di blocco. Per correggerli, è possibile utilizzare il comando fix -e. +di blocco. Per correggerli, è possibile utilizzare il comando `fix -e`.

Mostra anche un grafico che rappresenta l'ultima volta che ogni blocco è stato sottoposto a scrub o sincronizzato. I blocchi sottoposti a scrub -sono mostrati con *, i blocchi sincronizzati ma non ancora sottoposti -a scrub con o. +sono mostrati con '*', i blocchi sincronizzati ma non ancora sottoposti +a scrub con 'o'.

Nulla viene modificato. -

-
-

+

5.2 smart -

+

Stampa un report SMART di tutti i dischi nel sistema.

Include una stima della probabilità di guasto nel prossimo anno, consentendo di pianificare sostituzioni di manutenzione di dischi che mostrano attributi sospetti.

Questa stima della probabilità è ottenuta correlando gli attributi SMART dei dischi con i dati Backblaze disponibili all'indirizzo: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Se SMART segnala che un disco sta per guastarsi, viene stampato FAIL -o PREFAIL per quel disco e SnapRAID restituisce un errore. +

+

Se SMART segnala che un disco sta per guastarsi, viene stampato `FAIL` +o `PREFAIL` per quel disco e SnapRAID restituisce un errore. In questo caso, si raccomanda vivamente la sostituzione immediata del disco.

Altre possibili stringhe di stato sono: -

-
-
+

+ + + +
logfail -
+
In passato, alcuni attributi erano inferiori alla soglia. - - -
-
+
logerr -
+
Il log degli errori del dispositivo contiene errori. - - -
-
+
selferr -
+
Il log dell'autotest del dispositivo contiene errori. - - - +

Se viene specificata l'opzione -v, --verbose, viene fornita un'analisi statistica più approfondita. Questa analisi può aiutare a decidere se è necessaria più o meno parità. -

Questo comando utilizza lo strumento smartctl ed è equivalente -all'esecuzione di smartctl -a su tutti i dispositivi. +

Questo comando utilizza lo strumento `smartctl` ed è equivalente +all'esecuzione di `smartctl -a` su tutti i dispositivi.

Se i dispositivi non vengono rilevati automaticamente correttamente, è possibile specificare un comando personalizzato utilizzando l'opzione -smartctl nel file di configurazione. +`smartctl` nel file di configurazione.

Nulla viene modificato. -

-
-

+

5.3 probe -

+

Stampa lo stato POWER di tutti i dischi nel sistema. -

Standby significa che il disco non sta girando. Active significa +

`Standby` significa che il disco non sta girando. `Active` significa che il disco sta girando. -

Questo comando utilizza lo strumento smartctl ed è equivalente -all'esecuzione di smartctl -n standby -i su tutti i dispositivi. +

Questo comando utilizza lo strumento `smartctl` ed è equivalente +all'esecuzione di `smartctl -n standby -i` su tutti i dispositivi.

Se i dispositivi non vengono rilevati automaticamente correttamente, è possibile specificare un comando personalizzato utilizzando l'opzione -smartctl nel file di configurazione. +`smartctl` nel file di configurazione.

Nulla viene modificato. -

-
-

+

5.4 up -

+

Fa girare tutti i dischi dell'array.

È possibile far girare solo dischi specifici utilizzando l'opzione -d, --filter-disk.

Far girare tutti i dischi contemporaneamente richiede molta energia. Assicurarsi che l'alimentatore possa sostenerlo.

Nulla viene modificato. -

-
-

+

5.5 down -

+

Ferma tutti i dischi dell'array. -

Questo comando utilizza lo strumento smartctl ed è equivalente -all'esecuzione di smartctl -s standby,now su tutti i dispositivi. +

Questo comando utilizza lo strumento `smartctl` ed è equivalente +all'esecuzione di `smartctl -s standby,now` su tutti i dispositivi.

È possibile fermare solo dischi specifici utilizzando l'opzione -d, --filter-disk.

Per fermare automaticamente in caso di errore, è possibile utilizzare l'opzione -s, --spin-down-on-error con qualsiasi altro comando, -che è equivalente all'esecuzione manuale di down quando si verifica +che è equivalente all'esecuzione manuale di `down` quando si verifica un errore.

Nulla viene modificato. -

-
-

+

5.6 diff -

-

Elenca tutti i file modificati dall'ultimo sync che devono avere i + +

Elenca tutti i file modificati dall'ultimo `sync` che devono avere i loro dati di parità ricalcolati.

Questo comando non controlla i dati del file, ma solo il timestamp del file, le dimensioni e l'inode.

Dopo aver elencato tutti i file modificati, viene presentato un riepilogo delle modifiche, raggruppate per: -

-
-
+

+ + + + + + + +
equal -
+
File invariati rispetto a prima. - - -
-
+
added -
+
File aggiunti che non erano presenti prima. - - -
-
+
removed -
+
File rimossi. - - -
-
+
updated -
+
File con dimensioni o timestamp diversi, il che significa che sono stati modificati. - - -
-
+
moved -
+
File spostati in una directory diversa sullo stesso disco. Sono identificati dall'avere lo stesso nome, dimensioni, timestamp e inode, ma una directory diversa. - - -
-
+
copied -
-File copiati sullo stesso disco o su un disco diverso dove il -file originale esiste ancora. -Sono identificati dall'avere lo stesso nome, dimensione e timestamp. -Se il timestamp al sottomultiplo del secondo è zero, -il percorso completo deve corrispondere per essere -identificato, non solo il nome. -
- -
-
-relocated -
-File spostati sullo stesso disco o su un disco -diverso dove l'originale è scomparso. -Sono identificati dall' avere lo stesso nome, dimensione -e timestamp. -Se il timestamp al sottomultiplo del secondo è zero, -il percorso completo deve corrispondere per essere -identificato. -A differenza dei file moved sullo stesso disco, -i file ricollocati hanno un inode diverso. -
-
-
-
+
+File copiati sullo stesso o su un disco diverso. +Si noti che se sono stati veramente spostati su un altro +disco, saranno contati anche in `removed`. +Sono identificati dall'avere lo stesso nome, dimensioni +e timestamp. Se il timestamp sotto il secondo è zero, +il percorso completo deve corrispondere, non solo il nome. +
restored -
-File con un inode diverso ma directory, -nome, dimensione e timestamp corrispondenti. -Questi sono solitamente file ripristinati dopo essere -stati eliminati. -
- - -

Se è richiesto un sync, il codice di ritorno del processo è 2, +

+File con un inode diverso ma nome, dimensioni e +timestamp corrispondenti. Questi sono di solito file +ripristinati dopo essere stati eliminati. +
+

Se è richiesto un `sync`, il codice di ritorno del processo è 2, invece del predefinito 0. Il codice di ritorno 1 è utilizzato per una condizione di errore generica.

Nulla viene modificato. -

-
-

+

5.7 sync -

+

Aggiorna le informazioni di parità. Tutti i file modificati nell'array di dischi vengono letti e i dati di parità corrispondenti vengono aggiornati.

È possibile interrompere questo processo in qualsiasi momento premendo Ctrl+C, senza perdere il lavoro già svolto. -Alla prossima esecuzione, il processo sync riprenderà da dove +Alla prossima esecuzione, il processo `sync` riprenderà da dove è stato interrotto.

Se vengono trovati errori silenti o di input/output durante il processo, i blocchi corrispondenti vengono contrassegnati come bad. @@ -796,13 +728,11 @@ Se il file viene spostato o rinominato sullo stesso disco, mantenendo lo stesso inode, la parità non viene ricalcolata. Se il file viene spostato su un altro disco, la parità viene ricalcolata, ma le informazioni di hash precedentemente calcolate vengono mantenute. -

I file content e parity vengono modificati se necessario. +

I file `content` e `parity` vengono modificati se necessario. I file nell'array NON vengono modificati. -

-
-

+

5.8 scrub -

+

Esegue lo scrub dell'array, controllando la presenza di errori silenti o di input/output nei dischi dati e di parità.

Ogni invocazione controlla circa l'8% dell'array, escludendo @@ -814,73 +744,69 @@ ogni tre mesi. utilizzando l'opzione -p, --plan, che accetta: bad - Esegue lo scrub dei blocchi contrassegnati come bad. new - Esegue lo scrub dei blocchi appena sincronizzati non ancora -

sottoposti a scrub. -

-
-
+

+

sottoposti a scrub. +

+ + + +
full -
+
Esegue lo scrub di tutto. - - -
-
+
0-100 -
+
Esegue lo scrub della percentuale specificata di blocchi. - - - +

Se si specifica una quantità percentuale, è anche possibile utilizzare l'opzione -o, --older-than per definire quanto deve essere vecchio il blocco. I blocchi più vecchi vengono sottoposti a scrub per primi, garantendo un controllo ottimale. Se si desidera eseguire lo scrub solo dei blocchi appena sincronizzati -non ancora sottoposti a scrub, utilizzare l'opzione -p new. +non ancora sottoposti a scrub, utilizzare l'opzione `-p new`.

Per ottenere i dettagli dello stato dello scrub, utilizzare il comando -status. +`status`.

Per qualsiasi errore silente o di input/output trovato, i blocchi -corrispondenti vengono contrassegnati come bad nel file content. -Questi blocchi bad sono elencati in status e possono essere corretti -con fix -e. +corrispondenti vengono contrassegnati come bad nel file `content`. +Questi blocchi bad sono elencati in `status` e possono essere corretti +con `fix -e`. Dopo la correzione, al prossimo scrub, verranno ricontrollati e, se trovati corretti, il contrassegno bad verrà rimosso. Per eseguire lo scrub solo dei blocchi bad, è possibile utilizzare -il comando scrub -p bad. -

Si consiglia di eseguire scrub solo su un array sincronizzato per +il comando `scrub -p bad`. +

Si consiglia di eseguire `scrub` solo su un array sincronizzato per evitare errori segnalati causati da dati non sincronizzati. Questi errori sono riconosciuti come non essendo errori silenti e i blocchi non vengono contrassegnati come bad, ma tali errori sono riportati nell'output del comando. -

Il file content viene modificato per aggiornare l'ora dell'ultimo +

Il file `content` viene modificato per aggiornare l'ora dell'ultimo controllo per ogni blocco e per contrassegnare i blocchi bad. -I file parity NON vengono modificati. +I file `parity` NON vengono modificati. I file nell'array NON vengono modificati. -

-
-

+

5.9 fix -

+

Corregge tutti i file e i dati di parità.

Tutti i file e i dati di parità vengono confrontati con lo stato -snapshot salvato nell'ultimo sync. +snapshot salvato nell'ultimo `sync`. Se viene trovata una differenza, viene ripristinata allo snapshot memorizzato. -

ATTENZIONE! Il comando fix non differenzia tra errori e modifiche +

ATTENZIONE! Il comando `fix` non differenzia tra errori e modifiche intenzionali. Ripristina incondizionatamente lo stato del file -all'ultimo sync. +all'ultimo `sync`.

Se non viene specificata nessun'altra opzione, l'intero array viene elaborato. Utilizzare le opzioni di filtro per selezionare un sottoinsieme di file o dischi su cui operare. -

Per correggere solo i blocchi contrassegnati come bad durante sync -e scrub, utilizzare l'opzione -e, --filter-error. +

Per correggere solo i blocchi contrassegnati come bad durante `sync` +e `scrub`, utilizzare l'opzione -e, --filter-error. A differenza di altre opzioni di filtro, questa applica correzioni solo -ai file che sono invariati dall'ultimo sync. +ai file che sono invariati dall'ultimo `sync`.

SnapRAID rinomina tutti i file che non possono essere corretti aggiungendo -l'estensione .unrecoverable. +l'estensione `.unrecoverable`.

Prima di correggere, l'intero array viene scansionato per trovare -eventuali file spostati dall'ultima operazione di sync. +eventuali file spostati dall'ultima operazione di `sync`. Questi file sono identificati dal loro timestamp, ignorando il loro nome e la directory, e vengono utilizzati nel processo di recupero se necessario. @@ -888,61 +814,51 @@ Se alcuni di essi sono stati spostati al di fuori dell'array, è possibile utilizzare l'opzione -i, --import per specificare directory aggiuntive da scansionare.

I file sono identificati solo dal percorso, non dall'inode. -

Il file content NON viene modificato. -I file parity vengono modificati se necessario. +

Il file `content` NON viene modificato. +I file `parity` vengono modificati se necessario. I file nell'array vengono modificati se necessario. -

-
-

+

5.10 check -

+

Verifica tutti i file e i dati di parità. -

Funziona come fix, ma simula solo un recupero e nessuna modifica +

Funziona come `fix`, ma simula solo un recupero e nessuna modifica viene scritta nell'array.

Questo comando è destinato principalmente alla verifica manuale, ad esempio dopo un processo di recupero o in altre condizioni speciali. -Per i controlli periodici e pianificati, utilizzare scrub. +Per i controlli periodici e pianificati, utilizzare `scrub`.

Se si utilizza l'opzione -a, --audit-only, viene controllato solo l'hash dei file e i dati di parità vengono ignorati per un'esecuzione più veloce.

I file sono identificati solo dal percorso, non dall'inode.

Nulla viene modificato. -

-
-

+

5.11 list -

+

Elenca tutti i file contenuti nell'array al momento dell'ultimo -sync. +`sync`.

Con -v o --verbose, viene mostrato anche il tempo sotto il secondo.

Nulla viene modificato. -

-
-

+

5.12 dup -

+

Elenca tutti i file duplicati. Due file sono considerati uguali se i loro hash corrispondono. I dati del file non vengono letti; vengono utilizzati solo gli hash precalcolati.

Nulla viene modificato. -

-
-

+

5.13 pool -

+

Crea o aggiorna una vista virtuale di tutti -i file nell'array di dischi nella directory di pooling. +i file nell'array di dischi nella directory di `pooling`.

I file non vengono copiati ma collegati utilizzando collegamenti simbolici.

Durante l'aggiornamento, tutti i collegamenti simbolici esistenti e le sottodirectory vuote vengono eliminati e sostituiti con la nuova vista dell'array. Qualsiasi altro file regolare viene lasciato al suo posto.

Nulla viene modificato al di fuori della directory pool. -

-
-

+

5.14 devices -

+

Stampa i dispositivi di basso livello utilizzati dall'array.

Questo comando visualizza le associazioni dei dispositivi nell'array ed è principalmente destinato come interfaccia script. @@ -954,11 +870,9 @@ ogni disco nell'array, ma in alcune configurazioni più complesse, si potrebbe avere più dispositivi di basso livello utilizzati da un singolo disco nell'array.

Nulla viene modificato. -

-
-

+

5.15 touch -

+

Imposta un timestamp arbitrario sotto il secondo per tutti i file che lo hanno impostato a zero.

Questo migliora la capacità di SnapRAID di riconoscere i file @@ -971,11 +885,9 @@ al nome, alle dimensioni e al timestamp. Se il timestamp sotto il secondo le dimensioni e il timestamp corrispondono tutti.

Il timestamp di precisione al secondo non viene modificato, quindi tutte le date e gli orari dei file saranno conservati. -

-
-

+

5.16 rehash -

+

Pianifica un rehash dell'intero array.

Questo comando cambia il tipo di hash utilizzato, in genere quando si esegue l'aggiornamento da un sistema a 32 bit a uno a 64 bit, per @@ -983,51 +895,31 @@ passare da MurmurHash3 al più veloce SpookyHash.

Se si sta già utilizzando l'hash ottimale, questo comando non fa nulla e informa che non è necessaria alcuna azione.

Il rehash non viene eseguito immediatamente ma avviene -progressivamente durante sync e scrub. -

È possibile controllare lo stato del rehash utilizzando status. +progressivamente durante `sync` e `scrub`. +

È possibile controllare lo stato del rehash utilizzando `status`.

Durante il rehash, SnapRAID mantiene la piena funzionalità, -con l'unica eccezione che dup non è in grado di rilevare file +con l'unica eccezione che `dup` non è in grado di rilevare file duplicati utilizzando un hash diverso. -

-
-

-locate -

-

Individua i file memorizzati nei dischi di parità. Per ogni file corrispondente, -stampa la sua posizione all'interno del file di parità e il numero di frammenti -che occupa. -

È possibile utilizzare l'opzione -t, --tail per limitare l'operazione ai file -che occupano la porzione di coda specificata della parità. -Se si desidera riallocare questi file, è possibile utilizzare l'opzione --W, --force-realloc-tail. -

Si tenga presente che tali file non saranno protetti dalla parità durante -il processo di riallocazione. -

-
-
-

+

6 Opzioni -

+

SnapRAID fornisce le seguenti opzioni: -

-
-
+

+ +
-c, --conf CONFIG -
+
Seleziona il file di configurazione da utilizzare. Se non -specificato, in Unix utilizza il file /usr/local/etc/snapraid.conf -se esiste, altrimenti /etc/snapraid.conf. -In Windows, utilizza il file snapraid.conf nella stessa -directory di snapraid.exe. - - - -
-
-
+specificato, in Unix utilizza il file `/usr/local/etc/snapraid.conf` +se esiste, altrimenti `/etc/snapraid.conf`. +In Windows, utilizza il file `snapraid.conf` nella stessa +directory di `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filtra i file da elaborare in check e fix. +
+Filtra i file da elaborare in `check` e `fix`. Vengono elaborati solo i file che corrispondono al modello specificato. Questa opzione può essere utilizzata più volte. @@ -1035,116 +927,102 @@ Vedere la sezione PATTERN per maggiori dettagli sulle specifiche del modello. In Unix, assicurarsi che i caratteri di globbing siano citati se usati. -Questa opzione può essere utilizzata solo con check e fix. -Non può essere utilizzata con sync e scrub, poiché elaborano +Questa opzione può essere utilizzata solo con `check` e `fix`. +Non può essere utilizzata con `sync` e `scrub`, poiché elaborano sempre l'intero array. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtra i dischi da elaborare in check, fix, up e down. +
+Filtra i dischi da elaborare in `check`, `fix`, `up` e `down`. È necessario specificare un nome di disco come definito nel file di configurazione. È anche possibile specificare i dischi di parità con i nomi: -parity, 2-parity, 3-parity, ecc., per limitare le operazioni +`parity`, `2-parity`, `3-parity`, ecc., per limitare le operazioni a un disco di parità specifico. Se si combinano più opzioni --filter, --filter-disk e --filter-missing, vengono selezionati solo i file che corrispondono a tutti i filtri. Questa opzione può essere utilizzata più volte. -Questa opzione può essere utilizzata solo con check, fix, -up e down. -Non può essere utilizzata con sync e scrub, poiché elaborano +Questa opzione può essere utilizzata solo con `check`, `fix`, +`up` e `down`. +Non può essere utilizzata con `sync` e `scrub`, poiché elaborano sempre l'intero array. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtra i file da elaborare in check e fix. +
+Filtra i file da elaborare in `check` e `fix`. Vengono elaborati solo i file mancanti o eliminati dall'array. -Quando usato con fix, questo agisce come un comando di -undelete (annullamento eliminazione). +Quando usato con `fix`, questo agisce come un comando di +`undelete` (annullamento eliminazione). Se si combinano più opzioni --filter, --filter-disk e --filter-missing, vengono selezionati solo i file che corrispondono a tutti i filtri. -Questa opzione può essere utilizzata solo con check e fix. -Non può essere utilizzata con sync e scrub, poiché elaborano +Questa opzione può essere utilizzata solo con `check` e `fix`. +Non può essere utilizzata con `sync` e `scrub`, poiché elaborano sempre l'intero array. - - - -
-
-
+
+ + +
-e, --filter-error -
-Elabora i file con errori in check e fix. +
+Elabora i file con errori in `check` e `fix`. Elabora solo i file che hanno blocchi contrassegnati con errori -silenti o di input/output durante sync e scrub, come -elencato in status. -Questa opzione può essere utilizzata solo con check e fix. - - - -
-
-
+silenti o di input/output durante `sync` e `scrub`, come +elencato in `status`. +Questa opzione può essere utilizzata solo con `check` e `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Seleziona il piano di scrub. Se PERC è un valore numerico da 0 a 100, viene interpretato come la percentuale di blocchi da sottoporre a scrub. Invece di una percentuale, è possibile specificare un piano: -bad esegue lo scrub dei blocchi bad, new esegue lo scrub -dei blocchi non ancora sottoposti a scrub, e full esegue lo +`bad` esegue lo scrub dei blocchi bad, `new` esegue lo scrub +dei blocchi non ancora sottoposti a scrub, e `full` esegue lo scrub di tutto. -Questa opzione può essere utilizzata solo con scrub. - - - -
-
-
+Questa opzione può essere utilizzata solo con `scrub`. +
+ + +
-o, --older-than DAYS -
-Seleziona la parte più vecchia dell'array da elaborare in scrub. +
+Seleziona la parte più vecchia dell'array da elaborare in `scrub`. DAYS è l'età minima in giorni per un blocco da sottoporre a scrub; il valore predefinito è 10. I blocchi contrassegnati come bad vengono sempre sottoposti a scrub indipendentemente da questa opzione. -Questa opzione può essere utilizzata solo con scrub. - - - -
-
-
+Questa opzione può essere utilizzata solo con `scrub`. +
+ + +
-a, --audit-only -
-In check, verifica l'hash dei file senza +
+In `check`, verifica l'hash dei file senza controllare i dati di parità. Se si è interessati solo al controllo dei dati del file, questa opzione può velocizzare significativamente il processo di controllo. -Questa opzione può essere utilizzata solo con check. - - - -
-
-
+Questa opzione può essere utilizzata solo con `check`. +
+ + +
-h, --pre-hash -
-In sync, esegue una fase preliminare di hashing di tutti i nuovi +
+In `sync`, esegue una fase preliminare di hashing di tutti i nuovi dati per una verifica aggiuntiva prima del calcolo della parità. -Di solito, in sync, non viene eseguito alcun hashing preliminare +Di solito, in `sync`, non viene eseguito alcun hashing preliminare e i nuovi dati vengono sottoposti a hash subito prima del calcolo della parità quando vengono letti per la prima volta. Questo processo si verifica quando il sistema è sotto @@ -1153,74 +1031,53 @@ Questa è una condizione estrema per la macchina e, se presenta un problema hardware latente, gli errori silenti potrebbero non essere rilevati perché i dati non sono ancora stati sottoposti a hash. Per evitare questo rischio, è possibile abilitare la modalità -pre-hash per far leggere tutti i dati due volte per garantirne +`pre-hash` per far leggere tutti i dati due volte per garantirne l'integrità. Questa opzione verifica anche i file spostati all'interno dell'array per garantire che l'operazione di spostamento sia andata a buon fine e, se necessario, consente di eseguire un'operazione di fix prima di procedere. -Questa opzione può essere utilizzata solo con sync. - - - -
-
-
+Questa opzione può essere utilizzata solo con `sync`. +
+ + +
-i, --import DIR -
+
Importa dalla directory specificata tutti i file eliminati -dall'array dopo l'ultimo sync. -Se si hanno ancora tali file, possono essere utilizzati da check -e fix per migliorare il processo di recupero. +dall'array dopo l'ultimo `sync`. +Se si hanno ancora tali file, possono essere utilizzati da `check` +e `fix` per migliorare il processo di recupero. I file vengono letti, anche nelle sottodirectory, e sono identificati indipendentemente dal loro nome. -Questa opzione può essere utilizzata solo con check e fix. - - - -
-
-
+Questa opzione può essere utilizzata solo con `check` e `fix`. +
+ + +
-s, --spin-down-on-error -
+
In caso di errore, ferma (spin down) tutti i dischi gestiti prima di uscire con un codice di stato non zero. Ciò impedisce alle unità di rimanere attive e in rotazione dopo un'operazione interrotta, contribuendo a evitare inutili accumuli di calore e consumo di energia. Utilizzare questa opzione per garantire che i dischi siano arrestati in modo sicuro anche in caso di errore di un comando. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Applica un limite di larghezza di banda globale per tutti i dischi. RATE è il numero di byte al secondo. È possibile specificare un -moltiplicatore come K, M, G o T (ad esempio, --bw-limit 1G). - - - -
-
-
--t, --tail DIMENSIONE -
-Limita l'elenco dei file a quelli che non utilizzano più della -dimensione di coda specificata dei dischi di parità. -È possibile utilizzare moltiplicatori come K, M, G o T (ad es. --tail 1G). -Questa opzione è valida solo se utilizzata insieme al comando -locate. -
-
-
-
-
-
+moltiplicatore come K, M o G (ad esempio, --bw-limit 1G). +
+ + +
-A, --stats -
+
Abilita una vista dello stato estesa che mostra informazioni aggiuntive. La schermata visualizza due grafici: Il primo grafico mostra il numero di stripe bufferizzate per @@ -1239,14 +1096,12 @@ Tutti i calcoli vengono eseguiti in parallelo con le operazioni su disco. Pertanto, finché c'è un tempo di attesa misurabile per almeno un disco, ciò indica che la CPU è abbastanza veloce da tenere il passo con il carico di lavoro. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Forza l'operazione non sicura di sincronizzazione di un file con dimensione zero che in precedenza era non zero. Se SnapRAID rileva una tale condizione, interrompe la @@ -1256,15 +1111,13 @@ anomalo del sistema, alcuni file a cui si è acceduto sono stati troncati. Questa è una possibile condizione in Linux con i file system ext3/ext4. -Questa opzione può essere utilizzata solo con sync. - - - -
-
-
+Questa opzione può essere utilizzata solo con `sync`. +
+ + +
-E, --force-empty -
+
Forza l'operazione non sicura di sincronizzazione di un disco con tutti i file originali mancanti. Se SnapRAID rileva che tutti i file originariamente presenti @@ -1272,15 +1125,13 @@ sul disco sono mancanti o riscritti, interrompe la prosecuzione a meno che non si specifichi questa opzione. Ciò consente di rilevare facilmente quando un file system di dati non è montato. -Questa opzione può essere utilizzata solo con sync. - - - -
-
-
+Questa opzione può essere utilizzata solo con `sync`. +
+ + +
-U, --force-uuid -
+
Forza l'operazione non sicura di sincronizzazione, controllo e correzione con dischi che hanno cambiato il loro UUID. Se SnapRAID rileva che alcuni dischi hanno cambiato UUID, @@ -1291,16 +1142,14 @@ di montaggio sbagliati. Tuttavia, è consentito avere un singolo cambio di UUID con parità singola e di più con parità multipla, perché questo è il caso normale quando si sostituiscono i dischi dopo un recupero. -Questa opzione può essere utilizzata solo con sync, check -o fix. - - - -
-
-
+Questa opzione può essere utilizzata solo con `sync`, `check` +o `fix`. +
+ + +
-D, --force-device -
+
Forza l'operazione non sicura di correzione con dischi inaccessibili o con dischi sullo stesso dispositivo fisico. Ad esempio, se si sono persi due dischi dati e si ha un disco di @@ -1309,16 +1158,14 @@ disco inaccessibile. Oppure, se si desidera recuperare un disco nello spazio libero rimasto su un disco già utilizzato, condividendo lo stesso dispositivo fisico. -Questa opzione può essere utilizzata solo con fix. - - - -
-
-
+Questa opzione può essere utilizzata solo con `fix`. +
+ + +
-N, --force-nocopy -
-In sync, check e fix, disabilita l'euristica di rilevamento +
+In `sync`, `check` e `fix`, disabilita l'euristica di rilevamento della copia. Senza questa opzione, SnapRAID presume che i file con gli stessi attributi, come nome, dimensione e timestamp, siano copie con gli @@ -1329,141 +1176,99 @@ per rilevare errori silenti o per recuperare file mancanti. In alcuni rari casi, questo comportamento può comportare falsi positivi o un processo lento a causa di molte verifiche di hash, e questa opzione consente di risolvere tali problemi. -Questa opzione può essere utilizzata solo con sync, check -e fix. - - - -
-
-
+Questa opzione può essere utilizzata solo con `sync`, `check` +e `fix`. +
+ + +
-F, --force-full -
-In sync, forza un ricalcolo completo della parità. +
+In `sync`, forza un ricalcolo completo della parità. Questa opzione può essere utilizzata quando si aggiunge un nuovo livello di parità o se si è tornati a un vecchio file di contenuto utilizzando dati di parità più recenti. Invece di ricreare la parità da zero, questo consente di riutilizzare gli hash presenti nel file di contenuto per convalidare i dati e -mantenere la protezione dei dati durante il processo sync +mantenere la protezione dei dati durante il processo `sync` utilizzando i dati di parità esistenti. -Questa opzione può essere utilizzata solo con sync. - - - -
-
-
+Questa opzione può essere utilizzata solo con `sync`. +
+ + +
-R, --force-realloc -
-In sync, forza una riallocazione completa dei file e la +
+In `sync`, forza una riallocazione completa dei file e la ricostruzione della parità. Questa opzione può essere utilizzata per riallocare completamente tutti i file, rimuovendo la frammentazione, riutilizzando gli hash presenti nel file di contenuto per convalidare i dati. -Questa opzione può essere utilizzata solo con sync. +Questa opzione può essere utilizzata solo con `sync`. ATTENZIONE! Questa opzione è solo per esperti ed è vivamente sconsigliato utilizzarla. -NON si ha protezione dei dati durante l'operazione sync. - - - -
-
-
--W, --force-realloc-tail DIMENSIONE -
-Funziona come -R, --force-realloc, ma limitatamente alla porzione -di coda specificata (ultimi DIMENSIONE byte) di ogni file di parità. -Forza la riallocazione (spostamento) di qualsiasi frammento/blocco di file -attualmente memorizzato in quella sezione di coda, consentendo loro di essere -posizionati ovunque nei file di parità dove sia disponibile spazio libero -(inclusi i buchi esistenti). -Lo scopo principale di questa opzione è ridurre la dimensione su disco -del file di parità. -Se la riallocazione svuota con successo l'intera sezione di coda -(non rimangono blocchi che la utilizzano), il file di parità viene -troncato, recuperando lo spazio di coda inutilizzato. -È possibile utilizzare moltiplicatori come K, M, G o T (ad es. ---force-realloc-tail 1G). -È possibile utilizzare locate -t, --tail per conoscere in anticipo -i file interessati. -ATTENZIONE! -Questa opzione è solo per esperti ed è caldamente -raccomandato di non usarla. -NON si ha protezione dei dati durante l'operazione di sync -per i file interessati. -
-
-
-
-
-
+NON si ha protezione dei dati durante l'operazione `sync`. +
+ + +
-l, --log FILE -
+
Scrive un log dettagliato nel file specificato. Se questa opzione non è specificata, gli errori imprevisti vengono stampati sullo schermo, potenzialmente resulting in un output eccessivo in caso di molti errori. Quando -l, --log è specificato, vengono stampati sullo schermo solo gli errori fatali che causano l'arresto di SnapRAID. -Se il percorso inizia con >>, il file viene aperto in modalità -append. Le occorrenze di %D e %T nel nome vengono sostituite +Se il percorso inizia con '>>', il file viene aperto in modalità +append. Le occorrenze di '%D' e '%T' nel nome vengono sostituite con la data e l'ora nel formato YYYYMMDD e HHMMSS. Nei file batch -di Windows, è necessario raddoppiare il carattere %, ad esempio -result-%%D.log. Per utilizzare >>, è necessario racchiudere -il nome tra virgolette, ad esempio ">>result.log". +di Windows, è necessario raddoppiare il carattere '%', ad esempio +result-%%D.log. Per utilizzare '>>', è necessario racchiudere +il nome tra virgolette, ad esempio `">>result.log"`. Per indirizzare l'output del log all'output standard o all'errore -standard, è possibile utilizzare ">&1" e ">&2", +standard, è possibile utilizzare `">&1"` e `">&2"`, rispettivamente. Vedere il file snapraid_log.txt o la pagina man per le descrizioni dei tag di log. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Imposta un nuovo limite di errore prima di interrompere l'esecuzione. Per impostazione predefinita, SnapRAID si interrompe se incontra più di 100 errori di input/output, indicando che un disco sta probabilmente fallendo. -Questa opzione influisce su sync e scrub, a cui è consentito +Questa opzione influisce su `sync` e `scrub`, a cui è consentito continuare dopo il primo set di errori del disco per cercare di completare le loro operazioni. -Tuttavia, check e fix si interrompono sempre al primo errore. - - - -
-
-
+Tuttavia, `check` e `fix` si interrompono sempre al primo errore. +
+ + +
-S, --start BLKSTART -
+
Avvia l'elaborazione dal numero di blocco specificato. Ciò può essere utile per riprovare a controllare o correggere blocchi specifici in caso di disco danneggiato. Questa opzione è principalmente per il recupero manuale avanzato. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Elabora solo il numero specificato di blocchi. Questa opzione è principalmente per il recupero manuale avanzato. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Genera un file di configurazione fittizio da un file di contenuto esistente. Il file di configurazione viene scritto nell'output standard e non @@ -1471,69 +1276,57 @@ sovrascrive uno esistente. Questo file di configurazione contiene anche le informazioni necessarie per ricostruire i punti di montaggio del disco nel caso in cui si perda l'intero sistema. - - - -
-
-
+
+ + +
-v, --verbose -
+
Stampa più informazioni sullo schermo. Se specificato una volta, stampa i file esclusi e statistiche aggiuntive. Questa opzione non ha effetto sui file di log. - - - -
-
-
+
+ + +
-q, --quiet -
+
Stampa meno informazioni sullo schermo. Se specificato una volta, rimuove la barra di avanzamento; due volte, le operazioni in corso; tre volte, i messaggi di informazione; quattro volte, i messaggi di stato. Gli errori fatali vengono sempre stampati sullo schermo. Questa opzione non ha effetto sui file di log. - - - -
-
-
+
+ + +
-H, --help -
+
Stampa una breve schermata di aiuto. - - - -
-
-
+
+ + +
-V, --version -
+
Stampa la versione del programma. - - - - -
-

+

+

7 Configurazione -

+

SnapRAID richiede un file di configurazione per sapere dove si trova l'array di dischi e dove memorizzare le informazioni di parità. -

In Unix, utilizza il file /usr/local/etc/snapraid.conf se esiste, -altrimenti /etc/snapraid.conf. -In Windows, utilizza il file snapraid.conf nella stessa -directory di snapraid.exe. +

In Unix, utilizza il file `/usr/local/etc/snapraid.conf` se esiste, +altrimenti `/etc/snapraid.conf`. +In Windows, utilizza il file `snapraid.conf` nella stessa +directory di `snapraid.exe`.

Deve contenere le seguenti opzioni (sensibili al maiuscolo/minuscolo): -

-

+

7.1 parity FILE [,FILE] ... -

+

Definisce i file da utilizzare per memorizzare le informazioni di parità. La parità consente la protezione da un singolo guasto del disco, simile a RAID5. @@ -1548,11 +1341,9 @@ diventino frammentati, migliorando le prestazioni.

In Windows, 256 MB vengono lasciati inutilizzati su ogni disco per evitare l'avviso sui dischi pieni.

Questa opzione è obbligatoria e può essere utilizzata solo una volta. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Definisce i file da utilizzare per memorizzare informazioni di parità extra.

Per ogni livello di parità specificato, è abilitato un livello @@ -1576,46 +1367,40 @@ aggiuntivo di protezione:

Ogni livello di parità richiede la presenza di tutti i livelli di parità precedenti. -

Si applicano le stesse considerazioni dell'opzione parity. +

Si applicano le stesse considerazioni dell'opzione 'parity'.

Queste opzioni sono facoltative e possono essere utilizzate solo una volta. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Definisce un file e un formato alternativi per memorizzare la tripla parità. -

Questa opzione è un'alternativa a 3-parity, destinata +

Questa opzione è un'alternativa a '3-parity', destinata principalmente a CPU di fascia bassa come ARM o AMD Phenom, Athlon e Opteron che non supportano il set di istruzioni SSSE3. In tali casi, fornisce prestazioni migliori.

Questo formato è simile ma più veloce di quello utilizzato da ZFS RAIDZ3. Come ZFS, non funziona oltre la tripla parità. -

Quando si utilizza 3-parity, si verrà avvisati se è consigliato -utilizzare il formato z-parity per un miglioramento delle prestazioni. +

Quando si utilizza '3-parity', si verrà avvisati se è consigliato +utilizzare il formato 'z-parity' per un miglioramento delle prestazioni.

È possibile convertire da un formato all'altro regolando il file di configurazione con il file z-parity o 3-parity desiderato e -utilizzando fix per ricrearlo. -

-
-

+utilizzando 'fix' per ricrearlo. +

7.4 content FILE -

+

Definisce il file da utilizzare per memorizzare l'elenco e i checksum di tutti i file presenti nell'array di dischi.

Può essere posizionato su un disco utilizzato per dati, parità o qualsiasi altro disco disponibile. Se si utilizza un disco dati, questo file viene automaticamente -escluso dal processo sync. +escluso dal processo `sync`.

Questa opzione è obbligatoria e può essere utilizzata più volte per salvare più copie dello stesso file.

È necessario memorizzare almeno una copia per ogni disco di parità utilizzato più uno. L'utilizzo di copie aggiuntive non è dannoso. -

-
-

+

7.5 data NAME DIR -

+

Definisce il nome e il punto di montaggio dei dischi dati nell'array. NAME viene utilizzato per identificare il disco e deve essere unico. DIR è il punto di montaggio del disco nel file system. @@ -1624,50 +1409,32 @@ purché si mantenga fisso NAME.

È necessario utilizzare un'opzione per ogni disco dati nell'array.

È possibile rinominare un disco in seguito modificando NAME direttamente nel file di configurazione e quindi eseguendo un -comando sync. +comando 'sync'. In caso di ridenominazione, l'associazione viene eseguita utilizzando l'UUID memorizzato dei dischi. -

-
-

-extra NAME DIR -

-

Definisce il nome e il punto di montaggio di dischi aggiuntivi da monitorare -con i comandi smart e probe. -

Questo è utile per monitorare i dischi che non fanno parte dell' -array ma sono necessari per il funzionamento del sistema, come -il disco di avvio. -

Si noti che tali dischi non sono influenzati dai comandi up e down -perché si prevede che siano sempre in rotazione. -

-
-

+

7.6 nohidden -

+

Esclude tutti i file e le directory nascosti. -In Unix, i file nascosti sono quelli che iniziano con .. +In Unix, i file nascosti sono quelli che iniziano con `.`. In Windows, sono quelli con l'attributo nascosto. -

-
-

+

7.7 exclude/include PATTERN -

+

Definisce i modelli di file o directory da escludere o includere nel processo di sync. Tutti i modelli vengono elaborati nell'ordine specificato. -

Se il primo modello che corrisponde è un exclude, il file -viene escluso. Se è un include, il file viene incluso. +

Se il primo modello che corrisponde è un `exclude`, il file +viene escluso. Se è un `include`, il file viene incluso. Se nessun modello corrisponde, il file viene escluso se l'ultimo -modello specificato è un include, o incluso se l'ultimo modello -specificato è un exclude. +modello specificato è un `include`, o incluso se l'ultimo modello +specificato è un `exclude`.

Vedere la sezione PATTERN per maggiori dettagli sulle specifiche del modello.

Questa opzione può essere utilizzata più volte. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Definisce la dimensione di blocco di base in kibibyte per la parità. Un kibibyte è 1024 byte.

La dimensione di blocco predefinita è 256, che dovrebbe funzionare @@ -1692,7 +1459,7 @@ dimensione di blocco di 256 KiB, si sprecheranno 12,8 GB di parità, il che può comportare 12,8 GB in meno di spazio disponibile sul disco dati.

È possibile controllare la quantità di spazio sprecato su ogni disco -utilizzando status. +utilizzando `status`. Questa è la quantità di spazio che è necessario lasciare libero sui dischi dati o utilizzare per i file non inclusi nell'array. Se questo valore è negativo, significa che si è vicini a riempire @@ -1704,17 +1471,17 @@ dati, si ha abbastanza spazio extra per gestire fino a 100.000 file su ogni disco dati senza alcuno spreco di spazio.

Un trucco per ottenere una partizione di parità più grande in Linux è formattarla con il comando: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Ciò si traduce in circa l'1,5% di spazio extra, circa 60 GB per un disco da 4 TB, che consente circa 460.000 file su ogni disco dati senza alcuno spreco di spazio. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Definisce la dimensione dell'hash in byte per i blocchi salvati.

La dimensione di hash predefinita è 16 byte (128 bit), che dovrebbe funzionare nella maggior parte dei casi. @@ -1746,28 +1513,24 @@ blocco di 512, si ottiene:

 RAM = $(8 * 4 * 10^{12}) * (1+8) / (512 * 2^{10}) = 0.51 \text{ GiB}$
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Salva automaticamente lo stato durante la sincronizzazione o lo scrubbing dopo la quantità specificata di GB elaborati. -Questa opzione è utile per evitare di riavviare lunghi comandi sync +Questa opzione è utile per evitare di riavviare lunghi comandi `sync` da zero se interrotti da un arresto anomalo della macchina o qualsiasi altro evento. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Imposta la temperatura massima del disco consentita in Celsius. Se specificato, SnapRAID controlla periodicamente la temperatura di tutti i dischi utilizzando lo strumento smartctl. Le temperature attuali dei dischi vengono visualizzate mentre SnapRAID è in funzione. Se un disco supera questo limite, tutte le operazioni si interrompono e i dischi vengono messi in stand-by (spin down) per la durata definita -dall'opzione temp_sleep. Dopo il periodo di sonno, le operazioni +dall'opzione `temp_sleep`. Dopo il periodo di sonno, le operazioni riprendono, potenzialmente mettendosi in pausa di nuovo se il limite di temperatura viene raggiunto ancora una volta.

Durante il funzionamento, SnapRAID analizza anche la curva di riscaldamento @@ -1790,27 +1553,21 @@ dell'esecuzione come riferimento di riserva.

Normalmente, SnapRAID mostra solo la temperatura del disco più caldo. Per visualizzare la temperatura di tutti i dischi, utilizzare l'opzione -A o --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Imposta il tempo di stand-by, in minuti, quando il limite di temperatura viene raggiunto. Durante questo periodo, i dischi rimangono fermi (spin down). Il valore predefinito è 5 minuti. -

-
-

+

7.13 pool DIR -

+

Definisce la directory di pooling in cui viene creata la vista virtuale -dell'array di dischi utilizzando il comando pool. +dell'array di dischi utilizzando il comando `pool`.

La directory deve già esistere. -

-
-

+

7.14 share UNC_DIR -

+

Definisce il percorso UNC di Windows necessario per accedere ai dischi da remoto.

Se questa opzione è specificata, i collegamenti simbolici creati nella @@ -1820,63 +1577,66 @@ solo percorsi locali, il che non consente la condivisione della directory pool sulla rete.

I collegamenti simbolici sono formati utilizzando il percorso UNC specificato, aggiungendo il nome del disco come specificato nell'opzione -data e infine aggiungendo la directory e il nome del file. +`data` e infine aggiungendo la directory e il nome del file.

Questa opzione è richiesta solo per Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Definisce opzioni smartctl personalizzate per ottenere gli attributi SMART per ogni disco. Ciò potrebbe essere richiesto per controller RAID e alcuni dischi USB che non possono essere rilevati automaticamente. Il segnaposto %s viene sostituito dal nome del dispositivo, ma è facoltativo per dispositivi fissi come i controller RAID. -

DISK è lo stesso nome del disco specificato nell'opzione data. -PARITY è uno dei nomi di parità: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity o z-parity. -

Nelle OPTIONS specificate, la stringa %s viene sostituita dal +

DISK è lo stesso nome del disco specificato nell'opzione `data`. +PARITY è uno dei nomi di parità: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` o `z-parity`. +

Nelle OPTIONS specificate, la stringa `%s` viene sostituita dal nome del dispositivo. Per i controller RAID, il dispositivo è -probabilmente fisso e potrebbe non essere necessario utilizzare %s. +probabilmente fisso e potrebbe non essere necessario utilizzare `%s`.

Fare riferimento alla documentazione di smartmontools per le possibili opzioni: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Ad esempio: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignora l'attributo SMART specificato durante il calcolo della probabilità di guasto del disco. Questa opzione è utile se un disco segnala valori insoliti o fuorvianti per un particolare attributo. -

DISK è lo stesso nome del disco specificato nell'opzione data. -PARITY è uno dei nomi di parità: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity o z-parity. +

DISK è lo stesso nome del disco specificato nell'opzione `data`. +PARITY è uno dei nomi di parità: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` o `z-parity`. Il valore speciale * può essere utilizzato per ignorare l'attributo su tutti i dischi. -

Ad esempio, per ignorare l'attributo Current Pending Sector Count +

Ad esempio, per ignorare l'attributo `Current Pending Sector Count` su tutti i dischi: -

+

+
 smartignore * 197
 
+

Per ignorarlo solo sul primo disco di parità: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Esempi -

+

Un esempio di configurazione tipica per Unix è: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1890,8 +1650,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Un esempio di configurazione tipica per Windows è: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1906,84 +1668,54 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

I pattern offrono un modo flessibile per filtrare i file da includere o -escludere. Usando i caratteri globbing, è possibile definire regole che -corrispondano a nomi di file specifici o a intere strutture di directory senza -elencare manualmente ogni percorso. -

Il punto interrogativo ? corrisponde a qualsiasi carattere singolo eccetto il -separatore di directory. Questo lo rende utile per far corrispondere nomi di file -con caratteri variabili mantenendo il pattern confinato a un singolo livello di directory. -

L'asterisco singolo * corrisponde a qualsiasi sequenza di caratteri, ma come il -punto interrogativo, non attraversa mai i confini delle directory. Si ferma allo -slash in avanti, rendendolo adatto per la corrispondenza all'interno di un singolo -componente del percorso. Questo è il comportamento standard dei wildcard familiare -dal globbing della shell. -

Il doppio asterisco ** è più potente, corrisponde a qualsiasi sequenza di -caratteri inclusi i separatori di directory. Ciò consente ai pattern di corrispondere -attraverso più livelli di directory. Quando ** appare inserito direttamente in -un pattern, può corrispondere a zero o più caratteri inclusi gli slash tra -il testo letterale circostante. -

L'uso più importante di ** è nella forma speciale /**/. Questa corrisponde a -zero o più livelli di directory completi, rendendo possibile la corrispondenza di file -a qualsiasi profondità in un albero di directory senza conoscere l'esatta struttura del percorso. -Per esempio, il pattern src/**/main.js corrisponde a src/main.js (saltando -zero directory), src/ui/main.js (saltando una directory), e -src/ui/components/main.js (saltando due directory). -

Le classi di caratteri che usano le parentesi quadre [] corrispondono a un singolo carattere da un -set o intervallo specificato. Come gli altri pattern a carattere singolo, esse -non corrispondono ai separatori di directory. Le classi supportano intervalli e la negazione usando -un punto esclamativo. -

La distinzione fondamentale da ricordare è che *, ? e le classi di caratteri -rispettano tutti i confini delle directory e corrispondono solo all'interno di un singolo -componente del percorso, mentre ** è l'unico pattern che può corrispondere attraverso -i separatori di directory. + +

I pattern vengono utilizzati per selezionare un sottoinsieme di file da +escludere o includere nel processo.

Esistono quattro diversi tipi di pattern: -

-
-
+

+ +
FILE -
-Seleziona qualsiasi file chiamato FILE. +
+Seleziona qualsiasi file denominato FILE. È possibile utilizzare +qualsiasi carattere di globbing come * e ?, e classi di caratteri +come [a-z]. Questo pattern si applica solo ai file, non alle directory. - - - -
-
-
+
+ + +
DIR/ -
-Seleziona qualsiasi directory chiamata DIR e tutto ciò che contiene. +
+Seleziona qualsiasi directory denominata DIR e tutto ciò che è +al suo interno. È possibile utilizzare qualsiasi carattere di +globbing come * e ?. Questo pattern si applica solo alle directory, non ai file. - - - -
-
-
+
+ + +
/PATH/FILE -
-Seleziona l'esatto percorso del file specificato. Questo pattern si applica -solo ai file, non alle directory. -
- - -
-
-
+
+Seleziona l'esatto percorso del file specificato. È possibile +utilizzare qualsiasi carattere di globbing come * e ?, ma non +corrispondono mai a uno slash di directory. +Questo pattern si applica solo ai file, non alle directory. +
+ + +
/PATH/DIR/ -
-Seleziona l'esatto percorso della directory specificata e tutto ciò che -contiene. Questo pattern si applica solo alle directory, non ai file. -
- - +
+Seleziona l'esatto percorso della directory specificata e tutto +ciò che è al suo interno. È possibile utilizzare qualsiasi +carattere di globbing come * e ?, ma non corrispondono mai a +uno slash di directory. +Questo pattern si aplica solo alle directory, non ai file. +

Quando si specifica un percorso assoluto che inizia con /, viene applicato alla directory radice dell'array, non alla directory radice del file system locale. @@ -1992,190 +1724,131 @@ in avanti /. Le directory di sistema di Windows, le junction, i punti di montaggio e altre directory speciali di Windows sono trattati come file, il che significa che per escluderli, è necessario utilizzare una regola di file, non una di directory. -

Se il nome del file contiene un carattere *, ?, [ o ], +

Se il nome del file contiene un carattere '*', '?', '[' o ']', è necessario eseguirne l'escape per evitare che venga interpretato -come un carattere di globbing. In Unix, il carattere di escape è \; -in Windows, è ^. +come un carattere di globbing. In Unix, il carattere di escape è '\'; +in Windows, è '^'. Quando il pattern è sulla riga di comando, è necessario raddoppiare il carattere di escape per evitare che venga interpretato dalla shell dei comandi.

Nel file di configurazione, è possibile utilizzare diverse strategie per filtrare i file da elaborare. -L'approccio più semplice è utilizzare solo regole exclude per +L'approccio più semplice è utilizzare solo regole `exclude` per rimuovere tutti i file e le directory che non si desidera elaborare. Ad esempio: -

-# Esclude qualsiasi file denominato *.unrecoverable
+

+
+# Esclude qualsiasi file denominato `*.unrecoverable`
 exclude *.unrecoverable
-# Esclude la directory radice /lost+found
+# Esclude la directory radice `/lost+found`
 exclude /lost+found/
-# Esclude qualsiasi sottodirectory denominata tmp
+# Esclude qualsiasi sottodirectory denominata `tmp`
 exclude tmp/
 
+

L'approccio opposto è definire solo i file che si desidera elaborare, -utilizzando solo regole include. Ad esempio: -

+utilizzando solo regole `include`. Ad esempio:
+

+
 # Include solo alcune directory
 include /movies/
 include /musics/
 include /pictures/
 
-

L'approccio finale è mescolare regole exclude e include. In questo +

+

L'approccio finale è mescolare regole `exclude` e `include`. In questo caso, l'ordine delle regole è importante. Le regole precedenti hanno la precedenza su quelle successive. -Per semplificare, è possibile elencare prima tutte le regole exclude -e poi tutte le regole include. Ad esempio: -

-# Esclude qualsiasi file denominato *.unrecoverable
+Per semplificare, è possibile elencare prima tutte le regole `exclude`
+e poi tutte le regole `include`. Ad esempio:
+

+
+# Esclude qualsiasi file denominato `*.unrecoverable`
 exclude *.unrecoverable
-# Esclude qualsiasi sottodirectory denominata tmp
+# Esclude qualsiasi sottodirectory denominata `tmp`
 exclude tmp/
 # Include solo alcune directory
 include /movies/
 include /musics/
 include /pictures/
 
+

Sulla riga di comando, utilizzando l'opzione -f, è possibile utilizzare -solo pattern include. Ad esempio: -

+solo pattern `include`. Ad esempio:
+

+
 # Controlla solo i file .mp3.
 # In Unix, utilizzare le virgolette per evitare l'espansione
 # del globbing da parte della shell.
 snapraid -f "*.mp3" check
 
+

In Unix, quando si utilizzano caratteri di globbing sulla riga di comando, è necessario citarli per impedire alla shell di espanderli. -

-
-

-Ignore File -

-

In aggiunta alle regole globali nel file di configurazione, è possibile -inserire file .snapraidignore in qualsiasi directory all'interno dell'array -per definire regole di esclusione decentralizzate. -

Le regole definite in .snapraidignore vengono applicate dopo le regole nel -file di configurazione. Ciò significa che hanno una priorità più alta e possono -essere utilizzate per escludere file che erano stati precedentemente inclusi dalla -configurazione globale. In pratica, se una regola locale corrisponde, il file viene -escluso indipendentemente dalle impostazioni di inclusione globali. -

La logica dei pattern in .snapraidignore rispecchia la configurazione globale -ma ancora i pattern alla directory in cui si trova il file: -

-
-
-FILE -
-Seleziona qualsiasi file chiamato FILE in questa directory o sotto di essa. -Segue le stesse regole di globbing del pattern globale. -
-
-
-
-
-
-DIR/ -
-Seleziona qualsiasi directory chiamata DIR e tutto ciò che contiene, -che risieda in questa directory o sotto di essa. -
-
-
-
-
-
-/PATH/FILE -
-Seleziona l'esatto file specificato relativo alla posizione -del file .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Seleziona l'esatta directory specificata e tutto ciò che contiene, -relativa alla posizione del file .snapraidignore. -
-
-
-

A differenza della configurazione globale, i file .snapraidignore supportano -solo regole di esclusione; non è possibile utilizzare pattern include o negazioni (!). -

Ad esempio, se hai un .snapraidignore in /mnt/disk1/projects/: -

-# Esclude SOLO /mnt/disk1/projects/output.bin
-/output.bin
-# Esclude qualsiasi directory chiamata build all'interno di projects/
-build/
-# Esclude qualsiasi file .tmp all'interno di projects/ o delle sue sottocartelle
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID memorizza l'elenco e i checksum dei file nel file di contenuto.

È un file binario che elenca tutti i file presenti nell'array di dischi, insieme a tutti i checksum per verificarne l'integrità. -

Questo file viene letto e scritto dai comandi sync e scrub e -letto dai comandi fix, check e status. -

-
-

+

Questo file viene letto e scritto dai comandi `sync` e `scrub` e +letto dai comandi `fix`, `check` e `status`. +

10 Parity -

+

SnapRAID memorizza le informazioni di parità dell'array nei file di parità.

Questi sono file binari contenenti la parità calcolata di tutti i -blocchi definiti nel file content. -

Questi file vengono letti e scritti dai comandi sync e fix e -solo letti dai comandi scrub e check. -

-
-

+blocchi definiti nel file `content`. +

Questi file vengono letti e scritti dai comandi `sync` e `fix` e +solo letti dai comandi `scrub` e `check`. +

11 Codifica -

+

SnapRAID in Unix ignora qualsiasi codifica. Legge e memorizza i nomi dei file con la stessa codifica utilizzata dal file system.

In Windows, tutti i nomi letti dal file system vengono convertiti e elaborati in formato UTF-8.

Per avere i nomi dei file stampati correttamente, è necessario impostare -la console di Windows in modalità UTF-8 con il comando chcp 65001 e -utilizzare un carattere TrueType come Lucida Console come carattere +la console di Windows in modalità UTF-8 con il comando `chcp 65001` e +utilizzare un carattere TrueType come `Lucida Console` come carattere della console. Questo influisce solo sui nomi dei file stampati; se si reindirizza l'output della console a un file, il file risultante è sempre in formato UTF-8. -

-
-

+

13 Vedi Anche -

-

snapraid_log(1), snapraidd(1) -

+ +

snapraid_log(1), rsync(1) +

+

+

-
-
-
+
- - + diff --git a/manual-ja.html b/manual-ja.html index 1113a5c0..6bc46cd0 100644 --- a/manual-ja.html +++ b/manual-ja.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAIDは、ディスクアレイ用のバックアッププログラムで、最大6台のディスク障害が発生した場合の データ復旧のためにパリティ情報を保存します。

主に大容量で、更新頻度の低いファイルを扱うホームメディアセンターを対象としており、 @@ -179,19 +124,19 @@ SnapRAIDはデータをロックしません。いつでも再フォーマット

詳細については、SnapRAIDの公式サイトをご覧ください。 -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAIDはRAIDとバックアッププログラムのハイブリッドであり、両方の利点を組み合わせることを 目指しています。ただし、使用する前に考慮すべきいくつかの制限があります。 -

主な制限は、ディスクが故障し、最近 sync を実行していない場合、完全に復旧できない +

主な制限は、ディスクが故障し、最近 `sync` を実行していない場合、完全に復旧できない 可能性があることです。 -より具体的には、最後の sync 操作以降に変更または削除されたファイルのサイズまでのデータが +より具体的には、最後の `sync` 操作以降に変更または削除されたファイルのサイズまでのデータが 復旧できない可能性があります。 これは、変更または削除されたファイルが故障したディスク上にない場合でも発生します。 このため、SnapRAIDは**めったに変更されない**データに適しています。 @@ -220,40 +165,41 @@ SnapRAIDは**限られた数のディスク障害**からのみデータを復 アクセス許可、所有権、および拡張属性は保存されません。 -

-
-

+

4 Getting Started -

-

SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを parity 情報専用に + +

SnapRAIDを使用するには、まずディスクアレイ内の1つのディスクを `parity` 情報専用に 選択する必要があります。パリティ用に1つのディスクを使用すると、RAID5と同様に、単一のディスク障害から 復旧できます。

RAID6と同様に、より多くのディスク障害から復旧したい場合は、パリティ用に追加のディスクを 確保する必要があります。パリティディスクを追加するたびに、復旧できるディスク障害が1つ増えます。

パリティ情報はアレイ内の**最大のデータディスク**のサイズにまで増える可能性があるため、 パリティディスクとしては、アレイ内の**最大のディスク**を選択する必要があります。 -

これらのディスクは、parity ファイルの保存専用になります。 +

これらのディスクは、`parity` ファイルの保存専用になります。 **データを保存しないでください**。 -

次に、SnapRAIDで保護したい data ディスクを定義する必要があります。 +

次に、SnapRAIDで保護したい `data` ディスクを定義する必要があります。 これらのディスクに含まれるデータがめったに変更されない場合に、保護が最も効果的です。 このため、WindowsのC:\ディスクやUnixの/home、/var、/tmpディレクトリを含めない方が 良いでしょう。 -

ファイルの一覧は content ファイルに保存され、通常はデータ、パリティ、または +

ファイルの一覧は `content` ファイルに保存され、通常はデータ、パリティ、または ブートディスクに保存されます。 このファイルには、バックアップの詳細と、その整合性を検証するためのすべての チェックサムが含まれています。 -content ファイルは**複数のコピー**で保存され、複数のディスク障害が発生した場合でも、 +`content` ファイルは**複数のコピー**で保存され、複数のディスク障害が発生した場合でも、 少なくとも1つのコピーが利用可能であることを保証するために、**各コピーは異なるディスクに** 配置する必要があります。

たとえば、1レベルのパリティ保護のみに関心があり、ディスクが次の場所にあるとします。 -

+

+
 /mnt/diskp <- パリティ用に選択されたディスク
 /mnt/disk1 <- 保護する最初のディスク
 /mnt/disk2 <- 保護する2番目のディスク
 /mnt/disk3 <- 保護する3番目のディスク
 
-

構成ファイル /etc/snapraid.conf を次のオプションで作成する必要があります。 -

+
+

構成ファイル `/etc/snapraid.conf` を次のオプションで作成する必要があります。 +

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -262,9 +208,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Windowsを使用している場合は、スラッシュではなくドライブ文字とバックスラッシュを 使用したWindowsのパス形式を使用する必要があります。 -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -273,31 +221,37 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

ディスクが多くてドライブ文字が不足する場合は、サブフォルダにディスクを 直接マウントできます。参照: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

この時点で、パリティ情報を構築するために sync コマンドを実行する準備が整いました。 -

+
+

この時点で、パリティ情報を構築するために `sync` コマンドを実行する準備が整いました。 +

+
 snapraid sync
 
+

このプロセスは、既にディスクに存在するデータのサイズに応じて、初回は数時間かかる 場合があります。ディスクが空の場合は、プロセスは即座に完了します。

Ctrl+Cを押すことでいつでも停止でき、次回の実行時には中断された場所から再開されます。

このコマンドが完了すると、データは**SAFE**になります。 -

これで、アレイを自由に使い始め、定期的に sync コマンドを実行してパリティ情報を +

これで、アレイを自由に使い始め、定期的に `sync` コマンドを実行してパリティ情報を 更新できます。 -

-

+

4.1 Scrubbing -

-

データとパリティのエラーを定期的にチェックするには、scrub コマンドを + +

データとパリティのエラーを定期的にチェックするには、`scrub` コマンドを 実行できます。 -

+

+
 snapraid scrub
 
-

このコマンドは、配列内のデータを sync コマンド中に計算されたハッシュと比較して、 +

+

このコマンドは、配列内のデータを `sync` コマンド中に計算されたハッシュと比較して、 整合性を検証します。

このコマンドを1回実行すると、前回の10日間で既にスクラブされたデータを除いて、 アレイの約8%がチェックされます。 @@ -305,63 +259,78 @@ snapraid scrub -o, --older-than オプションを使用して異なる経過日数で 指定できます。 たとえば、20日以上経過したブロックの5%をチェックするには、次のように使用します。 -

+

+
 snapraid -p 5 -o 20 scrub
 
+

プロセス中にサイレントエラーまたは入出力エラーが見つかった場合、 -対応するブロックは content ファイル内で不良としてマークされ、 -status コマンドで一覧表示されます。 -

+対応するブロックは `content` ファイル内で不良としてマークされ、
+`status` コマンドで一覧表示されます。
+

+
 snapraid status
 
+

それらを修正するには、-e, --filter-error オプションで不良ブロックをフィルタリングして、 -fix コマンドを使用できます。 -

+`fix` コマンドを使用できます。
+

+
 snapraid -e fix
 
-

次回の scrub で、エラーが本当に修正されていれば、status レポートから -エラーは消えます。より高速にするために、-p bad を使用して不良としてマークされた +

+

次回の `scrub` で、エラーが本当に修正されていれば、`status` レポートから +エラーは消えます。より高速にするために、`-p bad` を使用して不良としてマークされた ブロックのみをスクラブできます。 -

+

+
 snapraid -p bad scrub
 
-

未同期のアレイで scrub を実行すると、削除または変更されたファイルによって -引き起こされたエラーが報告される場合があります。これらのエラーは scrub の +

+

未同期のアレイで `scrub` を実行すると、削除または変更されたファイルによって +引き起こされたエラーが報告される場合があります。これらのエラーは `scrub` の 出力で報告されますが、関連するブロックは不良としてマークされません。 -

-
-

+

4.2 Pooling -

-

注: ここで説明するプーリング機能は、**mergerfs** ツールに取って代わられました。 -mergerfs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。 + +

注: ここで説明するプーリング機能は、**mergefs** ツールに取って代わられました。 +mergefs は、SnapRAIDコミュニティのLinuxユーザーに推奨されるオプションです。 Mergefs は、複数のドライブを単一の統合されたマウントポイントにプールするための、 より柔軟で効率的な方法を提供し、シンボリックリンクに頼ることなくアレイ全体の ファイルにシームレスにアクセスできます。これは、パリティ保護のためにSnapRAIDと うまく統合されており、OpenMediaVault (OMV) やカスタムNAS構成などのセットアップで 一般的に使用されています。

アレイ内のすべてのファイルを同じディレクトリツリーに表示させるには、 -pooling 機能を有効にできます。これは、シンボリックリンクを使用して、 +`pooling` 機能を有効にできます。これは、シンボリックリンクを使用して、 アレイ内のすべてのファイルの読み取り専用の仮想ビューを作成します。 -

構成ファイルで pooling ディレクトリを次のように構成できます。 -

+

構成ファイルで `pooling` ディレクトリを次のように構成できます。 +

+
 pool /pool
 
+

または、Windowsの場合は、次のようにします。 -

+

+
 pool C:\pool
 
-

そして、pool コマンドを実行して仮想ビューを作成または更新します。 -

+
+

そして、`pool` コマンドを実行して仮想ビューを作成または更新します。 +

+
 snapraid pool
 
+

Unixプラットフォームを使用しており、このディレクトリをWindowsまたはUnixマシンに -ネットワーク経由で共有したい場合は、/etc/samba/smb.conf に次のオプションを +ネットワーク経由で共有したい場合は、`/etc/samba/smb.conf` に次のオプションを 追加する必要があります。 -

+

+
 # smb.conf の global セクションで
 unix extensions = no
 
+
+
 # smb.conf の share セクションで
 [pool]
@@ -372,387 +341,345 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

Windowsでは、ネットワーク経由でシンボリックリンクを共有するには、クライアントが それらをリモートで解決する必要があります。これを有効にするには、プールディレクトリを 共有することに加えて、構成ファイルで定義された**ディスク名**を共有ポイントとして 使用して、**すべてのディスクを個別に**共有する必要があります。また、リモートクライアントが これらの共有ディスクにアクセスするために使用する必要があるWindows UNCパスを、 -構成ファイルの share オプションで指定する必要があります。 -

たとえば、darkstar という名前のサーバーで操作している場合、次のオプションを +構成ファイルの `share` オプションで指定する必要があります。 +

たとえば、`darkstar` という名前のサーバーで操作している場合、次のオプションを 使用できます。 -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

そして、次のディレクトリをネットワーク経由で共有します。 -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
-

これにより、リモートクライアントは \\darkstar\pool ですべてのファイルに +

+

これにより、リモートクライアントは `\\darkstar\pool` ですべてのファイルに アクセスできるようになります。

また、リモートクライアントがリモートシンボリックリンクへのアクセスを有効にするために、 次のコマンドで構成する必要がある場合もあります。 -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAIDはRAIDシステムよりもバックアッププログラムのように機能し、 -f, --filter オプションを使用してファイルを以前の状態に復元または削除解除するために 使用できます。 -

+

+
 snapraid fix -f FILE
 
+

またはディレクトリの場合は: -

+

+
 snapraid fix -f DIR/
 
+

また、-m, --filter-missing オプションを使用して、ディレクトリ内の**誤って削除されたファイルのみ**を 復旧するために使用することもできます。これにより、不足しているファイルのみが復元され、 他のファイルはすべてそのまま残されます。 -

+

+
 snapraid fix -m -f DIR/
 
+

または、すべてのドライブ上のすべての削除されたファイルを復旧するには: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

最悪の事態が発生し、1台以上のディスクを失いました!

**パニックにならないでください!** 復旧できます!

最初に行うべきことは、ディスクアレイへの**さらなる変更を避ける**ことです。 -リモート接続、およびスケジュールされたSnapRAIDの夜間 sync や scrub を含む、 +リモート接続、およびスケジュールされたSnapRAIDの夜間 `sync` や `scrub` を含む、 すべてのスケジュールされたプロセスを無効にしてください。

次に、次の手順に進みます。 -

-

+

4.4.1 STEP 1 -> Reconfigure -

+

復旧のためにいくらかのスペースが必要です。理想的には追加の 予備ディスクですが、外部USBディスクやリモートディスクでも十分です。 -

SnapRAIDの構成ファイルを変更して、故障したディスクの data または parity +

SnapRAIDの構成ファイルを変更して、故障したディスクの `data` または `parity` オプションを、ファイルを復旧するための十分な空き容量のある場所に 向けます。 -

たとえば、ディスク d1 が故障した場合、次のように変更します。 -

+

たとえば、ディスク `d1` が故障した場合、次のように変更します。 +

+
 data d1 /mnt/disk1/
 
+

から: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

復旧するディスクがパリティディスクの場合は、適切な parity オプションを +

+

復旧するディスクがパリティディスクの場合は、適切な `parity` オプションを 更新します。 複数のディスクが故障している場合は、すべての構成オプションを更新します。 -

-
-

+

4.4.2 STEP 2 -> Fix -

-

ログを外部ファイルに保存して、fix コマンドを実行します。 -

+
+

ログを外部ファイルに保存して、`fix` コマンドを実行します。 +

+
 snapraid -d NAME -l fix.log fix
 
-

ここで NAME はディスクの名前であり、前の例では d1 のようなものです。 -復旧するディスクがパリティディスクの場合は、parity、2-parity などの +

+

ここで NAME はディスクの名前であり、前の例では `d1` のようなものです。 +復旧するディスクがパリティディスクの場合は、`parity`、`2-parity` などの 名前を使用します。 -複数のディスクが故障している場合は、複数の -d オプションを使用して +複数のディスクが故障している場合は、複数の `-d` オプションを使用して すべてを指定します。

このコマンドは時間がかかります。 -

fix.log ファイルを保存するために数ギガバイトの空き容量があることを確認してください。 +

`fix.log` ファイルを保存するために数ギガバイトの空き容量があることを確認してください。 十分な空き容量のあるディスクから実行してください。

これで、復旧可能なすべてのものが復旧されました。一部のファイルが部分的または完全に -復旧できない場合、それらは .unrecoverable 拡張子を追加して名前が変更されます。 -

fix.log ファイルで、unrecoverable: で始まるすべての行をチェックすることで、 +復旧できない場合、それらは `.unrecoverable` 拡張子を追加して名前が変更されます。 +

`fix.log` ファイルで、`unrecoverable:` で始まるすべての行をチェックすることで、 すべての復旧不能なブロックの詳細なリストを見つけることができます。

復旧に満足できない場合は、何度でも再試行できます。 -

たとえば、最後の sync の後にアレイからファイルを削除した場合、 +

たとえば、最後の `sync` の後にアレイからファイルを削除した場合、 これにより一部のファイルが復旧されない可能性があります。 この場合、-i, --import オプションを使用して、これらのファイルが現在どこにあるかを指定することで、 -復旧プロセスにそれらを再度含めるように fix を再試行できます。 +復旧プロセスにそれらを再度含めるように `fix` を再試行できます。

復旧に満足している場合は、さらに進むことができますが、**sync** の実行後には -fix コマンドを**再試行できない**ことに注意してください! -

-
-

+`fix` コマンドを**再試行できない**ことに注意してください! +

4.4.3 STEP 3 -> Check -

-

慎重なチェックとして、check コマンドを実行して、復旧されたディスク上の + +

慎重なチェックとして、`check` コマンドを実行して、復旧されたディスク上の すべてが正しいことを確認できます。 -

+

+
 snapraid -d NAME -a check
 
-

ここで NAME はディスクの名前であり、前の例では d1 のようなものです。 -

-d および -a オプションは、SnapRAIDに**指定されたディスクのみ**をチェックし、 +

+

ここで NAME はディスクの名前であり、前の例では `d1` のようなものです。 +

`-d` および `-a` オプションは、SnapRAIDに**指定されたディスクのみ**をチェックし、 **すべてのパリティデータを無視**するように指示します。

このコマンドは時間がかかりますが、過度に慎重でない場合はスキップできます。 -

-
-

+

4.4.4 STEP 4 -> Sync -

-

sync コマンドを実行して、アレイを新しいディスクと再同期します。 -

+
+

`sync` コマンドを実行して、アレイを新しいディスクと再同期します。 +

+
 snapraid sync
 
+

すべてが復旧されていれば、このコマンドは即座に完了します。 -

-
-
-
-

+

5 Commands -

+

SnapRAIDは、次のことを可能にするいくつかの簡単なコマンドを提供します。

  • -アレイの状態の概要を出力 -> status +アレイの状態の概要を出力 -> `status`
  • -ディスクの制御 -> smart、probe、up、down +ディスクの制御 -> `smart`、`probe`、`up`、`down`
  • -バックアップ/スナップショットの作成 -> sync +バックアップ/スナップショットの作成 -> `sync`
  • -データの定期的なチェック -> scrub +データの定期的なチェック -> `scrub`
  • -最後のバックアップ/スナップショットの復元 -> fix。 +最後のバックアップ/スナップショットの復元 -> `fix`。

コマンドは**小文字**で記述する必要があります。 -

-

+

5.1 status -

+

ディスクアレイの状態の概要を出力します。

これには、パリティの断片化、チェックなしでのブロックの古さ、および スクラビング中に遭遇したすべての記録されたサイレントエラーに関する情報が 含まれます。 -

提示される情報は、最後に sync を実行した時点のものです。 +

提示される情報は、最後に `sync` を実行した時点のものです。 それ以降の変更は考慮されません。

不良ブロックが検出された場合、それらのブロック番号が一覧表示されます。 -それらを修正するには、fix -e コマンドを使用できます。 +それらを修正するには、`fix -e` コマンドを使用できます。

また、各ブロックが最後にスクラブまたは同期された時期を示すグラフも表示されます。 -スクラブされたブロックは * で、同期されたがまだスクラブされていないブロックは o で +スクラブされたブロックは `*` で、同期されたがまだスクラブされていないブロックは `o` で 示されます。

何も変更されません。 -

-
-

+

5.2 smart -

+

システム内のすべてのディスクのSMARTレポートを出力します。

これには、翌年の故障確率の推定値が含まれており、疑わしい属性を示すディスクの メンテナンス交換を計画できます。

この確率推定は、ディスクのSMART属性を次の場所で利用可能なBackblazeのデータと 相関させることで得られます。 -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

SMARTがディスクが故障していると報告した場合、そのディスクに対して FAIL または PREFAIL が +

+

SMARTがディスクが故障していると報告した場合、そのディスクに対して `FAIL` または `PREFAIL` が 出力され、SnapRAIDはエラーを返します。 この場合、**ディスクの即時交換**が強く推奨されます。

その他の可能なステータス文字列は次のとおりです。 -

-
-
+

+ + + +
logfail -
+
過去に、一部の属性がしきい値よりも低かった。 - - -
-
+
logerr -
+
デバイスのエラーログにエラーが含まれている。 - - -
-
+
selferr -
+
デバイスのセルフテストログにエラーが含まれている。 - - - -
-
-
+
+ + +
-v, --verbose オプションが指定されている場合、より詳細な統計分析が提供されます。 -
-
- - +
+

この分析は、より多くまたはより少ないパリティが必要かどうかを決定するのに役立ちます。 -

このコマンドは smartctl ツールを使用し、すべてのデバイスで smartctl -a を実行するのと +

このコマンドは `smartctl` ツールを使用し、すべてのデバイスで `smartctl -a` を実行するのと 同等です。 -

デバイスが正しく自動検出されない場合は、構成ファイルで smartctl オプションを +

デバイスが正しく自動検出されない場合は、構成ファイルで `smartctl` オプションを 使用してカスタムコマンドを指定できます。

何も変更されません。 -

-
-

+

5.3 probe -

+

システム内のすべてのディスクのPOWER状態を出力します。 -

Standby はディスクがスピンしていないことを意味します。Active は +

`Standby` はディスクがスピンしていないことを意味します。`Active` は ディスクがスピンしていることを意味します。 -

このコマンドは smartctl ツールを使用し、すべてのデバイスで smartctl -n standby -i を実行するのと +

このコマンドは `smartctl` ツールを使用し、すべてのデバイスで `smartctl -n standby -i` を実行するのと 同等です。 -

デバイスが正しく自動検出されない場合は、構成ファイルで smartctl オプションを +

デバイスが正しく自動検出されない場合は、構成ファイルで `smartctl` オプションを 使用してカスタムコマンドを指定できます。

何も変更されません。 -

-
-

+

5.4 up -

+

アレイのすべてのディスクをスピンアップします。 -

-
-
+

+ +
-d, --filter-disk オプションを使用して、特定のディスクのみをスピンアップできます。 -
-
- - +
+

すべてのディスクを同時にスピンアップするには、多くの電力が必要です。 電源がそれに耐えられることを確認してください。

何も変更されません。 -

-
-

+

5.5 down -

+

アレイのすべてのディスクをスピンダウンします。 -

このコマンドは smartctl ツールを使用し、すべてのデバイスで smartctl -s standby,now を実行するのと +

このコマンドは `smartctl` ツールを使用し、すべてのデバイスで `smartctl -s standby,now` を実行するのと 同等です。 -

-
-
+

+ +
-d, --filter-disk オプションを使用して、特定のディスクのみをスピンダウンできます。 -
-
- - +
+

エラー時に自動的にスピンダウンするには、他の任意のコマンドで -s, --spin-down-on-error -オプションを使用できます。これは、エラーが発生したときに手動で down を実行するのと同等です。 +オプションを使用できます。これは、エラーが発生したときに手動で `down` を実行するのと同等です。

何も変更されません。 -

-
-

+

5.6 diff -

-

最後の sync 以降に変更され、パリティデータを再計算する必要があるすべてのファイルを + +

最後の `sync` 以降に変更され、パリティデータを再計算する必要があるすべてのファイルを 一覧表示します。

このコマンドはファイルデータはチェックせず、ファイルのタイムスタンプ、サイズ、 およびinodeのみをチェックします。

変更されたすべてのファイルを一覧表示した後、変更の概要が 次のようにグループ化されて提示されます。 -

-
-
+

+ + + + + + + +
equal -
+
変更されていないファイル。 - - -
-
+
added -
+
以前は存在しなかった追加されたファイル。 - - -
-
+
removed -
+
削除されたファイル。 - - -
-
+
updated -
+
サイズまたはタイムスタンプが異なるファイル。これは、 変更されたことを意味します。 - - -
-
+
moved -
+
同じディスク上の異なるディレクトリに移動されたファイル。 同じ名前、サイズ、タイムスタンプ、およびinodeを持ちますが、ディレクトリが 異なることで識別されます。 - - -
-
+
copied -
-元のファイルがまだ存在する、同じディスクまたは別の -ディスクにコピーされたファイル。 -これらは、同じ名前、サイズ、およびタイムスタンプを持つこと -によって識別されます。 -サブ秒のタイムスタンプがゼロの場合、名前だけでなくフルパス -が一致する必要があります。 -
- -
-
-relocated -
-オリジナルが消失した、同じディスクまたは別のディ -スクに移動されたファイル。 -これらは、同じ名前、サイズ、およびタイムスタンプを持つこと -によって識別されます。 -サブ秒のタイムスタンプがゼロの場合、識別するにはフルパスが -一致する必要があります。 -同じディスク上の 'moved' ファイルとは異なり、再配置された -ファイルは異なる inode を持ちます。 -
-
-
-
+
+同じディスクまたは異なるディスクにコピーされたファイル。 +異なるディスクに真に移動された場合、`removed` にも +カウントされることに注意してください。 +同じ名前、サイズ、およびタイムスタンプを持つことで識別されます。 +サブ秒のタイムスタンプがゼロの場合、ファイル名だけでなく、 +フルパスが一致する必要があります。 +
restored -
-inode は異なるが、ディレクトリ、名前、サイズ、お -よびタイムスタンプが一致するファイル。 -これらは通常、削除された後に復元されたファイルです。 -
- - -

sync が必要な場合、プロセスはデフォルトの0ではなく、リターンコード2を返します。 +

+inodeは異なるが、名前、サイズ、タイムスタンプが一致するファイル。 +これらは通常、削除後に復元されたファイルです。 +
+

`sync` が必要な場合、プロセスはデフォルトの0ではなく、リターンコード2を返します。 リターンコード1は、一般的なエラー状態に使用されます。

何も変更されません。 -

-
-

+

5.7 sync -

+

パリティ情報を更新します。ディスクアレイ内のすべての変更されたファイルが読み取られ、 対応するパリティデータが更新されます。

Ctrl+Cを押すことでいつでもこのプロセスを停止でき、 既に完了した作業を失うことはありません。 -次回の実行時には、sync プロセスは中断された場所から +次回の実行時には、`sync` プロセスは中断された場所から 再開されます。

プロセス中にサイレントエラーまたは入出力エラーが見つかった場合、 対応するブロックは不良としてマークされます。 @@ -764,27 +691,23 @@ sync パリティは再計算されません。 ファイルが別のディスクに移動された場合、パリティは再計算されますが、 以前に計算されたハッシュ情報は保持されます。 -

content ファイルと parity ファイルは必要に応じて変更されます。 +

`content` ファイルと `parity` ファイルは必要に応じて変更されます。 アレイ内のファイルは**変更されません**。 -

-
-

+

5.8 scrub -

+

アレイをスクラブし、データおよびパリティディスクのサイレントエラーまたは入出力エラーを チェックします。

1回の呼び出しごとに、最後の10日間で既にスクラブされたデータを除いて、 アレイの約8%がチェックされます。 これは、週に1回スクラビングを実行すると、すべてのデータが少なくとも3か月に1回は チェックされることを意味します。 -

-
-
+

+ +
-p, --plan オプションを使用して、異なるスクラブプランまたは量を定義できます。 -
-
- - +
+

このオプションは以下を受け入れます。 bad - 不良としてマークされたブロックをスクラブします。 new - まだスクラブされていない、同期されたばかりのブロックをスクラブします。 @@ -794,113 +717,97 @@ full - すべてをスクラブします。 ブロックがどれくらいの古さである必要があるかを定義することもできます。 最も古いブロックが最初にスクラブされ、最適なチェックが保証されます。 まだスクラブされていない、同期されたばかりのブロックのみをスクラブしたい場合は、 --p new オプションを使用します。 -

スクラブステータスの詳細を取得するには、status コマンドを使用します。 +`-p new` オプションを使用します。 +

スクラブステータスの詳細を取得するには、`status` コマンドを使用します。

見つかったサイレントエラーまたは入出力エラーごとに、対応するブロックは -content ファイル内で不良としてマークされます。 -これらの不良ブロックは status で一覧表示され、fix -e で修正できます。 +`content` ファイル内で不良としてマークされます。 +これらの不良ブロックは `status` で一覧表示され、`fix -e` で修正できます。 修正後、次回のスクラブで再チェックされ、修正されていると判明した場合、 不良マークは削除されます。 -不良ブロックのみをスクラブするには、scrub -p bad コマンドを使用できます。 +不良ブロックのみをスクラブするには、`scrub -p bad` コマンドを使用できます。

未同期のデータによって引き起こされた報告されたエラーを避けるために、 -scrub は**同期された**アレイでのみ実行することをお勧めします。これらのエラーは +`scrub` は**同期された**アレイでのみ実行することをお勧めします。これらのエラーは サイレントエラーではないと認識され、ブロックは不良としてマークされませんが、 そのようなエラーはコマンドの出力で報告されます。 -

content ファイルは、各ブロックの最後のチェック時刻を更新し、不良ブロックを +

`content` ファイルは、各ブロックの最後のチェック時刻を更新し、不良ブロックを マークするために変更されます。 -parity ファイルは**変更されません**。 +`parity` ファイルは**変更されません**。 アレイ内のファイルは**変更されません**。 -

-
-

+

5.9 fix -

+

すべてのファイルとパリティデータを修正します。 -

すべてのファイルとパリティデータは、最後の sync で保存されたスナップショット状態と +

すべてのファイルとパリティデータは、最後の `sync` で保存されたスナップショット状態と 比較されます。 違いが見つかった場合、保存されたスナップショットに**元に戻されます**。 -

**警告!** fix コマンドは、エラーと意図的な変更を区別しません。 -ファイルの_状態を_最後の sync に**無条件に元に戻します**。 +

**警告!** `fix` コマンドは、エラーと意図的な変更を区別しません。 +ファイルの_状態を_最後の `sync` に**無条件に元に戻します**。

他のオプションが指定されていない場合、アレイ全体が処理されます。 フィルタオプションを使用して、操作するファイルまたはディスクのサブセットを 選択します。 -

sync および scrub 中に不良としてマークされたブロックのみを修正するには、 +

`sync` および `scrub` 中に不良としてマークされたブロックのみを修正するには、 -e, --filter-error オプションを使用します。 -他のフィルタオプションとは異なり、これは最新の sync 以降に**変更されていない** +他のフィルタオプションとは異なり、これは最新の `sync` 以降に**変更されていない** ファイルにのみ修正を適用します。 -

SnapRAIDは、修正できないすべてのファイルの名前を .unrecoverable 拡張子を +

SnapRAIDは、修正できないすべてのファイルの名前を `.unrecoverable` 拡張子を 追加して変更します。 -

修正する前に、アレイ全体がスキャンされ、最後の sync 操作以降に移動されたファイルが +

修正する前に、アレイ全体がスキャンされ、最後の `sync` 操作以降に移動されたファイルが 見つけられます。 これらのファイルは、名前を無視してタイムスタンプによって識別され、 必要に応じて復旧プロセスで使用されます。 それらのいくつかをアレイ外に移動した場合は、-i, --import オプションを使用して スキャンする追加のディレクトリを指定できます。

ファイルは**パスによってのみ**識別され、inodeによっては識別されません。 -

content ファイルは**変更されません**。 -parity ファイルは必要に応じて変更されます。 +

`content` ファイルは**変更されません**。 +`parity` ファイルは必要に応じて変更されます。 アレイ内のファイルは必要に応じて変更されます。 -

-
-

+

5.10 check -

+

すべてのファイルとパリティデータを検証します。 -

fix のように機能しますが、復旧を**シミュレートするだけ**で、アレイに**変更は書き込まれません**。 +

`fix` のように機能しますが、復旧を**シミュレートするだけ**で、アレイに**変更は書き込まれません**。

このコマンドは、主に復旧プロセス後やその他の特殊な条件下での手動検証を 目的としています。 -定期的でスケジュールされたチェックには、scrub を使用します。 -

-
-
+定期的でスケジュールされたチェックには、`scrub` を使用します。 +

+ +
-a, --audit-only オプションを使用すると、ファイルの**ハッシュのみ**がチェックされ、 -
-
- - +
+

パリティデータは無視されるため、チェックプロセスが大幅に高速化されます。

ファイルは**パスによってのみ**識別され、inodeによっては識別されません。

何も変更されません。 -

-
-

+

5.11 list -

-

最後の sync の時点のアレイに含まれるすべてのファイルを + +

最後の `sync` の時点のアレイに含まれるすべてのファイルを 一覧表示します。 -

-
-
+

+ +
-v または --verbose を使用すると、サブ秒の時間も表示されます。 -
-
- - +
+

何も変更されません。 -

-
-

+

5.12 dup -

+

すべての重複ファイルを一覧表示します。ハッシュが一致する場合、2つのファイルは等しいと見なされます。 ファイルデータは読み取られず、事前に計算されたハッシュのみが使用されます。

何も変更されません。 -

-
-

+

5.13 pool -

-

pooling ディレクトリに、ディスクアレイ内のすべてのファイルの仮想ビューを + +

`pooling` ディレクトリに、ディスクアレイ内のすべてのファイルの仮想ビューを 作成または更新します。

ファイルはコピーされず、シンボリックリンクを使用してリンクされます。

更新時、既存のすべてのシンボリックリンクと空のサブディレクトリは削除され、 アレイの新しいビューに置き換えられます。その他の通常のファイルはそのまま残されます。

プールディレクトリ外は何も変更されません。 -

-
-

+

5.14 devices -

+

アレイで使用される低レベルデバイスを出力します。

このコマンドは、アレイ内のデバイスの関連付けを表示し、主にスクリプトインターフェイスを 目的としています。 @@ -911,11 +818,9 @@ devices より複雑な構成では、単一のアレイ内のディスクで複数の低レベルデバイスが 使用される場合があります。

何も変更されません。 -

-
-

+

5.15 touch -

+

サブ秒のタイムスタンプがゼロに設定されているすべてのファイルに、任意のサブ秒のタイムスタンプを 設定します。

これにより、タイムスタンプがほぼ一意になり、重複の可能性が減るため、 @@ -926,238 +831,175 @@ SnapRAIDが移動およびコピーされたファイルを認識する能力が 一致する場合にのみコピーと見なされます。

秒精度のタイムスタンプは変更されないため、ファイルのすべての日付と時刻は 保持されます。 -

-
-

+

5.16 rehash -

+

アレイ全体のリハッシュをスケジュールします。

このコマンドは、使用されるハッシュの種類を変更します。これは通常、32ビットシステムから 64ビットシステムにアップグレードするときに、MurmurHash3からより高速なSpookyHashに 切り替えるために行われます。

既に最適なハッシュを使用している場合、このコマンドは何もせず、アクションが不要であることを 通知します。 -

リハッシュはすぐには実行されず、sync および scrub の間に徐々に実行されます。 -

status を使用してリハッシュの状態を確認できます。 +

リハッシュはすぐには実行されず、`sync` および `scrub` の間に徐々に実行されます。 +

`status` を使用してリハッシュの状態を確認できます。

リハッシュ中もSnapRAIDは完全な機能を維持しますが、唯一の例外として、 -dup は異なるハッシュを使用している重複ファイルを検出できません。 -

-
-

-locate -

-

パリティディスクに保存されているファイルを検索します。一致する各ファイルについて、 -パリティファイル内での位置と、それが占有するフラグメントの数を出力します。 -

-
-
--t, --tail オプションを使用すると、パリティの指定された末尾部分を占有する -
-
-
-
-

ファイルに操作を制限できます。 -

これらのファイルを再配置したい場合は、-W, --force-realloc-tail オプションを -使用できます。 -再配置プロセス中、これらのファイルはパリティによって保護されないことに -注意してください。 -

-
-
-

+`dup` は異なるハッシュを使用している重複ファイルを検出できません。 +

6 Options -

+

SnapRAIDには、次のオプションがあります。 -

-
-
+

+ +
-c, --conf CONFIG -
+
使用する構成ファイルを選択します。指定されていない場合、Unixでは、存在すれば -/usr/local/etc/snapraid.conf を使用し、それ以外の場合は /etc/snapraid.conf を +`/usr/local/etc/snapraid.conf` を使用し、それ以外の場合は `/etc/snapraid.conf` を 使用します。 -Windowsでは、snapraid.exe と同じディレクトリにある snapraid.conf ファイルを +Windowsでは、`snapraid.exe` と同じディレクトリにある `snapraid.conf` ファイルを 使用します。 - - - -
-
-
+
+ + +
-f, --filter PATTERN -
-check および fix で処理するファイルをフィルタリングします。 +
+`check` および `fix` で処理するファイルをフィルタリングします。 指定されたパターンに一致するファイルのみが処理されます。 このオプションは複数回使用できます。 パターン仕様の詳細については、PATTERNセクションを参照してください。 Unixでは、グロブ文字を使用する場合は引用符で囲むようにしてください。 -このオプションは、check および fix のみで使用できます。 -これらは常にアレイ全体を処理するため、sync および scrub では +このオプションは、`check` および `fix` のみで使用できます。 +これらは常にアレイ全体を処理するため、`sync` および `scrub` では 使用できません。 - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-check、fix、up、および down で処理するディスクをフィルタリングします。 +
+`check`、`fix`、`up`、および `down` で処理するディスクをフィルタリングします。 構成ファイルで定義されているディスク名を指定する必要があります。 -parity、2-parity、3-parity などの名前でパリティディスクも指定して、 +`parity`、`2-parity`、`3-parity` などの名前でパリティディスクも指定して、 特定のパリティディスクに操作を限定できます。 複数の --filter、--filter-disk、および --filter-missing オプションを組み合わせると、 すべてのフィルタに一致するファイルのみが選択されます。 このオプションは複数回使用できます。 -このオプションは、check、fix、up、および down のみで使用できます。 -これらは常にアレイ全体を処理するため、sync および scrub では +このオプションは、`check`、`fix`、`up`、および `down` のみで使用できます。 +これらは常にアレイ全体を処理するため、`sync` および `scrub` では 使用できません。 - - - -
-
-
+
+ + +
-m, --filter-missing -
-check および fix で処理するファイルをフィルタリングします。 +
+`check` および `fix` で処理するファイルをフィルタリングします。 アレイから不足または削除されたファイルのみが処理されます。 -fix と一緒に使用すると、これは undelete コマンドとして機能します。 +`fix` と一緒に使用すると、これは `undelete` コマンドとして機能します。 複数の --filter、--filter-disk、および --filter-missing オプションを組み合わせると、 すべてのフィルタに一致するファイルのみが選択されます。 -このオプションは、check および fix のみで使用できます。 -これらは常にアレイ全体を処理するため、sync および scrub では +このオプションは、`check` および `fix` のみで使用できます。 +これらは常にアレイ全体を処理するため、`sync` および `scrub` では 使用できません。 - - - -
-
-
+
+ + +
-e, --filter-error -
-check および fix でエラーのあるファイルを処理します。 -status で一覧表示されているように、sync および scrub 中にサイレントエラーまたは +
+`check` および `fix` でエラーのあるファイルを処理します。 +`status` で一覧表示されているように、`sync` および `scrub` 中にサイレントエラーまたは 入出力エラーでマークされたブロックを持つファイルのみを処理します。 -このオプションは、check および fix のみで使用できます。 - - - -
-
-
+このオプションは、`check` および `fix` のみで使用できます。 +
+ + +
-p, --plan PERC|bad|new|full -
+
スクラブプランを選択します。PERCが0から100までの数値である場合、 スクラブするブロックのパーセンテージとして解釈されます。 パーセンテージの代わりに、プランを指定できます。 -bad は不良ブロックをスクラブし、new はまだスクラブされていないブロックをスクラブし、 -full はすべてをスクラブします。 -このオプションは、scrub のみで使用できます。 - - - -
-
-
+`bad` は不良ブロックをスクラブし、`new` はまだスクラブされていないブロックをスクラブし、 +`full` はすべてをスクラブします。 +このオプションは、`scrub` のみで使用できます。 +
+ + +
-o, --older-than DAYS -
-scrub で処理するアレイの最も古い部分を選択します。 +
+`scrub` で処理するアレイの最も古い部分を選択します。 DAYS は、ブロックがスクラブされるための最小経過日数であり、デフォルトは10です。 不良としてマークされたブロックは、このオプションに関係なく常にスクラブされます。 -このオプションは、scrub のみで使用できます。 - - - -
-
-
+このオプションは、`scrub` のみで使用できます。 +
+ + +
-a, --audit-only -
-check で、パリティデータをチェックせずにファイルのハッシュを検証します。 +
+`check` で、パリティデータをチェックせずにファイルのハッシュを検証します。 ファイルデータのみのチェックに関心がある場合、このオプションはチェックプロセスを 大幅に高速化できます。 -このオプションは、check のみで使用できます。 - - - -
-
-
+このオプションは、`check` のみで使用できます。 +
+ + +
-h, --pre-hash -
-sync で、パリティ計算の前の追加検証のために、すべての新しいデータの +
+`sync` で、パリティ計算の前の追加検証のために、すべての新しいデータの 予備ハッシュ化フェーズを実行します。 -通常、sync では、予備ハッシュ化は行われず、新しいデータはパリティ計算の直前に、 +通常、`sync` では、予備ハッシュ化は行われず、新しいデータはパリティ計算の直前に、 最初に読み取られたときにハッシュ化されます。 このプロセスは、システムが重い負荷の下にあり、すべてのディスクがスピンしており、CPUが ビジーなときに発生します。 これはマシンにとって極端な状態であり、潜在的なハードウェアの問題がある場合、 データがまだハッシュ化されていないため、サイレントエラーが検出されないままになる 可能性があります。 -このリスクを回避するために、pre-hash モードを有効にして、すべてのデータを2回読み取り、 +このリスクを回避するために、`pre-hash` モードを有効にして、すべてのデータを2回読み取り、 その整合性を確保できます。 このオプションは、アレイ内で移動されたファイルも検証して、移動操作が成功したことを 確認し、必要に応じて、続行する前に修正操作を実行できるようにします。 -このオプションは、sync のみで使用できます。 - - - -
-
-
+このオプションは、`sync` のみで使用できます。 +
+ + +
-i, --import DIR -
-最後の sync の後にアレイから削除されたファイルを、指定されたディレクトリから +
+最後の `sync` の後にアレイから削除されたファイルを、指定されたディレクトリから インポートします。 これらのファイルをまだ持っている場合、それらは復旧プロセスを改善するために -check および fix で使用できます。 +`check` および `fix` で使用できます。 ファイルは、サブディレクトリを含めて読み取られ、名前に関係なく識別されます。 -このオプションは、check および fix のみで使用できます。 - - - -
-
-
+このオプションは、`check` および `fix` のみで使用できます。 +
+ + +
-s, --spin-down-on-error -
+
エラーが発生した場合、非ゼロのステータスコードで終了する前に、管理されているすべてのディスクを スピンダウンします。これにより、中断された操作後にドライブがアクティブなままスピンし続け、 不要な熱の蓄積と電力消費を回避するのに役立ちます。 コマンドが失敗した場合でも、ディスクが安全に停止されるように、このオプションを使用します。 - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
すべてのディスクにグローバルな帯域幅制限を適用します。RATE は 1秒あたりのバイト数です。K、M、Gなどの乗数を指定できます (例:--bw-limit 1G)。 - - - -
-
-
--t, --tail サイズ -
-ファイルリストを、パリティディスクの指定された末尾サイズ以下を -使用しているものに制限します。 -K、M、G、T などの倍数を使用できます(例:--tail 1G)。 -このオプションは、locate コマンドと一緒に使用された場合にのみ -有効です。 -
-
-
-
-
-
+
+ + +
-A, --stats -
+
追加情報を表示する拡張ステータスビューを有効にします。 画面には2つのグラフが表示されます。 最初のグラフは、各ディスクのバッファリングされたストライプの数と、そのディスクで現在 @@ -1170,74 +1012,64 @@ K、M、G、T などの倍数を使用できます(例:--tail 1G)。 すべての計算はディスク操作と並行して実行されます。 したがって、少なくとも1つのディスクで測定可能な待機時間がある限り、 CPUがワークロードに追いつくのに十分速いことを示しています。 - - - -
-
-
+
+ + +
-Z, --force-zero -
+
以前は非ゼロだったサイズのファイルをゼロで同期するという安全でない操作を強制します。 SnapRAIDがこのような状態を検出した場合、このオプションを指定しない限り、 続行を停止します。 これにより、システムクラッシュ後に一部のアクセスされたファイルが切り捨てられたときに、 それを簡単に検出できます。 これは、ext3/ext4ファイルシステムを使用したLinuxで起こりうる状態です。 -このオプションは、sync のみで使用できます。 - - - -
-
-
+このオプションは、`sync` のみで使用できます。 +
+ + +
-E, --force-empty -
+
元のファイルがすべて不足しているディスクを同期するという安全でない操作を強制します。 SnapRAIDが、元々ディスクに存在していたすべてのファイルが不足しているか、 書き換えられていることを検出した場合、このオプションを指定しない限り、 続行を停止します。 これにより、データファイルシステムがマウントされていないときに、それを簡単に 検出できます。 -このオプションは、sync のみで使用できます。 - - - -
-
-
+このオプションは、`sync` のみで使用できます。 +
+ + +
-U, --force-uuid -
+
UUIDが変更されたディスクとの同期、チェック、および修正という安全でない操作を強制します。 SnapRAIDが一部のディスクがUUIDを変更したことを検出した場合、 このオプションを指定しない限り、続行を停止します。 これにより、ディスクが間違ったマウントポイントにマウントされているときに、それを検出できます。 ただし、単一パリティでの単一のUUID変更、および複数のパリティでのより多くのUUID変更は 許可されています。これは、復旧後にディスクを交換するときの通常のケースであるためです。 -このオプションは、sync、check、または fix のみで使用できます。 - - - -
-
-
+このオプションは、`sync`、`check`、または `fix` のみで使用できます。 +
+ + +
-D, --force-device -
+
アクセスできないディスク、または同じ物理デバイス上のディスクとの修正という安全でない操作を強制します。 たとえば、2台のデータディスクを失い、最初の1台だけを復旧するための予備ディスクがある場合、 2番目のアクセスできないディスクを無視できます。 または、既に**使用されている**ディスクに残された空き容量にディスクを復旧したい場合、 同じ物理デバイスを共有します。 -このオプションは、fix のみで使用できます。 - - - -
-
-
+このオプションは、`fix` のみで使用できます。 +
+ + +
-N, --force-nocopy -
-sync、check、および fix で、コピー検出ヒューリスティックを無効にします。 +
+`sync`、`check`、および `fix` で、コピー検出ヒューリスティックを無効にします。 このオプションがない場合、SnapRAIDは、名前、サイズ、タイムスタンプなどの同じ属性を持つファイルが、 同じデータを持つコピーであると見なします。 これにより、あるディスクから別のディスクにコピーまたは移動されたファイルを識別し、 @@ -1245,194 +1077,141 @@ SnapRAIDが一部のディスクがUUIDを変更したことを検出した場 復旧したりできます。 まれに、この動作が誤検出や、多くのハッシュ検証によるプロセスの遅延につながる可能性があり、 このオプションを使用すると、そのような問題を解決できます。 -このオプションは、sync、check、および fix のみで使用できます。 - - - -
-
-
+このオプションは、`sync`、`check`、および `fix` のみで使用できます。 +
+ + +
-F, --force-full -
-sync で、パリティの完全な再計算を強制します。 +
+`sync` で、パリティの完全な再計算を強制します。 このオプションは、新しいパリティレベルを追加する場合、またはより新しいパリティデータを使用して 古いコンテンツファイルに戻した場合に使用できます。 パリティを最初から再作成する代わりに、これにより、コンテンツファイルに存在するハッシュを -再利用してデータを検証し、既存のパリティデータを使用して sync プロセス中にデータ保護を +再利用してデータを検証し、既存のパリティデータを使用して `sync` プロセス中にデータ保護を 維持できます。 -このオプションは、sync のみで使用できます。 - - - -
-
-
+このオプションは、`sync` のみで使用できます。 +
+ + +
-R, --force-realloc -
-sync で、ファイルの完全な再割り当てとパリティの再構築を強制します。 +
+`sync` で、ファイルの完全な再割り当てとパリティの再構築を強制します。 このオプションは、コンテンツファイルに存在するハッシュを再利用してデータを検証しながら、 断片化を削除して、すべてのファイルを完全に再割り当てするために使用できます。 -このオプションは、sync のみで使用できます。 +このオプションは、`sync` のみで使用できます。 **警告!** このオプションはエキスパートのみを対象としており、使用しないことを強く お勧めします。 -sync 操作中にデータ保護はありません。 - - - -
-
-
--W, --force-realloc-tail サイズ -
--R, --force-realloc と同様に動作しますが、各パリティファイルの -指定された末尾部分(最後の「サイズ」バイト)に制限されます。 -現在その末尾セクションに保存されているファイルフラグメント/ブロックの -再配置(移動)を強制し、空きスペースがあるパリティファイル内の -任意の場所(既存のホールを含む)に配置できるようにします。 -このオプションの主な目的は、パリティファイルのディスク上でのサイズを -縮小することです。 -再配置によって末尾セクション全体が正常にクリアされた場合 -(それを使用するブロックが残っていない場合)、パリティファイルは -切り詰められ、未使用の末尾スペースが回収されます。 -K、M、G、T などの倍数を使用できます(例: ---force-realloc-tail 1G)。 -locate -t, --tail を使用して、影響を受けるファイルを事前に -知ることができます。 -警告! -このオプションはエキスパート専用であり、使用しないことが -強く推奨されます。 -影響を受けるファイルについては、sync 操作中にデータ保護は -行われません。 -
-
-
-
-
-
+`sync` 操作中にデータ保護はありません。 +
+ + +
-l, --log FILE -
+
詳細なログを指定されたファイルに書き込みます。 このオプションが指定されていない場合、予期しないエラーが画面に出力され、 多くのエラーが発生した場合に過剰な出力になる可能性があります。 -l, --log が指定されている場合、SnapRAIDが停止する原因となる致命的なエラーのみが 画面に出力されます。 -パスが >> で始まる場合、ファイルは追記モードで開かれます。 -名前に %D と %T が出現すると、それぞれYYYYMMDDとHHMMSSの形式で -日付と時刻に置き換えられます。Windowsバッチファイルでは、% 文字を -2倍にする必要があります。例:result-%%D.log。>> を使用するには、 -名前を引用符で囲む必要があります。例:">>result.log"。 -ログを標準出力または標準エラーに出力するには、それぞれ ">&1" および ">&2" を +パスが '>>' で始まる場合、ファイルは追記モードで開かれます。 +名前に '%D' と '%T' が出現すると、それぞれYYYYMMDDとHHMMSSの形式で +日付と時刻に置き換えられます。Windowsバッチファイルでは、'%' 文字を +2倍にする必要があります。例:result-%%D.log。'>>' を使用するには、 +名前を引用符で囲む必要があります。例:`">>result.log"`。 +ログを標準出力または標準エラーに出力するには、それぞれ `">&1"` および `">&2"` を 使用できます。 ログタグの説明については、snapraid_log.txtファイルまたはmanページを参照してください。 - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
実行を停止する前の新しいエラー制限を設定します。 デフォルトでは、SnapRAIDは100を超える入出力エラーに遭遇した場合に停止します。 これは、ディスクが故障している可能性が高いことを示しています。 -このオプションは sync と scrub に影響し、最初の一連のディスクエラーの後に +このオプションは `sync` と `scrub` に影響し、最初の一連のディスクエラーの後に 続行して操作を完了しようとすることが許可されます。 -ただし、check と fix は常に最初のエラーで停止します。 - - - -
-
-
+ただし、`check` と `fix` は常に最初のエラーで停止します。 +
+ + +
-S, --start BLKSTART -
+
指定されたブロック番号から処理を開始します。 これは、破損したディスクの場合に特定のブロックを再試行してチェックまたは修正するのに 役立ちます。 このオプションは、主に高度な手動復旧を目的としています。 - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
指定された数のブロックのみを処理します。 このオプションは、主に高度な手動復旧を目的としています。 - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
既存のコンテンツファイルからダミーの構成ファイルを生成します。 構成ファイルは標準出力に書き込まれ、既存のファイルを上書きしません。 この構成ファイルには、システム全体を失った場合にディスクのマウントポイントを 再構築するために必要な情報も含まれています。 - - - -
-
-
+
+ + +
-v, --verbose -
+
画面により多くの情報を出力します。 1回指定すると、除外されたファイルと追加の統計が出力されます。 このオプションはログファイルには影響しません。 - - - -
-
-
+
+ + +
-q, --quiet -
+
画面に出力される情報を減らします。 1回指定すると、プログレスバーが削除されます。2回指定すると、実行中の操作が削除されます。 3回指定すると、情報メッセージが削除されます。4回指定すると、ステータスメッセージが削除されます。 致命的なエラーは常に画面に出力されます。 このオプションはログファイルには影響しません。 - - - -
-
-
+
+ + +
-H, --help -
+
短いヘルプ画面を出力します。 - - - -
-
-
+
+ + +
-V, --version -
+
プログラムのバージョンを出力します。 - - - - -
-

+

+

7 Configuration -

+

SnapRAIDは、ディスクアレイの場所とパリティ情報の保存場所を知るために、構成ファイルを 必要とします。 -

Unixでは、存在すれば /usr/local/etc/snapraid.conf を使用し、それ以外の場合は -/etc/snapraid.conf を使用します。 -Windowsでは、snapraid.exe と同じディレクトリにある snapraid.conf ファイルを +

Unixでは、存在すれば `/usr/local/etc/snapraid.conf` を使用し、それ以外の場合は +`/etc/snapraid.conf` を使用します。 +Windowsでは、`snapraid.exe` と同じディレクトリにある `snapraid.conf` ファイルを 使用します。

次のオプションを含める必要があります(大文字と小文字を区別します)。 -

-

+

7.1 parity FILE [,FILE] ... -

+

パリティ情報を保存するために使用するファイルを定義します。 パリティは、RAID5と同様に、単一のディスク障害からの保護を有効にします。

複数のファイルを指定でき、それらは異なるディスク上に存在する必要があります。 @@ -1445,11 +1224,9 @@ parity FILE [,FILE] ...

Windowsでは、フルディスクに関する警告を避けるために、各ディスクに256 MBが未使用で 残されます。

このオプションは必須であり、1回のみ使用できます。 -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

追加のパリティ情報を保存するために使用するファイルを定義します。

指定されたパリティレベルごとに、1つの追加の保護レベルが有効になります。

    @@ -1470,87 +1247,64 @@ parity FILE [,FILE] ...

各パリティレベルには、以前のすべてのパリティレベルが存在する必要があります。 -

parity オプションと同じ考慮事項が適用されます。 +

`parity` オプションと同じ考慮事項が適用されます。

これらのオプションはオプションであり、1回のみ使用できます。 -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

トリプルパリティを保存するための代替ファイルとフォーマットを定義します。 -

このオプションは 3-parity の代替であり、主にARMやSSSE3命令セットをサポートしていない +

このオプションは `3-parity` の代替であり、主にARMやSSSE3命令セットをサポートしていない AMD Phenom、Athlon、OpteronなどのローエンドCPUを対象としています。 このような場合、より良いパフォーマンスを提供します。

このフォーマットは、ZFS RAIDZ3で使用されるものと似ていますが、より高速です。 ZFSと同様に、トリプルパリティを超えては機能しません。 -

3-parity を使用している場合、パフォーマンス向上のために z-parity フォーマットの +

`3-parity` を使用している場合、パフォーマンス向上のために `z-parity` フォーマットの 使用が推奨される場合は警告が表示されます。 -

構成ファイルを目的の z-parity または 3-parity ファイルで調整し、 -fix を使用して再作成することで、あるフォーマットから別のフォーマットに +

構成ファイルを目的の `z-parity` または `3-parity` ファイルで調整し、 +`fix` を使用して再作成することで、あるフォーマットから別のフォーマットに 変換することが可能です。 -

-
-

+

7.4 content FILE -

+

ディスクアレイに存在するすべてのファイルの一覧とチェックサムを保存するために使用するファイルを 定義します。

データ、パリティ、またはその他の利用可能なディスクに配置できます。 -データディスクを使用する場合、このファイルは sync プロセスから自動的に +データディスクを使用する場合、このファイルは `sync` プロセスから自動的に 除外されます。

このオプションは必須であり、同じファイルを複数コピー保存するために複数回使用できます。

使用するパリティディスクごとに**少なくとも1つのコピー**と、さらに**1つのコピー**を 保存する必要があります。追加のコピーを使用しても害はありません。 -

-
-

+

7.5 data NAME DIR -

+

アレイ内のデータディスクの名前とマウントポイントを定義します。 NAME はディスクを識別するために使用され、**一意である**必要があります。 DIR はファイルシステム内のディスクの**マウントポイント**です。

NAME を固定したままにしておけば、必要に応じてマウントポイントを変更できます。

アレイ内のデータディスクごとに1つのオプションを使用する必要があります。 -

構成ファイルで直接 NAME を変更してから sync コマンドを実行することで、 +

構成ファイルで直接 NAME を変更してから `sync` コマンドを実行することで、 後でディスクの名前を変更できます。 名前変更の場合、関連付けはディスクの保存されたUUIDを使用して行われます。 -

-
-

-extra NAME DIR -

-

smart および probe コマンドで監視する追加ディスクの名前とマウ -ントポイントを定義します。 -

これは、ブートディスクなど、アレイの一部ではないがシステムの機能に必 -要なディスクを監視するのに役立ちます。 -

これらのディスクは常に回転していることが期待されるため、up およ -び down コマンドの影響を受けないことに注意してください。 -

-
-

+

7.6 nohidden -

+

すべての隠しファイルとディレクトリを除外します。 -Unixでは、隠しファイルは . で始まるファイルです。 +Unixでは、隠しファイルは `.` で始まるファイルです。 Windowsでは、隠し属性を持つファイルです。 -

-
-

+

7.7 exclude/include PATTERN -

+

syncプロセスで除外または含めるファイルまたはディレクトリのパターンを定義します。 すべてのパターンは指定された順序で処理されます。 -

一致する最初のパターンが exclude の場合、ファイルは除外されます。 -include の場合、ファイルは含まれます。 -パターンが一致しない場合、最後に指定されたパターンが include の場合はファイルは除外され、 -exclude の場合は含まれます。 +

一致する最初のパターンが `exclude` の場合、ファイルは除外されます。 +`include` の場合、ファイルは含まれます。 +パターンが一致しない場合、最後に指定されたパターンが `include` の場合はファイルは除外され、 +`exclude` の場合は含まれます。

パターン仕様の詳細については、PATTERNセクションを参照してください。

このオプションは複数回使用できます。 -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

パリティの基本ブロックサイズをキビバイト単位で定義します。 1キビバイトは1024バイトです。

デフォルトのブロックサイズは256であり、ほとんどの場合に機能するはずです。 @@ -1567,7 +1321,7 @@ blocksize SIZE_IN_KIBIBYTES

概算として、ファイルごとにブロックサイズの半分が浪費されると仮定できます。 たとえば、100,000ファイルと256 KiBのブロックサイズがある場合、12.8 GBのパリティが浪費され、 これによりデータディスク上で12.8 GB少ないスペースしか利用できなくなる可能性があります。 -

status を使用して、各ディスクの浪費スペースの量を確認できます。 +

`status` を使用して、各ディスクの浪費スペースの量を確認できます。 これは、データディスク上に**空き**として残す必要がある、またはアレイに含まれないファイルに 使用する必要があるスペースの量です。 この値が負の場合、パリティが満杯に近づいていることを意味し、まだ浪費できるスペースを @@ -1578,16 +1332,16 @@ blocksize SIZE_IN_KIBIBYTES 浪費スペースはありません。

Linuxでより大きなパリティパーティションを取得するトリックは、次のコマンドで フォーマットすることです。 -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

これにより、約1.5%の追加スペース、4 TBディスクで約60 GBが得られ、 浪費スペースなしで各データディスクで約460,000ファイルが可能になります。 -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

保存されたブロックのハッシュサイズをバイト単位で定義します。

デフォルトのハッシュサイズは16バイト(128ビット)であり、ほとんどの場合に機能するはずです。

**警告!** このオプションはエキスパートのみを対象としており、この値を変更しないことを強く @@ -1614,23 +1368,19 @@ RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 16) / (512 \cdot 2^{10}) = 0.96 \tex

 RAM = $(8 \cdot 4 \cdot 10^{12}) \cdot (1 + 8) / (512 \cdot 2^{10}) = 0.51 \text{ GiB}$
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

処理された指定されたGB量後に、同期またはスクラビング時に状態を自動的に保存します。 このオプションは、マシンクラッシュやその他のイベントによって中断された場合に、 -長い sync コマンドを最初から再起動するのを避けるのに役立ちます。 -

-
-

+長い `sync` コマンドを最初から再起動するのを避けるのに役立ちます。 +

7.11 temp_limit TEMPERATURE_CELSIUS -

+

許容される最大ディスク温度を摂氏で設定します。指定されている場合、 SnapRAIDは smartctl ツールを使用してすべてのディスクの温度を定期的にチェックします。 SnapRAIDが動作している間、現在のディスク温度が表示されます。 -いずれかのディスクがこの制限を超えると、すべての操作が停止し、ディスクは temp_sleep +いずれかのディスクがこの制限を超えると、すべての操作が停止し、ディスクは `temp_sleep` オプションで定義された期間、スピンダウン(スタンバイ状態に移行)されます。 スリープ期間後、操作は再開されますが、温度制限に再度達した場合は再び一時停止する 可能性があります。 @@ -1648,85 +1398,82 @@ SnapRAIDの動作には影響しません。プログラムの動作は、実際 使用します。

通常、SnapRAIDは最も熱いディスクの温度のみを表示します。 すべてのディスクの温度を表示するには、-A または --stats オプションを使用します。 -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

温度制限に達したときのスタンバイ時間(分単位)を設定します。この期間中、ディスクは スピンダウンしたままです。デフォルトは5分です。 -

-
-

+

7.13 pool DIR -

-

pool コマンドを使用してディスクアレイの仮想ビューが作成されるプーリングディレクトリを + +

`pool` コマンドを使用してディスクアレイの仮想ビューが作成されるプーリングディレクトリを 定義します。

ディレクトリは既に存在している必要があります。 -

-
-

+

7.14 share UNC_DIR -

+

ディスクにリモートでアクセスするために必要なWindows UNCパスを定義します。

このオプションが指定されている場合、プールディレクトリに作成されたシンボリックリンクは、 ディスクにアクセスするためにこのUNCパスを使用します。 このオプションがない場合、生成されたシンボリックリンクはローカルパスのみを使用し、 プールディレクトリをネットワーク経由で共有することはできません。 -

シンボリックリンクは、指定されたUNCパスを使用して形成され、data オプションで +

シンボリックリンクは、指定されたUNCパスを使用して形成され、`data` オプションで 指定されたディスク名を追加し、最後にファイルのディレクトリと名前を追加します。

このオプションはWindowsでのみ必要です。 -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

各ディスクのSMART属性を取得するためのカスタムsmartctlオプションを定義します。 これは、RAIDコントローラーや一部のUSBディスクが自動検出できない場合に必要になる -ことがあります。%s プレースホルダーはデバイス名に置き換えられますが、 +ことがあります。`%s` プレースホルダーはデバイス名に置き換えられますが、 RAIDコントローラーなどの固定デバイスではオプションです。 -

DISK は data オプションで指定されたのと同じディスク名です。 -PARITY はパリティ名のいずれかです:parity、2-parity、3-parity、 -4-parity、5-parity、6-parity、または z-parity。 -

指定された OPTIONS で、%s 文字列はデバイス名に置き換えられます。 +

DISK は `data` オプションで指定されたのと同じディスク名です。 +PARITY はパリティ名のいずれかです:`parity`、`2-parity`、`3-parity`、 +`4-parity`、`5-parity`、`6-parity`、または `z-parity`。 +

指定された OPTIONS で、`%s` 文字列はデバイス名に置き換えられます。 RAIDコントローラーの場合、デバイスは固定されている可能性が高いため、 -%s を使用する必要はないかもしれません。 +`%s` を使用する必要はないかもしれません。

使用可能なオプションについては、smartmontoolsのドキュメントを参照してください。 -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

例: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

ディスク障害の確率を計算するときに、指定されたSMART属性を無視します。 このオプションは、ディスクが特定の属性について異常な値または誤解を招く値を報告する場合に 役立ちます。 -

DISK は data オプションで指定されたのと同じディスク名です。 -PARITY はパリティ名のいずれかです:parity、2-parity、3-parity、 -4-parity、5-parity、6-parity、または z-parity。 -特殊な値 * は、すべてのディスクで属性を無視するために使用できます。 -

例として、すべてのディスクで Current Pending Sector Count 属性を無視するには: -

+

DISK は `data` オプションで指定されたのと同じディスク名です。 +PARITY はパリティ名のいずれかです:`parity`、`2-parity`、`3-parity`、 +`4-parity`、`5-parity`、`6-parity`、または `z-parity`。 +特殊な値 `*` は、すべてのディスクで属性を無視するために使用できます。 +

例として、すべてのディスクで `Current Pending Sector Count` 属性を無視するには: +

+
 smartignore * 197
 
+

最初のパリティディスクでのみ無視するには: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Unixの一般的な構成の例は次のとおりです。 -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1740,8 +1487,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Windowsの一般的な構成の例は次のとおりです。 -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1756,260 +1505,170 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

パターンは、含めるファイルまたは除外するファイルをフィルタリングするための柔軟な方法を -提供します。グロブ文字を使用することで、すべてのパスを手動でリストすることなく、 -特定のファイル名やディレクトリ構造全体に一致するルールを定義できます。 -

疑問符 ? は、ディレクトリ区切り文字を除く任意の1文字に一致します。 -これにより、パターンを単一のディレクトリレベルに限定したまま、可変文字を -持つファイル名と一致させるのに役立ちます。 -

単一のアスタリスク * は任意の文字列に一致しますが、疑問符と同様に -ディレクトリの境界を越えることはありません。スラッシュで停止するため、 -単一のパスコンポーネント内での一致に適しています。これは、シェルの -グロブでおなじみの標準的なワイルドカードの動作です。 -

ダブルアスタリスク ** はより強力で、ディレクトリ区切り文字を含む -任意の文字列に一致します。これにより、パターンが複数のディレクトリレベルを -またいで一致できるようになります。** がパターン内に直接埋め込まれている場合、 -周囲のリテラルテキストの間にあるスラッシュを含む0文字以上の文字に一致します。 -

** の最も重要な使い方は、特別な形式である /**/ です。これは -0個以上の完全なディレクトリレベルに一致し、正確なパス構造を知らなくても、 -ディレクトリツリー内の任意の深さにあるファイルと一致させることができます。 -例えば、パターン src/**/main.js は src/main.js(ディレクトリを0個スキップ)、 -src/ui/main.js(1個スキップ)、src/ui/components/main.js(2個スキップ) -に一致します。 -

角括弧 [] を使用した文字クラスは、指定されたセットまたは範囲の -任意の1文字に一致します。他の単一文字パターンと同様に、 -ディレクトリ区切り文字には一致しません。クラスは範囲と、感嘆符を -使用した否定をサポートしています。 -

覚えておくべき根本的な違いは、*、?、および文字クラスはすべて -ディレクトリの境界を尊重し、単一のパスコンポーネント内でのみ一致するのに対し、 -** はディレクトリ区切り文字をまたいで一致できる唯一のパターンであるということです。 + +

パターンは、プロセスで除外または含めるファイルのサブセットを選択するために使用されます。

4つの異なる種類のパターンがあります。 -

-
-
+

+ +
FILE -
-FILE という名前の任意のファイルを選択します。 -このパターンはファイルにのみ適用され、ディレクトリには適用されません。 -
- - -
-
-
+
+FILE という名前の任意のファイルを選択します。* や ? などのグロブ文字、 +および [a-z] などの文字クラスを使用できます。 +このパターンは**ファイルのみ**に適用され、ディレクトリには適用されません。 +
+ + +
DIR/ -
-DIR という名前の任意のディレクトリとその中のすべてを選択します。 -このパターンはディレクトリにのみ適用され、ファイルには適用されません。 -
- - -
-
-
+
+DIR という名前の任意のディレクトリと、その中のすべてを選択します。 +* や ? などのグロブ文字を使用できます。 +このパターンは**ディレクトリのみ**に適用され、ファイルには適用されません。 +
+ + +
/PATH/FILE -
-指定された正確なファイル パスを選択します。このパターンは -ファイルにのみ適用され、ディレクトリには適用されません。 -
- - -
-
-
+
+正確に指定されたファイルパスを選択します。* や ? などのグロブ文字を +使用できますが、**ディレクトリスラッシュには一致しません**。 +このパターンは**ファイルのみ**に適用され、ディレクトリには適用されません。 +
+ + +
/PATH/DIR/ -
-指定された正確なディレクトリ パスとその中のすべてを選択します。 -このパターンはディレクトリにのみ適用され、ファイルには適用されません。 -
- - -
-
-
+
+正確に指定されたディレクトリパスと、その中のすべてを選択します。* や ? などの +グロブ文字を使用できますが、**ディレクトリスラッシュには一致しません**。 +このパターンは**ディレクトリのみ**に適用され、ファイルには適用されません。 +
+ + +
/ で始まる絶対パスを指定する場合、それはローカルファイルシステムのルートディレクトリではなく、 -
-
- - +
+

**アレイのルートディレクトリ**に適用されます。

Windowsでは、フォワードスラッシュ / の代わりにバックスラッシュ \ を使用できます。 Windowsシステムディレクトリ、ジャンクション、マウントポイント、およびその他のWindowsの 特殊ディレクトリはファイルとして扱われます。つまり、それらを除外するには、 ディレクトリルールではなく**ファイルルール**を使用する必要があります。 -

ファイル名に *、?、[、または ] 文字が含まれている場合は、 +

ファイル名に '*'、'?'、'['、または ']' 文字が含まれている場合は、 グロブ文字として解釈されないように**エスケープ**する必要があります。 -Unixではエスケープ文字は \ です。Windowsでは ^ です。 +Unixではエスケープ文字は '\' です。Windowsでは '^' です。 パターンがコマンドラインにある場合は、コマンドシェルによって解釈されるのを防ぐために、 エスケープ文字を**2倍**にする必要があります。

構成ファイルでは、処理するファイルをフィルタリングするために異なる戦略を使用できます。 最も簡単なアプローチは、**除外**したいすべてのファイルとディレクトリを削除するために、 -exclude ルールのみを使用することです。例: -

-# *.unrecoverable という名前の任意のファイルを除外
+`exclude` ルールのみを使用することです。例:
+

+
+# `*.unrecoverable` という名前の任意のファイルを除外
 exclude *.unrecoverable
-# ルートディレクトリ /lost+found を除外
+# ルートディレクトリ `/lost+found` を除外
 exclude /lost+found/
-# tmp という名前の任意のサブディレクトリを除外
+# `tmp` という名前の任意のサブディレクトリを除外
 exclude tmp/
 
-

反対のアプローチは、include ルールのみを使用して、**処理したいファイルのみ**を +

+

反対のアプローチは、`include` ルールのみを使用して、**処理したいファイルのみ**を 定義することです。例: -

+

+
 # 一部のディレクトリのみを含める
 include /movies/
 include /musics/
 include /pictures/
 
-

最後の方法としては、exclude と include ルールを混在させます。この場合、 +

+

最後の方法としては、`exclude` と `include` ルールを混在させます。この場合、 **ルールの順序が重要**です。前のルールは後のルールよりも優先されます。 -簡素化するために、すべての exclude ルールを最初にリストし、次にすべての include +簡素化するために、すべての `exclude` ルールを最初にリストし、次にすべての `include` ルールをリストできます。例: -

-# *.unrecoverable という名前の任意のファイルを除外
+

+
+# `*.unrecoverable` という名前の任意のファイルを除外
 exclude *.unrecoverable
-# tmp という名前の任意のサブディレクトリを除外
+# `tmp` という名前の任意のサブディレクトリを除外
 exclude tmp/
 # 一部のディレクトリのみを含める
 include /movies/
 include /musics/
 include /pictures/
 
-

コマンドラインで -f オプションを使用する場合、include パターンのみを +

+

コマンドラインで -f オプションを使用する場合、`include` パターンのみを 使用できます。例: -

+

+
 # .mp3 ファイルのみをチェック。
 # Unixでは、シェルによるグロブ展開を防ぐために引用符を使用。
 snapraid -f "*.mp3" check
 
+

Unixでは、コマンドラインでグロブ文字を使用する場合、シェルがそれらを展開するのを 防ぐために引用符で囲む必要があります。 -

-
-

-Ignore File -

-

設定ファイルのグローバルルールに加えて、アレイ内の任意のディレクトリに -.snapraidignore ファイルを配置して、分散型の除外ルールを定義できます。 -

.snapraidignore で定義されたルールは、設定ファイルのルールの後に -適用されます。これは、それらがより高い優先度を持ち、グローバル設定で -以前に含まれていたファイルを除外するために使用できることを意味します。 -事実上、ローカルルールが一致する場合、グローバルな包含設定に関係なく、 -ファイルは除外されます。 -

.snapraidignore のパターンロジックはグローバル設定を反映していますが、 -パターンはそのファイルが配置されているディレクトリに固定されます: -

-
-
-FILE -
-このディレクトリまたはその下にある、FILE という名前の任意のファイルを -選択します。これは、グローバルパターンと同じグロッビングルールに従います。 -
-
-
-
-
-
-DIR/ -
-このディレクトリまたはその下にある、DIR という名前の任意のディレクトリと -その中のすべてを選択します。 -
-
-
-
-
-
-/PATH/FILE -
-.snapraidignore ファイルの場所を基準にして、指定された正確な -ファイルを選択します。 -
-
-
-
-
-
-/PATH/DIR/ -
-.snapraidignore ファイルの場所を基準にして、指定された正確な -ディレクトリとその中のすべてを選択します。 -
-
-
-

グローバル設定とは異なり、.snapraidignore ファイルは除外ルールのみを -サポートします。include パターンや否定 (!) は使用できません。 -

たとえば、/mnt/disk1/projects/ に .snapraidignore がある場合: -

-# /mnt/disk1/projects/output.bin のみを除外
-/output.bin
-# projects/ 内の build という名前のディレクトリをすべて除外
-build/
-# projects/ またはそのサブフォルダ内のすべての .tmp ファイルを除外
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAIDは、ファイルの一覧とチェックサムをコンテンツファイルに保存します。

これはバイナリファイルであり、ディスクアレイに存在するすべてのファイルと、 それらの整合性を検証するためのすべてのチェックサムを一覧表示します。 -

このファイルは sync および scrub コマンドによって読み書きされ、 -fix、check、および status コマンドによって読み取られます。 -

-
-

+

このファイルは `sync` および `scrub` コマンドによって読み書きされ、 +`fix`、`check`、および `status` コマンドによって読み取られます。 +

10 Parity -

+

SnapRAIDは、アレイのパリティ情報をパリティファイルに保存します。 -

これらはバイナリファイルであり、content ファイルで定義されたすべてのブロックの +

これらはバイナリファイルであり、`content` ファイルで定義されたすべてのブロックの 計算されたパリティが含まれています。 -

これらのファイルは sync および fix コマンドによって読み書きされ、 -scrub および check コマンドによって**読み取られるだけ**です。 -

-
-

+

これらのファイルは `sync` および `fix` コマンドによって読み書きされ、 +`scrub` および `check` コマンドによって**読み取られるだけ**です。 +

11 Encoding -

+

UnixのSnapRAIDは、エンコーディングを無視します。ファイルシステムで使用されている のと同じエンコーディングでファイル名を読み取り、保存します。

Windowsでは、ファイルシステムから読み取られたすべての名前はUTF-8形式に変換され、 処理されます。 -

ファイル名を正しく出力するには、chcp 65001 コマンドでWindowsコンソールをUTF-8モードに設定し、 -コンソールフォントとして Lucida Console などのTrueTypeフォントを**使用する**必要があります。 +

ファイル名を正しく出力するには、`chcp 65001` コマンドでWindowsコンソールをUTF-8モードに設定し、 +コンソールフォントとして `Lucida Console` などのTrueTypeフォントを**使用する**必要があります。 これは出力されるファイル名にのみ影響します。コンソール出力をファイルにリダイレクトする場合、 結果のファイルは常にUTF-8形式になります。 -

+

+

+

-
-
-
+
- - + diff --git a/manual-ko.html b/manual-ko.html index 2e0ecfe6..7229c5a8 100644 --- a/manual-ko.html +++ b/manual-ko.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID는 디스크 어레이를 위해 설계된 백업 프로그램으로, 최대 6개의 디스크 오류가 발생해도 데이터를 복구하기 위한 패리티 정보를 저장합니다. @@ -182,14 +127,14 @@ SnapRAID는 데이터를 가두지 않습니다. 언제든지 포맷하거나

더 자세한 정보는 공식 SnapRAID 사이트를 방문하십시오: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID는 RAID와 백업 프로그램의 하이브리드로, 두 가지의 장점을 결합하는 것을 목표로 합니다. 하지만, 사용 전에 고려해야 할 몇 가지 제한 사항이 있습니다. @@ -225,13 +170,11 @@ SnapRAID는 제한된 수의 디스크 오류에서만 데이터를 복구할 권한, 소유권, 확장 속성은 저장되지 않습니다. -

-
-

+

4 Getting Started -

+

SnapRAID를 사용하려면, 먼저 디스크 어레이에서 하나의 디스크를 -parity(패리티) 정보 전용으로 선택해야 합니다. 하나의 패리티 디스크로 +`parity`(패리티) 정보 전용으로 선택해야 합니다. 하나의 패리티 디스크로 RAID5와 유사하게 단일 디스크 오류로부터 복구할 수 있습니다.

RAID6와 유사하게 더 많은 디스크 오류로부터 복구하려면, 추가 디스크를 패리티용으로 예약해야 합니다. 추가 패리티 디스크 @@ -239,29 +182,32 @@ RAID5와 유사하게 단일 디스크 오류로부터 복구할 수 있습니

패리티 디스크로는 어레이에서 가장 큰 디스크를 선택해야 합니다. 패리티 정보가 어레이에서 가장 큰 **데이터 디스크**의 크기만큼 커질 수 있기 때문입니다. -

이 디스크들은 parity 파일을 저장하는 데 전념하게 됩니다. +

이 디스크들은 `parity` 파일을 저장하는 데 전념하게 됩니다. 여기에 데이터를 저장해서는 안 됩니다. -

다음으로, SnapRAID로 보호하려는 data(데이터) 디스크를 정의해야 합니다. +

다음으로, SnapRAID로 보호하려는 `data`(데이터) 디스크를 정의해야 합니다. 이 디스크들이 **거의 변경되지 않는 데이터**를 포함할 때 보호 효과가 더 좋습니다. 이러한 이유로, Windows C:\ 디스크나 Unix의 /home, /var, /tmp 디렉토리를 포함하지 않는 것이 좋습니다. -

파일 목록은 content 파일에 저장되며, 보통 데이터, 패리티, 또는 부트 +

파일 목록은 `content` 파일에 저장되며, 보통 데이터, 패리티, 또는 부트 디스크에 저장됩니다. 이 파일에는 무결성을 확인하기 위한 모든 체크섬을 포함하여 백업에 대한 세부 정보가 들어 있습니다. -content 파일은 여러 복사본으로 저장되며, 다중 디스크 오류의 경우에도 +`content` 파일은 여러 복사본으로 저장되며, 다중 디스크 오류의 경우에도 적어도 하나의 복사본을 사용할 수 있도록 각 복사본은 서로 다른 디스크에 있어야 합니다.

예를 들어, 하나의 패리티 보호 수준만 원하고 디스크가 다음과 같이 위치한다고 가정해 봅시다: -

+

+
 /mnt/diskp <- 패리티용으로 선택된 디스크
 /mnt/disk1 <- 보호할 첫 번째 디스크
 /mnt/disk2 <- 보호할 두 번째 디스크
 /mnt/disk3 <- 보호할 세 번째 디스크
 
+

다음 옵션으로 설정 파일 /etc/snapraid.conf를 생성해야 합니다: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -270,9 +216,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Windows를 사용하는 경우, 슬래시 대신 드라이브 문자 및 백슬래시를 사용하는 Windows 경로 형식을 사용해야 합니다. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -281,34 +229,40 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

디스크가 많아 드라이브 문자가 부족한 경우, 디스크를 하위 폴더에 직접 마운트할 수 있습니다. 다음을 참조하십시오: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

이 시점에서, 패리티 정보를 빌드하기 위해 sync 명령을 실행할 +

+

이 시점에서, 패리티 정보를 빌드하기 위해 `sync` 명령을 실행할 준비가 되었습니다. -

+

+
 snapraid sync
 
+

이 프로세스는 디스크에 이미 존재하는 데이터의 크기에 따라 첫 실행 시 몇 시간이 걸릴 수 있습니다. 디스크가 비어 있으면 프로세스는 즉시 완료됩니다.

Ctrl+C를 눌러 언제든지 중지할 수 있으며, 다음 실행 시 중단된 곳에서 재개됩니다.

이 명령이 완료되면 데이터는 **SAFE**합니다. -

이제 어레이를 원하는 대로 사용하고 주기적으로 sync 명령을 +

이제 어레이를 원하는 대로 사용하고 주기적으로 `sync` 명령을 실행하여 패리티 정보를 업데이트할 수 있습니다. -

-

+

4.1 Scrubbing -

-

주기적으로 데이터 및 패리티의 오류를 확인하려면 scrub 명령을 + +

주기적으로 데이터 및 패리티의 오류를 확인하려면 `scrub` 명령을 실행할 수 있습니다. -

+

+
 snapraid scrub
 
-

이 명령은 데이터 무결성을 확인하기 위해 어레이의 데이터를 sync 명령 +

+

이 명령은 데이터 무결성을 확인하기 위해 어레이의 데이터를 `sync` 명령 중에 계산된 해시와 비교합니다.

이 명령을 실행할 때마다 이전에 10일 이내에 스크럽된 데이터를 제외하고 어레이의 약 8%를 확인합니다. @@ -316,34 +270,40 @@ snapraid scrub 지정하려면 -o, --older-than 옵션을 사용할 수 있습니다. 예를 들어, 20일보다 오래된 블록에 대해 어레이의 5%를 확인하려면 다음과 같이 사용합니다: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

이 프로세스 중에 무단 또는 입출력 오류가 발견되면, 해당 블록은 -content 파일에 bad로 표시되며 status 명령에 나열됩니다. -

+`content` 파일에 bad로 표시되며 `status` 명령에 나열됩니다.
+

+
 snapraid status
 
+

이들을 수정하려면 -e, --filter-error 옵션으로 bad 블록을 필터링하여 -fix 명령을 사용할 수 있습니다. -

+`fix` 명령을 사용할 수 있습니다.
+

+
 snapraid -e fix
 
-

다음 scrub 시에 오류가 실제로 수정되면 status 보고서에서 -사라집니다. 더 빠르게 하려면, -p bad를 사용하여 bad로 표시된 블록만 +

+

다음 `scrub` 시에 오류가 실제로 수정되면 `status` 보고서에서 +사라집니다. 더 빠르게 하려면, `-p bad`를 사용하여 bad로 표시된 블록만 스크럽할 수 있습니다. -

+

+
 snapraid -p bad scrub
 
-

동기화되지 않은 어레이에서 scrub을 실행하면 제거되거나 수정된 파일로 -인한 오류가 보고될 수 있습니다. 이러한 오류는 scrub 출력에는 +

+

동기화되지 않은 어레이에서 `scrub`을 실행하면 제거되거나 수정된 파일로 +인한 오류가 보고될 수 있습니다. 이러한 오류는 `scrub` 출력에는 보고되지만, 관련 블록은 bad로 표시되지 않습니다. -

-
-

+

4.2 Pooling -

-

참고: 아래에 설명된 풀링(pooling) 기능은 **mergerfs** 도구로 대체되었으며, + +

참고: 아래에 설명된 풀링(pooling) 기능은 **mergefs** 도구로 대체되었으며, 이는 SnapRAID 커뮤니티에서 Linux 사용자를 위한 권장 옵션입니다. Mergefs는 여러 드라이브를 단일 통합 마운트 지점으로 풀링하는 더 유연하고 효율적인 방법을 제공하여, 심볼릭 링크에 의존하지 않고 어레이 전체의 @@ -351,27 +311,36 @@ Mergefs는 여러 드라이브를 단일 통합 마운트 지점으로 풀링하 SnapRAID와 잘 통합되며, OpenMediaVault (OMV) 또는 사용자 정의 NAS 구성과 같은 설정에서 흔히 사용됩니다.

어레이의 모든 파일을 동일한 디렉토리 트리에 표시하려면, -pooling 기능을 활성화할 수 있습니다. 이 기능은 심볼릭 링크를 사용하여 +`pooling` 기능을 활성화할 수 있습니다. 이 기능은 심볼릭 링크를 사용하여 어레이의 모든 파일에 대한 읽기 전용 가상 뷰를 생성합니다. -

설정 파일에서 pooling 디렉토리를 다음과 같이 구성할 수 있습니다: -

+

설정 파일에서 `pooling` 디렉토리를 다음과 같이 구성할 수 있습니다: +

+
 pool /pool
 
+

또는 Windows에서 다음과 같이 합니다: -

+

+
 pool C:\pool
 
-

그리고 나서 pool 명령을 실행하여 가상 뷰를 생성하거나 업데이트합니다. -

+
+

그리고 나서 `pool` 명령을 실행하여 가상 뷰를 생성하거나 업데이트합니다. +

+
 snapraid pool
 
+

Unix 플랫폼을 사용하고 이 디렉토리를 Windows 또는 Unix 컴퓨터에 네트워크를 통해 공유하려면, /etc/samba/smb.conf에 다음 옵션을 추가해야 합니다: -

+

+
 # smb.conf의 global 섹션에서
 unix extensions = no
 
+
+
 # smb.conf의 share 섹션에서
 [pool]
@@ -382,102 +351,116 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

Windows에서 네트워크를 통해 심볼릭 링크를 공유하려면 클라이언트가 원격으로 이들을 해석해야 합니다. 이를 활성화하기 위해, 풀 디렉토리를 공유하는 것 외에도, 설정 파일에 정의된 디스크 이름을 공유 지점으로 사용하여 모든 디스크를 독립적으로 공유해야 합니다. 또한 설정 파일의 -share 옵션에서 원격 클라이언트가 이러한 공유 디스크에 액세스하는 데 +`share` 옵션에서 원격 클라이언트가 이러한 공유 디스크에 액세스하는 데 필요한 Windows UNC 경로를 지정해야 합니다. -

예를 들어, darkstar라는 서버에서 작업하는 경우, 다음 옵션을 +

예를 들어, `darkstar`라는 서버에서 작업하는 경우, 다음 옵션을 사용할 수 있습니다: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

그리고 네트워크를 통해 다음 디렉토리를 공유합니다: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

이렇게 하면 원격 클라이언트가 \\darkstar\pool에서 모든 파일에 액세스할 수 있습니다.

또한 다음 명령으로 원격 클라이언트를 구성하여 원격 심볼릭 링크에 대한 액세스를 활성화해야 할 수도 있습니다: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID는 RAID 시스템보다는 백업 프로그램처럼 작동하며, -f, --filter 옵션을 사용하여 파일이나 디렉토리를 이전 상태로 복원하거나 삭제 취소할 수 있습니다: -

+

+
 snapraid fix -f FILE
 
+

또는 디렉토리에 대해: -

+

+
 snapraid fix -f DIR/
 
+

또한 -m, --filter-missing 옵션을 사용하여 디렉토리 내에서 실수로 삭제된 파일만 복구할 수도 있습니다. 이 옵션은 누락된 파일만 복원하고 다른 파일은 그대로 둡니다. -

+

+
 snapraid fix -m -f DIR/
 
+

또는 모든 드라이브에서 삭제된 모든 파일을 다음으로 복구합니다: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

최악의 상황이 발생하여 하나 이상의 디스크를 잃었습니다!

**패닉하지 마십시오!** 복구할 수 있습니다!

가장 먼저 해야 할 일은 디스크 어레이에 대한 추가 변경을 피하는 것입니다. 모든 원격 연결과 SnapRAID 야간 동기화 또는 스크럽을 포함한 모든 예약된 프로세스를 비활성화하십시오.

그런 다음 다음 단계를 진행하십시오. -

-

+

4.4.1 STEP 1 -> Reconfigure -

+

복구할 공간이 필요하며, 이상적으로는 추가 예비 디스크에, 하지만 외부 USB 디스크 또는 원격 디스크로도 충분합니다. -

SnapRAID 설정 파일을 수정하여 실패한 디스크의 data 또는 parity +

SnapRAID 설정 파일을 수정하여 실패한 디스크의 `data` 또는 `parity` 옵션이 파일을 복구할 수 있는 충분한 빈 공간이 있는 위치를 가리키도록 합니다. -

예를 들어, 디스크 d1이 실패한 경우, 다음에서 변경합니다: -

+

예를 들어, 디스크 `d1`이 실패한 경우, 다음에서 변경합니다: +

+
 data d1 /mnt/disk1/
 
+

다음으로: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

복구할 디스크가 패리티 디스크인 경우, 적절한 parity 옵션을 +

+

복구할 디스크가 패리티 디스크인 경우, 적절한 `parity` 옵션을 업데이트합니다. 여러 개의 실패한 디스크가 있는 경우, 모든 구성 옵션을 업데이트합니다. -

-
-

+

4.4.2 STEP 2 -> Fix -

+

로그를 외부 파일에 저장하면서 fix 명령을 실행합니다: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

여기서 NAME은 이전 예제의 d1과 같은 디스크 이름입니다. -복구할 디스크가 패리티 디스크인 경우, parity, 2-parity 등의 이름을 +

+

여기서 NAME은 이전 예제의 `d1`과 같은 디스크 이름입니다. +복구할 디스크가 패리티 디스크인 경우, `parity`, `2-parity` 등의 이름을 사용합니다. 여러 개의 실패한 디스크가 있는 경우, 여러 -d 옵션을 사용하여 모두 지정합니다. @@ -485,293 +468,234 @@ snapraid -d NAME -l fix.log fix

fix.log 파일을 저장할 몇 기가바이트의 여유 공간이 있는지 확인하십시오. 충분한 여유 공간이 있는 디스크에서 실행하십시오.

이제 복구할 수 있는 모든 것을 복구했습니다. 일부 파일이 부분적으로 -또는 완전히 복구 불가능한 경우, .unrecoverable 확장자가 추가되어 +또는 완전히 복구 불가능한 경우, `.unrecoverable` 확장자가 추가되어 이름이 변경됩니다. -

unrecoverable:로 시작하는 모든 줄을 확인하여 fix.log 파일에서 +

`unrecoverable:`로 시작하는 모든 줄을 확인하여 fix.log 파일에서 복구 불가능한 모든 블록의 자세한 목록을 찾을 수 있습니다.

복구가 만족스럽지 않으면, 원하는 만큼 여러 번 재시도할 수 있습니다. -

예를 들어, 마지막 sync 이후 어레이에서 파일을 제거한 경우, +

예를 들어, 마지막 `sync` 이후 어레이에서 파일을 제거한 경우, 일부 파일이 복구되지 않을 수 있습니다. -이 경우, -i, --import 옵션을 사용하여 fix를 재시도하고, +이 경우, -i, --import 옵션을 사용하여 `fix`를 재시도하고, 이 파일들이 현재 어디에 있는지 지정하여 복구 프로세스에 다시 포함시킬 수 있습니다. -

복구가 만족스럽다면 계속 진행할 수 있지만, 동기화 후에는 fix 명령을 +

복구가 만족스럽다면 계속 진행할 수 있지만, 동기화 후에는 `fix` 명령을 더 이상 재시도할 수 없다는 점에 유의하십시오! -

-
-

+

4.4.3 STEP 3 -> Check -

-

조심스러운 확인으로, 이제 check 명령을 실행하여 복구된 디스크의 + +

조심스러운 확인으로, 이제 `check` 명령을 실행하여 복구된 디스크의 모든 것이 올바른지 확인할 수 있습니다. -

+

+
 snapraid -d NAME -a check
 
-

여기서 NAME은 이전 예제의 d1과 같은 디스크 이름입니다. -

-
-
+
+

여기서 NAME은 이전 예제의 `d1`과 같은 디스크 이름입니다. +

+ +
-d 및 -a 옵션은 SnapRAID에게 지정된 디스크만 확인하고 모든 패리티 -
-
- - +
+

데이터를 무시하도록 지시합니다.

이 명령은 오랜 시간이 걸리지만, 지나치게 조심스럽지 않다면 건너뛸 수 있습니다. -

-
-

+

4.4.4 STEP 4 -> Sync -

-

sync 명령을 실행하여 새 디스크로 어레이를 재동기화합니다. -

+
+

`sync` 명령을 실행하여 새 디스크로 어레이를 재동기화합니다. +

+
 snapraid sync
 
+

모든 것이 복구되면 이 명령은 즉시 완료됩니다. -

-
-
-
-

+

5 Commands -

+

SnapRAID는 다음을 허용하는 몇 가지 간단한 명령을 제공합니다:

  • -어레이의 상태 출력 -> status +어레이의 상태 출력 -> `status`
  • -디스크 제어 -> smart, probe, up, down +디스크 제어 -> `smart`, `probe`, `up`, `down`
  • -백업/스냅샷 생성 -> sync +백업/스냅샷 생성 -> `sync`
  • -주기적으로 데이터 확인 -> scrub +주기적으로 데이터 확인 -> `scrub`
  • -마지막 백업/스냅샷 복원 -> fix. +마지막 백업/스냅샷 복원 -> `fix`.

명령은 소문자로 작성해야 합니다. -

-

+

5.1 status -

+

디스크 어레이의 상태 요약을 출력합니다.

패리티 단편화, 확인 없이 블록이 얼마나 오래되었는지, 그리고 스크럽 중에 발생한 모든 기록된 무단 오류에 대한 정보를 포함합니다. -

제시된 정보는 마지막으로 sync를 실행했을 때를 나타냅니다. +

제시된 정보는 마지막으로 `sync`를 실행했을 때를 나타냅니다. 나중에 수정된 내용은 고려되지 않습니다.

bad 블록이 감지되면 해당 블록 번호가 나열됩니다. -이들을 수정하려면 fix -e 명령을 사용할 수 있습니다. +이들을 수정하려면 `fix -e` 명령을 사용할 수 있습니다.

또한 각 블록이 마지막으로 스크럽되거나 동기화된 시간을 나타내는 -그래프를 보여줍니다. 스크럽된 블록은 *, 동기화되었지만 아직 -스크럽되지 않은 블록은 o로 표시됩니다. +그래프를 보여줍니다. 스크럽된 블록은 '*', 동기화되었지만 아직 +스크럽되지 않은 블록은 'o'로 표시됩니다.

아무것도 수정되지 않습니다. -

-
-

+

5.2 smart -

+

시스템의 모든 디스크에 대한 SMART 보고서를 출력합니다.

향후 1년 동안의 실패 확률 추정치를 포함하여, 의심스러운 속성을 보이는 디스크의 유지 보수 교체를 계획할 수 있습니다.

이 확률 추정치는 다음에서 사용 가능한 Backblaze 데이터와 디스크의 SMART 속성을 상호 연관시켜 얻습니다: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
+

SMART가 디스크가 실패하고 있다고 보고하면, 해당 디스크에 대해 -FAIL 또는 PREFAIL이 출력되며, SnapRAID는 오류를 반환하며 종료됩니다. +`FAIL` 또는 `PREFAIL`이 출력되며, SnapRAID는 오류를 반환하며 종료됩니다. 이 경우, 디스크의 즉각적인 교체가 강력히 권장됩니다.

다른 가능한 상태 문자열은 다음과 같습니다: -

-
-
+

+ + + +
logfail -
+
과거에 일부 속성이 임계값보다 낮았습니다. - - -
-
+
logerr -
+
장치 오류 로그에 오류가 포함되어 있습니다. - - -
-
+
selferr -
+
장치 자체 테스트 로그에 오류가 포함되어 있습니다. - - - -
-
-
+
+ + +
-v, --verbose 옵션이 지정되면, 더 깊은 통계 분석이 제공됩니다. -
-
- - +
+

이 분석은 더 많거나 적은 패리티가 필요한지 결정하는 데 도움이 될 수 있습니다. -

이 명령은 smartctl 도구를 사용하며, 모든 장치에서 smartctl -a를 +

이 명령은 `smartctl` 도구를 사용하며, 모든 장치에서 `smartctl -a`를 실행하는 것과 동일합니다. -

장치가 올바르게 자동 감지되지 않으면, 설정 파일에서 smartctl 옵션을 +

장치가 올바르게 자동 감지되지 않으면, 설정 파일에서 `smartctl` 옵션을 사용하여 사용자 정의 명령을 지정할 수 있습니다.

아무것도 수정되지 않습니다. -

-
-

+

5.3 probe -

+

시스템의 모든 디스크의 POWER 상태를 출력합니다. -

Standby는 디스크가 회전하지 않음을 의미합니다. Active는 +

`Standby`는 디스크가 회전하지 않음을 의미합니다. `Active`는 디스크가 회전하고 있음을 의미합니다. -

이 명령은 smartctl 도구를 사용하며, 모든 장치에서 smartctl -n standby -i를 +

이 명령은 `smartctl` 도구를 사용하며, 모든 장치에서 `smartctl -n standby -i`를 실행하는 것과 동일합니다. -

장치가 올바르게 자동 감지되지 않으면, 설정 파일에서 smartctl 옵션을 +

장치가 올바르게 자동 감지되지 않으면, 설정 파일에서 `smartctl` 옵션을 사용하여 사용자 정의 명령을 지정할 수 있습니다.

아무것도 수정되지 않습니다. -

-
-

+

5.4 up -

+

어레이의 모든 디스크를 회전시킵니다(spin up). -

-
-
+

+ +
-d, --filter-disk 옵션을 사용하여 특정 디스크만 회전시킬 수 있습니다. -
-
- - +
+

모든 디스크를 동시에 회전시키려면 많은 전력이 필요합니다. 전원 공급 장치가 이를 지탱할 수 있는지 확인하십시오.

아무것도 수정되지 않습니다. -

-
-

+

5.5 down -

+

어레이의 모든 디스크를 회전 중지합니다(spin down). -

이 명령은 smartctl 도구를 사용하며, 모든 장치에서 smartctl -s standby,now를 +

이 명령은 `smartctl` 도구를 사용하며, 모든 장치에서 `smartctl -s standby,now`를 실행하는 것과 동일합니다. -

-
-
+

+ +
-d, --filter-disk 옵션을 사용하여 특정 디스크만 회전 중지할 수 있습니다. -
-
- - +
+

오류 발생 시 자동으로 회전 중지하려면, 다른 명령과 함께 -s, --spin-down-on-error -옵션을 사용할 수 있습니다. 이는 오류 발생 시 수동으로 down을 실행하는 것과 +옵션을 사용할 수 있습니다. 이는 오류 발생 시 수동으로 `down`을 실행하는 것과 동일합니다.

아무것도 수정되지 않습니다. -

-
-

+

5.6 diff -

-

마지막 sync 이후 수정되어 패리티 데이터를 재계산해야 하는 모든 파일을 + +

마지막 `sync` 이후 수정되어 패리티 데이터를 재계산해야 하는 모든 파일을 나열합니다.

이 명령은 파일 데이터를 확인하지 않고, 파일 타임스탬프, 크기 및 아이노드(inode)만 확인합니다.

모든 변경된 파일을 나열한 후, 다음과 같이 그룹화된 변경 사항 요약이 제시됩니다: -

-
-
+

+ + + + + + + +
equal -
+
이전과 변경되지 않은 파일. - - -
-
+
added -
+
이전에 없던 추가된 파일. - - -
-
+
removed -
+
제거된 파일. - - -
-
+
updated -
+
크기 또는 타임스탬프가 다른 파일, 즉 수정된 파일. - - -
-
+
moved -
+
동일한 디스크의 다른 디렉토리로 이동된 파일. 이들은 이름, 크기, 타임스탬프 및 아이노드가 동일하지만 디렉토리가 다른 것으로 식별됩니다. - - -
-
+
copied -
-원본 파일이 여전히 존재하는 동일한 디스크 또는 다른 -디스크에 복사된 파일. -이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니 -다. -하위 초 타임스탬프가 0인 경우, 이름뿐만 아니라 전체 경로가 -일치해야 식별됩니다. -
- -
-
-relocated -
-원본이 사라진 동일한 디스크 또는 다른 디스크로 이 -동된 파일. -이들은 동일한 이름, 크기 및 타임스탬프를 가짐으로써 식별됩니 -다. -하위 초 타임스탬프가 0인 경우, 식별을 위해 전체 경로가 일치 -해야 합니다. -동일한 디스크의 'moved' 파일과 달리, 재배치된 파일은 다른 -inode를 가집니다. -
-
-
-
+
+동일하거나 다른 디스크에 복사된 파일. 다른 디스크로 +실제로 이동된 경우 `removed`에도 포함된다는 점에 유의하십시오. +이들은 이름, 크기 및 타임스탬프가 동일한 것으로 식별됩니다. +하위 초 타임스탬프(sub-second timestamp)가 0인 경우, +이름뿐만 아니라 전체 경로가 일치해야 합니다. +
restored -
-inode는 다르지만 디렉토리, 이름, 크기 및 타임스탬 -프가 일치하는 파일. -이들은 대개 삭제된 후 복구된 파일들입니다. -
- - -

sync가 필요한 경우, 프로세스 반환 코드는 기본 0 대신 2입니다. +

+아이노드는 다르지만 이름, 크기 및 타임스탬프가 일치하는 파일. +이들은 일반적으로 삭제 후 복원된 파일입니다. +
+

`sync`가 필요한 경우, 프로세스 반환 코드는 기본 0 대신 2입니다. 반환 코드 1은 일반적인 오류 조건에 사용됩니다.

아무것도 수정되지 않습니다. -

-
-

+

5.7 sync -

+

패리티 정보를 업데이트합니다. 디스크 어레이의 모든 수정된 파일을 읽고 해당 패리티 데이터를 업데이트합니다.

이미 수행된 작업을 잃지 않고 Ctrl+C를 눌러 언제든지 이 프로세스를 중지할 수 있습니다. -다음 실행 시 sync 프로세스는 중단된 곳에서 재개됩니다. +다음 실행 시 `sync` 프로세스는 중단된 곳에서 재개됩니다.

이 프로세스 중에 무단 또는 입출력 오류가 발견되면, 해당 블록은 bad로 표시됩니다.

파일은 경로 및/또는 아이노드로 식별되며 크기와 타임스탬프로 @@ -782,27 +706,23 @@ sync 유지하면 패리티는 재계산되지 않습니다. 파일이 다른 디스크로 이동되면 패리티는 재계산되지만, 이전에 계산된 해시 정보는 유지됩니다. -

content 및 parity 파일은 필요한 경우 수정됩니다. +

`content` 및 `parity` 파일은 필요한 경우 수정됩니다. 어레이의 파일은 수정되지 않습니다. -

-
-

+

5.8 scrub -

+

어레이를 스크럽하여 데이터 및 패리티 디스크의 무단 또는 입출력 오류를 확인합니다.

각 호출은 이전에 10일 이내에 스크럽된 데이터를 제외하고 어레이의 약 8%를 확인합니다. 이는 일주일에 한 번 스크럽하면 모든 데이터 비트가 적어도 3개월마다 한 번씩 확인됨을 의미합니다. -

-
-
+

+ +
-p, --plan 옵션을 사용하여 다른 스크럽 계획 또는 양을 정의할 수 있으며, -
-
- - +
+

다음 값을 허용합니다: bad - bad로 표시된 블록 스크럽. new - 동기화되었지만 아직 스크럽되지 않은 블록 스크럽. @@ -812,113 +732,97 @@ full - 모든 것 스크럽. 얼마나 오래되었는지 정의할 수도 있습니다. 가장 오래된 블록이 먼저 스크럽되어 최적의 확인을 보장합니다. 동기화되었지만 아직 스크럽되지 않은 블록만 스크럽하려면, --p new 옵션을 사용하십시오. -

스크럽 상태의 세부 정보를 얻으려면 status 명령을 사용하십시오. -

발견된 모든 무단 또는 입출력 오류에 대해, 해당 블록은 content 파일에 +`-p new` 옵션을 사용하십시오. +

스크럽 상태의 세부 정보를 얻으려면 `status` 명령을 사용하십시오. +

발견된 모든 무단 또는 입출력 오류에 대해, 해당 블록은 `content` 파일에 bad로 표시됩니다. -이러한 bad 블록은 status에 나열되며 fix -e로 수정할 수 있습니다. +이러한 bad 블록은 `status`에 나열되며 `fix -e`로 수정할 수 있습니다. 수정 후, 다음 스크럽 시에 다시 확인되며, 수정된 것으로 발견되면 bad 표시는 제거됩니다. -bad 블록만 스크럽하려면 scrub -p bad 명령을 사용할 수 있습니다. +bad 블록만 스크럽하려면 `scrub -p bad` 명령을 사용할 수 있습니다.

동기화되지 않은 데이터로 인한 보고된 오류를 피하기 위해 동기화된 -어레이에서만 scrub을 실행하는 것이 좋습니다. 이러한 오류는 무단 +어레이에서만 `scrub`을 실행하는 것이 좋습니다. 이러한 오류는 무단 오류가 아닌 것으로 인식되며, 블록은 bad로 표시되지 않지만, 이러한 오류는 명령의 출력에 보고됩니다. -

content 파일은 각 블록의 마지막 확인 시간을 업데이트하고 bad 블록을 +

`content` 파일은 각 블록의 마지막 확인 시간을 업데이트하고 bad 블록을 표시하기 위해 수정됩니다. -parity 파일은 수정되지 않습니다. +`parity` 파일은 수정되지 않습니다. 어레이의 파일은 수정되지 않습니다. -

-
-

+

5.9 fix -

+

모든 파일과 패리티 데이터를 수정합니다. -

모든 파일과 패리티 데이터는 마지막 sync에 저장된 스냅샷 +

모든 파일과 패리티 데이터는 마지막 `sync`에 저장된 스냅샷 상태와 비교됩니다. 차이가 발견되면 저장된 스냅샷으로 되돌려집니다. -

**경고!** fix 명령은 오류와 의도적인 수정 사이를 구별하지 -않습니다. 파일 상태를 무조건 마지막 sync로 되돌립니다. +

**경고!** `fix` 명령은 오류와 의도적인 수정 사이를 구별하지 +않습니다. 파일 상태를 무조건 마지막 `sync`로 되돌립니다.

다른 옵션이 지정되지 않으면 전체 어레이가 처리됩니다. 필터 옵션을 사용하여 처리할 파일 또는 디스크의 하위 집합을 선택하십시오. -

sync 및 scrub 중에 bad로 표시된 블록만 수정하려면, +

`sync` 및 `scrub` 중에 bad로 표시된 블록만 수정하려면, -e, --filter-error 옵션을 사용하십시오. -다른 필터 옵션과 달리, 이 옵션은 최신 sync 이후 변경되지 않은 +다른 필터 옵션과 달리, 이 옵션은 최신 `sync` 이후 변경되지 않은 파일에만 수정을 적용합니다. -

SnapRAID는 수정할 수 없는 모든 파일에 .unrecoverable 확장자를 +

SnapRAID는 수정할 수 없는 모든 파일에 `.unrecoverable` 확장자를 추가하여 이름을 변경합니다. -

수정하기 전에, 전체 어레이를 스캔하여 마지막 sync 이후 이동된 +

수정하기 전에, 전체 어레이를 스캔하여 마지막 `sync` 이후 이동된 파일을 찾습니다. 이 파일들은 이름과 디렉토리를 무시하고 타임스탬프로 식별되며, 필요한 경우 복구 프로세스에 사용됩니다. 일부 파일을 어레이 외부로 이동한 경우, -i, --import 옵션을 사용하여 추가로 스캔할 디렉토리를 지정할 수 있습니다.

파일은 아이노드가 아닌 경로로만 식별됩니다. -

content 파일은 수정되지 않습니다. -parity 파일은 필요한 경우 수정됩니다. +

`content` 파일은 수정되지 않습니다. +`parity` 파일은 필요한 경우 수정됩니다. 어레이의 파일은 필요한 경우 수정됩니다. -

-
-

+

5.10 check -

+

모든 파일과 패리티 데이터를 확인합니다. -

fix처럼 작동하지만, 복구를 시뮬레이션할 뿐이며 어레이에 +

`fix`처럼 작동하지만, 복구를 시뮬레이션할 뿐이며 어레이에 어떤 변경 사항도 기록되지 않습니다.

이 명령은 주로 복구 프로세스 후 또는 기타 특별한 조건에서와 같이 수동 확인을 위한 것입니다. -주기적이고 예약된 확인을 위해서는 scrub을 사용하십시오. -

-
-
+주기적이고 예약된 확인을 위해서는 `scrub`을 사용하십시오. +

+ +
-a, --audit-only 옵션을 사용하면 파일 데이터만 확인하고 -
-
- - +
+

패리티 데이터는 무시하여 실행 속도를 높일 수 있습니다.

파일은 아이노드가 아닌 경로로만 식별됩니다.

아무것도 수정되지 않습니다. -

-
-

+

5.11 list -

-

마지막 sync 시점에 어레이에 포함된 모든 파일을 나열합니다. -

-
-
+ +

마지막 `sync` 시점에 어레이에 포함된 모든 파일을 나열합니다. +

+ +
-v 또는 --verbose를 사용하면 하위 초 시간도 표시됩니다. -
-
- - +
+

아무것도 수정되지 않습니다. -

-
-

+

5.12 dup -

+

모든 중복 파일을 나열합니다. 두 파일의 해시가 일치하면 동일한 것으로 간주됩니다. 파일 데이터는 읽지 않고, 미리 계산된 해시만 사용됩니다.

아무것도 수정되지 않습니다. -

-
-

+

5.13 pool -

-

pooling 디렉토리에서 디스크 어레이의 모든 파일에 대한 가상 뷰를 + +

`pooling` 디렉토리에서 디스크 어레이의 모든 파일에 대한 가상 뷰를 생성하거나 업데이트합니다.

파일은 복사되지 않고 심볼릭 링크를 사용하여 연결됩니다.

업데이트 시, 모든 기존 심볼릭 링크와 빈 하위 디렉토리는 삭제되고 어레이의 새 뷰로 대체됩니다. 다른 일반 파일은 제자리에 남습니다.

풀 디렉토리 외부에서는 아무것도 수정되지 않습니다. -

-
-

+

5.14 devices -

+

어레이에서 사용되는 저수준(low-level) 장치를 출력합니다.

이 명령은 어레이의 장치 연결을 표시하며, 주로 스크립트 인터페이스를 위한 것입니다. @@ -929,11 +833,9 @@ devices 있지만, 일부 더 복잡한 구성에서는 단일 어레이 디스크에 의해 사용되는 여러 저수준 장치가 있을 수 있습니다.

아무것도 수정되지 않습니다. -

-
-

+

5.15 touch -

+

하위 초 타임스탬프가 0으로 설정된 모든 파일에 임의의 하위 초 타임스탬프를 설정합니다.

이는 타임스탬프를 거의 고유하게 만들어 가능한 중복을 줄이므로, @@ -944,241 +846,178 @@ SnapRAID가 이동되거나 복사된 파일을 인식하는 능력을 향상시 모두 일치하는 경우에만 복사본으로 간주됩니다.

초 단위 정밀도의 타임스탬프는 수정되지 않으므로, 파일의 모든 날짜와 시간은 보존됩니다. -

-
-

+

5.16 rehash -

+

전체 어레이의 재해시(rehash)를 예약합니다.

이 명령은 사용되는 해시 종류를 변경하며, 일반적으로 32비트 시스템에서 64비트 시스템으로 업그레이드할 때 MurmurHash3에서 더 빠른 SpookyHash로 전환하기 위해 사용됩니다.

이미 최적의 해시를 사용하고 있다면, 이 명령은 아무것도 하지 않고 조치가 필요하지 않음을 알려줍니다. -

재해시는 즉시 수행되지 않고 sync 및 scrub 중에 점진적으로 +

재해시는 즉시 수행되지 않고 `sync` 및 `scrub` 중에 점진적으로 진행됩니다. -

status를 사용하여 재해시 상태를 확인할 수 있습니다. +

`status`를 사용하여 재해시 상태를 확인할 수 있습니다.

재해시 중에도 SnapRAID는 전체 기능을 유지하며, 유일한 예외는 -dup가 다른 해시를 사용하는 중복 파일을 감지할 수 없다는 것입니다. -

-
-

-locate -

-

패리티 디스크에 저장된 파일을 찾습니다. 일치하는 각 파일에 대해 -패리티 파일 내의 위치와 점유하고 있는 조각(fragment)의 수를 -출력합니다. -

-
-
--t, --tail 옵션을 사용하여 패리티의 지정된 꼬리(tail) 부분을 점유하는 -
-
-
-
-

파일로 작업을 제한할 수 있습니다. -

이 파일들을 재할당하려면 -W, --force-realloc-tail 옵션을 -사용할 수 있습니다. -재할당 과정 동안 해당 파일들은 패리티에 의해 보호되지 않으므로 -주의하십시오. -

-
-
-

+`dup`가 다른 해시를 사용하는 중복 파일을 감지할 수 없다는 것입니다. +

6 Options -

+

SnapRAID는 다음 옵션을 제공합니다: -

-
-
+

+ +
-c, --conf CONFIG -
+
사용할 설정 파일을 선택합니다. 지정하지 않으면 Unix에서는 -/usr/local/etc/snapraid.conf 파일이 존재하면 사용하고, -그렇지 않으면 /etc/snapraid.conf를 사용합니다. -Windows에서는 snapraid.exe와 같은 디렉토리에 있는 -snapraid.conf 파일을 사용합니다. - - - -
-
-
+`/usr/local/etc/snapraid.conf` 파일이 존재하면 사용하고, +그렇지 않으면 `/etc/snapraid.conf`를 사용합니다. +Windows에서는 `snapraid.exe`와 같은 디렉토리에 있는 +`snapraid.conf` 파일을 사용합니다. +
+ + +
-f, --filter PATTERN -
-check 및 fix에서 처리할 파일을 필터링합니다. +
+`check` 및 `fix`에서 처리할 파일을 필터링합니다. 지정된 패턴과 일치하는 파일만 처리됩니다. 이 옵션은 여러 번 사용될 수 있습니다. 패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오. Unix에서는 글로빙 문자가 사용되는 경우 따옴표로 묶어야 합니다. -이 옵션은 check 및 fix에서만 사용할 수 있습니다. -sync 및 scrub은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. - - - -
-
-
+이 옵션은 `check` 및 `fix`에서만 사용할 수 있습니다. +`sync` 및 `scrub`은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. +
+ + +
-d, --filter-disk NAME -
-check, fix, up, 및 down에서 처리할 디스크를 필터링합니다. +
+`check`, `fix`, `up`, 및 `down`에서 처리할 디스크를 필터링합니다. 설정 파일에 정의된 디스크 이름을 지정해야 합니다. -또한 parity, 2-parity, 3-parity 등의 이름으로 패리티 디스크를 +또한 `parity`, `2-parity`, `3-parity` 등의 이름으로 패리티 디스크를 지정하여 특정 패리티 디스크로 작업을 제한할 수 있습니다. 여러 --filter, --filter-disk, --filter-missing 옵션을 결합하면, 모든 필터와 일치하는 파일만 선택됩니다. 이 옵션은 여러 번 사용될 수 있습니다. -이 옵션은 check, fix, up, 및 down에서만 사용할 수 있습니다. -sync 및 scrub은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. - - - -
-
-
+이 옵션은 `check`, `fix`, `up`, 및 `down`에서만 사용할 수 있습니다. +`sync` 및 `scrub`은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. +
+ + +
-m, --filter-missing -
-check 및 fix에서 처리할 파일을 필터링합니다. +
+`check` 및 `fix`에서 처리할 파일을 필터링합니다. 어레이에서 누락되거나 삭제된 파일만 처리됩니다. -fix와 함께 사용하면, 이 옵션은 undelete 명령 역할을 합니다. +`fix`와 함께 사용하면, 이 옵션은 `undelete` 명령 역할을 합니다. 여러 --filter, --filter-disk, --filter-missing 옵션을 결합하면, 모든 필터와 일치하는 파일만 선택됩니다. -이 옵션은 check 및 fix에서만 사용할 수 있습니다. -sync 및 scrub은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. - - - -
-
-
+이 옵션은 `check` 및 `fix`에서만 사용할 수 있습니다. +`sync` 및 `scrub`은 항상 전체 어레이를 처리하므로 사용할 수 없습니다. +
+ + +
-e, --filter-error -
-check 및 fix에서 오류가 있는 파일을 처리합니다. -status에 나열된 대로 sync 및 scrub 중에 무단 또는 입출력 오류가 +
+`check` 및 `fix`에서 오류가 있는 파일을 처리합니다. +`status`에 나열된 대로 `sync` 및 `scrub` 중에 무단 또는 입출력 오류가 표시된 블록을 가진 파일만 처리합니다. -이 옵션은 check 및 fix에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `check` 및 `fix`에서만 사용할 수 있습니다. +
+ + +
-p, --plan PERC|bad|new|full -
+
스크럽 계획을 선택합니다. PERC가 0에서 100 사이의 숫자 값인 경우, 스크럽할 블록의 백분율로 해석됩니다. 백분율 대신 계획을 지정할 수 있습니다: -bad는 bad 블록을 스크럽하고, new는 아직 스크럽되지 않은 -막 동기화된 블록을 스크럽하며, full은 모든 것을 스크럽합니다. -이 옵션은 scrub에서만 사용할 수 있습니다. - - - -
-
-
+`bad`는 bad 블록을 스크럽하고, `new`는 아직 스크럽되지 않은 +막 동기화된 블록을 스크럽하며, `full`은 모든 것을 스크럽합니다. +이 옵션은 `scrub`에서만 사용할 수 있습니다. +
+ + +
-o, --older-than DAYS -
-scrub에서 처리할 어레이의 가장 오래된 부분을 선택합니다. +
+`scrub`에서 처리할 어레이의 가장 오래된 부분을 선택합니다. DAYS는 블록이 스크럽되어야 하는 최소 일령(days)이며, 기본값은 10입니다. bad로 표시된 블록은 이 옵션에 관계없이 항상 스크럽됩니다. -이 옵션은 scrub에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `scrub`에서만 사용할 수 있습니다. +
+ + +
-a, --audit-only -
-check에서 패리티 데이터를 확인하지 않고 파일의 해시를 +
+`check`에서 패리티 데이터를 확인하지 않고 파일의 해시를 확인합니다. 파일 데이터만 확인하는 데 관심이 있다면, 이 옵션은 확인 프로세스의 속도를 상당히 높일 수 있습니다. -이 옵션은 check에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `check`에서만 사용할 수 있습니다. +
+ + +
-h, --pre-hash -
-sync에서 패리티 계산 전에 추가 확인을 위해 모든 새 데이터에 대한 +
+`sync`에서 패리티 계산 전에 추가 확인을 위해 모든 새 데이터에 대한 예비 해시 단계를 실행합니다. -일반적으로 sync에서는 예비 해시가 수행되지 않으며, 새 데이터는 +일반적으로 `sync`에서는 예비 해시가 수행되지 않으며, 새 데이터는 패리티 계산 직전에 처음 읽을 때 해시됩니다. 이 프로세스는 모든 디스크가 회전하고 CPU가 바쁜, 시스템이 과부하 상태일 때 발생합니다. 이는 기계의 극한 조건이며, 잠재된 하드웨어 문제가 있는 경우 데이터가 아직 해시되지 않았기 때문에 무단 오류가 감지되지 않고 지나갈 수 있습니다. -이러한 위험을 피하려면, pre-hash 모드를 활성화하여 모든 데이터를 +이러한 위험을 피하려면, `pre-hash` 모드를 활성화하여 모든 데이터를 두 번 읽어 무결성을 보장할 수 있습니다. 이 옵션은 또한 어레이 내에서 이동된 파일을 확인하여 이동 작업이 성공했는지 확인하고, 필요한 경우 계속 진행하기 전에 fix 작업을 실행할 수 있도록 합니다. -이 옵션은 sync에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `sync`에서만 사용할 수 있습니다. +
+ + +
-i, --import DIR -
-지정된 디렉토리에서 마지막 sync 이후 어레이에서 삭제된 파일을 +
+지정된 디렉토리에서 마지막 `sync` 이후 어레이에서 삭제된 파일을 가져옵니다. -이러한 파일이 여전히 있는 경우, 이들은 check 및 fix에 의해 +이러한 파일이 여전히 있는 경우, 이들은 `check` 및 `fix`에 의해 복구 프로세스를 개선하는 데 사용될 수 있습니다. 파일은 하위 디렉토리를 포함하여 읽히며, 이름에 관계없이 식별됩니다. -이 옵션은 check 및 fix에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `check` 및 `fix`에서만 사용할 수 있습니다. +
+ + +
-s, --spin-down-on-error -
+
오류 발생 시, 0이 아닌 상태 코드로 종료하기 전에 관리되는 모든 디스크를 회전 중지합니다. 이는 중단된 작업 후에 드라이브가 계속 활성 상태로 회전하는 것을 방지하여 불필요한 열 축적 및 전력 소비를 방지하는 데 도움이 됩니다. 명령이 실패하더라도 디스크가 안전하게 중지되도록 이 옵션을 사용하십시오. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
모든 디스크에 대한 전역 대역폭 제한을 적용합니다. RATE는 초당 바이트 수입니다. K, M, 또는 G와 같은 승수(예: --bw-limit 1G)를 지정할 수 있습니다. - - - -
-
-
--t, --tail 크기 -
-패리티 디스크의 지정된 꼬리 크기 이하를 사용하는 파일로 -목록을 제한합니다. -K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: --tail 1G). -이 옵션은 locate 명령과 함께 사용할 때만 유효합니다. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
추가 정보를 보여주는 확장된 상태 보기를 활성화합니다. 화면에는 두 개의 그래프가 표시됩니다: 첫 번째 그래프는 각 디스크에 대한 버퍼링된 스트라이프 수와 함께 @@ -1194,14 +1033,12 @@ K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: --tail 1G). 모든 계산은 디스크 작업과 병렬로 실행됩니다. 따라서 적어도 하나의 디스크에 대해 측정 가능한 대기 시간이 있는 한, 이는 CPU가 워크로드에 충분히 빠르다는 것을 나타냅니다. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
이전에 0이 아니었던 크기가 0인 파일의 동기화라는 안전하지 않은 작업을 강제합니다. SnapRAID가 이러한 조건을 감지하면, 이 옵션을 지정하지 않는 한 @@ -1209,15 +1046,13 @@ SnapRAID가 이러한 조건을 감지하면, 이 옵션을 지정하지 않는 이는 시스템 충돌 후 일부 액세스된 파일이 잘렸을 때 쉽게 감지할 수 있도록 합니다. 이는 ext3/ext4 파일 시스템을 사용하는 Linux에서 가능한 조건입니다. -이 옵션은 sync에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `sync`에서만 사용할 수 있습니다. +
+ + +
-E, --force-empty -
+
원래 디스크에 있던 모든 파일이 누락된 디스크의 동기화라는 안전하지 않은 작업을 강제합니다. SnapRAID가 디스크에 원래 있던 모든 파일이 누락되거나 다시 @@ -1225,15 +1060,13 @@ SnapRAID가 디스크에 원래 있던 모든 파일이 누락되거나 다시 중지합니다. 이는 데이터 파일 시스템이 마운트되지 않았을 때 쉽게 감지할 수 있도록 합니다. -이 옵션은 sync에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `sync`에서만 사용할 수 있습니다. +
+ + +
-U, --force-uuid -
+
UUID가 변경된 디스크를 사용하여 동기화, 확인 및 수정을 강제하는 안전하지 않은 작업입니다. SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면, @@ -1243,15 +1076,13 @@ SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면, 그러나 단일 패리티를 사용하는 경우 하나의 UUID 변경이 허용되며, 여러 패리티를 사용하는 경우 더 많은 변경이 허용됩니다. 이는 복구 후 디스크를 교체할 때의 일반적인 경우이기 때문입니다. -이 옵션은 sync, check, 또는 fix에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `sync`, `check`, 또는 `fix`에서만 사용할 수 있습니다. +
+ + +
-D, --force-device -
+
액세스할 수 없는 디스크 또는 동일한 물리적 장치에 있는 디스크로 수정을 강제하는 안전하지 않은 작업입니다. 예를 들어, 두 개의 데이터 디스크를 잃고 첫 번째 디스크만 @@ -1259,16 +1090,14 @@ SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면, 디스크를 무시할 수 있습니다. 또는 이미 사용 중인 디스크에 남은 여유 공간에 디스크를 복구하려는 경우, 동일한 물리적 장치를 공유합니다. -이 옵션은 fix에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `fix`에서만 사용할 수 있습니다. +
+ + +
-N, --force-nocopy -
-sync, check, 및 fix에서 복사 감지 발견법(heuristic)을 +
+`sync`, `check`, 및 `fix`에서 복사 감지 발견법(heuristic)을 비활성화합니다. 이 옵션이 없으면 SnapRAID는 이름, 크기 및 타임스탬프와 같은 동일한 속성을 가진 파일이 동일한 데이터를 가진 복사본이라고 @@ -1279,196 +1108,145 @@ SnapRAID가 일부 디스크의 UUID가 변경되었음을 감지하면, 일부 드문 경우에 이 동작은 오탐(false positives) 또는 많은 해시 확인으로 인한 느린 프로세스를 초래할 수 있으며, 이 옵션을 사용하면 이러한 문제를 해결할 수 있습니다. -이 옵션은 sync, check, 및 fix에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `sync`, `check`, 및 `fix`에서만 사용할 수 있습니다. +
+ + +
-F, --force-full -
-sync에서 패리티의 전체 재계산을 강제합니다. +
+`sync`에서 패리티의 전체 재계산을 강제합니다. 이 옵션은 새 패리티 수준을 추가하거나, 더 최근의 패리티 데이터를 사용하여 이전 content 파일로 되돌렸을 때 사용할 수 있습니다. 처음부터 패리티를 다시 생성하는 대신, 이 옵션을 사용하면 content 파일에 있는 해시를 재사용하여 데이터를 검증하고 -기존 패리티 데이터를 사용하여 sync 프로세스 중에 데이터 보호를 +기존 패리티 데이터를 사용하여 `sync` 프로세스 중에 데이터 보호를 유지할 수 있습니다. -이 옵션은 sync에서만 사용할 수 있습니다. - - - -
-
-
+이 옵션은 `sync`에서만 사용할 수 있습니다. +
+ + +
-R, --force-realloc -
-sync에서 파일의 전체 재할당 및 패리티 재빌드를 강제합니다. +
+`sync`에서 파일의 전체 재할당 및 패리티 재빌드를 강제합니다. 이 옵션은 content 파일에 있는 해시를 재사용하여 데이터를 검증하면서 단편화를 제거하고 모든 파일을 완전히 재할당하는 데 사용될 수 있습니다. -이 옵션은 sync에서만 사용할 수 있습니다. +이 옵션은 `sync`에서만 사용할 수 있습니다. **경고!** 이 옵션은 전문가 전용이며, 사용하지 않는 것이 강력히 권장됩니다. -sync 작업 중에는 데이터 보호가 없습니다. - - - -
-
-
--W, --force-realloc-tail 크기 -
--R, --force-realloc과 같이 작동하지만, 각 패리티 파일의 지정된 -꼬리 부분(마지막 '크기' 바이트)으로 제한됩니다. -현재 해당 꼬리 섹션에 저장된 모든 파일 조각/블록의 재할당(이동)을 -강제하여, 여유 공간이 있는 패리티 파일 내의 어느 곳이든(기존 -빈 공간 포함) 배치될 수 있도록 합니다. -이 옵션의 주요 목적은 패리티 파일의 디스크상 크기를 줄이는 것입니다. -재할당을 통해 전체 꼬리 섹션이 성공적으로 비워지면(남은 블록이 없음), -패리티 파일이 잘리고(truncated) 사용되지 않는 꼬리 공간을 회수합니다. -K, M, G, T와 같은 배수를 사용할 수 있습니다 (예: ---force-realloc-tail 1G). -locate -t, --tail을 사용하여 영향을 받는 파일을 사전에 -확인할 수 있습니다. -경고! -이 옵션은 전문가 전용이며, 사용하지 않을 것을 강력히 -권장합니다. -영향을 받는 파일에 대해서는 sync 작업 동안 데이터 보호를 -받을 수 없습니다. -
-
-
-
-
-
+`sync` 작업 중에는 데이터 보호가 없습니다. +
+ + +
-l, --log FILE -
+
지정된 파일에 자세한 로그를 기록합니다. 이 옵션을 지정하지 않으면 예상치 못한 오류가 화면에 출력되어, 많은 오류가 발생하는 경우 과도한 출력이 발생할 수 있습니다. -l, --log가 지정되면 SnapRAID가 중지되는 치명적인 오류만 화면에 출력됩니다. -경로가 >>로 시작하면 파일이 추가 모드로 열립니다. -이름의 %D와 %T는 YYYYMMDD 및 HHMMSS 형식의 날짜 및 -시간으로 대체됩니다. Windows 배치 파일에서는 % 문자를 -두 배로 늘려야 합니다(예: result-%%D.log). >>를 사용하려면 -이름을 따옴표로 묶어야 합니다(예: ">>result.log"). -로그를 표준 출력 또는 표준 오류로 출력하려면 각각 ">&1" 및 ">&2"를 +경로가 '>>'로 시작하면 파일이 추가 모드로 열립니다. +이름의 '%D'와 '%T'는 YYYYMMDD 및 HHMMSS 형식의 날짜 및 +시간으로 대체됩니다. Windows 배치 파일에서는 '%' 문자를 +두 배로 늘려야 합니다(예: result-%%D.log). '>>'를 사용하려면 +이름을 따옴표로 묶어야 합니다(예: `">>result.log"`). +로그를 표준 출력 또는 표준 오류로 출력하려면 각각 `">&1"` 및 `">&2"`를 사용할 수 있습니다. 로그 태그 설명은 snapraid_log.txt 파일 또는 man 페이지를 참조하십시오. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
실행을 중지하기 전에 새로운 오류 제한을 설정합니다. 기본적으로 SnapRAID는 100개 이상의 입출력 오류가 발생하면 중지됩니다. 이는 디스크가 실패할 가능성이 있음을 나타냅니다. -이 옵션은 sync 및 scrub에 영향을 미치며, 첫 번째 디스크 오류 +이 옵션은 `sync` 및 `scrub`에 영향을 미치며, 첫 번째 디스크 오류 세트 후에 계속 진행하여 작업을 완료하려고 시도할 수 있도록 허용합니다. -그러나 check 및 fix는 항상 첫 번째 오류에서 중지됩니다. - - - -
-
-
+그러나 `check` 및 `fix`는 항상 첫 번째 오류에서 중지됩니다. +
+ + +
-S, --start BLKSTART -
+
지정된 블록 번호부터 처리를 시작합니다. 이는 손상된 디스크의 경우 특정 블록을 다시 확인하거나 수정하는 데 유용할 수 있습니다. 이 옵션은 주로 고급 수동 복구를 위한 것입니다. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
지정된 수의 블록만 처리합니다. 이 옵션은 주로 고급 수동 복구를 위한 것입니다. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
기존 content 파일에서 더미 설정 파일을 생성합니다. 설정 파일은 표준 출력으로 작성되며 기존 파일을 덮어쓰지 않습니다. 이 설정 파일에는 전체 시스템을 잃을 경우 디스크 마운트 지점을 재구성하는 데 필요한 정보도 포함되어 있습니다. - - - -
-
-
+
+ + +
-v, --verbose -
+
화면에 더 많은 정보를 출력합니다. 한 번 지정하면 제외된 파일 및 추가 통계를 출력합니다. 이 옵션은 로그 파일에는 영향을 미치지 않습니다. - - - -
-
-
+
+ + +
-q, --quiet -
+
화면에 더 적은 정보를 출력합니다. 한 번 지정하면 진행률 표시줄을 제거하고, 두 번 지정하면 실행 중인 작업을 제거하며, 세 번 지정하면 정보 메시지를 제거하고, 네 번 지정하면 상태 메시지를 제거합니다. 치명적인 오류는 항상 화면에 출력됩니다. 이 옵션은 로그 파일에는 영향을 미치지 않습니다. - - - -
-
-
+
+ + +
-H, --help -
+
간단한 도움말 화면을 출력합니다. - - - -
-
-
+
+ + +
-V, --version -
+
프로그램 버전을 출력합니다. - - - - -
-

+

+

7 Configuration -

+

SnapRAID는 디스크 어레이의 위치와 패리티 정보를 저장할 위치를 알기 위해 설정 파일이 필요합니다. -

Unix에서는 /usr/local/etc/snapraid.conf 파일이 존재하면 사용하고, -그렇지 않으면 /etc/snapraid.conf를 사용합니다. -Windows에서는 snapraid.exe와 같은 디렉토리에 있는 -snapraid.conf 파일을 사용합니다. +

Unix에서는 `/usr/local/etc/snapraid.conf` 파일이 존재하면 사용하고, +그렇지 않으면 `/etc/snapraid.conf`를 사용합니다. +Windows에서는 `snapraid.exe`와 같은 디렉토리에 있는 +`snapraid.conf` 파일을 사용합니다.

다음 옵션이 포함되어야 합니다(대소문자 구분): -

-

+

7.1 parity FILE [,FILE] ... -

+

패리티 정보를 저장하는 데 사용할 파일을 정의합니다. 패리티는 RAID5와 유사하게 단일 디스크 오류로부터 보호를 가능하게 합니다. @@ -1484,11 +1262,9 @@ parity FILE [,FILE] ...

Windows에서는 디스크가 가득 찼다는 경고를 피하기 위해 각 디스크에 256MB가 사용되지 않은 채로 남습니다.

이 옵션은 필수이며 한 번만 사용할 수 있습니다. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

추가 패리티 정보를 저장하는 데 사용할 파일을 정의합니다.

지정된 각 패리티 수준에 대해 하나의 추가 보호 수준이 활성화됩니다: @@ -1511,91 +1287,68 @@ parity FILE [,FILE] ...

각 패리티 수준은 모든 이전 패리티 수준의 존재를 필요로 합니다. -

parity 옵션과 동일한 고려 사항이 적용됩니다. +

`parity` 옵션과 동일한 고려 사항이 적용됩니다.

이 옵션은 선택 사항이며 한 번만 사용할 수 있습니다. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

삼중 패리티를 저장하는 대체 파일 및 형식을 정의합니다. -

이 옵션은 3-parity의 대안이며, 주로 SSSE3 명령어 세트를 지원하지 +

이 옵션은 '3-parity'의 대안이며, 주로 SSSE3 명령어 세트를 지원하지 않는 ARM 또는 AMD Phenom, Athlon, Opteron과 같은 저가형 CPU를 위한 것입니다. 이러한 경우 더 나은 성능을 제공합니다.

이 형식은 ZFS RAIDZ3에서 사용되는 것과 유사하지만 더 빠릅니다. ZFS와 마찬가지로 삼중 패리티 이상에서는 작동하지 않습니다. -

3-parity를 사용할 때 성능 향상을 위해 z-parity 형식을 사용하는 +

'3-parity'를 사용할 때 성능 향상을 위해 'z-parity' 형식을 사용하는 것이 권장되는 경우 경고를 받게 됩니다.

원하는 z-parity 또는 3-parity 파일로 설정 파일을 조정하고 -fix를 사용하여 다시 생성함으로써 한 형식에서 다른 형식으로 +'fix'를 사용하여 다시 생성함으로써 한 형식에서 다른 형식으로 변환할 수 있습니다. -

-
-

+

7.4 content FILE -

+

디스크 어레이에 있는 모든 파일의 목록과 체크섬을 저장하는 데 사용할 파일을 정의합니다.

데이터, 패리티 또는 사용 가능한 다른 디스크에 배치할 수 있습니다. -데이터 디스크를 사용하는 경우, 이 파일은 sync 프로세스에서 +데이터 디스크를 사용하는 경우, 이 파일은 `sync` 프로세스에서 자동으로 제외됩니다.

이 옵션은 필수이며 동일한 파일의 여러 복사본을 저장하기 위해 여러 번 사용될 수 있습니다.

사용된 각 패리티 디스크에 대해 최소한 하나의 복사본을 저장해야 하며, 하나를 더 추가해야 합니다. 추가 복사본을 사용해도 해롭지 않습니다. -

-
-

+

7.5 data NAME DIR -

+

어레이의 데이터 디스크의 이름과 마운트 지점을 정의합니다. NAME은 디스크를 식별하는 데 사용되며 고유해야 합니다. DIR은 파일 시스템에서 디스크의 마운트 지점입니다.

NAME을 고정된 상태로 유지하는 한, 필요에 따라 마운트 지점을 변경할 수 있습니다.

어레이의 각 데이터 디스크에 대해 하나의 옵션을 사용해야 합니다. -

나중에 설정 파일에서 직접 NAME을 변경하고 sync 명령을 +

나중에 설정 파일에서 직접 NAME을 변경하고 'sync' 명령을 실행하여 디스크의 이름을 바꿀 수 있습니다. 이름 변경의 경우, 디스크의 저장된 UUID를 사용하여 연결됩니다. -

-
-

-extra NAME DIR -

-

smart 및 probe 명령으로 모니터링할 추가 디스크의 이름과 마운트 -지점을 정의합니다. -

이것은 부팅 디스크와 같이 어레이의 일부는 아니지만 시스템 작동에 필요 -한 디스크를 모니터링하는 데 유용합니다. -

이러한 디스크는 항상 회전할 것으로 예상되므로 up 및 down 명령의 -영향을 받지 않습니다. -

-
-

+

7.6 nohidden -

+

모든 숨겨진 파일 및 디렉토리를 제외합니다. Unix에서는 숨겨진 파일은 '.'으로 시작하는 파일입니다. Windows에서는 숨김 속성을 가진 파일입니다. -

-
-

+

7.7 exclude/include PATTERN -

+

sync 프로세스에서 제외하거나 포함할 파일 또는 디렉토리 패턴을 정의합니다. 모든 패턴은 지정된 순서대로 처리됩니다. -

일치하는 첫 번째 패턴이 exclude 패턴이면 파일은 제외됩니다. -include 패턴이면 파일은 포함됩니다. -일치하는 패턴이 없으면, 지정된 마지막 패턴이 include이면 -파일은 제외되고, exclude이면 포함됩니다. +

일치하는 첫 번째 패턴이 `exclude` 패턴이면 파일은 제외됩니다. +`include` 패턴이면 파일은 포함됩니다. +일치하는 패턴이 없으면, 지정된 마지막 패턴이 `include`이면 +파일은 제외되고, `exclude`이면 포함됩니다.

패턴 사양에 대한 자세한 내용은 PATTERN 섹션을 참조하십시오.

이 옵션은 여러 번 사용될 수 있습니다. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

패리티의 기본 블록 크기를 키비바이트(kibibyte) 단위로 정의합니다. 1키비바이트는 1024바이트입니다.

기본 블록 크기는 256이며, 대부분의 경우에 작동해야 합니다. @@ -1615,7 +1368,7 @@ blocksize SIZE_IN_KIBIBYTES 있습니다. 예를 들어, 100,000개의 파일과 256KiB 블록 크기로 12.8GB의 패리티가 낭비되며, 이는 데이터 디스크에서 12.8GB의 사용 가능한 공간이 줄어들 수 있음을 의미합니다. -

status를 사용하여 각 디스크의 낭비된 공간의 양을 확인할 수 있습니다. +

`status`를 사용하여 각 디스크의 낭비된 공간의 양을 확인할 수 있습니다. 이는 데이터 디스크에 비워 두거나 어레이에 포함되지 않은 파일에 사용해야 하는 공간의 양입니다. 이 값이 음수이면 패리티를 거의 채우고 있음을 의미하며, 여전히 @@ -1626,17 +1379,17 @@ blocksize SIZE_IN_KIBIBYTES 처리할 수 있는 충분한 추가 공간이 있습니다.

Linux에서 더 큰 패리티 파티션을 얻는 트릭은 다음 명령으로 포맷하는 것입니다: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

이로 인해 약 1.5%의 추가 공간이 발생하며, 4TB 디스크의 경우 약 60GB로, 낭비되는 공간 없이 각 데이터 디스크에 약 460,000개의 파일을 허용합니다. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

저장된 블록의 해시 크기를 바이트 단위로 정의합니다.

기본 해시 크기는 16바이트(128비트)이며, 대부분의 경우에 작동해야 합니다.

**경고!** 이 옵션은 전문가 전용이며, 이 값을 변경하지 않는 것이 @@ -1666,24 +1419,20 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

지정된 GB 양이 처리된 후 동기화 또는 스크럽 시 상태를 자동으로 저장합니다. -이 옵션은 기계 충돌 또는 기타 이벤트로 인해 중단된 경우 긴 sync +이 옵션은 기계 충돌 또는 기타 이벤트로 인해 중단된 경우 긴 `sync` 명령을 처음부터 다시 시작하는 것을 방지하는 데 유용합니다. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

허용되는 최대 디스크 온도를 섭씨로 설정합니다. 지정되면 SnapRAID는 smartctl 도구를 사용하여 주기적으로 모든 디스크의 온도를 확인합니다. SnapRAID가 작동하는 동안 현재 디스크 온도가 표시됩니다. 어떤 디스크라도 이 제한을 초과하면 모든 작업이 중지되고, 디스크는 -temp_sleep 옵션으로 정의된 기간 동안 회전 중지됩니다(대기 모드로 +`temp_sleep` 옵션으로 정의된 기간 동안 회전 중지됩니다(대기 모드로 전환됨). 절전 기간 후 작업이 재개되며, 온도 제한에 다시 도달하면 다시 일시 중지될 수 있습니다.

작동 중에 SnapRAID는 각 디스크의 가열 곡선을 분석하고 활동이 계속되면 @@ -1700,87 +1449,84 @@ SnapRAID가 작동하는 동안 현재 디스크 온도가 표시됩니다. 디스크 온도를 대체 참조로 사용합니다.

일반적으로 SnapRAID는 가장 뜨거운 디스크의 온도만 표시합니다. 모든 디스크의 온도를 표시하려면 -A 또는 --stats 옵션을 사용하십시오. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

온도 제한에 도달했을 때의 대기 시간(분)을 설정합니다. 이 기간 동안 디스크는 회전 중지 상태를 유지합니다. 기본값은 5분입니다. -

-
-

+

7.13 pool DIR -

-

pool 명령을 사용하여 디스크 어레이의 가상 뷰가 생성되는 풀링 + +

`pool` 명령을 사용하여 디스크 어레이의 가상 뷰가 생성되는 풀링 디렉토리를 정의합니다.

디렉토리는 이미 존재해야 합니다. -

-
-

+

7.14 share UNC_DIR -

+

디스크에 원격으로 액세스하는 데 필요한 Windows UNC 경로를 정의합니다.

이 옵션이 지정되면 풀 디렉토리에 생성된 심볼릭 링크는 이 UNC 경로를 사용하여 디스크에 액세스합니다. 이 옵션이 없으면 생성된 심볼릭 링크는 로컬 경로만 사용하며, 이는 네트워크를 통해 풀 디렉토리를 공유하는 것을 허용하지 않습니다. -

심볼릭 링크는 지정된 UNC 경로를 사용하여 형성되며, data 옵션에 +

심볼릭 링크는 지정된 UNC 경로를 사용하여 형성되며, `data` 옵션에 지정된 디스크 이름이 추가되고, 마지막으로 파일 디렉토리와 이름이 추가됩니다.

이 옵션은 Windows에만 필요합니다. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

각 디스크에 대한 SMART 속성을 얻기 위한 사용자 정의 smartctl 옵션을 정의합니다. 이는 RAID 컨트롤러 및 일부 자동 감지할 수 없는 USB 디스크에 필요할 수 있습니다. %s 자리 표시자는 장치 이름으로 대체되지만, RAID 컨트롤러와 같은 고정된 장치에서는 선택 사항입니다. -

DISK는 data 옵션에 지정된 것과 동일한 디스크 이름입니다. -PARITY는 parity, 2-parity, 3-parity, 4-parity, 5-parity, -6-parity, 또는 z-parity 중 하나의 패리티 이름입니다. -

지정된 OPTIONS에서 %s 문자열은 장치 이름으로 대체됩니다. +

DISK는 `data` 옵션에 지정된 것과 동일한 디스크 이름입니다. +PARITY는 `parity`, `2-parity`, `3-parity`, `4-parity`, `5-parity`, +`6-parity`, 또는 `z-parity` 중 하나의 패리티 이름입니다. +

지정된 OPTIONS에서 `%s` 문자열은 장치 이름으로 대체됩니다. RAID 컨트롤러의 경우 장치가 고정되어 있을 가능성이 높으므로 -%s를 사용할 필요가 없을 수 있습니다. +`%s`를 사용할 필요가 없을 수 있습니다.

가능한 옵션은 smartmontools 설명서를 참조하십시오: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

예: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

디스크 실패 확률을 계산할 때 지정된 SMART 속성을 무시합니다. 이 옵션은 디스크가 특정 속성에 대해 특이하거나 오해의 소지가 있는 값을 보고하는 경우에 유용합니다. -

DISK는 data 옵션에 지정된 것과 동일한 디스크 이름입니다. -PARITY는 parity, 2-parity, 3-parity, 4-parity, 5-parity, -6-parity, 또는 z-parity 중 하나의 패리티 이름입니다. +

DISK는 `data` 옵션에 지정된 것과 동일한 디스크 이름입니다. +PARITY는 `parity`, `2-parity`, `3-parity`, `4-parity`, `5-parity`, +`6-parity`, 또는 `z-parity` 중 하나의 패리티 이름입니다. 특수 값 *는 모든 디스크에서 속성을 무시하는 데 사용될 수 있습니다. -

예를 들어, 모든 디스크에서 Current Pending Sector Count 속성을 +

예를 들어, 모든 디스크에서 `Current Pending Sector Count` 속성을 무시하려면: -

+

+
 smartignore * 197
 
+

첫 번째 패리티 디스크에서만 무시하려면: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Unix의 일반적인 설정 예는 다음과 같습니다: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1794,8 +1540,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Windows의 일반적인 설정 예는 다음과 같습니다: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1810,263 +1558,176 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

패턴은 포함하거나 제외할 파일을 필터링하는 유연한 방법을 제공합니다. -글로빙(globbing) 문자를 사용하면 모든 경로를 일일이 나열하지 않고도 -특정 파일 이름이나 전체 디렉토리 구조와 일치하는 규칙을 정의할 수 있습니다. -

물음표 ?는 디렉토리 구분 기호를 제외한 모든 단일 문자와 일치합니다. -이는 패턴을 단일 디렉토리 수준으로 제한하면서 가변 문자가 포함된 -파일 이름을 일치시키는 데 유용합니다. -

단일 별표 *는 모든 문자 시퀀스와 일치하지만, 물음표와 마찬가지로 -디렉토리 경계를 넘지 않습니다. 슬래시에서 멈추므로 단일 경로 구성 요소 -내에서의 일치에 적합합니다. 이는 쉘 글로빙에서 익숙한 표준 와일드카드 -동작입니다. -

이중 별표 **는 더 강력하며 디렉토리 구분 기호를 포함한 모든 문자 -시퀀스와 일치합니다. 이를 통해 패턴이 여러 디렉토리 수준에서 일치할 수 -있습니다. **가 패턴 내에 직접 포함된 경우, 주변 리터럴 텍스트 사이의 -슬래시를 포함하여 0개 이상의 문자와 일치할 수 있습니다. -

**의 가장 중요한 용도는 특수 형식인 /**/입니다. 이는 0개 이상의 -전체 디렉토리 수준과 일치하므로 정확한 경로 구조를 모르더라도 -디렉토리 트리의 모든 깊이에서 파일과 일치시킬 수 있습니다. -예를 들어, src/**/main.js 패턴은 src/main.js(0개의 디렉토리 건너뜀), -src/ui/main.js(1개의 디렉토리 건너뜀), src/ui/components/main.js -(2개의 디렉토리 건너뜀)와 일치합니다. -

대괄호 []를 사용하는 문자 클래스는 지정된 세트 또는 범위에서 -단일 문자와 일치합니다. 다른 단일 문자 패턴과 마찬가지로 디렉토리 -구분 기호와는 일치하지 않습니다. 클래스는 범위 및 느낌표를 사용한 -부정을 지원합니다. -

기억해야 할 근본적인 차이점은 *, ? 및 문자 클래스는 모두 -디렉토리 경계를 준수하고 단일 경로 구성 요소 내에서만 일치하는 반면, -**는 디렉토리 구분 기호를 가로질러 일치할 수 있는 유일한 패턴이라는 것입니다. + +

패턴은 처리에서 제외하거나 포함할 파일의 하위 집합을 선택하는 데 +사용됩니다.

네 가지 유형의 패턴이 있습니다: -

-
-
+

+ +
FILE -
-FILE이라는 이름의 모든 파일을 선택합니다. +
+FILE이라는 이름의 모든 파일을 선택합니다. *, ?와 같은 글로빙 +문자와 [a-z]와 같은 문자 클래스를 사용할 수 있습니다. 이 패턴은 디렉토리가 아닌 파일에만 적용됩니다. - - - -
-
-
+
+ + +
DIR/ -
+
DIR이라는 이름의 모든 디렉토리와 그 안의 모든 것을 선택합니다. +*, ?와 같은 글로빙 문자를 사용할 수 있습니다. 이 패턴은 파일이 아닌 디렉토리에만 적용됩니다. - - - -
-
-
+
+ + +
/PATH/FILE -
-지정된 정확한 파일 경로를 선택합니다. 이 패턴은 디렉토리가 아닌 -파일에만 적용됩니다. -
- - -
-
-
+
+정확히 지정된 파일 경로를 선택합니다. *, ?와 같은 글로빙 +문자를 사용할 수 있지만, 디렉토리 슬래시와는 절대 일치하지 않습니다. +이 패턴은 디렉토리가 아닌 파일에만 적용됩니다. +
+ + +
/PATH/DIR/ -
-지정된 정확한 디렉토리 경로와 그 안의 모든 것을 선택합니다. +
+정확히 지정된 디렉토리 경로와 그 안의 모든 것을 선택합니다. +*, ?와 같은 글로빙 문자를 사용할 수 있지만, 디렉토리 슬래시와는 +절대 일치하지 않습니다. 이 패턴은 파일이 아닌 디렉토리에만 적용됩니다. - - - -
-
-
+
+ + +
/로 시작하는 절대 경로를 지정하면 로컬 파일 시스템의 루트 디렉토리가 -
-
- - +
+

아닌 어레이 루트 디렉토리에 적용됩니다.

Windows에서는 정방향 슬래시 / 대신 역슬래시 \를 사용할 수 있습니다. Windows 시스템 디렉토리, 접합점(junctions), 마운트 지점 및 기타 Windows 특수 디렉토리는 파일로 취급됩니다. 즉, 이들을 제외하려면 디렉토리 규칙이 아닌 파일 규칙을 사용해야 합니다. -

파일 이름에 *, ?, [, -또는 ] 문자가 포함된 경우, 글로빙 문자로 해석되는 것을 피하기 위해 -이스케이프해야 합니다. Unix에서는 이스케이프 문자가 \이고, -Windows에서는 ^입니다. +

파일 이름에 '*', '?', '[', +또는 ']' 문자가 포함된 경우, 글로빙 문자로 해석되는 것을 피하기 위해 +이스케이프해야 합니다. Unix에서는 이스케이프 문자가 '\'이고, +Windows에서는 '^'입니다. 패턴이 명령줄에 있는 경우, 명령 셸에 의해 해석되는 것을 피하기 위해 이스케이프 문자를 두 배로 늘려야 합니다.

설정 파일에서는 처리할 파일을 필터링하기 위해 다른 전략을 사용할 수 있습니다. 가장 간단한 접근 방식은 원하지 않는 모든 파일과 디렉토리를 제거하기 -위해 exclude 규칙만 사용하는 것입니다. 예를 들어: -

-# *.unrecoverable이라는 이름의 모든 파일 제외
+위해 `exclude` 규칙만 사용하는 것입니다. 예를 들어:
+

+
+# `*.unrecoverable`이라는 이름의 모든 파일 제외
 exclude *.unrecoverable
-# 루트 디렉토리 /lost+found 제외
+# 루트 디렉토리 `/lost+found` 제외
 exclude /lost+found/
-# tmp라는 이름의 모든 하위 디렉토리 제외
+# `tmp`라는 이름의 모든 하위 디렉토리 제외
 exclude tmp/
 
-

반대 접근 방식은 include 규칙만 사용하여 처리하려는 파일만 +

+

반대 접근 방식은 `include` 규칙만 사용하여 처리하려는 파일만 정의하는 것입니다. 예를 들어: -

+

+
 # 일부 디렉토리만 포함
 include /movies/
 include /musics/
 include /pictures/
 
-

최종 접근 방식은 exclude 및 include 규칙을 혼합하는 것입니다. +

+

최종 접근 방식은 `exclude` 및 `include` 규칙을 혼합하는 것입니다. 이 경우 규칙의 순서가 중요합니다. 앞선 규칙이 뒤의 규칙보다 우선합니다. -단순화를 위해 모든 exclude 규칙을 먼저 나열한 다음 모든 -include 규칙을 나열할 수 있습니다. 예를 들어: -

-# *.unrecoverable이라는 이름의 모든 파일 제외
+단순화를 위해 모든 `exclude` 규칙을 먼저 나열한 다음 모든
+`include` 규칙을 나열할 수 있습니다. 예를 들어:
+

+
+# `*.unrecoverable`이라는 이름의 모든 파일 제외
 exclude *.unrecoverable
-# tmp라는 이름의 모든 하위 디렉토리 제외
+# `tmp`라는 이름의 모든 하위 디렉토리 제외
 exclude tmp/
 # 일부 디렉토리만 포함
 include /movies/
 include /musics/
 include /pictures/
 
-

명령줄에서 -f 옵션을 사용할 때 include 패턴만 사용할 수 있습니다. +

+

명령줄에서 -f 옵션을 사용할 때 `include` 패턴만 사용할 수 있습니다. 예를 들어: -

+

+
 # .mp3 파일만 확인.
 # Unix에서는 셸에 의한 글로빙 확장을 피하기 위해 따옴표를 사용합니다.
 snapraid -f "*.mp3" check
 
+

Unix에서는 명령줄에서 글로빙 문자를 사용할 때 셸이 확장하는 것을 방지하기 위해 따옴표로 묶어야 합니다. -

-
-

-Ignore File -

-

설정 파일의 전역 규칙 외에도, 배열 내의 모든 디렉토리에 .snapraidignore -파일을 배치하여 분산된 제외 규칙을 정의할 수 있습니다. -

.snapraidignore에 정의된 규칙은 설정 파일의 규칙 다음에 적용됩니다. -이는 해당 규칙들이 더 높은 우선순위를 가지며, 전역 설정에 의해 이전에 -포함되었던 파일들을 제외하는 데 사용될 수 있음을 의미합니다. 사실상 -로컬 규칙이 일치하면, 전역 포함 설정과 관계없이 해당 파일은 제외됩니다. -

.snapraidignore의 패턴 로직은 전역 설정을 따르지만, 패턴은 해당 파일이 -위치한 디렉토리를 기준으로 고정됩니다: -

-
-
-FILE -
-이 디렉토리 또는 그 하위에서 FILE이라는 이름의 모든 파일을 선택합니다. -이는 전역 패턴과 동일한 글로빙(globbing) 규칙을 따릅니다. -
-
-
-
-
-
-DIR/ -
-이 디렉토리 또는 그 하위에서 DIR이라는 이름의 모든 디렉토리와 -그 안의 모든 항목을 선택합니다. -
-
-
-
-
-
-/PATH/FILE -
-.snapraidignore 파일의 위치를 기준으로 지정된 정확한 파일을 -선택합니다. -
-
-
-
-
-
-/PATH/DIR/ -
-.snapraidignore 파일의 위치를 기준으로 지정된 정확한 디렉토리와 -그 안의 모든 항목을 선택합니다. -
-
-
-

전역 설정과 달리, .snapraidignore 파일은 제외 규칙만 지원합니다. -include 패턴이나 부정(!)은 사용할 수 없습니다. -

예를 들어, /mnt/disk1/projects/에 .snapraidignore가 있는 경우: -

-# /mnt/disk1/projects/output.bin만 제외
-/output.bin
-# projects/ 내부의 build라는 이름의 모든 디렉토리 제외
-build/
-# projects/ 또는 그 하위 폴더의 모든 .tmp 파일 제외
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID는 content 파일에 파일 목록과 체크섬을 저장합니다.

이것은 디스크 어레이에 있는 모든 파일의 목록과 무결성을 확인하기 위한 모든 체크섬을 나열하는 이진 파일입니다. -

이 파일은 sync 및 scrub 명령에 의해 읽고 쓰여지며, -fix, check, 및 status 명령에 의해 읽혀집니다. -

-
-

+

이 파일은 `sync` 및 `scrub` 명령에 의해 읽고 쓰여지며, +`fix`, `check`, 및 `status` 명령에 의해 읽혀집니다. +

10 Parity -

+

SnapRAID는 패리티 파일에 어레이의 패리티 정보를 저장합니다. -

이들은 content 파일에 정의된 모든 블록의 계산된 패리티를 포함하는 +

이들은 `content` 파일에 정의된 모든 블록의 계산된 패리티를 포함하는 이진 파일입니다. -

이 파일들은 sync 및 fix 명령에 의해 읽고 쓰여지며, -scrub 및 check 명령에 의해서만 읽혀집니다. -

-
-

+

이 파일들은 `sync` 및 `fix` 명령에 의해 읽고 쓰여지며, +`scrub` 및 `check` 명령에 의해서만 읽혀집니다. +

11 Encoding -

+

Unix의 SnapRAID는 인코딩을 무시합니다. 파일 시스템에서 사용되는 것과 동일한 인코딩으로 파일 이름을 읽고 저장합니다.

Windows에서는 파일 시스템에서 읽은 모든 이름이 UTF-8 형식으로 변환되고 처리됩니다. -

파일 이름이 올바르게 출력되도록 하려면, chcp 65001 명령으로 -Windows 콘솔을 UTF-8 모드로 설정하고 콘솔 글꼴로 Lucida Console과 +

파일 이름이 올바르게 출력되도록 하려면, `chcp 65001` 명령으로 +Windows 콘솔을 UTF-8 모드로 설정하고 콘솔 글꼴로 `Lucida Console`과 같은 TrueType 글꼴을 사용해야 합니다. 이는 출력되는 파일 이름에만 영향을 미치며, 콘솔 출력을 파일로 리디렉션하는 경우 결과 파일은 항상 UTF-8 형식입니다. -

+

+

+

-
-
-
+
- - + diff --git a/manual-pl.html b/manual-pl.html index a897944f..11c90110 100644 --- a/manual-pl.html +++ b/manual-pl.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID to program do tworzenia kopii zapasowych przeznaczony dla macierzy dyskowych, przechowujący informacje parzystości do odzyskiwania danych w przypadku awarii do sześciu dysków. @@ -182,14 +127,14 @@ co oszczędza energię i zmniejsza hałas.

Więcej informacji można znaleźć na oficjalnej stronie SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID to hybryda programu RAID i programu do tworzenia kopii zapasowych, której celem jest połączenie najlepszych zalet obu. Ma jednak pewne ograniczenia, które należy wziąć pod uwagę przed jego użyciem. @@ -228,13 +173,11 @@ i dowiązania twarde. Uprawnienia, właścicielstwo i rozszerzone atrybuty nie są zapisywane. -

-
-

+

4 Getting Started -

+

Aby użyć SnapRAID, musisz najpierw wybrać jeden dysk w swojej macierzy -dysków, który zostanie przeznaczony na informacje o parzystości. Z jednym dyskiem +dysków, który zostanie przeznaczony na informacje o `parzystości`. Z jednym dyskiem na parzystość będziesz w stanie odzyskać dane po awarii pojedynczego dysku, podobnie jak w RAID5.

Jeśli chcesz odzyskać dane po większej liczbie awarii dysków, podobnie jak @@ -243,31 +186,34 @@ dysk parzystości umożliwia odzyskanie danych po jeszcze jednej awarii dysku.

Jako dyski parzystości musisz wybrać największe dyski w macierzy, ponieważ informacje o parzystości mogą urosnąć do rozmiaru największego dysku danych w macierzy. -

Dyski te będą przeznaczone do przechowywania plików parzystości. +

Dyski te będą przeznaczone do przechowywania plików `parzystości`. Nie powinieneś na nich przechowywać swoich danych. -

Następnie musisz zdefiniować dyski danych, które chcesz chronić +

Następnie musisz zdefiniować dyski `danych`, które chcesz chronić za pomocą SnapRAID. Ochrona jest bardziej skuteczna, jeśli te dyski zawierają dane, które rzadko się zmieniają. Z tego powodu lepiej jest NIE włączać dysku C:\ w systemie Windows ani katalogów /home, /var i /tmp w systemie Unix. -

Lista plików jest zapisywana w plikach zawartości, zwykle +

Lista plików jest zapisywana w plikach `zawartości`, zwykle przechowywanych na dyskach danych, parzystości lub rozruchowych. Plik ten zawiera szczegóły Twojej kopii zapasowej, w tym wszystkie sumy kontrolne w celu weryfikacji jej integralności. -Plik zawartości jest przechowywany w wielu kopiach, a każda kopia musi +Plik `zawartości` jest przechowywany w wielu kopiach, a każda kopia musi znajdować się na innym dysku, aby zapewnić, że nawet w przypadku wielu awarii dysków, przynajmniej jedna kopia jest dostępna.

Na przykład, załóżmy, że interesuje Cię tylko jeden poziom parzystości i Twoje dyski znajdują się w: -

+

+
 /mnt/diskp <- wybrany dysk dla parzystości
 /mnt/disk1 <- pierwszy dysk do ochrony
 /mnt/disk2 <- drugi dysk do ochrony
 /mnt/disk3 <- trzeci dysk do ochrony
 
+

Musisz utworzyć plik konfiguracyjny /etc/snapraid.conf z następującymi opcjami: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -276,9 +222,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Jeśli używasz systemu Windows, powinieneś użyć formatu ścieżek Windows, z literami dysków i ukośnikami odwrotnymi zamiast ukośników: -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -287,16 +235,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Jeśli masz wiele dysków i zabrakło Ci liter dysków, możesz zamontować dyski bezpośrednio w podfolderach. Zobacz: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

W tym momencie jesteś gotowy do uruchomienia polecenia sync, aby zbudować +

+

W tym momencie jesteś gotowy do uruchomienia polecenia `sync`, aby zbudować informacje o parzystości. -

+

+
 snapraid sync
 
+

Ten proces może zająć kilka godzin za pierwszym razem, w zależności od rozmiaru danych już obecnych na dyskach. Jeśli dyski są puste, proces jest natychmiastowy. @@ -304,53 +257,60 @@ proces jest natychmiastowy. uruchomieniu wznowi się w miejscu, w którym został przerwany.

Kiedy to polecenie się zakończy, Twoje dane są BEZPIECZNE.

Teraz możesz zacząć używać swojej macierzy, jak chcesz, i okresowo -aktualizować informacje o parzystości, uruchamiając polecenie sync. -

-

+aktualizować informacje o parzystości, uruchamiając polecenie `sync`. +

4.1 Scrubbing -

+

Aby okresowo sprawdzać dane i parzystość pod kątem błędów, możesz -uruchomić polecenie scrub. -

+uruchomić polecenie `scrub`.
+

+
 snapraid scrub
 
+

To polecenie porównuje dane w Twojej macierzy z haszem obliczonym -podczas polecenia sync, aby zweryfikować integralność. +podczas polecenia `sync`, aby zweryfikować integralność.

Każde uruchomienie polecenia sprawdza około 8% macierzy, z wyłączeniem danych już sprawdzonych w ciągu poprzednich 10 dni. Możesz użyć opcji -p, --plan, aby określić inną ilość, oraz opcji -o, --older-than, aby określić inny wiek w dniach. Na przykład, aby sprawdzić 5% macierzy dla bloków starszych niż 20 dni, użyj: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Jeśli podczas procesu zostaną znalezione ciche błędy lub błędy wejścia/wyjścia, -odpowiednie bloki zostaną oznaczone jako złe w pliku content -i wymienione w poleceniu status. -

+odpowiednie bloki zostaną oznaczone jako złe w pliku `content`
+i wymienione w poleceniu `status`.
+

+
 snapraid status
 
-

Aby je naprawić, możesz użyć polecenia fix, filtrując złe bloki +

+

Aby je naprawić, możesz użyć polecenia `fix`, filtrując złe bloki za pomocą opcji -e, --filter-error: -

+

+
 snapraid -e fix
 
-

Przy następnym scrub, błędy znikną z raportu status, +

+

Przy następnym `scrub`, błędy znikną z raportu `status`, jeśli zostały faktycznie naprawione. Aby przyspieszyć, możesz użyć -p bad, aby sprawdzić tylko bloki oznaczone jako złe. -

+

+
 snapraid -p bad scrub
 
-

Uruchomienie scrub na niezsynchronizowanej macierzy może zgłosić błędy +

+

Uruchomienie `scrub` na niezsynchronizowanej macierzy może zgłosić błędy spowodowane usuniętymi lub zmodyfikowanymi plikami. Błędy te są zgłaszane -w wyniku scrub, ale powiązane bloki nie są oznaczane jako złe. -

-
-

+w wyniku `scrub`, ale powiązane bloki nie są oznaczane jako złe. +

4.2 Pooling -

+

Uwaga: Funkcja łączenia w pulę opisana poniżej została zastąpiona przez -narzędzie mergerfs, które jest obecnie zalecaną opcją dla użytkowników Linuksa +narzędzie mergefs, które jest obecnie zalecaną opcją dla użytkowników Linuksa w społeczności SnapRAID. Mergefs zapewnia bardziej elastyczny i wydajny sposób łączenia wielu dysków w jeden ujednolicony punkt montowania, umożliwiając bezproblemowy dostęp do plików w całej macierzy bez polegania @@ -358,27 +318,36 @@ na dowiązaniach symbolicznych. Dobrze integruje się z SnapRAID w celu ochrony parzystości i jest powszechnie używane w konfiguracjach takich jak OpenMediaVault (OMV) lub niestandardowe konfiguracje NAS.

Aby wszystkie pliki w Twojej macierzy były widoczne w tym samym drzewie katalogów, -możesz włączyć funkcję pooling. Tworzy ona wirtualny, tylko do odczytu, +możesz włączyć funkcję `pooling`. Tworzy ona wirtualny, tylko do odczytu, widok wszystkich plików w Twojej macierzy za pomocą dowiązań symbolicznych. -

Katalog pooling możesz skonfigurować w pliku konfiguracyjnym za pomocą: -

+

Katalog `pooling` możesz skonfigurować w pliku konfiguracyjnym za pomocą: +

+
 pool /pool
 
+

lub, jeśli używasz systemu Windows, za pomocą: -

+

+
 pool C:\pool
 
-

a następnie uruchom polecenie pool, aby utworzyć lub zaktualizować wirtualny widok. -

+
+

a następnie uruchom polecenie `pool`, aby utworzyć lub zaktualizować wirtualny widok. +

+
 snapraid pool
 
+

Jeśli używasz platformy Unix i chcesz udostępnić ten katalog przez sieć maszynom Windows lub Unix, powinieneś dodać następujące opcje do swojego /etc/samba/smb.conf: -

+

+
 # W sekcji globalnej smb.conf
 unix extensions = no
 
+
+
 # W sekcji udziału smb.conf
 [pool]
@@ -389,101 +358,115 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

W systemie Windows udostępnianie dowiązań symbolicznych przez sieć wymaga od klientów zdalnego ich rozwiązywania. Aby to umożliwić, oprócz udostępnienia katalogu puli, musisz również udostępnić wszystkie dyski niezależnie, używając nazw dysków zdefiniowanych w pliku konfiguracyjnym jako punkty udostępniania. Musisz również -określić w opcji share w pliku konfiguracyjnym ścieżkę UNC Windows, +określić w opcji `share` w pliku konfiguracyjnym ścieżkę UNC Windows, której klienci zdalni muszą użyć, aby uzyskać dostęp do tych udostępnionych dysków. -

Na przykład, działając z serwera o nazwie darkstar, możesz użyć +

Na przykład, działając z serwera o nazwie `darkstar`, możesz użyć opcji: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

i udostępnić w sieci następujące katalogi: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

aby umożliwić zdalnym klientom dostęp do wszystkich plików pod adresem \\darkstar\pool.

Możesz również potrzebować skonfigurować klientów zdalnych, aby umożliwić dostęp do zdalnych dowiązań symbolicznych za pomocą polecenia: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID działa bardziej jak program do tworzenia kopii zapasowych niż system RAID i może być użyty do przywrócenia lub odzyskania usuniętych plików do ich poprzedniego stanu za pomocą opcji -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

lub dla katalogu: -

+

+
 snapraid fix -f DIR/
 
+

Możesz go również użyć do odzyskania tylko przypadkowo usuniętych plików wewnątrz katalogu za pomocą opcji -m, --filter-missing, która przywraca tylko brakujące pliki, pozostawiając wszystkie inne nienaruszone. -

+

+
 snapraid fix -m -f DIR/
 
+

Lub aby odzyskać wszystkie usunięte pliki na wszystkich dyskach za pomocą: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

Najgorsze się wydarzyło i straciłeś jeden lub więcej dysków!

NIE PANIKUJ! Będziesz w stanie je odzyskać!

Pierwszą rzeczą, którą musisz zrobić, to unikać dalszych zmian w Twojej macierzy dysków. Wyłącz wszelkie zdalne połączenia z nią i wszelkie zaplanowane procesy, w tym jakąkolwiek zaplanowaną nocną synchronizację lub scrub SnapRAID.

Następnie postępuj zgodnie z poniższymi krokami. -

-

+

4.4.1 KROK 1 -> Ponowna konfiguracja -

+

Potrzebujesz trochę miejsca do odzyskania, najlepiej na dodatkowych zapasowych dyskach, ale wystarczy zewnętrzny dysk USB lub dysk zdalny. -

Zmodyfikuj plik konfiguracyjny SnapRAID, aby opcja data lub parity +

Zmodyfikuj plik konfiguracyjny SnapRAID, aby opcja `data` lub `parity` uszkodzonego dysku wskazywała na lokalizację z wystarczającą ilością pustego miejsca do odzyskania plików. -

Na przykład, jeśli dysk d1 uległ awarii, zmień z: -

+

Na przykład, jeśli dysk `d1` uległ awarii, zmień z: +

+
 data d1 /mnt/disk1/
 
+

na: -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Jeśli dysk do odzyskania jest dyskiem parzystości, zaktualizuj odpowiednią -opcję parity. +opcję `parity`. Jeśli masz wiele uszkodzonych dysków, zaktualizuj wszystkie ich opcje konfiguracyjne. -

-
-

+

4.4.2 KROK 2 -> Naprawa -

+

Uruchom polecenie fix, zapisując log w pliku zewnętrznym za pomocą: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Gdzie NAME to nazwa dysku, taka jak d1 w naszym poprzednim przykładzie. -Jeśli dysk do odzyskania jest dyskiem parzystości, użyj nazw parity, 2-parity, +

+

Gdzie NAME to nazwa dysku, taka jak `d1` w naszym poprzednim przykładzie. +Jeśli dysk do odzyskania jest dyskiem parzystości, użyj nazw `parity`, `2-parity`, itp. Jeśli masz wiele uszkodzonych dysków, użyj wielu opcji -d, aby określić wszystkie z nich. @@ -492,272 +475,221 @@ wszystkie z nich. Uruchom je z dysku z wystarczającą ilością wolnego miejsca.

Teraz odzyskałeś wszystko, co jest możliwe do odzyskania. Jeśli niektóre pliki są częściowo lub całkowicie nie do odzyskania, zostaną one przemianowane -poprzez dodanie rozszerzenia .unrecoverable. +poprzez dodanie rozszerzenia `.unrecoverable`.

Szczegółową listę wszystkich nie do odzyskania bloków znajdziesz w pliku fix.log, -sprawdzając wszystkie linie zaczynające się od unrecoverable:. +sprawdzając wszystkie linie zaczynające się od `unrecoverable:`.

Jeśli nie jesteś zadowolony z odzyskiwania, możesz spróbować ponownie tyle razy, ile chcesz.

Na przykład, jeśli usunąłeś pliki z macierzy po ostatniej -sync, może to spowodować, że niektóre pliki nie zostaną odzyskane. -W tym przypadku możesz ponowić próbę fix za pomocą opcji -i, --import, +`sync`, może to spowodować, że niektóre pliki nie zostaną odzyskane. +W tym przypadku możesz ponowić próbę `fix` za pomocą opcji -i, --import, określając, gdzie te pliki znajdują się teraz, aby włączyć je ponownie do procesu odzyskiwania.

Jeśli jesteś zadowolony z odzyskiwania, możesz kontynuować, -ale pamiętaj, że po synchronizacji nie możesz już ponowić próby polecenia fix! -

-
-

+ale pamiętaj, że po synchronizacji nie możesz już ponowić próby polecenia `fix`! +

4.4.3 KROK 3 -> Sprawdzenie -

-

Jako ostrożne sprawdzenie, możesz teraz uruchomić polecenie check, aby upewnić się, że + +

Jako ostrożne sprawdzenie, możesz teraz uruchomić polecenie `check`, aby upewnić się, że wszystko jest poprawne na odzyskanym dysku. -

+

+
 snapraid -d NAME -a check
 
-

Gdzie NAME to nazwa dysku, taka jak d1 w naszym poprzednim przykładzie. +

+

Gdzie NAME to nazwa dysku, taka jak `d1` w naszym poprzednim przykładzie.

Opcje -d i -a mówią SnapRAID, aby sprawdził tylko określony dysk i zignorował wszystkie dane parzystości.

To polecenie zajmie dużo czasu, ale jeśli nie jesteś zbyt ostrożny, możesz je pominąć. -

-
-

+

4.4.4 KROK 4 -> Synchronizacja -

-

Uruchom polecenie sync, aby ponownie zsynchronizować macierz z nowym dyskiem. -

+
+

Uruchom polecenie `sync`, aby ponownie zsynchronizować macierz z nowym dyskiem. +

+
 snapraid sync
 
+

Jeśli wszystko zostanie odzyskane, to polecenie jest natychmiastowe. -

-
-
-
-

+

5 Commands -

+

SnapRAID udostępnia kilka prostych poleceń, które pozwalają na:

  • -Wyświetlenie statusu macierzy -> status +Wyświetlenie statusu macierzy -> `status`
  • -Kontrolę dysków -> smart, probe, up, down +Kontrolę dysków -> `smart`, `probe`, `up`, `down`
  • -Wykonanie kopii zapasowej/migawki -> sync +Wykonanie kopii zapasowej/migawki -> `sync`
  • -Okresowe sprawdzanie danych -> scrub +Okresowe sprawdzanie danych -> `scrub`
  • -Przywrócenie ostatniej kopii zapasowej/migawki -> fix. +Przywrócenie ostatniej kopii zapasowej/migawki -> `fix`.

Polecenia muszą być zapisane małymi literami. -

-

+

5.1 status -

+

Wyświetla podsumowanie stanu macierzy dysków.

Zawiera informacje o fragmentacji parzystości, jak stare są bloki bez sprawdzenia i wszystkie zarejestrowane ciche błędy napotkane podczas scrubbingu.

Prezentowane informacje odnoszą się do ostatniego momentu, w którym -uruchomiłeś sync. Późniejsze modyfikacje nie są brane pod uwagę. +uruchomiłeś `sync`. Późniejsze modyfikacje nie są brane pod uwagę.

Jeśli wykryto złe bloki, ich numery bloków są wymienione. -Aby je naprawić, możesz użyć polecenia fix -e. +Aby je naprawić, możesz użyć polecenia `fix -e`.

Pokazuje również wykres reprezentujący ostatni raz, kiedy każdy blok został sprawdzony lub zsynchronizowany. Sprawdzone bloki są pokazane -za pomocą *, bloki zsynchronizowane, ale jeszcze niesprawdzone, za pomocą o. +za pomocą '*', bloki zsynchronizowane, ale jeszcze niesprawdzone, za pomocą 'o'.

Nic nie jest modyfikowane. -

-
-

+

5.2 smart -

+

Wyświetla raport SMART wszystkich dysków w systemie.

Zawiera oszacowanie prawdopodobieństwa awarii w następnym roku, co pozwala zaplanować wymianę konserwacyjną dysków, które wykazują podejrzane atrybuty.

To oszacowanie prawdopodobieństwa uzyskuje się poprzez skorelowanie atrybutów SMART dysków z danymi Backblaze dostępnymi pod adresem: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
+

Jeśli SMART zgłosi, że dysk ulega awarii, dla tego dysku -wyświetlane jest FAIL lub PREFAIL, a SnapRAID zwraca błąd. +wyświetlane jest `FAIL` lub `PREFAIL`, a SnapRAID zwraca błąd. W takim przypadku natychmiastowa wymiana dysku jest wysoce zalecana.

Inne możliwe ciągi statusu to: -

-
-
+

+ + + +
logfail -
+
W przeszłości niektóre atrybuty były niższe niż próg. - - -
-
+
logerr -
+
Dziennik błędów urządzenia zawiera błędy. - - -
-
+
selferr -
+
Dziennik autotestu urządzenia zawiera błędy. - - - +

Jeśli określono opcję -v, --verbose, dostarczana jest głębsza analiza statystyczna. Ta analiza może pomóc Ci zdecydować, czy potrzebujesz więcej czy mniej parzystości. -

To polecenie używa narzędzia smartctl i jest równoważne -uruchomieniu smartctl -a na wszystkich urządzeniach. +

To polecenie używa narzędzia `smartctl` i jest równoważne +uruchomieniu `smartctl -a` na wszystkich urządzeniach.

Jeśli Twoje urządzenia nie zostaną poprawnie wykryte automatycznie, możesz określić -niestandardowe polecenie za pomocą opcji smartctl w pliku konfiguracyjnym. +niestandardowe polecenie za pomocą opcji `smartctl` w pliku konfiguracyjnym.

Nic nie jest modyfikowane. -

-
-

+

5.3 probe -

+

Wyświetla stan ZASILANIA wszystkich dysków w systemie. -

Standby oznacza, że dysk się nie kręci. Active oznacza, +

`Standby` oznacza, że dysk się nie kręci. `Active` oznacza, że dysk się kręci. -

To polecenie używa narzędzia smartctl i jest równoważne -uruchomieniu smartctl -n standby -i na wszystkich urządzeniach. +

To polecenie używa narzędzia `smartctl` i jest równoważne +uruchomieniu `smartctl -n standby -i` na wszystkich urządzeniach.

Jeśli Twoje urządzenia nie zostaną poprawnie wykryte automatycznie, możesz określić -niestandardowe polecenie za pomocą opcji smartctl w pliku konfiguracyjnym. +niestandardowe polecenie za pomocą opcji `smartctl` w pliku konfiguracyjnym.

Nic nie jest modyfikowane. -

-
-

+

5.4 up -

+

Rozpędza wszystkie dyski macierzy.

Możesz rozpędzić tylko określone dyski za pomocą opcji -d, --filter-disk.

Rozpędzanie wszystkich dysków w tym samym czasie wymaga dużo energii. Upewnij się, że Twój zasilacz jest w stanie to wytrzymać.

Nic nie jest modyfikowane. -

-
-

+

5.5 down -

+

Zatrzymuje wszystkie dyski macierzy. -

To polecenie używa narzędzia smartctl i jest równoważne -uruchomieniu smartctl -s standby,now na wszystkich urządzeniach. +

To polecenie używa narzędzia `smartctl` i jest równoważne +uruchomieniu `smartctl -s standby,now` na wszystkich urządzeniach.

Możesz zatrzymać tylko określone dyski za pomocą opcji -d, --filter-disk.

Aby automatycznie zatrzymać dyski w przypadku błędu, możesz użyć opcji -s, --spin-down-on-error z dowolnym innym poleceniem, co jest -równoważne ręcznemu uruchomieniu down, gdy wystąpi błąd. +równoważne ręcznemu uruchomieniu `down`, gdy wystąpi błąd.

Nic nie jest modyfikowane. -

-
-

+

5.6 diff -

-

Wyświetla listę wszystkich plików zmodyfikowanych od ostatniej sync, które + +

Wyświetla listę wszystkich plików zmodyfikowanych od ostatniej `sync`, które wymagają ponownego obliczenia danych parzystości.

To polecenie nie sprawdza danych pliku, a jedynie znacznik czasu pliku, rozmiar i inode.

Po wyświetleniu listy wszystkich zmienionych plików, prezentowane jest podsumowanie zmian, pogrupowane według: -

-
-
+

+ + + + + + + +
equal -
+
Pliki niezmienione od wcześniej. - - -
-
+
added -
+
Pliki dodane, których wcześniej nie było. - - -
-
+
removed -
+
Pliki usunięte. - - -
-
+
updated -
+
Pliki o innym rozmiarze lub znaczniku czasu, co oznacza, że zostały zmodyfikowane. - - -
-
+
moved -
+
Pliki przeniesione do innego katalogu na tym samym dysku. Są one identyfikowane przez tę samą nazwę, rozmiar, znacznik czasu i inode, ale inny katalog. - - -
-
+
copied -
-Pliki skopiowane na ten sam lub inny dysk, gdzie -oryginalny plik nadal istnieje. -Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru -i znacznika czasu. -Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka -musi być zgodna, aby plik został zidentyfikowany, a nie -tylko nazwa. -
- -
-
-relocated -
-Pliki przeniesione na ten sam lub inny dysk, gdzie -oryginał zniknął. -Są one identyfikowane przez posiadanie tej samej nazwy, rozmiaru -i znacznika czasu. -Jeśli podsekundowy znacznik czasu wynosi zero, pełna ścieżka -musi być zgodna, aby plik został zidentyfikowany. -W przeciwieństwie do plików 'moved' na tym samym dysku, pliki -relokowane mają inny i-węzeł. -
-
-
-
+
+Pliki skopiowane na tym samym lub innym dysku. Zauważ, że jeśli +zostały faktycznie przeniesione na inny dysk, zostaną również +policzone w `removed`. +Są one identyfikowane przez tę samą nazwę, rozmiar i +znacznik czasu. Jeśli znacznik czasu z dokładnością do podsekundy wynosi zero, +musi pasować pełna ścieżka, a nie tylko nazwa. +
restored -
-Pliki o innym i-węźle, ale pasującym katalogu, -nazwie, rozmiarze i znaczniku czasu. -Są to zazwyczaj pliki przywrócone po ich usunięciu. -
- - -

Jeśli wymagana jest sync, kod powrotu procesu wynosi 2, zamiast +

+Pliki o innym inode, ale pasującej nazwie, rozmiarze i znaczniku czasu. +Są to zazwyczaj pliki przywrócone po usunięciu. +
+

Jeśli wymagana jest `sync`, kod powrotu procesu wynosi 2, zamiast domyślnego 0. Kod powrotu 1 jest używany dla ogólnego stanu błędu.

Nic nie jest modyfikowane. -

-
-

+

5.7 sync -

+

Aktualizuje informacje o parzystości. Wszystkie zmodyfikowane pliki w macierzy dysków są odczytywane, a odpowiednie dane parzystości są aktualizowane.

Możesz zatrzymać ten proces w dowolnym momencie, naciskając Ctrl+C, bez utraty już wykonanej pracy. -Przy następnym uruchomieniu proces sync wznowi się w miejscu, w którym +Przy następnym uruchomieniu proces `sync` wznowi się w miejscu, w którym został przerwany.

Jeśli podczas procesu zostaną znalezione ciche błędy lub błędy wejścia/wyjścia, odpowiednie bloki zostaną oznaczone jako złe. @@ -769,13 +701,11 @@ Jeśli plik zostanie przeniesiony lub zmieniony na tym samym dysku, zachowując parzystość nie jest ponownie obliczana. Jeśli plik zostanie przeniesiony na inny dysk, parzystość jest ponownie obliczana, ale wcześniej obliczone informacje o haszu są zachowywane. -

Pliki content i parity są modyfikowane w razie potrzeby. +

Pliki `content` i `parity` są modyfikowane w razie potrzeby. Pliki w macierzy NIE są modyfikowane. -

-
-

+

5.8 scrub -

+

Sprawdza macierz, szukając cichych błędów lub błędów wejścia/wyjścia w danych i dyskach parzystości.

Każde wywołanie sprawdza około 8% macierzy, z wyłączeniem @@ -792,104 +722,92 @@ full - Sprawdza wszystko. aby zdefiniować, jak stary powinien być blok. Najpierw sprawdzane są najstarsze bloki, co zapewnia optymalne sprawdzenie. Jeśli chcesz sprawdzić tylko bloki właśnie zsynchronizowane, jeszcze niesprawdzone, -użyj opcji -p new. -

Aby uzyskać szczegóły statusu sprawdzania, użyj polecenia status. +użyj opcji `-p new`. +

Aby uzyskać szczegóły statusu sprawdzania, użyj polecenia `status`.

Dla każdego znalezionego cichego błędu lub błędu wejścia/wyjścia, odpowiednie bloki -są oznaczane jako złe w pliku content. -Te złe bloki są wymienione w status i mogą zostać naprawione za pomocą fix -e. +są oznaczane jako złe w pliku `content`. +Te złe bloki są wymienione w `status` i mogą zostać naprawione za pomocą `fix -e`. Po naprawie, przy następnym sprawdzeniu, zostaną one ponownie sprawdzone, a jeśli okaże się, że zostały poprawione, oznaczenie złego zostanie usunięte. -Aby sprawdzić tylko złe bloki, możesz użyć polecenia scrub -p bad. -

Zaleca się uruchamianie scrub tylko na zsynchronizowanej macierzy, aby uniknąć +Aby sprawdzić tylko złe bloki, możesz użyć polecenia `scrub -p bad`. +

Zaleca się uruchamianie `scrub` tylko na zsynchronizowanej macierzy, aby uniknąć zgłaszania błędów spowodowanych przez niezsynchronizowane dane. Błędy te są rozpoznawane jako nie będące cichymi błędami, a bloki nie są oznaczane jako złe, ale takie błędy są zgłaszane w wyniku polecenia. -

Plik content jest modyfikowany w celu zaktualizowania czasu ostatniego sprawdzenia +

Plik `content` jest modyfikowany w celu zaktualizowania czasu ostatniego sprawdzenia dla każdego bloku i oznaczenia złych bloków. -Pliki parity NIE są modyfikowane. +Pliki `parity` NIE są modyfikowane. Pliki w macierzy NIE są modyfikowane. -

-
-

+

5.9 fix -

+

Naprawia wszystkie pliki i dane parzystości.

Wszystkie pliki i dane parzystości są porównywane ze stanem migawki -zapisanym w ostatniej sync. +zapisanym w ostatniej `sync`. Jeśli zostanie znaleziona różnica, jest ona przywracana do zapisanego stanu migawki. -

OSTRZEŻENIE! Polecenie fix nie rozróżnia błędów od +

OSTRZEŻENIE! Polecenie `fix` nie rozróżnia błędów od celowych modyfikacji. Bezwarunkowo przywraca stan pliku -do ostatniej sync. +do ostatniej `sync`.

Jeśli nie określono żadnej innej opcji, przetwarzana jest cała macierz. Użyj opcji filtra, aby wybrać podzbiór plików lub dysków do operacji. -

Aby naprawić tylko bloki oznaczone jako złe podczas sync i scrub, +

Aby naprawić tylko bloki oznaczone jako złe podczas `sync` i `scrub`, użyj opcji -e, --filter-error. W przeciwieństwie do innych opcji filtra, ta stosuje poprawki tylko do plików, które są -niezmienione od ostatniej sync. +niezmienione od ostatniej `sync`.

SnapRAID zmienia nazwy wszystkich plików, których nie można naprawić, dodając -rozszerzenie .unrecoverable. +rozszerzenie `.unrecoverable`.

Przed naprawą, cała macierz jest skanowana w celu znalezienia wszelkich plików przeniesionych -od ostatniej operacji sync. +od ostatniej operacji `sync`. Pliki te są identyfikowane na podstawie ich znacznika czasu, ignorując ich nazwę i katalog, i są używane w procesie odzyskiwania, jeśli to konieczne. Jeśli przeniosłeś niektóre z nich poza macierz, możesz użyć opcji -i, --import, aby określić dodatkowe katalogi do skanowania.

Pliki są identyfikowane tylko po ścieżce, a nie po inode. -

Plik content NIE jest modyfikowany. -Pliki parity są modyfikowane w razie potrzeby. +

Plik `content` NIE jest modyfikowany. +Pliki `parity` są modyfikowane w razie potrzeby. Pliki w macierzy są modyfikowane w razie potrzeby. -

-
-

+

5.10 check -

+

Weryfikuje wszystkie pliki i dane parzystości. -

Działa jak fix, ale tylko symuluje odzyskiwanie i żadne zmiany +

Działa jak `fix`, ale tylko symuluje odzyskiwanie i żadne zmiany nie są zapisywane w macierzy.

To polecenie jest przeznaczone głównie do ręcznej weryfikacji, takiej jak po procesie odzyskiwania lub w innych specjalnych warunkach. -Do okresowych i zaplanowanych sprawdzeń użyj scrub. +Do okresowych i zaplanowanych sprawdzeń użyj `scrub`.

Jeśli użyjesz opcji -a, --audit-only, sprawdzane są tylko dane pliku, a dane parzystości są ignorowane, co zapewnia szybsze działanie.

Pliki są identyfikowane tylko po ścieżce, a nie po inode.

Nic nie jest modyfikowane. -

-
-

+

5.11 list -

+

Wyświetla listę wszystkich plików zawartych w macierzy w momencie -ostatniej sync. +ostatniej `sync`.

Z -v lub --verbose, wyświetlany jest również czas z dokładnością do podsekundy.

Nic nie jest modyfikowane. -

-
-

+

5.12 dup -

+

Wyświetla listę wszystkich zduplikowanych plików. Dwa pliki są uważane za równe, jeśli ich hasze pasują. Dane pliku nie są odczytywane; używane są tylko wcześniej obliczone hasze.

Nic nie jest modyfikowane. -

-
-

+

5.13 pool -

+

Tworzy lub aktualizuje wirtualny widok wszystkich -plików w Twojej macierzy dysków w katalogu pooling. +plików w Twojej macierzy dysków w katalogu `pooling`.

Pliki nie są kopiowane, ale linkowane za pomocą dowiązań symbolicznych.

Podczas aktualizacji, wszystkie istniejące dowiązania symboliczne i puste podkatalogi są usuwane i zastępowane nowym widokiem macierzy. Wszelkie inne zwykłe pliki pozostają na swoim miejscu.

Nic nie jest modyfikowane poza katalogiem puli. -

-
-

+

5.14 devices -

+

Wyświetla urządzenia niskiego poziomu używane przez macierz.

To polecenie wyświetla skojarzenia urządzeń w macierzy i jest przeznaczone głównie jako interfejs skryptowy. @@ -900,11 +818,9 @@ Ostatnia kolumna to nazwa dysku w macierzy. macierzy, ale w niektórych bardziej złożonych konfiguracjach możesz mieć wiele urządzeń niskiego poziomu używanych przez pojedynczy dysk w macierzy.

Nic nie jest modyfikowane. -

-
-

+

5.15 touch -

+

Ustawia arbitralny znacznik czasu z dokładnością do podsekundy dla wszystkich plików, które mają go ustawiony na zero.

Poprawia to zdolność SnapRAID do rozpoznawania przeniesionych @@ -917,11 +833,9 @@ jest zerowy, jest uważany za kopię tylko wtedy, gdy pasują pełna ścieżka, rozmiar i znacznik czasu.

Znacznik czasu z dokładnością do sekundy nie jest modyfikowany, więc wszystkie daty i czasy Twoich plików zostaną zachowane. -

-
-

+

5.16 rehash -

+

Planuje ponowne haszowanie całej macierzy.

To polecenie zmienia używany rodzaj hasza, zazwyczaj podczas aktualizacji z systemu 32-bitowego na 64-bitowy, aby przełączyć się z @@ -929,156 +843,122 @@ MurmurHash3 na szybszy SpookyHash.

Jeśli używasz już optymalnego hasza, to polecenie nic nie robi i informuje Cię, że nie jest potrzebne żadne działanie.

Ponowne haszowanie nie jest wykonywane natychmiast, ale odbywa się -stopniowo podczas sync i scrub. -

Możesz sprawdzić stan ponownego haszowania za pomocą status. +stopniowo podczas `sync` i `scrub`. +

Możesz sprawdzić stan ponownego haszowania za pomocą `status`.

Podczas ponownego haszowania SnapRAID zachowuje pełną funkcjonalność, -z jedynym wyjątkiem, że dup nie może wykryć zduplikowanych +z jedynym wyjątkiem, że `dup` nie może wykryć zduplikowanych plików używających innego hasza. -

-
-

-locate -

-

Lokalizuje pliki zapisane na dyskach parzystości. Dla każdego dopasowanego pliku -wypisuje jego lokalizację w pliku parzystości oraz liczbę zajmowanych przez -niego fragmentów. -

Możesz użyć opcji -t, --tail, aby ograniczyć operację do plików zajmujących -określoną końcową część parzystości. -

Jeśli chcesz dokonać realokacji tych plików, możesz użyć opcji --W, --force-realloc-tail. -Pamiętaj, że takie pliki nie będą chronione przez parzystość podczas procesu -realokacji. -

-
-
-

+

6 Options -

+

SnapRAID udostępnia następujące opcje: -

-
-
+

+ +
-c, --conf CONFIG -
+
Wybiera plik konfiguracyjny do użycia. Jeśli nie określono, w systemie Unix -używa pliku /usr/local/etc/snapraid.conf, jeśli istnieje, -w przeciwnym razie /etc/snapraid.conf. -W systemie Windows używa pliku snapraid.conf w tym samym -katalogu co snapraid.exe. - - - -
-
-
+używa pliku `/usr/local/etc/snapraid.conf`, jeśli istnieje, +w przeciwnym razie `/etc/snapraid.conf`. +W systemie Windows używa pliku `snapraid.conf` w tym samym +katalogu co `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filtruje pliki do przetworzenia w check i fix. +
+Filtruje pliki do przetworzenia w `check` i `fix`. Przetwarzane są tylko pliki pasujące do określonego wzorca. Ta opcja może być używana wielokrotnie. Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat specyfikacji wzorców. W systemie Unix upewnij się, że znaki globbing są cytowane, jeśli są używane. -Ta opcja może być używana tylko z check i fix. -Nie może być używana z sync i scrub, ponieważ zawsze +Ta opcja może być używana tylko z `check` i `fix`. +Nie może być używana z `sync` i `scrub`, ponieważ zawsze przetwarzają całą macierz. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtruje dyski do przetworzenia w check, fix, up i down. +
+Filtruje dyski do przetworzenia w `check`, `fix`, `up` i `down`. Musisz określić nazwę dysku zdefiniowaną w pliku konfiguracyjnym. -Możesz również określić dyski parzystości za pomocą nazw: parity, 2-parity, -3-parity, itp., aby ograniczyć operacje do określonego dysku parzystości. +Możesz również określić dyski parzystości za pomocą nazw: `parity`, `2-parity`, +`3-parity`, itp., aby ograniczyć operacje do określonego dysku parzystości. Jeśli połączysz wiele opcji --filter, --filter-disk i --filter-missing, wybrane zostaną tylko pliki pasujące do wszystkich filtrów. Ta opcja może być używana wielokrotnie. -Ta opcja może być używana tylko z check, fix, up i down. -Nie może być używana z sync i scrub, ponieważ zawsze +Ta opcja może być używana tylko z `check`, `fix`, `up` i `down`. +Nie może być używana z `sync` i `scrub`, ponieważ zawsze przetwarzają całą macierz. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtruje pliki do przetworzenia w check i fix. +
+Filtruje pliki do przetworzenia w `check` i `fix`. Przetwarzane są tylko pliki brakujące lub usunięte z macierzy. -Użyte z fix, działa to jako polecenie undelete. +Użyte z `fix`, działa to jako polecenie `undelete`. Jeśli połączysz wiele opcji --filter, --filter-disk i --filter-missing, wybrane zostaną tylko pliki pasujące do wszystkich filtrów. -Ta opcja może być używana tylko z check i fix. -Nie może być używana z sync i scrub, ponieważ zawsze +Ta opcja może być używana tylko z `check` i `fix`. +Nie może być używana z `sync` i `scrub`, ponieważ zawsze przetwarzają całą macierz. - - - -
-
-
+
+ + +
-e, --filter-error -
-Przetwarza pliki z błędami w check i fix. +
+Przetwarza pliki z błędami w `check` i `fix`. Przetwarza tylko pliki, które mają bloki oznaczone cichymi -błędami lub błędami wejścia/wyjścia podczas sync i scrub, jak wymieniono w status. -Ta opcja może być używana tylko z check i fix. - - - -
-
-
+błędami lub błędami wejścia/wyjścia podczas `sync` i `scrub`, jak wymieniono w `status`. +Ta opcja może być używana tylko z `check` i `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Wybiera plan sprawdzania. Jeśli PERC jest wartością numeryczną od 0 do 100, jest interpretowany jako procent bloków do sprawdzenia. Zamiast wartości procentowej możesz określić plan: -bad sprawdza złe bloki, new sprawdza bloki jeszcze niesprawdzone, -a full sprawdza wszystko. -Ta opcja może być używana tylko z scrub. - - - -
-
-
+`bad` sprawdza złe bloki, `new` sprawdza bloki jeszcze niesprawdzone, +a `full` sprawdza wszystko. +Ta opcja może być używana tylko z `scrub`. +
+ + +
-o, --older-than DAYS -
-Wybiera najstarszą część macierzy do przetworzenia w scrub. +
+Wybiera najstarszą część macierzy do przetworzenia w `scrub`. DAYS to minimalny wiek w dniach dla bloku, który ma być sprawdzony; domyślnie jest to 10. Bloki oznaczone jako złe są zawsze sprawdzane niezależnie od tej opcji. -Ta opcja może być używana tylko z scrub. - - - -
-
-
+Ta opcja może być używana tylko z `scrub`. +
+ + +
-a, --audit-only -
-W check, weryfikuje hasz plików bez +
+W `check`, weryfikuje hasz plików bez sprawdzania danych parzystości. Jeśli interesuje Cię tylko sprawdzenie danych pliku, ta opcja może znacznie przyspieszyć proces sprawdzania. -Ta opcja może być używana tylko z check. - - - -
-
-
+Ta opcja może być używana tylko z `check`. +
+ + +
-h, --pre-hash -
-W sync, uruchamia wstępną fazę haszowania wszystkich nowych danych +
+W `sync`, uruchamia wstępną fazę haszowania wszystkich nowych danych w celu dodatkowej weryfikacji przed obliczeniem parzystości. -Zazwyczaj w sync nie jest wykonywane wstępne haszowanie, a nowe +Zazwyczaj w `sync` nie jest wykonywane wstępne haszowanie, a nowe dane są haszowane tuż przed obliczeniem parzystości, gdy są odczytywane po raz pierwszy. Ten proces zachodzi, gdy system jest pod @@ -1086,73 +966,52 @@ dużym obciążeniem, wszystkie dyski się kręcą, a CPU jest zajęte. Jest to ekstremalny warunek dla maszyny, a jeśli ma ukryty problem sprzętowy, ciche błędy mogą pozostać niewykryte, ponieważ dane nie są jeszcze haszowane. -Aby uniknąć tego ryzyka, możesz włączyć tryb pre-hash, aby +Aby uniknąć tego ryzyka, możesz włączyć tryb `pre-hash`, aby wszystkie dane były odczytywane dwukrotnie w celu zapewnienia ich integralności. Ta opcja weryfikuje również pliki przeniesione wewnątrz macierzy, aby upewnić się, że operacja przeniesienia zakończyła się pomyślnie, i, jeśli to konieczne, umożliwia uruchomienie operacji fix przed kontynuowaniem. -Ta opcja może być używana tylko z sync. - - - -
-
-
+Ta opcja może być używana tylko z `sync`. +
+ + +
-i, --import DIR -
+
Importuje z określonego katalogu wszelkie pliki usunięte -z macierzy po ostatniej sync. -Jeśli nadal masz takie pliki, mogą być użyte przez check -i fix, aby poprawić proces odzyskiwania. +z macierzy po ostatniej `sync`. +Jeśli nadal masz takie pliki, mogą być użyte przez `check` +i `fix`, aby poprawić proces odzyskiwania. Pliki są odczytywane, w tym w podkatalogach, i są identyfikowane niezależnie od ich nazwy. -Ta opcja może być używana tylko z check i fix. - - - -
-
-
+Ta opcja może być używana tylko z `check` i `fix`. +
+ + +
-s, --spin-down-on-error -
+
W przypadku każdego błędu, zatrzymuje wszystkie zarządzane dyski przed wyjściem z niezerowym kodem statusu. Zapobiega to pozostawaniu dysków aktywnymi i kręcącymi się po przerwanej operacji, pomagając uniknąć niepotrzebnego gromadzenia się ciepła i zużycia energii. Użyj tej opcji, aby upewnić się, że dyski są bezpiecznie zatrzymane, nawet gdy polecenie zakończy się niepowodzeniem. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Stosuje globalne ograniczenie przepustowości dla wszystkich dysków. RATE to liczba bajtów na sekundę. Możesz określić mnożnik, taki jak K, M lub G (np. --bw-limit 1G). - - - -
-
-
--t, --tail ROZMIAR -
-Ogranicza listę plików do tych, które nie używają więcej niż określony -końcowy rozmiar dysków parzystości. -Możesz użyć mnożników takich jak K, M, G lub T (np. --tail 1G). -Opcja ta jest ważna tylko wtedy, gdy jest używana wraz z poleceniem -locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Włącza rozszerzony widok statusu, który pokazuje dodatkowe informacje. Ekran wyświetla dwa wykresy: Pierwszy wykres pokazuje liczbę buforowanych pasków dla każdego @@ -1169,14 +1028,12 @@ Wszystkie obliczenia są wykonywane równolegle z operacjami dyskowymi. Dlatego, dopóki istnieje mierzalny czas oczekiwania dla przynajmniej jednego dysku, oznacza to, że CPU jest wystarczająco szybkie, aby nadążyć za obciążeniem. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Wymusza niebezpieczną operację synchronizacji pliku o zerowym rozmiarze, który wcześniej był niezerowy. Jeśli SnapRAID wykryje taki stan, zatrzymuje przetwarzanie, @@ -1184,15 +1041,13 @@ chyba że określisz tę opcję. Pozwala to łatwo wykryć, kiedy po awarii systemu niektóre dostępne pliki zostały obcięte. Jest to możliwy stan w systemie Linux z systemami plików ext3/ext4. -Ta opcja może być używana tylko z sync. - - - -
-
-
+Ta opcja może być używana tylko z `sync`. +
+ + +
-E, --force-empty -
+
Wymusza niebezpieczną operację synchronizacji dysku z brakującymi wszystkimi oryginalnymi plikami. Jeśli SnapRAID wykryje, że brakuje wszystkich plików pierwotnie obecnych @@ -1200,15 +1055,13 @@ na dysku lub zostały przepisane, zatrzymuje przetwarzanie, chyba że określisz tę opcję. Pozwala to łatwo wykryć, kiedy system plików danych nie jest zamontowany. -Ta opcja może być używana tylko z sync. - - - -
-
-
+Ta opcja może być używana tylko z `sync`. +
+ + +
-U, --force-uuid -
+
Wymusza niebezpieczną operację synchronizacji, sprawdzania i naprawiania z dyskami, które zmieniły swój UUID. Jeśli SnapRAID wykryje, że niektóre dyski zmieniły UUID, @@ -1218,32 +1071,28 @@ niewłaściwych punktach montowania. Dozwolona jest jednak pojedyncza zmiana UUID z pojedynczą parzystością i więcej z wielokrotną parzystością, ponieważ jest to normalny przypadek podczas wymiany dysków po odzyskaniu. -Ta opcja może być używana tylko z sync, check lub -fix. - - - -
-
-
+Ta opcja może być używana tylko z `sync`, `check` lub +`fix`. +
+ + +
-D, --force-device -
+
Wymusza niebezpieczną operację naprawiania z niedostępnymi dyskami lub z dyskami na tym samym urządzeniu fizycznym. Na przykład, jeśli straciłeś dwa dyski danych i masz zapasowy dysk do odzyskania tylko pierwszego, możesz zignorować drugi niedostępny dysk. Lub, jeśli chcesz odzyskać dysk w wolnym miejscu pozostawionym na już używanym dysku, współdzielącym to samo urządzenie fizyczne. -Ta opcja może być używana tylko z fix. - - - -
-
-
+Ta opcja może być używana tylko z `fix`. +
+ + +
-N, --force-nocopy -
-W sync, check i fix, wyłącza heurystykę wykrywania kopii. +
+W `sync`, `check` i `fix`, wyłącza heurystykę wykrywania kopii. Bez tej opcji SnapRAID zakłada, że pliki o tych samych atrybutach, takich jak nazwa, rozmiar i znacznik czasu, są kopiami z tymi samymi danymi. @@ -1253,135 +1102,93 @@ w celu wykrycia cichych błędów lub odzyskania brakujących plików. W niektórych rzadkich przypadkach to zachowanie może prowadzić do fałszywych alarmów lub spowolnienia procesu z powodu wielu weryfikacji hasza, a ta opcja pozwala rozwiązać takie problemy. -Ta opcja może być używana tylko z sync, check i fix. - - - -
-
-
+Ta opcja może być używana tylko z `sync`, `check` i `fix`. +
+ + +
-F, --force-full -
-W sync, wymusza pełne ponowne obliczenie parzystości. +
+W `sync`, wymusza pełne ponowne obliczenie parzystości. Ta opcja może być używana, gdy dodajesz nowy poziom parzystości lub jeśli powróciłeś do starego pliku zawartości, używając nowszych danych parzystości. Zamiast ponownego tworzenia parzystości od podstaw, pozwala to na ponowne wykorzystanie haszy obecnych w pliku zawartości do walidacji danych -i utrzymania ochrony danych podczas procesu sync za pomocą +i utrzymania ochrony danych podczas procesu `sync` za pomocą istniejących danych parzystości. -Ta opcja może być używana tylko z sync. - - - -
-
-
+Ta opcja może być używana tylko z `sync`. +
+ + +
-R, --force-realloc -
-W sync, wymusza pełną realokację plików i przebudowę parzystości. +
+W `sync`, wymusza pełną realokację plików i przebudowę parzystości. Ta opcja może być używana do całkowitej realokacji wszystkich plików, usuwając fragmentację, jednocześnie ponownie wykorzystując hasze obecne w pliku zawartości do walidacji danych. -Ta opcja może być używana tylko z sync. +Ta opcja może być używana tylko z `sync`. OSTRZEŻENIE! Ta opcja jest tylko dla ekspertów i jest wysoce zalecane, aby jej nie używać. -NIE MASZ ochrony danych podczas operacji sync. - - - -
-
-
--W, --force-realloc-tail ROZMIAR -
-Działa jak -R, --force-realloc, ale ogranicza się do określonej części -końcowej (ostatnie ROZMIAR bajtów) każdego pliku parzystości. -Wymusza realokację (przeniesienie) wszelkich fragmentów/bloków plików -obecnie przechowywanych w tej sekcji końcowej, pozwalając na ich -umieszczenie w dowolnym miejscu w pliku (plikach) parzystości, gdzie -dostępne jest wolne miejsce (w tym w istniejących lukach). -Głównym celem tej opcji jest zmniejszenie rozmiaru pliku parzystości -na dysku. -Jeśli realokacja pomyślnie wyczyści całą sekcję końcową (nie pozostaną -żadne bloki korzystające z niej), plik parzystości zostanie przycięty, -odzyskując nieużywane miejsce na końcu. -Możesz użyć mnożników takich jak K, M, G lub T (np. ---force-realloc-tail 1G). -Możesz użyć locate -t, --tail, aby wcześniej poznać pliki, których -będzie to dotyczyć. -OSTRZEŻENIE! -Ta opcja jest przeznaczona wyłącznie dla ekspertów i zdecydowanie -zaleca się jej nie używać. -Podczas operacji sync pliki, których to dotyczy, NIE mają ochrony -danych. -
-
-
-
-
-
+NIE MASZ ochrony danych podczas operacji `sync`. +
+ + +
-l, --log FILE -
+
Zapisuje szczegółowy log do określonego pliku. Jeśli ta opcja nie jest określona, nieoczekiwane błędy są drukowane na ekranie, potencjalnie prowadząc do nadmiernego wyjścia w przypadku wielu błędów. Gdy -l, --log jest określone, tylko krytyczne błędy, które powodują zatrzymanie SnapRAID, są drukowane na ekranie. -Jeśli ścieżka zaczyna się od >>, plik jest otwierany -w trybie dołączania. Wystąpienia %D i %T w nazwie są +Jeśli ścieżka zaczyna się od '>>', plik jest otwierany +w trybie dołączania. Wystąpienia '%D' i '%T' w nazwie są zastępowane datą i czasem w formacie RRRRMMDD i GGMMSS. W plikach wsadowych Windows musisz podwoić -znak %, np. result-%%D.log. Aby użyć >>, musisz -ujęć nazwę w cudzysłów, np. ">>result.log". +znak '%', np. result-%%D.log. Aby użyć '>>', musisz +ujęć nazwę w cudzysłów, np. `">>result.log"`. Aby wyprowadzić log do standardowego wyjścia lub standardowego błędu, -możesz użyć odpowiednio ">&1" i ">&2". +możesz użyć odpowiednio `">&1"` i `">&2"`. Opisy tagów logu znajdziesz w pliku snapraid_log.txt lub na stronie podręcznika. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Ustawia nowy limit błędów przed zatrzymaniem wykonania. Domyślnie SnapRAID zatrzymuje się, jeśli napotka więcej niż 100 błędów wejścia/wyjścia, co wskazuje, że dysk prawdopodobnie ulega awarii. -Ta opcja dotyczy sync i scrub, które mogą +Ta opcja dotyczy `sync` i `scrub`, które mogą kontynuować po pierwszym zestawie błędów dysku, aby spróbować ukończyć swoje operacje. -Jednak check i fix zawsze zatrzymują się przy pierwszym błędzie. - - - -
-
-
+Jednak `check` i `fix` zawsze zatrzymują się przy pierwszym błędzie. +
+ + +
-S, --start BLKSTART -
+
Zaczyna przetwarzanie od określonego numeru bloku. Może to być przydatne do ponownej próby sprawdzenia lub naprawy określonych bloków w przypadku uszkodzonego dysku. Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Przetwarza tylko określoną liczbę bloków. Ta opcja jest przeznaczona głównie do zaawansowanego ręcznego odzyskiwania. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Generuje atrapę pliku konfiguracyjnego z istniejącego pliku zawartości. Plik konfiguracyjny jest zapisywany na standardowe wyjście @@ -1389,69 +1196,57 @@ i nie nadpisuje istniejącego. Ten plik konfiguracyjny zawiera również informacje potrzebne do rekonstrukcji punktów montowania dysków na wypadek utraty całego systemu. - - - -
-
-
+
+ + +
-v, --verbose -
+
Wyświetla więcej informacji na ekranie. Jeśli określono raz, drukuje wykluczone pliki i dodatkowe statystyki. Ta opcja nie ma wpływu na pliki logów. - - - -
-
-
+
+ + +
-q, --quiet -
+
Wyświetla mniej informacji na ekranie. Jeśli określono raz, usuwa pasek postępu; dwa razy, bieżące operacje; trzy razy, komunikaty informacyjne; cztery razy, komunikaty statusu. Krytyczne błędy są zawsze drukowane na ekranie. Ta opcja nie ma wpływu na pliki logów. - - - -
-
-
+
+ + +
-H, --help -
+
Wyświetla krótki ekran pomocy. - - - -
-
-
+
+ + +
-V, --version -
+
Wyświetla wersję programu. - - - - -
-

+

+

7 Configuration -

+

SnapRAID wymaga pliku konfiguracyjnego, aby wiedzieć, gdzie znajduje się Twoja macierz dysków i gdzie przechowywać informacje o parzystości. -

W systemie Unix używa pliku /usr/local/etc/snapraid.conf, jeśli istnieje, -w przeciwnym razie /etc/snapraid.conf. -W systemie Windows używa pliku snapraid.conf w tym samym -katalogu co snapraid.exe. +

W systemie Unix używa pliku `/usr/local/etc/snapraid.conf`, jeśli istnieje, +w przeciwnym razie `/etc/snapraid.conf`. +W systemie Windows używa pliku `snapraid.conf` w tym samym +katalogu co `snapraid.exe`.

Musi zawierać następujące opcje (uwzględniające wielkość liter): -

-

+

7.1 parity FILE [,FILE] ... -

+

Definiuje pliki do użycia do przechowywania informacji o parzystości. Parzystość umożliwia ochronę przed awarią pojedynczego dysku, podobnie jak w RAID5. @@ -1466,11 +1261,9 @@ nie ulegną fragmentacji, co poprawia wydajność.

W systemie Windows 256 MB jest pozostawione niewykorzystane na każdym dysku, aby uniknąć ostrzeżenia o pełnych dyskach.

Ta opcja jest obowiązkowa i może być używana tylko raz. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Definiuje pliki do użycia do przechowywania dodatkowych informacji o parzystości.

Dla każdego określonego poziomu parzystości włączany jest jeden dodatkowy poziom ochrony: @@ -1492,45 +1285,39 @@ poziom ochrony:

Każdy poziom parzystości wymaga obecności wszystkich poprzednich poziomów parzystości. -

Obowiązują te same uwagi, co dla opcji parity. +

Obowiązują te same uwagi, co dla opcji 'parity'.

Te opcje są opcjonalne i mogą być używane tylko raz. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Definiuje alternatywny plik i format do przechowywania potrójnej parzystości. -

Ta opcja jest alternatywą dla 3-parity, przeznaczoną głównie dla +

Ta opcja jest alternatywą dla '3-parity', przeznaczoną głównie dla procesorów niskiej klasy, takich jak ARM lub AMD Phenom, Athlon i Opteron, które nie obsługują zestawu instrukcji SSSE3. W takich przypadkach zapewnia lepszą wydajność.

Ten format jest podobny, ale szybszy niż ten używany przez ZFS RAIDZ3. Podobnie jak ZFS, nie działa powyżej potrójnej parzystości. -

Podczas używania 3-parity zostaniesz ostrzeżony, jeśli zaleca się użycie -formatu z-parity w celu poprawy wydajności. +

Podczas używania '3-parity' zostaniesz ostrzeżony, jeśli zaleca się użycie +formatu 'z-parity' w celu poprawy wydajności.

Możliwa jest konwersja z jednego formatu na inny poprzez dostosowanie pliku konfiguracyjnego z pożądanym plikiem z-parity lub 3-parity -i użycie fix do jego ponownego utworzenia. -

-
-

+i użycie 'fix' do jego ponownego utworzenia. +

7.4 content FILE -

+

Definiuje plik do użycia do przechowywania listy i sum kontrolnych wszystkich plików obecnych w Twojej macierzy dysków.

Może być umieszczony na dysku używanym do danych, parzystości lub każdym innym dostępnym dysku. Jeśli użyjesz dysku danych, ten plik jest automatycznie wykluczony -z procesu sync. +z procesu `sync`.

Ta opcja jest obowiązkowa i może być używana wielokrotnie do zapisania wielu kopii tego samego pliku.

Musisz przechowywać co najmniej jedną kopię dla każdego używanego dysku parzystości plus jeden. Używanie dodatkowych kopii nie szkodzi. -

-
-

+

7.5 data NAME DIR -

+

Definiuje nazwę i punkt montowania dysków danych w macierzy. NAME służy do identyfikacji dysku i musi być unikalna. DIR to punkt montowania dysku w @@ -1539,49 +1326,31 @@ systemie plików. zachowasz stałą nazwę NAME.

Powinieneś użyć jednej opcji dla każdego dysku danych w macierzy.

Możesz później zmienić nazwę dysku, zmieniając bezpośrednio nazwę NAME -w pliku konfiguracyjnym, a następnie uruchamiając polecenie sync. +w pliku konfiguracyjnym, a następnie uruchamiając polecenie 'sync'. W przypadku zmiany nazwy, skojarzenie odbywa się za pomocą zapisanego UUID dysków. -

-
-

-extra NAME DIR -

-

Definiuje nazwę i punkt montowania dodatkowych dysków do -monitorowania za pomocą poleceń smart oraz probe. -

Jest to przydatne do monitorowania dysków, które nie są częścią -macierzy, ale są wymagane do funkcjonowania systemu, takich jak -dysk rozruchowy. -

Należy zauważyć, że polecenia up i down nie mają wpływu na takie -dyski, ponieważ oczekuje się, że będą one zawsze w ruchu. -

-
-

+

7.6 nohidden -

+

Wyklucza wszystkie ukryte pliki i katalogi. -W systemie Unix ukryte pliki to te zaczynające się od .. +W systemie Unix ukryte pliki to te zaczynające się od `.`. W systemie Windows są to te z atrybutem ukrycia. -

-
-

+

7.7 exclude/include PATTERN -

+

Definiuje wzorce plików lub katalogów do wykluczenia lub włączenia do procesu synchronizacji. Wszystkie wzorce są przetwarzane w określonej kolejności. -

Jeśli pierwszy pasujący wzorzec jest exclude, plik -jest wykluczony. Jeśli jest to include, plik jest włączony. +

Jeśli pierwszy pasujący wzorzec jest `exclude`, plik +jest wykluczony. Jeśli jest to `include`, plik jest włączony. Jeśli żaden wzorzec nie pasuje, plik jest wykluczony, jeśli ostatni określony -wzorzec to include, lub włączony, jeśli ostatni określony wzorzec to exclude. +wzorzec to `include`, lub włączony, jeśli ostatni określony wzorzec to `exclude`.

Zobacz sekcję PATTERN, aby uzyskać więcej szczegółów na temat specyfikacji wzorców.

Ta opcja może być używana wielokrotnie. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Definiuje podstawowy rozmiar bloku w kibibajtach dla parzystości. Jeden kibibajt to 1024 bajty.

Domyślny rozmiar bloku to 256, co powinno działać w większości przypadków. @@ -1601,7 +1370,7 @@ ilość danych na tym dysku danych, a nie na innych. marnowana dla każdego pliku. Na przykład, z 100 000 plików i rozmiarem bloku 256 KiB, zmarnujesz 12,8 GB parzystości, co może skutkować 12,8 GB mniejszą dostępną przestrzenią na dysku danych. -

Możesz sprawdzić ilość zmarnowanego miejsca na każdym dysku za pomocą status. +

Możesz sprawdzić ilość zmarnowanego miejsca na każdym dysku za pomocą `status`. Jest to ilość miejsca, którą musisz pozostawić wolną na dyskach danych lub użyć dla plików nie włączonych do macierzy. Jeśli ta wartość jest ujemna, oznacza to, że jesteś blisko wypełnienia @@ -1612,17 +1381,17 @@ masz wystarczająco dużo dodatkowego miejsca, aby obsłużyć do 100 000 plików na każdym dysku danych bez marnowania miejsca.

Sztuczką, aby uzyskać większą partycję parzystości w systemie Linux, jest sformatowanie jej za pomocą polecenia: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Daje to około 1,5% dodatkowego miejsca, około 60 GB dla dysku 4 TB, co pozwala na około 460 000 plików na każdym dysku danych bez marnowania miejsca. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Definiuje rozmiar hasza w bajtach dla zapisanych bloków.

Domyślny rozmiar hasza to 16 bajtów (128 bitów), co powinno działać w większości przypadków. @@ -1653,26 +1422,22 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Automatycznie zapisuje stan podczas synchronizacji lub sprawdzania po przetworzeniu określonej ilości GB. -Ta opcja jest przydatna, aby uniknąć ponownego uruchamiania długich poleceń sync +Ta opcja jest przydatna, aby uniknąć ponownego uruchamiania długich poleceń `sync` od zera, jeśli zostaną przerwane przez awarię maszyny lub inne zdarzenie. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Ustawia maksymalną dozwoloną temperaturę dysku w stopniach Celsjusza. Po określeniu, SnapRAID okresowo sprawdza temperaturę wszystkich dysków za pomocą narzędzia smartctl. Aktualne temperatury dysków są wyświetlane podczas działania SnapRAID. Jeśli którykolwiek dysk przekroczy ten limit, wszystkie operacje zostają zatrzymane, a dyski są zatrzymywane (przechodzą w stan gotowości) na czas -zdefiniowany przez opcję temp_sleep. Po okresie uśpienia, operacje +zdefiniowany przez opcję `temp_sleep`. Po okresie uśpienia, operacje są wznawiane, potencjalnie ponownie zatrzymując się, jeśli limit temperatury zostanie ponownie osiągnięty.

Podczas działania SnapRAID analizuje również krzywą nagrzewania każdego @@ -1691,87 +1456,84 @@ Jeśli nie można uzyskać dostępu do żadnego czujnika systemu, jako awaryjne wykorzystuje najniższą temperaturę dysku zmierzoną na początku uruchomienia.

Normalnie SnapRAID pokazuje tylko temperaturę najgorętszego dysku. Aby wyświetlić temperaturę wszystkich dysków, użyj opcji -A lub --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Ustawia czas gotowości, w minutach, po osiągnięciu limitu temperatury. W tym okresie dyski pozostają zatrzymane. Domyślnie jest to 5 minut. -

-
-

+

7.13 pool DIR -

+

Definiuje katalog puli, w którym tworzony jest wirtualny widok macierzy -dysków za pomocą polecenia pool. +dysków za pomocą polecenia `pool`.

Katalog musi już istnieć. -

-
-

+

7.14 share UNC_DIR -

+

Definiuje ścieżkę UNC Windows wymaganą do zdalnego dostępu do dysków.

Jeśli ta opcja jest określona, dowiązania symboliczne utworzone w katalogu puli używają tej ścieżki UNC do dostępu do dysków. Bez tej opcji generowane dowiązania symboliczne używają tylko ścieżek lokalnych, co nie pozwala na udostępnianie katalogu puli w sieci.

Dowiązania symboliczne są tworzone przy użyciu określonej ścieżki UNC, -dodając nazwę dysku określoną w opcji data, a na końcu dodając +dodając nazwę dysku określoną w opcji `data`, a na końcu dodając katalog i nazwę pliku.

Ta opcja jest wymagana tylko dla systemu Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Definiuje niestandardowe opcje smartctl do uzyskania atrybutów SMART dla każdego dysku. Może to być wymagane dla kontrolerów RAID i niektórych dysków USB, których nie można wykryć automatycznie. Symbol zastępczy %s jest zastępowany nazwą urządzenia, ale jest opcjonalny dla stałych urządzeń, takich jak kontrolery RAID. -

DISK to ta sama nazwa dysku określona w opcji data. -PARITY to jedna z nazw parzystości: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity lub z-parity. -

W określonych OPCJACH ciąg %s jest zastępowany +

DISK to ta sama nazwa dysku określona w opcji `data`. +PARITY to jedna z nazw parzystości: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` lub `z-parity`. +

W określonych OPCJACH ciąg `%s` jest zastępowany nazwą urządzenia. W przypadku kontrolerów RAID, urządzenie jest -prawdopodobnie stałe i może nie być konieczne użycie %s. +prawdopodobnie stałe i może nie być konieczne użycie `%s`.

Zapoznaj się z dokumentacją smartmontools, aby uzyskać możliwe opcje: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Na przykład: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignoruje określony atrybut SMART podczas obliczania prawdopodobieństwa awarii dysku. Ta opcja jest przydatna, jeśli dysk zgłasza nietypowe lub wprowadzające w błąd wartości dla określonego atrybutu. -

DISK to ta sama nazwa dysku określona w opcji data. -PARITY to jedna z nazw parzystości: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity lub z-parity. +

DISK to ta sama nazwa dysku określona w opcji `data`. +PARITY to jedna z nazw parzystości: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` lub `z-parity`. Specjalna wartość * może być użyta do zignorowania atrybutu na wszystkich dyskach. -

Na przykład, aby zignorować atrybut Current Pending Sector Count na +

Na przykład, aby zignorować atrybut `Current Pending Sector Count` na wszystkich dyskach: -

+

+
 smartignore * 197
 
+

Aby zignorować go tylko na pierwszym dysku parzystości: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Przykład typowej konfiguracji dla systemu Unix: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1785,8 +1547,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Przykład typowej konfiguracji dla systemu Windows: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1801,263 +1565,173 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

Wzorce zapewniają elastyczny sposób filtrowania plików do uwzględnienia lub -wykluczenia. Używając znaków globbingowych, można zdefiniować reguły, które -pasują do określonych nazw plików lub całych struktur katalogów bez -ręcznego wymieniania każdej ścieżki. -

Znak zapytania ? dopasowuje dowolny pojedynczy znak z wyjątkiem -separatora katalogów. Dzięki temu jest przydatny do dopasowywania nazw plików ze -zmiennymi znakami, przy jednoczesnym ograniczeniu wzorca do jednego poziomu katalogu. -

Pojedyncza gwiazdka * dopasowuje dowolną sekwencję znaków, ale podobnie jak -znak zapytania, nigdy nie przekracza granic katalogów. Zatrzymuje się na -ukośniku, co czyni ją odpowiednią do dopasowywania w obrębie jednego -składnika ścieżki. Jest to standardowe zachowanie symboli wieloznacznych znane -z globbingu powłoki (shell). -

Podwójna gwiazdka ** jest potężniejsza, dopasowuje dowolną sekwencję -znaków, w tym separatory katalogów. Pozwala to wzorcom dopasowywać się -na wielu poziomach katalogów. Gdy ** pojawia się bezpośrednio wewnątrz -wzorca, może dopasować zero lub więcej znaków, w tym ukośniki między -otaczającym tekstem dosłownym. -

Najważniejszym zastosowaniem ** jest specjalna forma /**/. Dopasowuje ona -zero lub więcej pełnych poziomów katalogów, umożliwiając dopasowanie plików -na dowolnej głębokości w drzewie katalogów bez znajomości dokładnej struktury ścieżki. -Na przykład wzorzec src/**/main.js pasuje do src/main.js (pomijając -zero katalogów), src/ui/main.js (pomijając jeden katalog) oraz -src/ui/components/main.js (pomijając dwa katalogi). -

Klasy znaków używające nawiasów kwadratowych [] dopasowują pojedynczy znak z -określonego zestawu lub zakresu. Podobnie jak inne wzorce pojedynczych znaków, -nie pasują one do separatorów katalogów. Klasy obsługują zakresy i negację za pomocą -wykrzyknika. -

Podstawową różnicą, o której należy pamiętać, jest to, że *, ? i klasy znaków -wszystkie respektują granice katalogów i dopasowują się tylko w obrębie jednego -składnika ścieżki, podczas gdy ** jest jedynym wzorcem, który może dopasowywać się poprzez -separatory katalogów. + +

Wzorce są używane do wybierania podzbioru plików do wykluczenia lub włączenia +do procesu.

Istnieją cztery różne typy wzorców: -

-
-
+

+ +
FILE -
-Wybiera dowolny plik o nazwie FILE. +
+Wybiera dowolny plik o nazwie FILE. Możesz użyć dowolnych +znaków globbing, takich jak * i ?, oraz klas znaków, takich jak [a-z]. Ten wzorzec dotyczy tylko plików, a nie katalogów. - - - -
-
-
+
+ + +
DIR/ -
-Wybiera dowolny katalog o nazwie DIR i wszystko, co się w nim znajduje. +
+Wybiera dowolny katalog o nazwie DIR i wszystko w środku. +Możesz użyć dowolnych znaków globbing, takich jak * i ?. Ten wzorzec dotyczy tylko katalogów, a nie plików. - - - -
-
-
+
+ + +
/PATH/FILE -
-Wybiera dokładnie określoną ścieżkę pliku. Ten wzorzec dotyczy -tylko plików, a nie katalogów. -
- - -
-
-
+
+Wybiera dokładnie określoną ścieżkę pliku. Możesz użyć dowolnych +znaków globbing, takich jak * i ?, ale nigdy nie pasują one do +ukośnika katalogu. +Ten wzorzec dotyczy tylko plików, a nie katalogów. +
+ + +
/PATH/DIR/ -
-Wybiera dokładnie określoną ścieżkę katalogu i wszystko, co się w nim -znajduje. Ten wzorzec dotyczy tylko katalogów, a nie plików. -
- - +
+Wybiera dokładnie określoną ścieżkę katalogu i wszystko +w środku. Możesz użyć dowolnych znaków globbing, takich jak * i ?, ale +nigdy nie pasują one do ukośnika katalogu. +Ten wzorzec dotyczy tylko katalogów, a nie plików. +

Gdy określisz ścieżkę bezwzględną zaczynającą się od /, jest ona stosowana w katalogu głównym macierzy, a nie w katalogu głównym lokalnego systemu plików.

W systemie Windows możesz użyć ukośnika odwrotnego \ zamiast ukośnika /. Katalogi systemowe Windows, połączenia, punkty montowania i inne specjalne katalogi Windows są traktowane jako pliki, co oznacza, że aby je wykluczyć, musisz użyć reguły pliku, a nie katalogu. -

Jeśli nazwa pliku zawiera znak *, ?, [, -lub ], musisz go uciec, aby uniknąć interpretacji jako -znaku globbing. W systemie Unix znakiem ucieczki jest \; w systemie Windows jest to ^. +

Jeśli nazwa pliku zawiera znak '*', '?', '[', +lub ']', musisz go uciec, aby uniknąć interpretacji jako +znaku globbing. W systemie Unix znakiem ucieczki jest '\'; w systemie Windows jest to '^'. Gdy wzorzec znajduje się w wierszu poleceń, musisz podwoić znak ucieczki, aby uniknąć interpretacji przez powłokę poleceń.

W pliku konfiguracyjnym możesz użyć różnych strategii do filtrowania plików do przetworzenia. -Najprostszym podejściem jest użycie tylko reguł exclude, aby usunąć wszystkie +Najprostszym podejściem jest użycie tylko reguł `exclude`, aby usunąć wszystkie pliki i katalogi, których nie chcesz przetwarzać. Na przykład: -

-# Wyklucza dowolny plik o nazwie *.unrecoverable
+

+
+# Wyklucza dowolny plik o nazwie `*.unrecoverable`
 exclude *.unrecoverable
-# Wyklucza katalog główny /lost+found
+# Wyklucza katalog główny `/lost+found`
 exclude /lost+found/
-# Wyklucza dowolny podkatalog o nazwie tmp
+# Wyklucza dowolny podkatalog o nazwie `tmp`
 exclude tmp/
 
+

Odwrotnym podejściem jest zdefiniowanie tylko plików, które chcesz przetwarzać, -używając tylko reguł include. Na przykład: -

+używając tylko reguł `include`. Na przykład:
+

+
 # Włącza tylko niektóre katalogi
 include /movies/
 include /musics/
 include /pictures/
 
-

Ostatecznym podejściem jest mieszanie reguł exclude i include. W tym przypadku +

+

Ostatecznym podejściem jest mieszanie reguł `exclude` i `include`. W tym przypadku kolejność reguł jest ważna. Wcześniejsze reguły mają pierwszeństwo przed późniejszymi. -Aby uprościć, możesz najpierw wymienić wszystkie reguły exclude, a następnie -wszystkie reguły include. Na przykład: -

-# Wyklucza dowolny plik o nazwie *.unrecoverable
+Aby uprościć, możesz najpierw wymienić wszystkie reguły `exclude`, a następnie
+wszystkie reguły `include`. Na przykład:
+

+
+# Wyklucza dowolny plik o nazwie `*.unrecoverable`
 exclude *.unrecoverable
-# Wyklucza dowolny podkatalog o nazwie tmp
+# Wyklucza dowolny podkatalog o nazwie `tmp`
 exclude tmp/
 # Włącza tylko niektóre katalogi
 include /movies/
 include /musics/
 include /pictures/
 
-

W wierszu poleceń, używając opcji -f, możesz użyć tylko wzorców include. +

+

W wierszu poleceń, używając opcji -f, możesz użyć tylko wzorców `include`. Na przykład: -

+

+
 # Sprawdza tylko pliki .mp3.
 # W systemie Unix użyj cudzysłowów, aby uniknąć rozszerzenia globbing przez powłokę.
 snapraid -f "*.mp3" check
 
+

W systemie Unix, używając znaków globbing w wierszu poleceń, musisz je cytować, aby zapobiec ich rozszerzeniu przez powłokę. -

-
-

-Ignore File -

-

Oprócz reguł globalnych w pliku konfiguracyjnym, możesz umieścić pliki -.snapraidignore w dowolnym katalogu w macierzy, aby zdefiniować -zdecentralizowane reguły wykluczania. -

Reguły zdefiniowane w .snapraidignore są stosowane po regułach w pliku -konfiguracyjnym. Oznacza to, że mają one wyższy priorytet i mogą być używane -do wykluczania plików, które zostały wcześniej uwzględnione przez konfigurację -globalną. Skutecznie, jeśli reguła lokalna pasuje, plik jest wykluczany bez -względu na globalne ustawienia uwzględniania. -

Logika wzorców w .snapraidignore odzwierciedla konfigurację globalną, ale -zakotwicza wzorce w katalogu, w którym znajduje się plik: -

-
-
-FILE -
-Wybiera dowolny plik o nazwie FILE w tym katalogu lub poniżej. -Podlega to tym samym zasadom dopasowywania (globbing) co wzorzec globalny. -
-
-
-
-
-
-DIR/ -
-Wybiera dowolny katalog o nazwie DIR i wszystko w jego wnętrzu, -znajdujący się w tym katalogu lub poniżej. -
-
-
-
-
-
-/PATH/FILE -
-Wybiera dokładnie określony plik względem lokalizacji -pliku .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Wybiera dokładnie określony katalog i wszystko w jego wnętrzu, -względem lokalizacji pliku .snapraidignore. -
-
-
-

W przeciwieństwie do konfiguracji globalnej, pliki .snapraidignore obsługują -tylko reguły wykluczania; nie można używać wzorców include ani negacji (!). -

Na przykład, jeśli masz .snapraidignore w /mnt/disk1/projects/: -

-# Wyklucza TYLKO /mnt/disk1/projects/output.bin
-/output.bin
-# Wyklucza każdy katalog o nazwie build wewnątrz projects/
-build/
-# Wyklucza każdy plik .tmp wewnątrz projects/ lub jego podfolderach
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID przechowuje listę i sumy kontrolne Twoich plików w pliku zawartości.

Jest to plik binarny, który zawiera listę wszystkich plików obecnych w Twojej macierzy dysków, wraz ze wszystkimi sumami kontrolnymi w celu weryfikacji ich integralności. -

Ten plik jest odczytywany i zapisywany przez polecenia sync i scrub -oraz odczytywany przez polecenia fix, check i status. -

-
-

+

Ten plik jest odczytywany i zapisywany przez polecenia `sync` i `scrub` +oraz odczytywany przez polecenia `fix`, `check` i `status`. +

10 Parity -

+

SnapRAID przechowuje informacje o parzystości Twojej macierzy w plikach parzystości.

Są to pliki binarne zawierające obliczoną parzystość wszystkich -bloków zdefiniowanych w pliku content. -

Pliki te są odczytywane i zapisywane przez polecenia sync i fix -oraz tylko odczytywane przez polecenia scrub i check. -

-
-

+bloków zdefiniowanych w pliku `content`. +

Pliki te są odczytywane i zapisywane przez polecenia `sync` i `fix` +oraz tylko odczytywane przez polecenia `scrub` i `check`. +

11 Encoding -

+

SnapRAID w systemie Unix ignoruje wszelkie kodowanie. Odczytuje i przechowuje nazwy plików z tym samym kodowaniem używanym przez system plików.

W systemie Windows wszystkie nazwy odczytane z systemu plików są konwertowane i przetwarzane w formacie UTF-8.

Aby nazwy plików były poprawnie drukowane, musisz ustawić konsolę Windows -na tryb UTF-8 za pomocą polecenia chcp 65001 i użyć -czcionki TrueType, takiej jak Lucida Console, jako czcionki konsoli. +na tryb UTF-8 za pomocą polecenia `chcp 65001` i użyć +czcionki TrueType, takiej jak `Lucida Console`, jako czcionki konsoli. Dotyczy to tylko drukowanych nazw plików; jeśli przekierujesz wyjście konsoli do pliku, wynikowy plik jest zawsze w formacie UTF-8. -

+

+

+

-
-
-
+
- - + diff --git a/manual-pt.html b/manual-pt.html index 683fed57..b0626e92 100644 --- a/manual-pt.html +++ b/manual-pt.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Sinopse -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Descrição -

+

SnapRAID é um programa de backup projetado para arrays de disco, armazenando informações de paridade para recuperação de dados no caso de até seis falhas de disco. @@ -183,14 +128,14 @@ economizando energia e reduzindo o ruído.

Para mais informações, visite o site oficial do SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitações -

+

SnapRAID é um híbrido entre um programa RAID e um programa de backup, visando combinar os melhores benefícios de ambos. No entanto, ele tem algumas limitações que você deve considerar antes de usá-lo. @@ -228,13 +173,11 @@ Apenas nomes de arquivos, carimbos de data/hora, symlinks e hardlinks são salvos. Permissões, propriedade e atributos estendidos não são salvos. -

-
-

+

4 Primeiros Passos -

+

Para usar o SnapRAID, você precisa primeiro selecionar um disco em seu array -de discos para dedicar às informações de parity (paridade). Com um +de discos para dedicar às informações de `parity` (paridade). Com um disco para paridade, você poderá recuperar de uma única falha de disco, semelhante ao RAID5.

Se você quiser recuperar de mais falhas de disco, semelhante ao RAID6, @@ -243,31 +186,34 @@ adicional permite a recuperação de mais uma falha de disco.

Como discos de paridade, você deve escolher os maiores discos do array, pois a informação de paridade pode crescer até o tamanho do maior disco de dados no array. -

Esses discos serão dedicados a armazenar os arquivos de parity. +

Esses discos serão dedicados a armazenar os arquivos de `parity`. Você não deve armazenar seus dados neles. -

Em seguida, você deve definir os discos de data (dados) que deseja proteger +

Em seguida, você deve definir os discos de `data` (dados) que deseja proteger com o SnapRAID. A proteção é mais eficaz se esses discos contiverem dados que raramente mudam. Por esse motivo, é melhor NÃO incluir o disco C:\ do Windows ou os diretórios /home, /var e /tmp do Unix. -

A lista de arquivos é salva nos arquivos de content (conteúdo), geralmente +

A lista de arquivos é salva nos arquivos de `content` (conteúdo), geralmente armazenados nos discos de dados, paridade ou boot. Este arquivo contém os detalhes do seu backup, incluindo todos os checksums para verificar sua integridade. -O arquivo de content é armazenado em várias cópias, e cada cópia deve +O arquivo de `content` é armazenado em várias cópias, e cada cópia deve estar em um disco diferente para garantir que, mesmo em caso de múltiplas falhas de disco, pelo menos uma cópia esteja disponível.

Por exemplo, suponha que você esteja interessado em apenas um nível de proteção de paridade, e seus discos estejam localizados em: -

+

+
 /mnt/diskp <- disco selecionado para paridade
 /mnt/disk1 <- primeiro disco a proteger
 /mnt/disk2 <- segundo disco a proteger
 /mnt/disk3 <- terceiro disco a proteger
 
+

Você deve criar o arquivo de configuração /etc/snapraid.conf com as seguintes opções: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -276,9 +222,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Se você estiver no Windows, deve usar o formato de caminho do Windows, com letras de unidade e barras invertidas em vez de barras. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -287,16 +235,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Se você tiver muitos discos e ficar sem letras de unidade, pode montar discos diretamente em subpastas. Consulte: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

Neste ponto, você está pronto para executar o comando sync para construir +

+

Neste ponto, você está pronto para executar o comando `sync` para construir as informações de paridade. -

+

+
 snapraid sync
 
+

Este processo pode levar várias horas na primeira vez, dependendo do tamanho dos dados já presentes nos discos. Se os discos estiverem vazios, o processo é imediato. @@ -304,83 +257,99 @@ o processo é imediato. execução, ele será retomado de onde foi interrompido.

Quando este comando for concluído, seus dados estarão SEGUROS.

Agora você pode começar a usar seu array como quiser e periodicamente -atualizar as informações de paridade executando o comando sync. -

-

+atualizar as informações de paridade executando o comando `sync`. +

4.1 Scrubbing -

+

Para verificar periodicamente os dados e a paridade em busca de erros, -você pode executar o comando scrub. -

+você pode executar o comando `scrub`.
+

+
 snapraid scrub
 
+

Este comando compara os dados em seu array com o hash calculado -durante o comando sync para verificar a integridade. +durante o comando `sync` para verificar a integridade.

Cada execução do comando verifica aproximadamente 8% do array, excluindo dados já examinados nos 10 dias anteriores. Você pode usar a opção -p, --plan para especificar uma quantidade diferente e a opção -o, --older-than para especificar uma idade diferente em dias. Por exemplo, para verificar 5% do array em busca de blocos com mais de 20 dias, use: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Se erros silenciosos ou de entrada/saída forem encontrados durante o processo, -os blocos correspondentes serão marcados como ruins no arquivo de content -e listados no comando status. -

+os blocos correspondentes serão marcados como ruins no arquivo de `content`
+e listados no comando `status`.
+

+
 snapraid status
 
-

Para corrigi-los, você pode usar o comando fix, filtrando por blocos +

+

Para corrigi-los, você pode usar o comando `fix`, filtrando por blocos ruins com a opção -e, --filter-error: -

+

+
 snapraid -e fix
 
-

Na próxima execução de scrub, os erros desaparecerão do relatório de status +

+

Na próxima execução de `scrub`, os erros desaparecerão do relatório de `status` se estiverem realmente corrigidos. Para torná-lo mais rápido, você pode usar -p bad para examinar apenas blocos marcados como ruins. -

+

+
 snapraid -p bad scrub
 
-

Executar scrub em um array não sincronizado pode relatar erros causados por -arquivos removidos ou modificados. Esses erros são relatados na saída de scrub, +

+

Executar `scrub` em um array não sincronizado pode relatar erros causados por +arquivos removidos ou modificados. Esses erros são relatados na saída de `scrub`, mas os blocos relacionados não são marcados como ruins. -

-
-

+

4.2 Pooling -

+

Nota: O recurso de pooling descrito abaixo foi substituído pela ferramenta -mergerfs, que agora é a opção recomendada para usuários Linux na comunidade +mergefs, que agora é a opção recomendada para usuários Linux na comunidade SnapRAID. Mergefs oferece uma maneira mais flexível e eficiente de agrupar várias unidades em um único ponto de montagem unificado, permitindo acesso perfeito a arquivos em todo o seu array sem depender de links simbólicos. Ele se integra bem ao SnapRAID para proteção de paridade e é comumente usado em configurações como OpenMediaVault (OMV) ou configurações NAS personalizadas.

Para ter todos os arquivos em seu array mostrados na mesma árvore de -diretórios, você pode habilitar o recurso de pooling. Ele cria uma +diretórios, você pode habilitar o recurso de `pooling`. Ele cria uma visualização virtual somente leitura de todos os arquivos em seu array usando links simbólicos. -

Você pode configurar o diretório de pooling no arquivo de configuração com: -

+

Você pode configurar o diretório de `pooling` no arquivo de configuração com: +

+
 pool /pool
 
+

ou, se você estiver no Windows, com: -

+

+
 pool C:\pool
 
-

e, em seguida, executar o comando pool para criar ou atualizar a +

+

e, em seguida, executar o comando `pool` para criar ou atualizar a visualização virtual. -

+

+
 snapraid pool
 
+

Se você estiver usando uma plataforma Unix e quiser compartilhar este diretório pela rede com máquinas Windows ou Unix, você deve adicionar as seguintes opções ao seu /etc/samba/smb.conf: -

+

+
 # Na seção global de smb.conf
 unix extensions = no
 
+
+
 # Na seção de compartilhamento de smb.conf
 [pool]
@@ -391,66 +360,77 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

No Windows, compartilhar links simbólicos por uma rede requer que os clientes os resolvam remotamente. Para habilitar isso, além de compartilhar o diretório do pool, você também deve compartilhar todos os discos de forma independente, usando os nomes de disco definidos no arquivo de configuração como pontos de compartilhamento. Você também -deve especificar na opção share do arquivo de configuração o caminho +deve especificar na opção `share` do arquivo de configuração o caminho UNC do Windows que os clientes remotos precisam usar para acessar esses discos compartilhados. -

Por exemplo, operando a partir de um servidor chamado darkstar, você +

Por exemplo, operando a partir de um servidor chamado `darkstar`, você pode usar as opções: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

e compartilhar os seguintes diretórios pela rede: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

para permitir que clientes remotos acessem todos os arquivos em \\darkstar\pool.

Você também pode precisar configurar clientes remotos para habilitar o acesso a symlinks remotos com o comando: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Desexcluir (Undeleting) -

+

O SnapRAID funciona mais como um programa de backup do que como um sistema RAID, e pode ser usado para restaurar ou desexcluir arquivos para seu estado anterior usando a opção -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

ou para um diretório: -

+

+
 snapraid fix -f DIR/
 
+

Você também pode usá-lo para recuperar apenas arquivos excluídos acidentalmente dentro de um diretório usando a opção -m, --filter-missing, que restaura apenas arquivos ausentes, deixando todos os outros intocados. -

+

+
 snapraid fix -m -f DIR/
 
+

Ou para recuperar todos os arquivos excluídos em todas as unidades com: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recuperando -

+

O pior aconteceu e você perdeu um ou mais discos!

NÃO ENTRE EM PÂNICO! Você será capaz de recuperá-los!

A primeira coisa que você deve fazer é evitar mais alterações em seu array @@ -458,39 +438,42 @@ de discos. Desabilite quaisquer conexões remotas a ele e quaisquer processos agendados, incluindo qualquer sincronização noturna ou scrub agendado do SnapRAID.

Em seguida, prossiga com as seguintes etapas. -

-

+

4.4.1 PASSO 1 -> Reconfigurar -

+

Você precisa de algum espaço para recuperar, idealmente em discos sobressalentes adicionais, mas um disco USB externo ou um disco remoto será suficiente.

Modifique o arquivo de configuração do SnapRAID para fazer com que a opção -data ou parity do disco com falha aponte para um local com espaço +`data` ou `parity` do disco com falha aponte para um local com espaço vazio suficiente para recuperar os arquivos. -

Por exemplo, se o disco d1 falhou, mude de: -

+

Por exemplo, se o disco `d1` falhou, mude de: +

+
 data d1 /mnt/disk1/
 
+

para: -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Se o disco a ser recuperado for um disco de paridade, atualize a opção -parity apropriada. +`parity` apropriada. Se você tiver vários discos com falha, atualize todas as opções de configuração deles. -

-
-

+

4.4.2 PASSO 2 -> Corrigir -

+

Execute o comando fix, armazenando o log em um arquivo externo com: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Onde NAME é o nome do disco, como d1 em nosso exemplo anterior. +

+

Onde NAME é o nome do disco, como `d1` em nosso exemplo anterior. Se o disco a ser recuperado for um disco de paridade, use os nomes -parity, 2-parity, etc. +`parity`, `2-parity`, etc. Se você tiver vários discos com falha, use várias opções -d para especificar todos eles.

Este comando levará muito tempo. @@ -498,277 +481,228 @@ especificar todos eles. Execute-o a partir de um disco com espaço livre suficiente.

Agora você recuperou tudo o que é recuperável. Se alguns arquivos estiverem parcialmente ou totalmente irrecuperáveis, eles serão renomeados -adicionando a extensão .unrecoverable. +adicionando a extensão `.unrecoverable`.

Você pode encontrar uma lista detalhada de todos os blocos irrecuperáveis -no arquivo fix.log, verificando todas as linhas que começam com unrecoverable:. +no arquivo fix.log, verificando todas as linhas que começam com `unrecoverable:`.

Se você não estiver satisfeito com a recuperação, pode tentar novamente quantas vezes quiser.

Por exemplo, se você removeu arquivos do array após a última -sync, isso pode resultar em alguns arquivos não sendo recuperados. -Neste caso, você pode tentar novamente o fix usando a opção -i, --import, +`sync`, isso pode resultar em alguns arquivos não sendo recuperados. +Neste caso, você pode tentar novamente o `fix` usando a opção -i, --import, especificando onde esses arquivos estão agora para incluí-los novamente no processo de recuperação.

Se você estiver satisfeito com a recuperação, pode prosseguir, mas observe que, após a sincronização, você não pode mais tentar -o comando fix novamente! -

-
-

+o comando `fix` novamente! +

4.4.3 PASSO 3 -> Checar -

+

Como uma verificação cautelosa, você pode agora executar um comando -check para garantir que tudo esteja correto no disco recuperado. -

+`check` para garantir que tudo esteja correto no disco recuperado.
+

+
 snapraid -d NAME -a check
 
-

Onde NAME é o nome do disco, como d1 em nosso exemplo anterior. +

+

Onde NAME é o nome do disco, como `d1` em nosso exemplo anterior.

As opções -d e -a dizem ao SnapRAID para verificar apenas o disco especificado e ignorar todos os dados de paridade.

Este comando levará muito tempo, mas se você não for excessivamente cauteloso, pode pulá-lo. -

-
-

+

4.4.4 PASSO 4 -> Sincronizar -

-

Execute o comando sync para ressincronizar o array com o novo disco. -

+
+

Execute o comando `sync` para ressincronizar o array com o novo disco. +

+
 snapraid sync
 
+

Se tudo for recuperado, este comando é imediato. -

-
-
-
-

+

5 Comandos -

+

SnapRAID fornece alguns comandos simples que permitem a você:

  • -Imprimir o status do array -> status +Imprimir o status do array -> `status`
  • -Controlar os discos -> smart, probe, up, down +Controlar os discos -> `smart`, `probe`, `up`, `down`
  • -Fazer um backup/snapshot -> sync +Fazer um backup/snapshot -> `sync`
  • -Verificar periodicamente os dados -> scrub +Verificar periodicamente os dados -> `scrub`
  • -Restaurar o último backup/snapshot -> fix. +Restaurar o último backup/snapshot -> `fix`.

Os comandos devem ser escritos em letras minúsculas. -

-

+

5.1 status -

+

Imprime um resumo do estado do array de discos.

Inclui informações sobre a fragmentação da paridade, a idade dos blocos sem verificação e todos os erros silenciosos registrados encontrados durante o scrubbing.

As informações apresentadas referem-se à última vez que você -executou sync. Modificações posteriores não são levadas em conta. +executou `sync`. Modificações posteriores não são levadas em conta.

Se blocos ruins foram detectados, seus números de bloco são listados. -Para corrigi-los, você pode usar o comando fix -e. +Para corrigi-los, você pode usar o comando `fix -e`.

Também mostra um gráfico que representa a última vez que cada bloco foi examinado (scrubbed) ou sincronizado (synced). Blocos examinados -são mostrados com *, blocos sincronizados, mas ainda não examinados, -com o. +são mostrados com '*', blocos sincronizados, mas ainda não examinados, +com 'o'.

Nada é modificado. -

-
-

+

5.2 smart -

+

Imprime um relatório SMART de todos os discos no sistema.

Inclui uma estimativa da probabilidade de falha no próximo ano, permitindo que você planeje substituições de manutenção de discos que mostrem atributos suspeitos.

Esta estimativa de probabilidade é obtida correlacionando os atributos SMART dos discos com os dados do Backblaze disponíveis em: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Se o SMART relatar que um disco está falhando, FAIL ou PREFAIL é +

+

Se o SMART relatar que um disco está falhando, `FAIL` ou `PREFAIL` é impresso para esse disco, e o SnapRAID retorna com um erro. Neste caso, a substituição imediata do disco é altamente recomendada.

Outras possíveis strings de status são: -

-
-
+

+ + + +
logfail -
+
No passado, alguns atributos estavam abaixo do limite. - - -
-
+
logerr -
+
O log de erros do dispositivo contém erros. - - -
-
+
selferr -
+
O log de autoteste do dispositivo contém erros. - - - +

Se a opção -v, --verbose for especificada, uma análise estatística mais profunda é fornecida. Esta análise pode ajudá-lo a decidir se você precisa de mais ou menos paridade. -

Este comando usa a ferramenta smartctl e é equivalente a executar -smartctl -a em todos os dispositivos. +

Este comando usa a ferramenta `smartctl` e é equivalente a executar +`smartctl -a` em todos os dispositivos.

Se seus dispositivos não forem detectados automaticamente corretamente, você pode especificar um comando personalizado usando a opção -smartctl no arquivo de configuração. +`smartctl` no arquivo de configuração.

Nada é modificado. -

-
-

+

5.3 probe -

+

Imprime o estado de ENERGIA de todos os discos no sistema. -

Standby significa que o disco não está girando. Active significa +

`Standby` significa que o disco não está girando. `Active` significa que o disco está girando. -

Este comando usa a ferramenta smartctl e é equivalente a executar -smartctl -n standby -i em todos os dispositivos. +

Este comando usa a ferramenta `smartctl` e é equivalente a executar +`smartctl -n standby -i` em todos os dispositivos.

Se seus dispositivos não forem detectados automaticamente corretamente, você pode especificar um comando personalizado usando a opção -smartctl no arquivo de configuração. +`smartctl` no arquivo de configuração.

Nada é modificado. -

-
-

+

5.4 up -

+

Liga (spins up) todos os discos do array.

Você pode ligar apenas discos específicos usando a opção -d, --filter-disk.

Ligar todos os discos ao mesmo tempo requer muita energia. Certifique-se de que sua fonte de alimentação pode suportar isso.

Nada é modificado. -

-
-

+

5.5 down -

+

Desliga (spins down) todos os discos do array. -

Este comando usa a ferramenta smartctl e é equivalente a executar -smartctl -s standby,now em todos os dispositivos. +

Este comando usa a ferramenta `smartctl` e é equivalente a executar +`smartctl -s standby,now` em todos os dispositivos.

Você pode desligar apenas discos específicos usando a opção -d, --filter-disk.

Para desligar automaticamente em caso de erro, você pode usar a opção -s, --spin-down-on-error com qualquer outro comando, o que é -equivalente a executar down manualmente quando ocorre um erro. +equivalente a executar `down` manualmente quando ocorre um erro.

Nada é modificado. -

-
-

+

5.6 diff -

-

Lista todos os arquivos modificados desde o último sync que precisam ter + +

Lista todos os arquivos modificados desde o último `sync` que precisam ter seus dados de paridade recalculados.

Este comando não verifica os dados do arquivo, mas apenas o carimbo de data/hora, tamanho e inode do arquivo.

Após listar todos os arquivos alterados, um resumo das alterações é apresentado, agrupado por: -

-
-
+

+ + + + + + + +
equal -
+
Arquivos inalterados de antes. - - -
-
+
added -
+
Arquivos adicionados que não estavam presentes antes. - - -
-
+
removed -
+
Arquivos removidos. - - -
-
+
updated -
+
Arquivos com tamanho ou carimbo de data/hora diferente, o que significa que foram modificados. - - -
-
+
moved -
+
Arquivos movidos para um diretório diferente no mesmo disco. Eles são identificados por terem o mesmo nome, tamanho, carimbo de data/hora e inode, mas um diretório diferente. - - -
-
+
copied -
-Arquivos copiados no mesmo disco ou em um disco -diferente onde o arquivo original ainda existe. +
+Arquivos copiados no mesmo ou em um disco diferente. +Observe que se eles forem realmente movidos para um disco +diferente, eles também serão contados em `removed`. Eles são identificados por terem o mesmo nome, tamanho e -carimbo de data/hora. -Se o carimbo de data/hora de subsegundos for zero, o caminho -completo deve corresponder para ser identificado, não apenas +carimbo de data/hora. Se o carimbo de data/hora sub-segundo +for zero, o caminho completo deve corresponder, não apenas o nome. - - -
-
-relocated -
-Arquivos movidos no mesmo disco ou em um disco -diferente onde o original desapareceu. -Eles são identificados por terem o mesmo nome, tamanho e -carimbo de data/hora. -Se o carimbo de data/hora de subsegundos for zero, o caminho -completo deve corresponder para ser identificado. -Ao contrário dos arquivos 'moved' no mesmo disco, os arquivos -realocados têm um inode diferente. -
-
-
-
+
restored -
-Arquivos com um inode diferente, mas com diretório, -nome, tamanho e carimbo de data/hora correspondentes. -Geralmente são arquivos restaurados após serem excluídos. -
- - -

Se uma sync for necessária, o código de retorno do processo é 2, +

+Arquivos com um inode diferente, mas nome, tamanho e carimbo +de data/hora correspondentes. Estes são geralmente arquivos +restaurados após terem sido excluídos. +
+

Se uma `sync` for necessária, o código de retorno do processo é 2, em vez do padrão 0. O código de retorno 1 é usado para uma condição de erro genérica.

Nada é modificado. -

-
-

+

5.7 sync -

+

Atualiza as informações de paridade. Todos os arquivos modificados no array de discos são lidos, e os dados de paridade correspondentes são atualizados.

Você pode parar este processo a qualquer momento pressionando Ctrl+C, sem perder o trabalho já feito. -Na próxima execução, o processo sync será retomado de onde +Na próxima execução, o processo `sync` será retomado de onde foi interrompido.

Se erros silenciosos ou de entrada/saída forem encontrados durante o processo, os blocos correspondentes são marcados como ruins. @@ -780,13 +714,11 @@ Se o arquivo for movido ou renomeado no mesmo disco, mantendo o mesmo inode, a paridade não é recalculada. Se o arquivo for movido para outro disco, a paridade é recalculada, mas as informações de hash calculadas anteriormente são mantidas. -

Os arquivos content e parity são modificados se necessário. +

Os arquivos `content` e `parity` são modificados se necessário. Os arquivos no array NÃO são modificados. -

-
-

+

5.8 scrub -

+

Examina (scrubs) o array, verificando se há erros silenciosos ou de entrada/saída nos discos de dados e paridade.

Cada invocação verifica aproximadamente 8% do array, excluindo @@ -805,97 +737,87 @@ full - Examina tudo. Os blocos mais antigos são examinados primeiro, garantindo uma verificação ideal. Se você quiser examinar apenas os blocos recém-sincronizados ainda -não examinados, use a opção -p new. -

Para obter detalhes do status do scrub, use o comando status. +não examinados, use a opção `-p new`. +

Para obter detalhes do status do scrub, use o comando `status`.

Para qualquer erro silencioso ou de entrada/saída encontrado, os blocos -correspondentes são marcados como ruins no arquivo de content. -Esses blocos ruins são listados em status e podem ser corrigidos com -fix -e. +correspondentes são marcados como ruins no arquivo de `content`. +Esses blocos ruins são listados em `status` e podem ser corrigidos com +`fix -e`. Após a correção, no próximo scrub, eles serão verificados novamente e, se considerados corrigidos, a marcação de ruim será removida. Para examinar apenas os blocos ruins, você pode usar o comando -scrub -p bad. -

É recomendado executar scrub apenas em um array sincronizado para +`scrub -p bad`. +

É recomendado executar `scrub` apenas em um array sincronizado para evitar erros relatados causados por dados não sincronizados. Esses erros são reconhecidos como não sendo erros silenciosos, e os blocos não são marcados como ruins, mas tais erros são relatados na saída do comando. -

O arquivo content é modificado para atualizar o tempo da última verificação +

O arquivo `content` é modificado para atualizar o tempo da última verificação para cada bloco e para marcar blocos ruins. -Os arquivos parity NÃO são modificados. +Os arquivos `parity` NÃO são modificados. Os arquivos no array NÃO são modificados. -

-
-

+

5.9 fix -

+

Corrige todos os arquivos e os dados de paridade.

Todos os arquivos e dados de paridade são comparados com o estado de -snapshot salvo na última sync. +snapshot salvo na última `sync`. Se uma diferença for encontrada, ela é revertida para o snapshot armazenado. -

ATENÇÃO! O comando fix não diferencia entre erros e modificações +

ATENÇÃO! O comando `fix` não diferencia entre erros e modificações intencionais. Ele reverte incondicionalmente o estado do arquivo -para a última sync. +para a última `sync`.

Se nenhuma outra opção for especificada, todo o array é processado. Use as opções de filtro para selecionar um subconjunto de arquivos ou discos para operar. -

Para corrigir apenas os blocos marcados como ruins durante sync e scrub, +

Para corrigir apenas os blocos marcados como ruins durante `sync` e `scrub`, use a opção -e, --filter-error. Ao contrário de outras opções de filtro, esta aplica correções apenas a -arquivos que não foram alterados desde a última sync. +arquivos que não foram alterados desde a última `sync`.

O SnapRAID renomeia todos os arquivos que não podem ser corrigidos adicionando -a extensão .unrecoverable. +a extensão `.unrecoverable`.

Antes de corrigir, todo o array é escaneado para encontrar quaisquer -arquivos movidos desde a última operação sync. +arquivos movidos desde a última operação `sync`. Esses arquivos são identificados por seu carimbo de data/hora, ignorando seu nome e diretório, e são usados no processo de recuperação, se necessário. Se você moveu alguns deles para fora do array, pode usar a opção -i, --import para especificar diretórios adicionais para escanear.

Os arquivos são identificados apenas por caminho, não por inode. -

O arquivo content NÃO é modificado. -Os arquivos parity são modificados se necessário. +

O arquivo `content` NÃO é modificado. +Os arquivos `parity` são modificados se necessário. Os arquivos no array são modificados se necessário. -

-
-

+

5.10 check -

+

Verifica todos os arquivos e os dados de paridade. -

Funciona como fix, mas apenas simula uma recuperação e nenhuma alteração +

Funciona como `fix`, mas apenas simula uma recuperação e nenhuma alteração é escrita no array.

Este comando é destinado principalmente a verificações manuais, como após um processo de recuperação ou em outras condições especiais. -Para verificações periódicas e agendadas, use scrub. +Para verificações periódicas e agendadas, use `scrub`.

Se você usar a opção -a, --audit-only, apenas os dados do arquivo são verificados, e os dados de paridade são ignorados para uma execução mais rápida.

Os arquivos são identificados apenas por caminho, não por inode.

Nada é modificado. -

-
-

+

5.11 list -

+

Lista todos os arquivos contidos no array no momento da -última sync. +última `sync`.

Com -v ou --verbose, o tempo sub-segundo também é mostrado.

Nada é modificado. -

-
-

+

5.12 dup -

+

Lista todos os arquivos duplicados. Dois arquivos são considerados iguais se seus hashes corresponderem. Os dados do arquivo não são lidos; apenas os hashes pré-calculados são usados.

Nada é modificado. -

-
-

+

5.13 pool -

+

Cria ou atualiza uma visualização virtual de todos -os arquivos em seu array de discos no diretório pooling. +os arquivos em seu array de discos no diretório `pooling`.

Os arquivos não são copiados, mas ligados usando links simbólicos.

Ao atualizar, todos os links simbólicos existentes e subdiretórios @@ -903,11 +825,9 @@ vazios são excluídos e substituídos pela nova visualização do array. Quaisquer outros arquivos regulares são deixados no lugar.

Nada é modificado fora do diretório do pool. -

-
-

+

5.14 devices -

+

Imprime os dispositivos de baixo nível usados pelo array.

Este comando exibe as associações de dispositivos no array e destina-se principalmente como uma interface de script. @@ -918,11 +838,9 @@ e o caminho. A última coluna é o nome do disco no array. no array, mas em algumas configurações mais complexas, você pode ter vários dispositivos de baixo nível usados por um único disco no array.

Nada é modificado. -

-
-

+

5.15 touch -

+

Define um carimbo de data/hora sub-segundo arbitrário para todos os arquivos que o têm definido como zero.

Isso melhora a capacidade do SnapRAID de reconhecer arquivos movidos @@ -935,11 +853,9 @@ sub-segundo for zero, ele é considerado uma cópia apenas se o caminho completo, tamanho e carimbo de data/hora corresponderem.

O carimbo de data/hora de precisão de segundo não é modificado, portanto, todas as datas e horas de seus arquivos serão preservadas. -

-
-

+

5.16 rehash -

+

Agenda um novo hash de todo o array.

Este comando altera o tipo de hash usado, tipicamente ao atualizar de um sistema de 32 bits para um de 64 bits, para alternar do @@ -947,159 +863,125 @@ MurmurHash3 para o mais rápido SpookyHash.

Se você já estiver usando o hash ideal, este comando não faz nada e informa que nenhuma ação é necessária.

O novo hash não é executado imediatamente, mas ocorre -progressivamente durante sync e scrub. -

Você pode verificar o estado do novo hash usando status. +progressivamente durante `sync` e `scrub`. +

Você pode verificar o estado do novo hash usando `status`.

Durante o novo hash, o SnapRAID mantém a funcionalidade total, -com a única exceção de que dup não pode detectar arquivos duplicados +com a única exceção de que `dup` não pode detectar arquivos duplicados usando um hash diferente. -

-
-

-locate -

-

Localiza arquivos armazenados nos discos de paridade. Para cada arquivo -correspondente, imprime sua localização dentro do arquivo de paridade e o -número de fragmentos que ocupa. -

Você pode usar a opção -t, --tail para restringir a operação aos arquivos -que ocupam a parte final especificada da paridade. -

Se desejar realocar esses arquivos, você poderá usar a opção --W, --force-realloc-tail. -Esteja ciente de que tais arquivos não estarão protegidos pela paridade durante -o processo de realocação. -

-
-
-

+

6 Opções -

+

SnapRAID fornece as seguintes opções: -

-
-
+

+ +
-c, --conf CONFIG -
+
Seleciona o arquivo de configuração a ser usado. Se não for especificado, -no Unix, ele usa o arquivo /usr/local/etc/snapraid.conf se existir, -caso contrário, /etc/snapraid.conf. -No Windows, ele usa o arquivo snapraid.conf no mesmo -diretório que snapraid.exe. - - - -
-
-
+no Unix, ele usa o arquivo `/usr/local/etc/snapraid.conf` se existir, +caso contrário, `/etc/snapraid.conf`. +No Windows, ele usa o arquivo `snapraid.conf` no mesmo +diretório que `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filtra os arquivos a serem processados em check e fix. +
+Filtra os arquivos a serem processados em `check` e `fix`. Apenas os arquivos que correspondem ao padrão especificado são processados. Esta opção pode ser usada várias vezes. Consulte a seção PATTERN para obter mais detalhes sobre especificações de padrão. No Unix, certifique-se de que os caracteres globbing sejam citados, se usados. -Esta opção pode ser usada apenas com check e fix. -Não pode ser usada com sync e scrub, pois eles sempre +Esta opção pode ser usada apenas com `check` e `fix`. +Não pode ser usada com `sync` e `scrub`, pois eles sempre processam o array inteiro. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtra os discos a serem processados em check, fix, up e down. +
+Filtra os discos a serem processados em `check`, `fix`, `up` e `down`. Você deve especificar um nome de disco conforme definido no arquivo de configuração. -Você também pode especificar discos de paridade com os nomes: parity, -2-parity, 3-parity, etc., para limitar as operações a um +Você também pode especificar discos de paridade com os nomes: `parity`, +`2-parity`, `3-parity`, etc., para limitar as operações a um disco de paridade específico. Se você combinar múltiplas opções --filter, --filter-disk e --filter-missing, apenas os arquivos que correspondem a todos os filtros são selecionados. Esta opção pode ser usada várias vezes. -Esta opção pode ser usada apenas com check, fix, up e down. -Não pode ser usada com sync e scrub, pois eles sempre +Esta opção pode ser usada apenas com `check`, `fix`, `up` e `down`. +Não pode ser usada com `sync` e `scrub`, pois eles sempre processam o array inteiro. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtra os arquivos a serem processados em check e fix. +
+Filtra os arquivos a serem processados em `check` e `fix`. Apenas os arquivos ausentes ou excluídos do array são processados. -Quando usado com fix, isso age como um comando undelete (desexcluir). +Quando usado com `fix`, isso age como um comando `undelete` (desexcluir). Se você combinar múltiplas opções --filter, --filter-disk e --filter-missing, apenas os arquivos que correspondem a todos os filtros são selecionados. -Esta opção pode ser usada apenas com check e fix. -Não pode ser usada com sync e scrub, pois eles sempre +Esta opção pode ser usada apenas com `check` e `fix`. +Não pode ser usada com `sync` e `scrub`, pois eles sempre processam o array inteiro. - - - -
-
-
+
+ + +
-e, --filter-error -
-Processa os arquivos com erros em check e fix. +
+Processa os arquivos com erros em `check` e `fix`. Processa apenas arquivos que têm blocos marcados com erros silenciosos -ou de entrada/saída durante sync e scrub, conforme listado em status. -Esta opção pode ser usada apenas com check e fix. - - - -
-
-
+ou de entrada/saída durante `sync` e `scrub`, conforme listado em `status`. +Esta opção pode ser usada apenas com `check` e `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Seleciona o plano de scrub. Se PERC for um valor numérico de 0 a 100, ele é interpretado como a porcentagem de blocos a serem examinados. Em vez de uma porcentagem, você pode especificar um plano: -bad examina blocos ruins, new examina blocos ainda não examinados, -e full examina tudo. -Esta opção pode ser usada apenas com scrub. - - - -
-
-
+`bad` examina blocos ruins, `new` examina blocos ainda não examinados, +e `full` examina tudo. +Esta opção pode ser usada apenas com `scrub`. +
+ + +
-o, --older-than DAYS -
-Seleciona a parte mais antiga do array a ser processada em scrub. +
+Seleciona a parte mais antiga do array a ser processada em `scrub`. DAYS é a idade mínima em dias para um bloco ser examinado; o padrão é 10. Os blocos marcados como ruins são sempre examinados, independentemente desta opção. -Esta opção pode ser usada apenas com scrub. - - - -
-
-
+Esta opção pode ser usada apenas com `scrub`. +
+ + +
-a, --audit-only -
-Em check, verifica o hash dos arquivos sem +
+Em `check`, verifica o hash dos arquivos sem verificar os dados de paridade. Se você estiver interessado apenas em verificar os dados do arquivo, esta opção pode acelerar significativamente o processo de verificação. -Esta opção pode ser usada apenas com check. - - - -
-
-
+Esta opção pode ser usada apenas com `check`. +
+ + +
-h, --pre-hash -
-Em sync, executa uma fase de hash preliminar de todos os novos dados +
+Em `sync`, executa uma fase de hash preliminar de todos os novos dados para verificação adicional antes do cálculo da paridade. -Normalmente, em sync, nenhum hash preliminar é feito, e os novos +Normalmente, em `sync`, nenhum hash preliminar é feito, e os novos dados são hashados logo antes do cálculo da paridade, quando são lidos pela primeira vez. Este processo ocorre quando o sistema está sob @@ -1107,73 +989,52 @@ carga pesada, com todos os discos girando e uma CPU ocupada. Esta é uma condição extrema para a máquina, e se ela tiver um problema de hardware latente, erros silenciosos podem passar despercebidos porque os dados ainda não foram hashados. -Para evitar esse risco, você pode habilitar o modo pre-hash para +Para evitar esse risco, você pode habilitar o modo `pre-hash` para ter todos os dados lidos duas vezes para garantir sua integridade. Esta opção também verifica arquivos movidos dentro do array para garantir que a operação de movimentação foi bem-sucedida e, se necessário, permite que você execute uma operação fix antes de prosseguir. -Esta opção pode ser usada apenas com sync. - - - -
-
-
+Esta opção pode ser usada apenas com `sync`. +
+ + +
-i, --import DIR -
+
Importa do diretório especificado quaisquer arquivos excluídos -do array após a última sync. -Se você ainda tiver esses arquivos, eles podem ser usados por check -e fix para melhorar o processo de recuperação. +do array após a última `sync`. +Se você ainda tiver esses arquivos, eles podem ser usados por `check` +e `fix` para melhorar o processo de recuperação. Os arquivos são lidos, incluindo em subdiretórios, e são identificados independentemente de seu nome. -Esta opção pode ser usada apenas com check e fix. - - - -
-
-
+Esta opção pode ser usada apenas com `check` e `fix`. +
+ + +
-s, --spin-down-on-error -
+
Em qualquer erro, desliga (spins down) todos os discos gerenciados antes de sair com um código de status diferente de zero. Isso impede que as unidades permaneçam ativas e girando após uma operação abortada, ajudando a evitar acúmulo desnecessário de calor e consumo de energia. Use esta opção para garantir que os discos sejam interrompidos com segurança, mesmo quando um comando falhar. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Aplica um limite de largura de banda global para todos os discos. A RATE é o número de bytes por segundo. Você pode especificar um multiplicador como K, M ou G (por exemplo, --bw-limit 1G). - - - -
-
-
--t, --tail TAMANHO -
-Limita a listagem de arquivos àqueles que não usam mais do que o -tamanho final especificado dos discos de paridade. -Você pode usar multiplicadores como K, M, G ou T (ex: --tail 1G). -Esta opção só é válida quando usada em conjunto com o comando -locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Habilita uma visualização de status estendida que mostra informações adicionais. A tela exibe dois gráficos: O primeiro gráfico mostra o número de stripes em buffer para cada @@ -1192,14 +1053,12 @@ Todos os cálculos são executados em paralelo com as operações de disco. Portanto, enquanto houver tempo de espera mensurável para pelo menos um disco, isso indica que a CPU é rápida o suficiente para acompanhar a carga de trabalho. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Força a operação insegura de sincronizar um arquivo com tamanho zero que era anteriormente não zero. Se o SnapRAID detectar tal condição, ele para de prosseguir @@ -1208,15 +1067,13 @@ Isso permite que você detecte facilmente quando, após uma falha do sistema, alguns arquivos acessados foram truncados. Esta é uma condição possível no Linux com os sistemas de arquivos ext3/ext4. -Esta opção pode ser usada apenas com sync. - - - -
-
-
+Esta opção pode ser usada apenas com `sync`. +
+ + +
-E, --force-empty -
+
Força a operação insegura de sincronizar um disco com todos os arquivos originais ausentes. Se o SnapRAID detectar que todos os arquivos originalmente presentes @@ -1224,15 +1081,13 @@ no disco estão ausentes ou foram reescritos, ele para de prosseguir a menos que você especifique esta opção. Isso permite que você detecte facilmente quando um sistema de arquivos de dados não está montado. -Esta opção pode ser usada apenas com sync. - - - -
-
-
+Esta opção pode ser usada apenas com `sync`. +
+ + +
-U, --force-uuid -
+
Força a operação insegura de sincronizar, verificar e corrigir com discos que tiveram seus UUIDs alterados. Se o SnapRAID detectar que alguns discos tiveram seus UUIDs alterados, @@ -1242,16 +1097,14 @@ nos pontos de montagem errados. No entanto, é permitido ter uma única mudança de UUID com paridade única e mais com paridade múltipla, porque este é o caso normal ao substituir discos após uma recuperação. -Esta opção pode ser usada apenas com sync, check ou -fix. - - - -
-
-
+Esta opção pode ser usada apenas com `sync`, `check` ou +`fix`. +
+ + +
-D, --force-device -
+
Força a operação insegura de corrigir com discos inacessíveis ou com discos no mesmo dispositivo físico. Por exemplo, se você perdeu dois discos de dados e tem um disco @@ -1259,16 +1112,14 @@ sobressalente para recuperar apenas o primeiro, você pode ignorar o segundo disco inacessível. Ou, se você quiser recuperar um disco no espaço livre restante em um disco já usado, compartilhando o mesmo dispositivo físico. -Esta opção pode ser usada apenas com fix. - - - -
-
-
+Esta opção pode ser usada apenas com `fix`. +
+ + +
-N, --force-nocopy -
-Em sync, check e fix, desabilita a heurística de detecção +
+Em `sync`, `check` e `fix`, desabilita a heurística de detecção de cópia. Sem esta opção, o SnapRAID assume que arquivos com os mesmos atributos, como nome, tamanho e carimbo de data/hora, são cópias com os mesmos dados. @@ -1278,139 +1129,97 @@ para detectar erros silenciosos ou para recuperar arquivos ausentes. Em alguns casos raros, esse comportamento pode resultar em falsos positivos ou em um processo lento devido a muitas verificações de hash, e esta opção permite que você resolva tais problemas. -Esta opção pode ser usada apenas com sync, check e fix. - - - -
-
-
+Esta opção pode ser usada apenas com `sync`, `check` e `fix`. +
+ + +
-F, --force-full -
-Em sync, força um recálculo completo da paridade. +
+Em `sync`, força um recálculo completo da paridade. Esta opção pode ser usada quando você adiciona um novo nível de paridade ou se você reverteu para um arquivo de conteúdo antigo usando dados de paridade mais recentes. Em vez de recriar a paridade do zero, isso permite que você reutilize os hashes presentes no arquivo de conteúdo para validar dados e manter a proteção de dados durante o processo -sync usando os dados de paridade existentes. -Esta opção pode ser usada apenas com sync. - - - -
-
-
+`sync` usando os dados de paridade existentes. +Esta opção pode ser usada apenas com `sync`. +
+ + +
-R, --force-realloc -
-Em sync, força uma realocação completa de arquivos e reconstrução +
+Em `sync`, força uma realocação completa de arquivos e reconstrução da paridade. Esta opção pode ser usada para realocar completamente todos os arquivos, removendo a fragmentação, enquanto reutiliza os hashes presentes no arquivo de conteúdo para validar dados. -Esta opção pode ser usada apenas com sync. +Esta opção pode ser usada apenas com `sync`. ATENÇÃO! Esta opção é apenas para especialistas e é altamente recomendado não usá-la. -Você NÃO tem proteção de dados durante a operação sync. - - - -
-
-
--W, --force-realloc-tail TAMANHO -
-Funciona como -R, --force-realloc, mas limitado à parte final -especificada (últimos TAMANHO bytes) de cada arquivo de paridade. -Força a realocação (movimentação) de quaisquer fragmentos/blocos de arquivos -atualmente armazenados nessa seção final, permitindo que sejam colocados -em qualquer lugar no(s) arquivo(s) de paridade onde houver espaço livre -disponível (incluindo espaços vazios existentes). -O objetivo principal desta opção é diminuir o tamanho em disco -do arquivo de paridade. -Se a realocação limpar com sucesso toda a seção final (nenhum bloco -permanecer usando-a), o arquivo de paridade será truncado, -recuperando o espaço final não utilizado. -Você pode usar multiplicadores como K, M, G ou T (ex: ---force-realloc-tail 1G). -Você pode usar locate -t, --tail para saber antecipadamente os -arquivos afetados. -AVISO! -Esta opção é apenas para especialistas e é altamente recomendado -não utilizá-la. -Você NÃO terá proteção de datos durante a operação sync para os -arquivos afetados. -
-
-
-
-
-
+Você NÃO tem proteção de dados durante a operação `sync`. +
+ + +
-l, --log FILE -
+
Escreve um log detalhado para o arquivo especificado. Se esta opção não for especificada, erros inesperados são impressos na tela, resultando potencialmente em saída excessiva em caso de muitos erros. Quando -l, --log é especificado, apenas erros fatais que fazem o SnapRAID parar são impressos na tela. -Se o caminho começar com >>, o arquivo é aberto -no modo de anexação. Ocorrências de %D e %T no nome são +Se o caminho começar com '>>', o arquivo é aberto +no modo de anexação. Ocorrências de '%D' e '%T' no nome são substituídas pela data e hora no formato YYYYMMDD e HHMMSS. Em arquivos em lote do Windows, você deve duplicar -o caractere %, por exemplo, resultado-%%D.log. Para usar >>, você deve -colocar o nome entre aspas, por exemplo, ">>resultado.log". +o caractere '%', por exemplo, resultado-%%D.log. Para usar '>>', você deve +colocar o nome entre aspas, por exemplo, `">>resultado.log"`. Para enviar o log para a saída padrão ou erro padrão, -você pode usar ">&1" e ">&2", respectivamente. +você pode usar `">&1"` e `">&2"`, respectivamente. Consulte o arquivo snapraid_log.txt ou a página man para descrições de tags de log. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Define um novo limite de erro antes de interromper a execução. Por padrão, o SnapRAID para se encontrar mais de 100 erros de entrada/saída, indicando que um disco provavelmente está falhando. -Esta opção afeta sync e scrub, que têm permissão +Esta opção afeta `sync` e `scrub`, que têm permissão para continuar após o primeiro conjunto de erros de disco para tentar completar suas operações. -No entanto, check e fix sempre param no primeiro erro. - - - -
-
-
+No entanto, `check` e `fix` sempre param no primeiro erro. +
+ + +
-S, --start BLKSTART -
+
Começa o processamento a partir do número de bloco especificado. Isso pode ser útil para tentar verificar ou corrigir blocos específicos em caso de um disco danificado. Esta opção é principalmente para recuperação manual avançada. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Processa apenas o número especificado de blocos. Esta opção é principalmente para recuperação manual avançada. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Gera um arquivo de configuração dummy a partir de um arquivo de conteúdo existente. O arquivo de configuração é escrito na saída padrão @@ -1418,69 +1227,57 @@ e não sobrescreve um existente. Este arquivo de configuração também contém as informações necessárias para reconstruir os pontos de montagem do disco, caso você perca todo o sistema. - - - -
-
-
+
+ + +
-v, --verbose -
+
Imprime mais informações na tela. Se especificado uma vez, ele imprime arquivos excluídos e estatísticas adicionais. Esta opção não tem efeito nos arquivos de log. - - - -
-
-
+
+ + +
-q, --quiet -
+
Imprime menos informações na tela. Se especificado uma vez, remove a barra de progresso; duas vezes, as operações em execução; três vezes, as mensagens de informação; quatro vezes, as mensagens de status. Erros fatais são sempre impressos na tela. Esta opção não tem efeito nos arquivos de log. - - - -
-
-
+
+ + +
-H, --help -
+
Imprime uma tela de ajuda curta. - - - -
-
-
+
+ + +
-V, --version -
+
Imprime a versão do programa. - - - - -
-

+

+

7 Configuração -

+

SnapRAID requer um arquivo de configuração para saber onde seu array de discos está localizado e onde armazenar as informações de paridade. -

No Unix, ele usa o arquivo /usr/local/etc/snapraid.conf se existir, -caso contrário, /etc/snapraid.conf. -No Windows, ele usa o arquivo snapraid.conf no mesmo -diretório que snapraid.exe. +

No Unix, ele usa o arquivo `/usr/local/etc/snapraid.conf` se existir, +caso contrário, `/etc/snapraid.conf`. +No Windows, ele usa o arquivo `snapraid.conf` no mesmo +diretório que `snapraid.exe`.

Deve conter as seguintes opções (sensível a maiúsculas/minúsculas): -

-

+

7.1 parity FILE [,FILE] ... -

+

Define os arquivos a serem usados para armazenar as informações de paridade. A paridade permite proteção contra uma única falha de disco, semelhante ao RAID5. @@ -1495,11 +1292,9 @@ eles não se fragmentem, melhorando o desempenho.

No Windows, 256 MB são deixados sem uso em cada disco para evitar o aviso sobre discos cheios.

Esta opção é obrigatória e pode ser usada apenas uma vez. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Define os arquivos a serem usados para armazenar informações de paridade extra.

Para cada nível de paridade especificado, um nível adicional de proteção é habilitado: @@ -1522,45 +1317,39 @@ aviso sobre discos cheios.

Cada nível de paridade requer a presença de todos os níveis de paridade anteriores. -

As mesmas considerações que para a opção parity se aplicam. +

As mesmas considerações que para a opção 'parity' se aplicam.

Estas opções são opcionais e podem ser usadas apenas uma vez. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Define um arquivo e formato alternativo para armazenar paridade tripla. -

Esta opção é uma alternativa a 3-parity, destinada principalmente a +

Esta opção é uma alternativa a '3-parity', destinada principalmente a CPUs de baixo custo como ARM ou AMD Phenom, Athlon e Opteron que não suportam o conjunto de instruções SSSE3. Nesses casos, ela fornece melhor desempenho.

Este formato é semelhante, mas mais rápido do que o usado pelo ZFS RAIDZ3. Assim como o ZFS, ele não funciona além da paridade tripla. -

Ao usar 3-parity, você será avisado se for recomendado usar -o formato z-parity para melhoria de desempenho. +

Ao usar '3-parity', você será avisado se for recomendado usar +o formato 'z-parity' para melhoria de desempenho.

É possível converter de um formato para outro ajustando o arquivo de configuração com o z-parity ou 3-parity desejado -e usando fix para recriá-lo. -

-
-

+e usando 'fix' para recriá-lo. +

7.4 content FILE -

+

Define o arquivo a ser usado para armazenar a lista e os checksums de todos os arquivos presentes em seu array de discos.

Pode ser colocado em um disco usado para dados, paridade ou qualquer outro disco disponível. Se você usar um disco de dados, este arquivo é automaticamente excluído -do processo sync. +do processo `sync`.

Esta opção é obrigatória e pode ser usada várias vezes para salvar múltiplas cópias do mesmo arquivo.

Você deve armazenar pelo menos uma cópia para cada disco de paridade usado mais um. Usar cópias adicionais não prejudica. -

-
-

+

7.5 data NAME DIR -

+

Define o nome e o ponto de montagem dos discos de dados no array. NAME é usado para identificar o disco e deve ser único. DIR é o ponto de montagem do disco no @@ -1569,57 +1358,39 @@ sistema de arquivos. mantenha o NAME fixo.

Você deve usar uma opção para cada disco de dados no array.

Você pode renomear um disco mais tarde alterando o NAME diretamente -no arquivo de configuração e, em seguida, executando um comando sync. +no arquivo de configuração e, em seguida, executando um comando 'sync'. No caso de renomeação, a associação é feita usando o UUID armazenado dos discos. -

-
-

-extra NAME DIR -

-

Define o nome e o ponto de montagem de discos adicionais para -monitorar com os comandos smart e probe. -

Isso é útil para monitorar discos que não fazem parte da matriz, -mas que são necessários para o funcionamento do sistema, como o -disco de inicialização. -

Observe que tais discos não são afetados pelos comandos up e down -porque se espera que estejam sempre girando. -

-
-

+

7.6 nohidden -

+

Exclui todos os arquivos e diretórios ocultos. -No Unix, arquivos ocultos são aqueles que começam com .. +No Unix, arquivos ocultos são aqueles que começam com `.`. No Windows, são aqueles com o atributo oculto. -

-
-

+

7.7 exclude/include PATTERN -

+

Define os padrões de arquivo ou diretório a serem excluídos ou incluídos no processo de sincronização. Todos os padrões são processados na ordem especificada. -

Se o primeiro padrão que corresponde for um exclude, o arquivo -é excluído. Se for um include, o arquivo é incluído. +

Se o primeiro padrão que corresponde for um `exclude`, o arquivo +é excluído. Se for um `include`, o arquivo é incluído. Se nenhum padrão corresponder, o arquivo é excluído se o último padrão -especificado for um include, ou incluído se o último padrão -especificado for um exclude. +especificado for um `include`, ou incluído se o último padrão +especificado for um `exclude`.

Consulte a seção PATTERN para obter mais detalhes sobre especificações de padrão.

Esta opção pode ser usada várias vezes. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Define o tamanho básico do bloco em kibibytes para a paridade. Um kibibyte é 1024 bytes. -

O blocksize padrão é 256, o que deve funcionar para a maioria dos casos. +

O `blocksize` padrão é 256, o que deve funcionar para a maioria dos casos.

ATENÇÃO! Esta opção é apenas para especialistas e é altamente recomendado não alterar este valor. Para alterar este valor no futuro, você precisará recriar toda a paridade! -

Uma razão para usar um blocksize diferente é se você tiver muitos arquivos +

Uma razão para usar um `blocksize` diferente é se você tiver muitos arquivos pequenos, na ordem de milhões.

Para cada arquivo, mesmo que apenas alguns bytes, um bloco inteiro de paridade é alocado, e com muitos arquivos, isso pode resultar em @@ -1634,7 +1405,7 @@ não em outros. desperdiçada para cada arquivo. Por exemplo, com 100.000 arquivos e um tamanho de bloco de 256 KiB, você desperdiçará 12,8 GB de paridade, o que pode resultar em 12,8 GB a menos de espaço disponível no disco de dados. -

Você pode verificar a quantidade de espaço desperdiçado em cada disco usando status. +

Você pode verificar a quantidade de espaço desperdiçado em cada disco usando `status`. Esta é a quantidade de espaço que você deve deixar livre nos discos de dados ou usar para arquivos não incluídos no array. Se este valor for negativo, significa que você está perto de encher @@ -1645,24 +1416,24 @@ você tem espaço extra suficiente para lidar com até 100.000 arquivos em cada disco de dados sem qualquer espaço desperdiçado.

Um truque para obter uma partição de paridade maior no Linux é formatá-la com o comando: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Isso resulta em cerca de 1,5% de espaço extra, aproximadamente 60 GB para um disco de 4 TB, o que permite cerca de 460.000 arquivos em cada disco de dados sem qualquer espaço desperdiçado. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Define o tamanho do hash em bytes para os blocos salvos. -

O hashsize padrão é 16 bytes (128 bits), o que deve funcionar +

O `hashsize` padrão é 16 bytes (128 bits), o que deve funcionar para a maioria dos casos.

ATENÇÃO! Esta opção é apenas para especialistas e é altamente recomendado não alterar este valor. Para alterar este valor no futuro, você precisará recriar toda a paridade! -

Uma razão para usar um hashsize diferente é se o seu sistema tiver +

Uma razão para usar um `hashsize` diferente é se o seu sistema tiver memória limitada. Como regra geral, o SnapRAID tipicamente requer 1 GiB de RAM para cada 16 TB de dados no array.

Especificamente, para armazenar os hashes dos dados, o SnapRAID requer @@ -1686,26 +1457,22 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Salva automaticamente o estado ao sincronizar ou examinar após a quantidade especificada de GB processados. -Esta opção é útil para evitar reiniciar longos comandos sync +Esta opção é útil para evitar reiniciar longos comandos `sync` do zero se interrompidos por uma falha de máquina ou qualquer outro evento. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Define a temperatura máxima permitida do disco em Celsius. Quando especificado, o SnapRAID verifica periodicamente a temperatura de todos os discos usando a ferramenta smartctl. As temperaturas atuais dos discos são exibidas enquanto o SnapRAID está operando. Se algum disco exceder este limite, todas as operações param, e os discos são desligados (colocados em standby) pela -duração definida pela opção temp_sleep. Após o período de espera, as +duração definida pela opção `temp_sleep`. Após o período de espera, as operações são retomadas, potencialmente pausando novamente se o limite de temperatura for atingido mais uma vez.

Durante a operação, o SnapRAID também analisa a curva de aquecimento de @@ -1726,89 +1493,86 @@ a temperatura mais baixa do disco medida no início da execução como referência de fallback.

Normalmente, o SnapRAID mostra apenas a temperatura do disco mais quente. Para exibir a temperatura de todos os discos, use a opção -A ou --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Define o tempo de espera (standby time), em minutos, quando o limite de temperatura é atingido. Durante este período, os discos permanecem desligados. O padrão é 5 minutos. -

-
-

+

7.13 pool DIR -

+

Define o diretório de pooling onde a visualização virtual do array -de discos é criada usando o comando pool. +de discos é criada usando o comando `pool`.

O diretório já deve existir. -

-
-

+

7.14 share UNC_DIR -

+

Define o caminho UNC do Windows necessário para acessar os discos remotamente.

Se esta opção for especificada, os links simbólicos criados no diretório do pool usam este caminho UNC para acessar os discos. Sem esta opção, os links simbólicos gerados usam apenas caminhos locais, o que não permite compartilhar o diretório do pool pela rede.

Os links simbólicos são formados usando o caminho UNC especificado, -adicionando o nome do disco conforme especificado na opção data, +adicionando o nome do disco conforme especificado na opção `data`, e finalmente adicionando o diretório e nome do arquivo.

Esta opção é necessária apenas para Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Define opções smartctl personalizadas para obter os atributos SMART para cada disco. Isso pode ser necessário para controladores RAID e alguns discos USB que não podem ser detectados automaticamente. O placeholder %s é substituído pelo nome do dispositivo, mas é opcional para dispositivos fixos como controladores RAID. -

DISK é o mesmo nome de disco especificado na opção data. -PARITY é um dos nomes de paridade: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity ou z-parity. -

Nas OPTIONS especificadas, a string %s é substituída pelo +

DISK é o mesmo nome de disco especificado na opção `data`. +PARITY é um dos nomes de paridade: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` ou `z-parity`. +

Nas OPTIONS especificadas, a string `%s` é substituída pelo nome do dispositivo. Para controladores RAID, o dispositivo é -provavelmente fixo, e você pode não precisar usar %s. +provavelmente fixo, e você pode não precisar usar `%s`.

Consulte a documentação do smartmontools para possíveis opções: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Por exemplo: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignora o atributo SMART especificado ao calcular a probabilidade de falha do disco. Esta opção é útil se um disco relatar valores incomuns ou enganosos para um atributo específico. -

DISK é o mesmo nome de disco especificado na opção data. -PARITY é um dos nomes de paridade: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity ou z-parity. +

DISK é o mesmo nome de disco especificado na opção `data`. +PARITY é um dos nomes de paridade: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` ou `z-parity`. O valor especial * pode ser usado para ignorar o atributo em todos os discos. -

Por exemplo, para ignorar o atributo Current Pending Sector Count em +

Por exemplo, para ignorar o atributo `Current Pending Sector Count` em todos os discos: -

+

+
 smartignore * 197
 
+

Para ignorá-lo apenas no primeiro disco de paridade: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Exemplos -

+

Um exemplo de uma configuração típica para Unix é: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1822,8 +1586,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Um exemplo de uma configuração típica para Windows é: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1838,274 +1604,180 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Padrão (Pattern) -

-

Os padrões fornecem uma maneira flexível de filtrar arquivos para inclusão ou -exclusão. Ao usar caracteres de globbing, você pode definir regras que -correspondam a nomes de arquivos específicos ou estruturas de diretórios inteiras sem -listar cada caminho manualmente. -

O ponto de interrogação ? corresponde a qualquer caractere único, exceto o -separador de diretórios. Isso o torna útil para corresponder nomes de arquivos com -caracteres variáveis, mantendo o padrão confinado a um único nível de diretório. -

O asterisco simples * corresponde a qualquer sequência de caracteres, mas, como o -ponto de interrogação, nunca cruza as fronteiras do diretório. Ele para na -barra invertida, tornando-o adequado para correspondência dentro de um único -componente de caminho. Este é o comportamento padrão de curinga familiar do -globbing de shell. -

O asterisco duplo ** é mais poderoso, ele corresponde a qualquer sequência de -caracteres, incluindo separadores de diretórios. Isso permite que os padrões correspondam -em vários níveis de diretório. Quando o ** aparece incorporado diretamente em -um padrão, ele pode corresponder a zero ou mais caracteres, incluindo barras entre -o texto literal circundante. -

O uso mais importante do ** é na forma especial /**/. Isso corresponde a -zero ou mais níveis de diretório completos, tornando possível corresponder arquivos -em qualquer profundidade em uma árvore de diretórios sem conhecer a estrutura exata do caminho. -Por exemplo, o padrão src/**/main.js corresponde a src/main.js (pulando -zero diretórios), src/ui/main.js (pulando um diretório) e -src/ui/components/main.js (pulando dois diretórios). -

Classes de caracteres usando colchetes [] correspondem a um único caractere de um -conjunto ou intervalo especificado. Como os outros padrões de caractere único, elas -não correspondem a separadores de diretório. As classes suportam intervalos e negação usando -um ponto de exclamação. -

A distinção fundamental a ser lembrada é que *, ? e classes de caracteres -respeitam os limites do diretório e correspondem apenas dentro de um único -componente de caminho, enquanto ** é o único padrão que pode corresponder através de -separadores de diretório. + +

Padrões são usados para selecionar um subconjunto de arquivos a serem +excluídos ou incluídos no processo.

Existem quatro tipos diferentes de padrões: -

-
-
+

+ +
FILE -
-Seleciona qualquer arquivo chamado FILE. +
+Seleciona qualquer arquivo chamado FILE. Você pode usar quaisquer +caracteres globbing como * e ?, e classes de caracteres como [a-z]. Este padrão se aplica apenas a arquivos, não a diretórios. - - - -
-
-
+
+ + +
DIR/ -
-Seleciona qualquer diretório chamado DIR e tudo o que estiver dentro dele. +
+Seleciona qualquer diretório chamado DIR e tudo dentro. +Você pode usar quaisquer caracteres globbing como * e ?. Este padrão se aplica apenas a diretórios, não a arquivos. - - - -
-
-
+
+ + +
/PATH/FILE -
-Seleciona o caminho exato do arquivo especificado. Este padrão se aplica -apenas a arquivos, não a diretórios. -
- - -
-
-
+
+Seleciona o caminho exato do arquivo especificado. Você pode usar +quaisquer caracteres globbing como * e ?, mas eles nunca correspondem +a uma barra de diretório. +Este padrão se aplica apenas a arquivos, não a diretórios. +
+ + +
/PATH/DIR/ -
-Seleciona o caminho exato do diretório especificado e tudo o que estiver -dentro dele. Este padrão se aplica apenas a diretórios, não a arquivos. -
- - +
+Seleciona o caminho exato do diretório especificado e tudo +dentro. Você pode usar quaisquer caracteres globbing como * e ?, mas +eles nunca correspondem a uma barra de diretório. +Este padrão se aplica apenas a diretórios, não a arquivos. +

Quando você especifica um caminho absoluto começando com /, ele é aplicado no diretório raiz do array, não no diretório raiz do sistema de arquivos local.

No Windows, você pode usar a barra invertida \ em vez da barra. Diretórios do sistema Windows, junctions, pontos de montagem e outros diretórios especiais do Windows são tratados como arquivos, o que significa que para excluí-los, você deve usar uma regra de arquivo, não uma de diretório. -

Se o nome do arquivo contiver um caractere *, ?, [, -ou ], você deve escapá-lo para evitar que seja interpretado como um -caractere globbing. No Unix, o caractere de escape é \; no Windows, é ^. +

Se o nome do arquivo contiver um caractere '*', '?', '[', +ou ']', você deve escapá-lo para evitar que seja interpretado como um +caractere globbing. No Unix, o caractere de escape é '\'; no Windows, é '^'. Quando o padrão está na linha de comando, você deve duplicar o caractere de escape para evitar que seja interpretado pelo shell de comando.

No arquivo de configuração, você pode usar diferentes estratégias para filtrar os arquivos a serem processados. -A abordagem mais simples é usar apenas regras exclude para remover todos os +A abordagem mais simples é usar apenas regras `exclude` para remover todos os arquivos e diretórios que você não deseja processar. Por exemplo: -

-# Exclui qualquer arquivo chamado *.unrecoverable
+

+
+# Exclui qualquer arquivo chamado `*.unrecoverable`
 exclude *.unrecoverable
-# Exclui o diretório raiz /lost+found
+# Exclui o diretório raiz `/lost+found`
 exclude /lost+found/
-# Exclui qualquer subdiretório chamado tmp
+# Exclui qualquer subdiretório chamado `tmp`
 exclude tmp/
 
+

A abordagem oposta é definir apenas os arquivos que você deseja processar, -usando apenas regras include. Por exemplo: -

+usando apenas regras `include`. Por exemplo:
+

+
 # Inclui apenas alguns diretórios
 include /movies/
 include /musics/
 include /pictures/
 
-

A abordagem final é misturar regras exclude e include. Neste caso, +

+

A abordagem final é misturar regras `exclude` e `include`. Neste caso, a ordem das regras é importante. As regras anteriores têm precedência sobre as posteriores. -Para simplificar, você pode listar todas as regras exclude primeiro e -depois todas as regras include. Por exemplo: -

-# Exclui qualquer arquivo chamado *.unrecoverable
+Para simplificar, você pode listar todas as regras `exclude` primeiro e
+depois todas as regras `include`. Por exemplo:
+

+
+# Exclui qualquer arquivo chamado `*.unrecoverable`
 exclude *.unrecoverable
-# Exclui qualquer subdiretório chamado tmp
+# Exclui qualquer subdiretório chamado `tmp`
 exclude tmp/
 # Inclui apenas alguns diretórios
 include /movies/
 include /musics/
 include /pictures/
 
-

Na linha de comando, usando a opção -f, você pode usar apenas padrões include. +

+

Na linha de comando, usando a opção -f, você pode usar apenas padrões `include`. Por exemplo: -

+

+
 # Verifica apenas os arquivos .mp3.
 # No Unix, use aspas para evitar a expansão globbing pelo shell.
 snapraid -f "*.mp3" check
 
+

No Unix, ao usar caracteres globbing na linha de comando, você deve citá-los para evitar que o shell os expanda. -

-
-

-Ignorar Arquivos (Ignore File) -

-

Além das regras globais no arquivo de configuração, você pode colocar -arquivos .snapraidignore em qualquer diretório dentro do array para definir -regras de exclusão descentralizadas. -

As regras definidas em .snapraidignore são aplicadas após as regras no -arquivo de configuração. Isso significa que elas têm uma prioridade maior e -podem ser usadas para excluir arquivos que foram anteriormente incluídos pela -configuração global. Efetivamente, se uma regra local corresponder, o arquivo -é excluído independentemente das configurações globais de inclusão. -

A lógica de padrões no .snapraidignore espelha a configuração global, mas -ancora os padrões ao diretório onde o arquivo está localizado: -

-
-
-FILE -
-Seleciona qualquer arquivo chamado FILE neste diretório ou abaixo. -Isso segue as mesmas regras de globbing do padrão global. -
-
-
-
-
-
-DIR/ -
-Seleciona qualquer diretório chamado DIR e tudo dentro dele, -residente neste diretório ou abaixo. -
-
-
-
-
-
-/PATH/FILE -
-Seleciona o arquivo exato especificado relativo à localização -do arquivo .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Seleciona o diretório exato especificado e tudo dentro dele, -relativo à localização do arquivo .snapraidignore. -
-
-
-

Ao contrário da configuração global, os arquivos .snapraidignore suportam -apenas regras de exclusão; você não pode usar padrões include ou negação (!). -

Por exemplo, se você tiver um .snapraidignore em /mnt/disk1/projects/: -

-# Exclui APENAS /mnt/disk1/projects/output.bin
-/output.bin
-# Exclui qualquer diretório chamado build dentro de projects/
-build/
-# Exclui qualquer arquivo .tmp dentro de projects/ ou suas subpastas
-*.tmp
-
-
-
-

+

9 Conteúdo (Content) -

+

SnapRAID armazena a lista e os checksums de seus arquivos no arquivo content.

É um arquivo binário que lista todos os arquivos presentes em seu array de discos, juntamente com todos os checksums para verificar sua integridade. -

Este arquivo é lido e escrito pelos comandos sync e scrub e -lido pelos comandos fix, check e status. -

-
-

+

Este arquivo é lido e escrito pelos comandos `sync` e `scrub` e +lido pelos comandos `fix`, `check` e `status`. +

10 Paridade (Parity) -

+

SnapRAID armazena as informações de paridade do seu array nos arquivos parity.

Estes são arquivos binários contendo a paridade calculada de todos os -blocos definidos no arquivo content. -

Estes arquivos são lidos e escritos pelos comandos sync e fix e -apenas lidos pelos comandos scrub e check. -

-
-

+blocos definidos no arquivo `content`. +

Estes arquivos são lidos e escritos pelos comandos `sync` e `fix` e +apenas lidos pelos comandos `scrub` e `check`. +

11 Codificação (Encoding) -

+

SnapRAID no Unix ignora qualquer codificação. Ele lê e armazena os nomes de arquivo com a mesma codificação usada pelo sistema de arquivos.

No Windows, todos os nomes lidos do sistema de arquivos são convertidos e processados no formato UTF-8.

Para que os nomes de arquivo sejam impressos corretamente, você deve -definir o console do Windows para o modo UTF-8 com o comando chcp 65001 -e usar uma fonte TrueType como Lucida Console como fonte do console. +definir o console do Windows para o modo UTF-8 com o comando `chcp 65001` +e usar uma fonte TrueType como `Lucida Console` como fonte do console. Isso afeta apenas os nomes de arquivo impressos; se você redirecionar a saída do console para um arquivo, o arquivo resultante estará sempre no formato UTF-8. -

-
-

+

12 Direitos Autorais (Copyright) -

+

Este arquivo é Copyright (C) 2025 Andrea Mazzoleni -

-
-

+

13 Veja Também (See Also) -

-

snapraid_log(1), snapraidd(1) -

+ +

snapraid_log(1), rsync(1) +

+

+

-
-
-
+
- - + diff --git a/manual-ro.html b/manual-ro.html index b3d9ef45..abd9abd4 100644 --- a/manual-ro.html +++ b/manual-ro.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Sintaxă -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Descriere -

+

SnapRAID este un program de backup conceput pentru matrici de discuri, care stochează informații de paritate pentru recuperarea datelor în cazul a până la șase defecte de disc. @@ -183,14 +128,14 @@ energie și reducând zgomotul.

Pentru mai multe informații, vă rugăm să vizitați site-ul oficial SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitări -

+

SnapRAID este un hibrid între un program RAID și unul de backup, care urmărește să combine cele mai bune beneficii ale ambelor. Cu toate acestea, are unele limitări pe care ar trebui să le luați în considerare înainte de a-l utiliza. @@ -228,13 +173,11 @@ Sunt salvate doar numele fișierelor, mărcile temporale, symlink-urile și hard Permisiunile, proprietarul și atributele extinse nu sunt salvate. -

-
-

+

4 Noțiuni de Bază -

+

Pentru a utiliza SnapRAID, trebuie mai întâi să selectați un disc în matricea dvs. de discuri -pentru a-l dedica informațiilor de paritate. Cu un singur disc pentru paritate, veți +pentru a-l dedica informațiilor de `paritate`. Cu un singur disc pentru paritate, veți putea recupera dintr-o singură defecțiune de disc, similar cu RAID5.

Dacă doriți să recuperați din mai multe defecțiuni de disc, similar cu RAID6, trebuie să rezervați discuri suplimentare pentru paritate. Fiecare disc de paritate @@ -242,30 +185,33 @@ suplimentar permite recuperarea dintr-o defecțiune de disc în plus.

Ca discuri de paritate, trebuie să le alegeți pe cele mai mari din matrice, deoarece informațiile de paritate pot crește până la dimensiunea celui mai mare disc de date din matrice. -

Aceste discuri vor fi dedicate stocării fișierelor de paritate. +

Aceste discuri vor fi dedicate stocării fișierelor de `paritate`. Nu ar trebui să stocați datele dvs. pe ele. -

Apoi, trebuie să definiți discurile de date pe care doriți să le protejați +

Apoi, trebuie să definiți discurile de `date` pe care doriți să le protejați cu SnapRAID. Protecția este mai eficientă dacă aceste discuri conțin date care se schimbă rar. Din acest motiv, este mai bine să NU includeți discul C:\ al Windows sau directoarele Unix /home, /var și /tmp. -

Lista de fișiere este salvată în fișierele de conținut, de obicei +

Lista de fișiere este salvată în fișierele de `conținut`, de obicei stocate pe discurile de date, de paritate sau de boot. Acest fișier conține detaliile backup-ului dvs., inclusiv toate sumele de control (checksums) pentru a-i verifica integritatea. -Fișierul de conținut este stocat în mai multe copii, iar fiecare copie trebuie +Fișierul de `conținut` este stocat în mai multe copii, iar fiecare copie trebuie să fie pe un disc diferit pentru a se asigura că, chiar și în cazul a multiple defecte de disc, cel puțin o copie este disponibilă.

De exemplu, să presupunem că sunteți interesați doar de un singur nivel de paritate de protecție și discurile dvs. se află la: -

+

+
 /mnt/diskp <- discul selectat pentru paritate
 /mnt/disk1 <- primul disc de protejat
 /mnt/disk2 <- al doilea disc de protejat
 /mnt/disk3 <- al treilea disc de protejat
 
+

Trebuie să creați fișierul de configurare /etc/snapraid.conf cu următoarele opțiuni: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -274,9 +220,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Dacă sunteți pe Windows, ar trebui să utilizați formatul de cale Windows, cu litere de unitate și backslash-uri în loc de slash-uri. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -285,16 +233,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Dacă aveți multe discuri și rămâneți fără litere de unitate, puteți monta discurile direct în subfoldere. Vedeți: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

În acest moment, sunteți gata să rulați comanda sync pentru a construi +

+

În acest moment, sunteți gata să rulați comanda `sync` pentru a construi informațiile de paritate. -

+

+
 snapraid sync
 
+

Acest proces poate dura câteva ore prima dată, în funcție de dimensiunea datelor deja prezente pe discuri. Dacă discurile sunt goale, procesul este imediat. @@ -302,53 +255,60 @@ procesul este imediat. va relua de unde a fost întrerupt.

Când această comandă se finalizează, datele dvs. sunt ÎN SIGURANȚĂ.

Acum puteți începe să utilizați matricea după cum doriți și -să actualizați periodic informațiile de paritate rulând comanda sync. -

-

+să actualizați periodic informațiile de paritate rulând comanda `sync`. +

4.1 Scrubbing (Verificare) -

+

Pentru a verifica periodic datele și paritatea pentru erori, puteți -rula comanda scrub. -

+rula comanda `scrub`.
+

+
 snapraid scrub
 
+

Această comandă compară datele din matricea dvs. cu hash-ul calculat -în timpul comenzii sync pentru a verifica integritatea. +în timpul comenzii `sync` pentru a verifica integritatea.

Fiecare rulare a comenzii verifică aproximativ 8% din matrice, excluzând datele deja verificate în ultimele 10 zile. Puteți utiliza opțiunea -p, --plan pentru a specifica o cantitate diferită și opțiunea -o, --older-than pentru a specifica o vârstă diferită în zile. De exemplu, pentru a verifica 5% din matrice pentru blocuri mai vechi de 20 de zile, utilizați: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Dacă se găsesc erori silențioase sau de intrare/ieșire în timpul procesului, -blocurile corespunzătoare sunt marcate ca fiind defecte în fișierul de conținut -și listate în comanda status. -

+blocurile corespunzătoare sunt marcate ca fiind defecte în fișierul de `conținut`
+și listate în comanda `status`.
+

+
 snapraid status
 
-

Pentru a le repara, puteți utiliza comanda fix, filtrând pentru blocuri defecte cu +

+

Pentru a le repara, puteți utiliza comanda `fix`, filtrând pentru blocuri defecte cu opțiunea -e, --filter-error: -

+

+
 snapraid -e fix
 
-

La următorul scrub, erorile vor dispărea din raportul status +

+

La următorul `scrub`, erorile vor dispărea din raportul `status` dacă sunt într-adevăr reparate. Pentru a face mai rapid, puteți utiliza -p bad pentru a verifica doar blocurile marcate ca defecte. -

+

+
 snapraid -p bad scrub
 
-

Rularea scrub pe o matrice nesincronizată poate raporta erori cauzate de -fișiere eliminate sau modificate. Aceste erori sunt raportate în ieșirea scrub, +

+

Rularea `scrub` pe o matrice nesincronizată poate raporta erori cauzate de +fișiere eliminate sau modificate. Aceste erori sunt raportate în ieșirea `scrub`, dar blocurile aferente nu sunt marcate ca defecte. -

-
-

+

4.2 Pooling (Agregare) -

+

Notă: Funcționalitatea de pooling descrisă mai jos a fost înlocuită de instrumentul -mergerfs, care este acum opțiunea recomandată pentru utilizatorii Linux în +mergefs, care este acum opțiunea recomandată pentru utilizatorii Linux în comunitatea SnapRAID. Mergefs oferă o modalitate mai flexibilă și eficientă de a agrega mai multe discuri într-un singur punct de montare unificat, permițând accesul neîntrerupt la fișiere pe toată matricea dvs. fără a se baza @@ -356,27 +316,36 @@ pe link-uri simbolice. Se integrează bine cu SnapRAID pentru protecția parită și este utilizat în mod obișnuit în configurații precum OpenMediaVault (OMV) sau configurații NAS personalizate.

Pentru a avea toate fișierele din matricea dvs. afișate în același arbore de directoare, -puteți activa funcționalitatea de pooling. Aceasta creează o vizualizare virtuală +puteți activa funcționalitatea de `pooling`. Aceasta creează o vizualizare virtuală doar în citire a tuturor fișierelor din matricea dvs. folosind link-uri simbolice. -

Puteți configura directorul de pooling în fișierul de configurare cu: -

+

Puteți configura directorul de `pooling` în fișierul de configurare cu: +

+
 pool /pool
 
+

sau, dacă sunteți pe Windows, cu: -

+

+
 pool C:\pool
 
-

și apoi rulați comanda pool pentru a crea sau actualiza vizualizarea virtuală. -

+
+

și apoi rulați comanda `pool` pentru a crea sau actualiza vizualizarea virtuală. +

+
 snapraid pool
 
+

Dacă utilizați o platformă Unix și doriți să partajați acest director peste rețea către mașini Windows sau Unix, ar trebui să adăugați următoarele opțiuni la /etc/samba/smb.conf: -

+

+
 # În secțiunea global a smb.conf
 unix extensions = no
 
+
+
 # În secțiunea share a smb.conf
 [pool]
@@ -387,373 +356,336 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

În Windows, partajarea link-urilor simbolice peste o rețea necesită ca clienții să le rezolve de la distanță. Pentru a permite acest lucru, pe lângă partajarea directorului pool, trebuie să partajați și toate discurile în mod independent, folosind numele discurilor definite în fișierul de configurare ca puncte de partajare. De asemenea, trebuie să specificați -în opțiunea share din fișierul de configurare calea UNC Windows pe care +în opțiunea `share` din fișierul de configurare calea UNC Windows pe care clienții la distanță trebuie să o folosească pentru a accesa aceste discuri partajate. -

De exemplu, operând de pe un server numit darkstar, puteți utiliza +

De exemplu, operând de pe un server numit `darkstar`, puteți utiliza opțiunile: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

și partajați următoarele directoare peste rețea: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

pentru a permite clienților la distanță să acceseze toate fișierele la \\darkstar\pool.

De asemenea, ar putea fi necesar să configurați clienții la distanță pentru a permite accesul la symlink-uri la distanță cu comanda: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting (Anulare Ștergere) -

+

SnapRAID funcționează mai mult ca un program de backup decât un sistem RAID și poate fi folosit pentru a restaura sau anula ștergerea fișierelor la starea lor anterioară utilizând opțiunea -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

sau pentru un director: -

+

+
 snapraid fix -f DIR/
 
+

De asemenea, îl puteți utiliza pentru a recupera doar fișiere șterse accidental în interiorul unui director folosind opțiunea -m, --filter-missing, care restaurează doar fișierele lipsă, lăsându-le pe toate celelalte neatinse. -

+

+
 snapraid fix -m -f DIR/
 
+

Sau pentru a recupera toate fișierele șterse de pe toate unitățile cu: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recuperare -

+

Cel mai rău s-a întâmplat și ați pierdut unul sau mai multe discuri!

NU INTRAȚI ÎN PANICĂ! Veți putea să le recuperați!

Primul lucru pe care trebuie să-l faceți este să evitați modificările ulterioare la matricea dvs. de discuri. Dezactivați orice conexiuni la distanță la aceasta și orice procese programate, inclusiv orice sincronizare sau verificare SnapRAID programată pe timp de noapte.

Apoi continuați cu următorii pași. -

-

+

4.4.1 PASUL 1 -> Reconfigurare -

+

Aveți nevoie de spațiu pentru a recupera, ideal pe discuri de rezervă suplimentare, dar un disc USB extern sau un disc la distanță vor fi suficiente. -

Modificați fișierul de configurare SnapRAID pentru a face ca opțiunea data sau parity +

Modificați fișierul de configurare SnapRAID pentru a face ca opțiunea `data` sau `parity` a discului defect să indice o locație cu suficient spațiu gol pentru a recupera fișierele. -

De exemplu, dacă discul d1 a eșuat, schimbați de la: -

+

De exemplu, dacă discul `d1` a eșuat, schimbați de la: +

+
 data d1 /mnt/disk1/
 
+

la: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

Dacă discul de recuperat este un disc de paritate, actualizați opțiunea parity +

+

Dacă discul de recuperat este un disc de paritate, actualizați opțiunea `parity` corespunzătoare. Dacă aveți mai multe discuri defecte, actualizați toate opțiunile lor de configurare. -

-
-

+

4.4.2 PASUL 2 -> Reparare (Fix) -

+

Rulați comanda fix, stocând jurnalul într-un fișier extern cu: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Unde NAME este numele discului, cum ar fi d1 în exemplul nostru anterior. -Dacă discul de recuperat este un disc de paritate, utilizați numele parity, 2-parity, +

+

Unde NAME este numele discului, cum ar fi `d1` în exemplul nostru anterior. +Dacă discul de recuperat este un disc de paritate, utilizați numele `parity`, `2-parity`, etc. Dacă aveți mai multe discuri defecte, utilizați mai multe opțiuni -d pentru a le specifica pe toate.

Această comandă va dura mult timp.

Asigurați-vă că aveți câțiva gigabytes liberi pentru a stoca fișierul fix.log. Rulați-l de pe un disc cu suficient spațiu liber.

Acum ați recuperat tot ce este recuperabil. Dacă unele fișiere sunt parțial -sau total nerecuperabile, vor fi redenumite adăugând extensia .unrecoverable. +sau total nerecuperabile, vor fi redenumite adăugând extensia `.unrecoverable`.

Puteți găsi o listă detaliată a tuturor blocurilor nerecuperabile în fișierul fix.log -verificând toate liniile care încep cu unrecoverable:. +verificând toate liniile care încep cu `unrecoverable:`.

Dacă nu sunteți mulțumit de recuperare, o puteți reîncerca de câte ori doriți.

De exemplu, dacă ați eliminat fișiere din matrice după ultima -sync, acest lucru poate duce la nerecuperarea unor fișiere. -În acest caz, puteți reîncerca fix-ul utilizând opțiunea -i, --import, +`sync`, acest lucru poate duce la nerecuperarea unor fișiere. +În acest caz, puteți reîncerca `fix`-ul utilizând opțiunea -i, --import, specificând unde se află acum aceste fișiere pentru a le include din nou în procesul de recuperare.

Dacă sunteți mulțumit de recuperare, puteți continua, -dar rețineți că după sincronizare, nu mai puteți reîncerca comanda fix +dar rețineți că după sincronizare, nu mai puteți reîncerca comanda `fix` deloc! -

-
-

+

4.4.3 PASUL 3 -> Verificare (Check) -

-

Ca o verificare prudentă, puteți rula acum o comandă check pentru a vă asigura că + +

Ca o verificare prudentă, puteți rula acum o comandă `check` pentru a vă asigura că totul este corect pe discul recuperat. -

+

+
 snapraid -d NAME -a check
 
-

Unde NAME este numele discului, cum ar fi d1 în exemplul nostru anterior. +

+

Unde NAME este numele discului, cum ar fi `d1` în exemplul nostru anterior.

Opțiunile -d și -a spun SnapRAID să verifice doar discul specificat și să ignore toate datele de paritate.

Această comandă va dura mult timp, dar dacă nu sunteți excesiv de prudent, o puteți sări. -

-
-

+

4.4.4 PASUL 4 -> Sincronizare (Sync) -

-

Rulați comanda sync pentru a resincroniza matricea cu noul disc. -

+
+

Rulați comanda `sync` pentru a resincroniza matricea cu noul disc. +

+
 snapraid sync
 
+

Dacă totul este recuperat, această comandă este imediată. -

-
-
-
-

+

5 Comenzi -

+

SnapRAID oferă câteva comenzi simple care vă permit să:

  • -Tipăriți starea matricei -> status +Tipăriți starea matricei -> `status`
  • -Controlați discurile -> smart, probe, up, down +Controlați discurile -> `smart`, `probe`, `up`, `down`
  • -Faceți un backup/snapshot -> sync +Faceți un backup/snapshot -> `sync`
  • -Verificați periodic datele -> scrub +Verificați periodic datele -> `scrub`
  • -Restaurați ultimul backup/snapshot -> fix. +Restaurați ultimul backup/snapshot -> `fix`.

Comenzile trebuie scrise cu litere mici. -

-

+

5.1 status -

+

Tipărește un rezumat al stării matricei de discuri.

Include informații despre fragmentarea parității, cât de vechi sunt blocurile fără verificare și toate erorile silențioase înregistrate întâlnite în timpul verificării (scrubbing).

Informațiile prezentate se referă la ultima dată când ați -rulat sync. Modificările ulterioare nu sunt luate în considerare. +rulat `sync`. Modificările ulterioare nu sunt luate în considerare.

Dacă au fost detectate blocuri defecte, numerele lor de bloc sunt listate. -Pentru a le repara, puteți utiliza comanda fix -e. +Pentru a le repara, puteți utiliza comanda `fix -e`.

De asemenea, arată un grafic care reprezintă ultima dată când fiecare bloc -a fost verificat (scrubbed) sau sincronizat. Blocurile verificate sunt afișate cu *, -blocurile sincronizate, dar încă neverificate, cu o. +a fost verificat (scrubbed) sau sincronizat. Blocurile verificate sunt afișate cu '*', +blocurile sincronizate, dar încă neverificate, cu 'o'.

Nimic nu este modificat. -

-
-

+

5.2 smart -

+

Tipărește un raport SMART al tuturor discurilor din sistem.

Include o estimare a probabilității de eșec în anul următor, permițându-vă să planificați înlocuiri de întreținere a discurilor care prezintă atribute suspecte.

Această estimare a probabilității este obținută prin corelarea atributelor SMART ale discurilor cu datele Backblaze disponibile la: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Dacă SMART raportează că un disc este pe cale să eșueze, FAIL sau PREFAIL este tipărit +

+

Dacă SMART raportează că un disc este pe cale să eșueze, `FAIL` sau `PREFAIL` este tipărit pentru acel disc, iar SnapRAID returnează o eroare. În acest caz, înlocuirea imediată a discului este puternic recomandată.

Alte șiruri de stare posibile sunt: -

-
-
+

+ + + +
logfail -
+
În trecut, unele atribute au fost mai mici decât pragul. - - -
-
+
logerr -
+
Jurnalul de erori al dispozitivului conține erori. - - -
-
+
selferr -
+
Jurnalul de auto-test al dispozitivului conține erori. - - - +

Dacă opțiunea -v, --verbose este specificată, este furnizată o analiză statistică mai profundă. Această analiză vă poate ajuta să decideți dacă aveți nevoie de mai multă sau mai puțină paritate. -

Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea -smartctl -a pe toate dispozitivele. +

Această comandă utilizează instrumentul `smartctl` și este echivalentă cu rularea +`smartctl -a` pe toate dispozitivele.

Dacă dispozitivele dvs. nu sunt detectate automat corect, puteți specifica -o comandă personalizată utilizând opțiunea smartctl în fișierul de configurare. +o comandă personalizată utilizând opțiunea `smartctl` în fișierul de configurare.

Nimic nu este modificat. -

-
-

+

5.3 probe -

+

Tipărește starea de ALIMENTARE (POWER) a tuturor discurilor din sistem. -

Standby înseamnă că discul nu se rotește. Active înseamnă +

`Standby` înseamnă că discul nu se rotește. `Active` înseamnă că discul se rotește. -

Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea -smartctl -n standby -i pe toate dispozitivele. +

Această comandă utilizează instrumentul `smartctl` și este echivalentă cu rularea +`smartctl -n standby -i` pe toate dispozitivele.

Dacă dispozitivele dvs. nu sunt detectate automat corect, puteți specifica -o comandă personalizată utilizând opțiunea smartctl în fișierul de configurare. +o comandă personalizată utilizând opțiunea `smartctl` în fișierul de configurare.

Nimic nu este modificat. -

-
-

+

5.4 up -

+

Pornirea tuturor discurilor din matrice.

Puteți porni doar discuri specifice utilizând opțiunea -d, --filter-disk.

Pornirea tuturor discurilor în același timp necesită multă energie. Asigurați-vă că sursa dvs. de alimentare o poate susține.

Nimic nu este modificat. -

-
-

+

5.5 down -

+

Oprirea (spin down) tuturor discurilor din matrice. -

Această comandă utilizează instrumentul smartctl și este echivalentă cu rularea -smartctl -s standby,now pe toate dispozitivele. +

Această comandă utilizează instrumentul `smartctl` și este echivalentă cu rularea +`smartctl -s standby,now` pe toate dispozitivele.

Puteți opri doar discuri specifice utilizând opțiunea -d, --filter-disk.

Pentru a opri automat la eroare, puteți utiliza opțiunea -s, --spin-down-on-error -cu orice altă comandă, care este echivalentă cu rularea manuală a down +cu orice altă comandă, care este echivalentă cu rularea manuală a `down` atunci când apare o eroare.

Nimic nu este modificat. -

-
-

+

5.6 diff -

-

Listează toate fișierele modificate de la ultima sync care trebuie + +

Listează toate fișierele modificate de la ultima `sync` care trebuie să li se recalculeze datele de paritate.

Această comandă nu verifică datele fișierului, ci doar marca temporală, dimensiunea și inodul fișierului.

După listarea tuturor fișierelor modificate, este prezentat un rezumat al modificărilor, grupate după: -

-
-
+

+ + + + + + + +
equal -
+
Fișiere neschimbate față de înainte. - - -
-
+
added -
+
Fișiere adăugate care nu erau prezente înainte. - - -
-
+
removed -
+
Fișiere eliminate. - - -
-
+
updated -
+
Fișiere cu o dimensiune sau marcă temporală diferită, ceea ce înseamnă că au fost modificate. - - -
-
+
moved -
+
Fișiere mutate într-un director diferit pe același disc. Sunt identificate având același nume, dimensiune, marcă temporală și inod, dar un director diferit. - - -
-
+
copied -
-Fișiere copiate pe același disc sau pe un disc diferit -unde fișierul original încă există. -Acestea sunt identificate prin faptul că au același nume, -dimensiune și amprentă temporală. -Dacă amprenta temporală sub-secundă este zero, calea completă -trebuie să se potrivească pentru a fi identificate, nu doar -numele. -
- -
-
-relocated -
-Fișiere mutate pe același disc sau pe un disc diferit -unde originalul a dispărut. -Acestea sunt identificate prin faptul că au același nume, -dimensiune și amprentă temporală. -Dacă amprenta temporală sub-secundă este zero, calea completă -trebuie să se potrivească pentru a fi identificate. -Spre deosebire de fișierele 'moved' de pe același disc, fișierele -relocate au un inod diferit. -
-
-
-
+
+Fișiere copiate pe același disc sau pe un disc diferit. Rețineți că dacă +sunt mutate cu adevărat pe un alt disc, vor fi, de asemenea, +numărate în `removed`. +Sunt identificate având același nume, dimensiune și +marcă temporală. Dacă marca temporală sub-secundă este zero, +întreaga cale trebuie să se potrivească, nu doar numele. +
restored -
-Fișiere cu un inod diferit, dar care se potrivesc ca -director, nume, dimensiune și amprentă temporală. +
+Fișiere cu un inod diferit, dar nume, dimensiune și marcă temporală care se potrivesc. Acestea sunt de obicei fișiere restaurate după ce au fost șterse. - - - -

Dacă este necesară o sync, codul de retur al procesului este 2, în loc de +

+

Dacă este necesară o `sync`, codul de retur al procesului este 2, în loc de cel implicit 0. Codul de retur 1 este utilizat pentru o condiție de eroare generică.

Nimic nu este modificat. -

-
-

+

5.7 sync -

+

Actualizează informațiile de paritate. Toate fișierele modificate din matricea de discuri sunt citite și datele de paritate corespunzătoare sunt actualizate.

Puteți opri acest proces în orice moment apăsând Ctrl+C, fără a pierde munca deja efectuată. -La următoarea rulare, procesul sync va relua de unde +La următoarea rulare, procesul `sync` va relua de unde a fost întrerupt.

Dacă se găsesc erori silențioase sau de intrare/ieșire în timpul procesului, blocurile corespunzătoare sunt marcate ca defecte. @@ -765,13 +697,11 @@ Dacă fișierul este mutat sau redenumit pe același disc, păstrând același inod, paritatea nu este recalculată. Dacă fișierul este mutat pe un alt disc, paritatea este recalculată, dar informațiile hash calculate anterior sunt păstrate. -

Fișierele de content și parity sunt modificate dacă este necesar. +

Fișierele de `content` și `parity` sunt modificate dacă este necesar. Fișierele din matrice NU sunt modificate. -

-
-

+

5.8 scrub -

+

Verifică (scrubs) matricea, căutând erori silențioase sau de intrare/ieșire în discurile de date și de paritate.

Fiecare invocare verifică aproximativ 8% din matrice, excluzând @@ -788,104 +718,92 @@ full - Verifică totul. pentru a defini cât de vechi ar trebui să fie blocul. Cele mai vechi blocuri sunt verificate primele, asigurând o verificare optimă. Dacă doriți să verificați doar blocurile tocmai sincronizate care nu au fost încă verificate, -utilizați opțiunea -p new. -

Pentru a obține detalii despre starea verificării, utilizați comanda status. +utilizați opțiunea `-p new`. +

Pentru a obține detalii despre starea verificării, utilizați comanda `status`.

Pentru orice eroare silențioasă sau de intrare/ieșire găsită, blocurile corespunzătoare -sunt marcate ca defecte în fișierul de content. -Aceste blocuri defecte sunt listate în status și pot fi reparate cu fix -e. +sunt marcate ca defecte în fișierul de `content`. +Aceste blocuri defecte sunt listate în `status` și pot fi reparate cu `fix -e`. După reparare, la următorul scrub, vor fi reverificate, iar dacă se găsesc corectate, marca defectă va fi eliminată. -Pentru a verifica doar blocurile defecte, puteți utiliza comanda scrub -p bad. -

Este recomandat să rulați scrub doar pe o matrice sincronizată pentru a evita +Pentru a verifica doar blocurile defecte, puteți utiliza comanda `scrub -p bad`. +

Este recomandat să rulați `scrub` doar pe o matrice sincronizată pentru a evita erorile raportate cauzate de date nesincronizate. Aceste erori sunt recunoscute ca nefiind erori silențioase, iar blocurile nu sunt marcate ca defecte, dar astfel de erori sunt raportate în ieșirea comenzii. -

Fișierul de content este modificat pentru a actualiza ora ultimei verificări +

Fișierul de `content` este modificat pentru a actualiza ora ultimei verificări pentru fiecare bloc și pentru a marca blocurile defecte. -Fișierele de parity NU sunt modificate. +Fișierele de `parity` NU sunt modificate. Fișierele din matrice NU sunt modificate. -

-
-

+

5.9 fix -

+

Repară toate fișierele și datele de paritate.

Toate fișierele și datele de paritate sunt comparate cu starea snapshot-ului -salvată la ultima sync. +salvată la ultima `sync`. Dacă se găsește o diferență, este readusă la snapshot-ul stocat. -

ATENȚIE! Comanda fix nu face diferența între erori și +

ATENȚIE! Comanda `fix` nu face diferența între erori și modificări intenționate. Ea revine necondiționat la starea fișierului -de la ultima sync. +de la ultima `sync`.

Dacă nu este specificată nicio altă opțiune, întreaga matrice este procesată. Utilizați opțiunile de filtrare pentru a selecta un subset de fișiere sau discuri de operat. -

Pentru a repara doar blocurile marcate ca defecte în timpul sync și scrub, +

Pentru a repara doar blocurile marcate ca defecte în timpul `sync` și `scrub`, utilizați opțiunea -e, --filter-error. Spre deosebire de alte opțiuni de filtrare, aceasta aplică reparații doar fișierelor care sunt -neschimbate de la ultima sync. +neschimbate de la ultima `sync`.

SnapRAID redenumește toate fișierele care nu pot fi reparate adăugând extensia -.unrecoverable. +`.unrecoverable`.

Înainte de reparare, întreaga matrice este scanată pentru a găsi orice fișiere mutate -de la ultima operațiune sync. +de la ultima operațiune `sync`. Aceste fișiere sunt identificate prin marca lor temporală, ignorând numele și directorul lor și sunt utilizate în procesul de recuperare dacă este necesar. Dacă ați mutat unele dintre ele în afara matricei, puteți utiliza opțiunea -i, --import pentru a specifica directoare suplimentare de scanat.

Fișierele sunt identificate doar prin cale, nu prin inod. -

Fișierul de content NU este modificat. -Fișierele de parity sunt modificate dacă este necesar. +

Fișierul de `content` NU este modificat. +Fișierele de `parity` sunt modificate dacă este necesar. Fișierele din matrice sunt modificate dacă este necesar. -

-
-

+

5.10 check -

+

Verifică toate fișierele și datele de paritate. -

Funcționează ca fix, dar simulează doar o recuperare și nu sunt scrise modificări +

Funcționează ca `fix`, dar simulează doar o recuperare și nu sunt scrise modificări în matrice.

Această comandă este destinată în primul rând verificării manuale, cum ar fi după un proces de recuperare sau în alte condiții speciale. -Pentru verificări periodice și programate, utilizați scrub. +Pentru verificări periodice și programate, utilizați `scrub`.

Dacă utilizați opțiunea -a, --audit-only, doar datele fișierului sunt verificate, iar datele de paritate sunt ignorate pentru o rulare mai rapidă.

Fișierele sunt identificate doar prin cale, nu prin inod.

Nimic nu este modificat. -

-
-

+

5.11 list -

+

Listează toate fișierele conținute în matrice la momentul -ultimei sync. +ultimei `sync`.

Cu -v sau --verbose, este afișat și timpul sub-secundă.

Nimic nu este modificat. -

-
-

+

5.12 dup -

+

Listează toate fișierele duplicate. Două fișiere sunt considerate egale dacă hash-urile lor se potrivesc. Datele fișierului nu sunt citite; sunt utilizate doar hash-urile precalculate.

Nimic nu este modificat. -

-
-

+

5.13 pool -

+

Creează sau actualizează o vizualizare virtuală a tuturor -fișierelor din matricea dvs. de discuri în directorul de pooling. +fișierelor din matricea dvs. de discuri în directorul de `pooling`.

Fișierele nu sunt copiate, ci legate folosind link-uri simbolice.

La actualizare, toate link-urile simbolice existente și subdirectoarele goale sunt șterse și înlocuite cu noua vizualizare a matricei. Orice alte fișiere obișnuite sunt lăsate pe loc.

Nimic nu este modificat în afara directorului pool. -

-
-

+

5.14 devices -

+

Tipărește dispozitivele de nivel scăzut utilizate de matrice.

Această comandă afișează asocierile de dispozitive din matrice și este destinată în principal ca interfață de script. @@ -896,11 +814,9 @@ Ultima coloană este numele discului din matrice. matrice, dar în unele configurații mai complexe, puteți avea mai multe dispozitive de nivel scăzut utilizate de un singur disc din matrice.

Nimic nu este modificat. -

-
-

+

5.15 touch -

+

Setează o marcă temporală arbitrară sub-secundă pentru toate fișierele care o au setată la zero.

Acest lucru îmbunătățește capacitatea SnapRAID de a recunoaște fișierele mutate @@ -913,11 +829,9 @@ este zero, este considerat o copie doar dacă calea completă, dimensiunea și marca temporală se potrivesc toate.

Marca temporală cu precizie de secundă nu este modificată, deci toate datele și orele fișierelor dvs. vor fi păstrate. -

-
-

+

5.16 rehash -

+

Programează o rehash-uire a întregii matrici.

Această comandă schimbă tipul de hash utilizat, de obicei la actualizarea de la un sistem pe 32 de biți la unul pe 64 de biți, pentru a trece de la @@ -925,156 +839,122 @@ MurmurHash3 la SpookyHash, care este mai rapid.

Dacă utilizați deja hash-ul optim, această comandă nu face nimic și vă informează că nu este necesară nicio acțiune.

Rehash-ul nu este efectuat imediat, ci are loc -progresiv în timpul sync și scrub. -

Puteți verifica starea rehash-ului utilizând status. +progresiv în timpul `sync` și `scrub`. +

Puteți verifica starea rehash-ului utilizând `status`.

În timpul rehash-ului, SnapRAID își menține funcționalitatea completă, -cu singura excepție că dup nu poate detecta fișierele duplicate +cu singura excepție că `dup` nu poate detecta fișierele duplicate folosind un hash diferit. -

-
-

-locate -

-

Localizează fișierele stocate pe discurile de paritate. Pentru fiecare fișier -potrivit, afișează locația acestuia în fișierul de paritate și numărul de -fragmente pe care le ocupă. -

Puteți utiliza opțiunea -t, --tail pentru a restricționa operațiunea la fișierele -care ocupă porțiunea finală specificată a parității. -Dacă doriți să realocați aceste fișiere, puteți utiliza apoi opțiunea --W, --force-realloc-tail. -

Rețineți că astfel de fișiere nu vor fi protejate de paritate în timpul procesului -de realocare. -

-
-
-

+

6 Opțiuni -

+

SnapRAID oferă următoarele opțiuni: -

-
-
+

+ +
-c, --conf CONFIG -
+
Selectează fișierul de configurare de utilizat. Dacă nu este specificat, în Unix -utilizează fișierul /usr/local/etc/snapraid.conf dacă există, -altfel /etc/snapraid.conf. -În Windows, utilizează fișierul snapraid.conf din același -director ca snapraid.exe. - - - -
-
-
+utilizează fișierul `/usr/local/etc/snapraid.conf` dacă există, +altfel `/etc/snapraid.conf`. +În Windows, utilizează fișierul `snapraid.conf` din același +director ca `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filtrează fișierele de procesat în check și fix. +
+Filtrează fișierele de procesat în `check` și `fix`. Sunt procesate doar fișierele care se potrivesc cu modelul specificat. Această opțiune poate fi utilizată de mai multe ori. Vedeți secțiunea PATTERN pentru mai multe detalii despre specificațiile modelului. În Unix, asigurați-vă că caracterele globbing sunt citate dacă sunt utilizate. -Această opțiune poate fi utilizată doar cu check și fix. -Nu poate fi utilizată cu sync și scrub, deoarece acestea +Această opțiune poate fi utilizată doar cu `check` și `fix`. +Nu poate fi utilizată cu `sync` și `scrub`, deoarece acestea procesează întotdeauna întreaga matrice. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtrează discurile de procesat în check, fix, up și down. +
+Filtrează discurile de procesat în `check`, `fix`, `up` și `down`. Trebuie să specificați un nume de disc așa cum este definit în fișierul de configurare. -Puteți specifica și discurile de paritate cu numele: parity, 2-parity, -3-parity, etc., pentru a limita operațiunile la un anumit disc de paritate. +Puteți specifica și discurile de paritate cu numele: `parity`, `2-parity`, +`3-parity`, etc., pentru a limita operațiunile la un anumit disc de paritate. Dacă combinați mai multe opțiuni --filter, --filter-disk și --filter-missing, sunt selectate doar fișierele care se potrivesc cu toate filtrele. Această opțiune poate fi utilizată de mai multe ori. -Această opțiune poate fi utilizată doar cu check, fix, up și down. -Nu poate fi utilizată cu sync și scrub, deoarece acestea +Această opțiune poate fi utilizată doar cu `check`, `fix`, `up` și `down`. +Nu poate fi utilizată cu `sync` și `scrub`, deoarece acestea procesează întotdeauna întreaga matrice. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtrează fișierele de procesat în check și fix. +
+Filtrează fișierele de procesat în `check` și `fix`. Sunt procesate doar fișierele lipsă sau șterse din matrice. -Când este utilizată cu fix, aceasta acționează ca o comandă de undelete (anulare ștergere). +Când este utilizată cu `fix`, aceasta acționează ca o comandă de `undelete` (anulare ștergere). Dacă combinați mai multe opțiuni --filter, --filter-disk și --filter-missing, sunt selectate doar fișierele care se potrivesc cu toate filtrele. -Această opțiune poate fi utilizată doar cu check și fix. -Nu poate fi utilizată cu sync și scrub, deoarece acestea +Această opțiune poate fi utilizată doar cu `check` și `fix`. +Nu poate fi utilizată cu `sync` și `scrub`, deoarece acestea procesează întotdeauna întreaga matrice. - - - -
-
-
+
+ + +
-e, --filter-error -
-Procesează fișierele cu erori în check și fix. +
+Procesează fișierele cu erori în `check` și `fix`. Procesează doar fișierele care au blocuri marcate cu erori silențioase -sau de intrare/ieșire în timpul sync și scrub, așa cum sunt listate în status. -Această opțiune poate fi utilizată doar cu check și fix. - - - -
-
-
+sau de intrare/ieșire în timpul `sync` și `scrub`, așa cum sunt listate în `status`. +Această opțiune poate fi utilizată doar cu `check` și `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Selectează planul de verificare (scrub). Dacă PERC este o valoare numerică de la 0 la 100, este interpretată ca procentul de blocuri de verificat. În loc de un procent, puteți specifica un plan: -bad verifică blocurile defecte, new verifică blocurile care nu au fost încă verificate, -iar full verifică totul. -Această opțiune poate fi utilizată doar cu scrub. - - - -
-
-
+`bad` verifică blocurile defecte, `new` verifică blocurile care nu au fost încă verificate, +iar `full` verifică totul. +Această opțiune poate fi utilizată doar cu `scrub`. +
+ + +
-o, --older-than DAYS -
-Selectează cea mai veche parte a matricei de procesat în scrub. +
+Selectează cea mai veche parte a matricei de procesat în `scrub`. DAYS este vârsta minimă în zile pentru ca un bloc să fie verificat; valoarea implicită este 10. Blocurile marcate ca defecte sunt întotdeauna verificate, indiferent de această opțiune. -Această opțiune poate fi utilizată doar cu scrub. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `scrub`. +
+ + +
-a, --audit-only -
-În check, verifică hash-ul fișierelor fără +
+În `check`, verifică hash-ul fișierelor fără a verifica datele de paritate. Dacă sunteți interesați doar de verificarea datelor fișierului, această opțiune poate accelera semnificativ procesul de verificare. -Această opțiune poate fi utilizată doar cu check. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `check`. +
+ + +
-h, --pre-hash -
-În sync, rulează o fază preliminară de hashing a tuturor datelor noi +
+În `sync`, rulează o fază preliminară de hashing a tuturor datelor noi pentru o verificare suplimentară înainte de calculul parității. -De obicei, în sync, nu se face hashing preliminar, iar datele noi +De obicei, în `sync`, nu se face hashing preliminar, iar datele noi sunt hash-uite chiar înainte de calculul parității, atunci când sunt citite pentru prima dată. Acest proces are loc atunci când sistemul este sub @@ -1082,73 +962,52 @@ Acest proces are loc atunci când sistemul este sub Aceasta este o condiție extremă pentru mașină și, dacă are o problemă hardware latentă, erorile silențioase pot trece nedetectate deoarece datele nu sunt încă hash-uite. -Pentru a evita acest risc, puteți activa modul pre-hash pentru a avea +Pentru a evita acest risc, puteți activa modul `pre-hash` pentru a avea toate datele citite de două ori pentru a le asigura integritatea. Această opțiune verifică și fișierele mutate în cadrul matricei pentru a se asigura că operațiunea de mutare a fost reușită și, dacă este necesar, vă permite să rulați o operațiune de reparare (fix) înainte de a continua. -Această opțiune poate fi utilizată doar cu sync. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `sync`. +
+ + +
-i, --import DIR -
+
Importă din directorul specificat orice fișiere șterse -din matrice după ultima sync. -Dacă mai aveți astfel de fișiere, ele pot fi utilizate de check -și fix pentru a îmbunătăți procesul de recuperare. +din matrice după ultima `sync`. +Dacă mai aveți astfel de fișiere, ele pot fi utilizate de `check` +și `fix` pentru a îmbunătăți procesul de recuperare. Fișierele sunt citite, inclusiv în subdirectoare, și sunt identificate indiferent de numele lor. -Această opțiune poate fi utilizată doar cu check și fix. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `check` și `fix`. +
+ + +
-s, --spin-down-on-error -
+
La orice eroare, oprește (spin down) toate discurile gestionate înainte de a ieși cu un cod de stare diferit de zero. Acest lucru împiedică unitățile să rămână active și să se rotească după o operațiune întreruptă, ajutând la evitarea acumulării inutile de căldură și a consumului de energie. Utilizați această opțiune pentru a vă asigura că discurile sunt oprite în siguranță chiar și atunci când o comandă eșuează. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Aplică o limită globală de lățime de bandă pentru toate discurile. RATE este numărul de octeți pe secundă. Puteți specifica un multiplicator cum ar fi K, M sau G (de exemplu, --bw-limit 1G). - - - -
-
-
--t, --tail DIMENSIUNE -
-Limitează listarea fișierelor la cele care nu utilizează mai mult de -dimensiunea finală specificată a discurilor de paritate. -Puteți utiliza multiplicatori precum K, M, G sau T (ex. --tail 1G). -Această opțiune este valabilă numai atunci când este utilizată împreună -cu comanda locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Activează o vizualizare de stare extinsă care arată informații suplimentare. Ecranul afișează două grafice: Primul grafic arată numărul de dungi (stripes) tamponate pentru fiecare @@ -1165,14 +1024,12 @@ Toate calculele rulează în paralel cu operațiunile de disc. Prin urmare, atâta timp cât există timp de așteptare măsurabil pentru cel puțin un disc, indică faptul că CPU-ul este suficient de rapid pentru a ține pasul cu sarcina de lucru. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Forțează operațiunea nesigură de sincronizare a unui fișier cu dimensiunea zero care era anterior non-zero. Dacă SnapRAID detectează o astfel de condiție, se oprește din a continua @@ -1180,15 +1037,13 @@ dacă nu specificați această opțiune. Acest lucru vă permite să detectați cu ușurință când, după o cădere de sistem, unele fișiere accesate au fost trunchiate. Aceasta este o condiție posibilă în Linux cu sistemele de fișiere ext3/ext4. -Această opțiune poate fi utilizată doar cu sync. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `sync`. +
+ + +
-E, --force-empty -
+
Forțează operațiunea nesigură de sincronizare a unui disc cu toate fișierele originale lipsă. Dacă SnapRAID detectează că toate fișierele prezente inițial @@ -1199,16 +1054,14 @@ montat. Este permis, totuși, să aveți o singură schimbare de UUID cu paritate simplă și mai multe cu paritate multiplă, deoarece acesta este cazul normal la înlocuirea discurilor după o recuperare. -Această opțiune poate fi utilizată doar cu sync, check sau -fix. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `sync`, `check` sau +`fix`. +
+ + +
-U, --force-uuid -
+
Forțează operațiunea nesigură de sincronizare, verificare și reparare cu discuri care și-au schimbat UUID-ul. Dacă SnapRAID detectează că unele discuri și-au schimbat UUID-ul, @@ -1218,32 +1071,28 @@ punctele de montare greșite. Este permis, totuși, să aveți o singură schimbare de UUID cu paritate simplă și mai multe cu paritate multiplă, deoarece acesta este cazul normal la înlocuirea discurilor după o recuperare. -Această opțiune poate fi utilizată doar cu sync, check sau -fix. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `sync`, `check` sau +`fix`. +
+ + +
-D, --force-device -
+
Forțează operațiunea nesigură de reparare cu discuri inaccesibile sau cu discuri pe același dispozitiv fizic. De exemplu, dacă ați pierdut două discuri de date și aveți un disc de rezervă pentru a recupera doar primul, puteți ignora al doilea disc inaccesibil. Sau, dacă doriți să recuperați un disc în spațiul liber rămas pe un disc deja utilizat, partajând același dispozitiv fizic. -Această opțiune poate fi utilizată doar cu fix. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `fix`. +
+ + +
-N, --force-nocopy -
-În sync, check și fix, dezactivează euristica de detectare a copiei. +
+În `sync`, `check` și `fix`, dezactivează euristica de detectare a copiei. Fără această opțiune, SnapRAID presupune că fișierele cu aceleași atribute, cum ar fi numele, dimensiunea și marca temporală, sunt copii cu aceleași date. @@ -1253,135 +1102,93 @@ pentru a detecta erori silențioase sau pentru a recupera fișiere lipsă. În unele cazuri rare, acest comportament poate duce la rezultate fals pozitive sau la un proces lent din cauza multor verificări hash, iar această opțiune vă permite să rezolvați astfel de probleme. -Această opțiune poate fi utilizată doar cu sync, check și fix. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `sync`, `check` și `fix`. +
+ + +
-F, --force-full -
-În sync, forțează o recalculare completă a parității. +
+În `sync`, forțează o recalculare completă a parității. Această opțiune poate fi utilizată atunci când adăugați un nou nivel de paritate sau dacă ați revenit la un fișier de conținut vechi utilizând date de paritate mai recente. În loc să recreați paritatea de la zero, aceasta vă permite să reutilizați hash-urile prezente în fișierul de conținut pentru a valida datele -și a menține protecția datelor în timpul procesului sync utilizând +și a menține protecția datelor în timpul procesului `sync` utilizând datele de paritate existente. -Această opțiune poate fi utilizată doar cu sync. - - - -
-
-
+Această opțiune poate fi utilizată doar cu `sync`. +
+ + +
-R, --force-realloc -
-În sync, forțează o realocare completă a fișierelor și o reconstruire a parității. +
+În `sync`, forțează o realocare completă a fișierelor și o reconstruire a parității. Această opțiune poate fi utilizată pentru a realoca complet toate fișierele, eliminând fragmentarea, în timp ce reutilizați hash-urile prezente în fișierul de conținut pentru a valida datele. -Această opțiune poate fi utilizată doar cu sync. +Această opțiune poate fi utilizată doar cu `sync`. ATENȚIE! Această opțiune este doar pentru experți și este puternic recomandat să nu o utilizați. -NU aveți protecție a datelor în timpul operațiunii sync. - - - -
-
-
--W, --force-realloc-tail DIMENSIUNE -
-Funcționează ca -R, --force-realloc, dar limitat la porțiunea finală -specificată (ultimii DIMENSIUNE octeți) ai fiecărui fișier de paritate. -Forțează realocarea (mutarea) oricăror fragmente/blocuri de fișiere stocate -în prezent în acea secțiune finală, permițându-le să fie plasate oriunde -în fișierul/fișierele de paritate unde este disponibil spațiu liber -(inclusiv golurile existente). -Scopul principal al acestei opțiuni este de a reduce dimensiunea pe disc -a fișierului de paritate. -Dacă realocarea eliberează cu succes întreaga secțiune finală -(nu mai rămân blocuri care să o utilizeze), fișierul de paritate este -trunchiat, recuperând spațiul final neutilizat. -Puteți utiliza multiplicatori precum K, M, G sau T (ex. ---force-realloc-tail 1G). -Puteți utiliza locate -t, --tail pentru a cunoaște în avans -fișierele afectate. -AVERTIZARE! -Această opțiune este doar pentru experți și se recomandă -insistent să nu fie utilizată. -NU beneficiați de protecție a datelor în timpul operațiunii sync -pentru fișierele afectate. -
-
-
-
-
-
+NU aveți protecție a datelor în timpul operațiunii `sync`. +
+ + +
-l, --log FILE -
+
Scrie un jurnal detaliat în fișierul specificat. Dacă această opțiune nu este specificată, erorile neașteptate sunt tipărite pe ecran, putând rezulta o ieșire excesivă în caz de multe erori. Când -l, --log este specificat, doar erorile fatale care fac SnapRAID să se oprească sunt tipărite pe ecran. -Dacă calea începe cu >>, fișierul este deschis -în modul de adăugare. Aparițiile de %D și %T în nume sunt +Dacă calea începe cu '>>', fișierul este deschis +în modul de adăugare. Aparițiile de '%D' și '%T' în nume sunt înlocuite cu data și ora în formatul YYYYMMDD și HHMMSS. În fișierele batch Windows, trebuie să dublați -caracterul %, de exemplu, result-%%D.log. Pentru a utiliza >>, trebuie -să închideți numele între ghilimele, de exemplu, ">>result.log". +caracterul '%', de exemplu, result-%%D.log. Pentru a utiliza '>>', trebuie +să închideți numele între ghilimele, de exemplu, `">>result.log"`. Pentru a scoate jurnalul la ieșirea standard sau la eroarea standard, -puteți utiliza ">&1" și ">&2", respectiv. +puteți utiliza `">&1"` și `">&2"`, respectiv. Vedeți fișierul snapraid_log.txt sau pagina de manual pentru descrieri ale etichetelor jurnalului. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Setează o nouă limită de erori înainte de a opri execuția. În mod implicit, SnapRAID se oprește dacă întâlnește mai mult de 100 de erori de intrare/ieșire, indicând că un disc probabil eșuează. -Această opțiune afectează sync și scrub, cărora li se permite +Această opțiune afectează `sync` și `scrub`, cărora li se permite să continue după primul set de erori de disc pentru a încerca să își finalizeze operațiunile. -Cu toate acestea, check și fix se opresc întotdeauna la prima eroare. - - - -
-
-
+Cu toate acestea, `check` și `fix` se opresc întotdeauna la prima eroare. +
+ + +
-S, --start BLKSTART -
+
Începe procesarea de la numărul de bloc specificat. Acest lucru poate fi util pentru a reîncerca verificarea sau repararea anumitor blocuri în cazul unui disc deteriorat. Această opțiune este în principal pentru recuperarea manuală avansată. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Procesează doar numărul specificat de blocuri. Această opțiune este în principal pentru recuperarea manuală avansată. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Generează un fișier de configurare fictiv dintr-un fișier de conținut existent. Fișierul de configurare este scris la ieșirea standard @@ -1389,69 +1196,57 @@ Fișierul de configurare este scris la ieșirea standard Acest fișier de configurare conține și informațiile necesare pentru a reconstrui punctele de montare a discului în cazul în care pierdeți întregul sistem. - - - -
-
-
+
+ + +
-v, --verbose -
+
Tipărește mai multe informații pe ecran. Dacă este specificat o dată, tipărește fișierele excluse și statistici suplimentare. Această opțiune nu are niciun efect asupra fișierelor jurnal. - - - -
-
-
+
+ + +
-q, --quiet -
+
Tipărește mai puține informații pe ecran. Dacă este specificat o dată, elimină bara de progres; de două ori, operațiunile în curs; de trei ori, mesajele info ; de patru ori, mesajele de stare. Erorile fatale sunt întotdeauna tipărite pe ecran. Această opțiune nu are niciun efect asupra fișierelor jurnal. - - - -
-
-
+
+ + +
-H, --help -
+
Tipărește un ecran de ajutor scurt. - - - -
-
-
+
+ + +
-V, --version -
+
Tipărește versiunea programului. - - - - -
-

+

+

7 Configurare -

+

SnapRAID necesită un fișier de configurare pentru a ști unde se află matricea dvs. de discuri și unde să stocheze informațiile de paritate. -

În Unix, utilizează fișierul /usr/local/etc/snapraid.conf dacă există, -altfel /etc/snapraid.conf. -În Windows, utilizează fișierul snapraid.conf din același -director ca snapraid.exe. +

În Unix, utilizează fișierul `/usr/local/etc/snapraid.conf` dacă există, +altfel `/etc/snapraid.conf`. +În Windows, utilizează fișierul `snapraid.conf` din același +director ca `snapraid.exe`.

Trebuie să conțină următoarele opțiuni (sensibile la majuscule/minuscule): -

-

+

7.1 parity FILE [,FILE] ... -

+

Definește fișierele de utilizat pentru a stoca informațiile de paritate. Paritatea permite protecția împotriva unei singure defecțiuni de disc, similar cu RAID5. @@ -1466,11 +1261,9 @@ nu devin fragmentate, îmbunătățind performanța.

În Windows, 256 MB sunt lăsați neutilizați pe fiecare disc pentru a evita avertismentul despre discuri pline.

Această opțiune este obligatorie și poate fi utilizată o singură dată. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Definește fișierele de utilizat pentru a stoca informații de paritate suplimentare.

Pentru fiecare nivel de paritate specificat, este activat un nivel suplimentar de protecție:

    @@ -1492,45 +1285,39 @@ avertismentul despre discuri pline.

Fiecare nivel de paritate necesită prezența tuturor nivelurilor de paritate anterioare. -

Aceleași considerații ca pentru opțiunea parity se aplică. +

Aceleași considerații ca pentru opțiunea 'parity' se aplică.

Aceste opțiuni sunt opționale și pot fi utilizate o singură dată. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Definește un fișier și un format alternativ pentru a stoca paritatea triplă. -

Această opțiune este o alternativă la 3-parity, destinată în primul rând +

Această opțiune este o alternativă la '3-parity', destinată în primul rând CPU-urilor low-end precum ARM sau AMD Phenom, Athlon și Opteron care nu suportă setul de instrucțiuni SSSE3. În astfel de cazuri, oferă o performanță mai bună.

Acest format este similar, dar mai rapid decât cel utilizat de ZFS RAIDZ3. Ca și ZFS, nu funcționează dincolo de paritatea triplă. -

Când utilizați 3-parity, veți fi avertizați dacă este recomandat să utilizați -formatul z-parity pentru îmbunătățirea performanței. +

Când utilizați '3-parity', veți fi avertizați dacă este recomandat să utilizați +formatul 'z-parity' pentru îmbunătățirea performanței.

Este posibil să convertiți de la un format la altul ajustând fișierul de configurare cu fișierul z-parity sau 3-parity dorit -și utilizând fix pentru a-l recrea. -

-
-

+și utilizând 'fix' pentru a-l recrea. +

7.4 content FILE -

+

Definește fișierul de utilizat pentru a stoca lista și sumele de control (checksums) a tuturor fișierelor prezente în matricea dvs. de discuri.

Poate fi plasat pe un disc utilizat pentru date, paritate sau orice alt disc disponibil. Dacă utilizați un disc de date, acest fișier este automat exclus -din procesul sync. +din procesul `sync`.

Această opțiune este obligatorie și poate fi utilizată de mai multe ori pentru a salva mai multe copii ale aceluiași fișier.

Trebuie să stocați cel puțin o copie pentru fiecare disc de paritate utilizat plus unul. Utilizarea de copii suplimentare nu dăunează. -

-
-

+

7.5 data NAME DIR -

+

Definește numele și punctul de montare al discurilor de date din matrice. NAME este utilizat pentru a identifica discul și trebuie să fie unic. DIR este punctul de montare al discului în @@ -1539,50 +1326,32 @@ sistemul de fișiere. păstrați NAME fix.

Ar trebui să utilizați o opțiune pentru fiecare disc de date din matrice.

Puteți redenumi un disc mai târziu schimbând NAME direct -în fișierul de configurare și apoi rulând o comandă sync. +în fișierul de configurare și apoi rulând o comandă 'sync'. În cazul redenumirii, asocierea se face utilizând UUID-ul stocat al discurilor. -

-
-

-extra NAME DIR -

-

Definește numele și punctul de montare al discurilor suplimentare -care vor fi monitorizate cu comenzile smart și probe. -

Acest lucru este util pentru monitorizarea discurilor care nu fac -parte din matrice, dar sunt necesare pentru funcționarea -sistemului, cum ar fi discul de pornire. -

Rețineți că astfel de discuri nu sunt afectate de comenzile up și -down deoarece se așteaptă ca acestea să se rotească mereu. -

-
-

+

7.6 nohidden -

+

Exclude toate fișierele și directoarele ascunse. -În Unix, fișierele ascunse sunt cele care încep cu .. +În Unix, fișierele ascunse sunt cele care încep cu `.`. În Windows, sunt cele cu atributul ascuns. -

-
-

+

7.7 exclude/include PATTERN -

+

Definește modelele de fișiere sau directoare de exclus sau inclus în procesul de sincronizare. Toate modelele sunt procesate în ordinea specificată. -

Dacă primul model care se potrivește este un exclude, fișierul -este exclus. Dacă este un include, fișierul este inclus. +

Dacă primul model care se potrivește este un `exclude`, fișierul +este exclus. Dacă este un `include`, fișierul este inclus. Dacă niciun model nu se potrivește, fișierul este exclus dacă ultimul model -specificat este un include, sau inclus dacă ultimul model -specificat este un exclude. +specificat este un `include`, sau inclus dacă ultimul model +specificat este un `exclude`.

Vedeți secțiunea PATTERN pentru mai multe detalii despre specificațiile modelului.

Această opțiune poate fi utilizată de mai multe ori. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Definește dimensiunea de bază a blocului în kibibytes pentru paritate. Un kibibyte este 1024 de octeți.

Dimensiunea implicită a blocului este 256, care ar trebui să funcționeze pentru majoritatea cazurilor. @@ -1602,7 +1371,7 @@ cantitatea de date de pe acel disc de date, nu pe celelalte. irosită pentru fiecare fișier. De exemplu, cu 100.000 de fișiere și o dimensiune de bloc de 256 KiB, veți irosi 12,8 GB de paritate, ceea ce poate duce la 12,8 GB mai puțin spațiu disponibil pe discul de date. -

Puteți verifica cantitatea de spațiu irosit pe fiecare disc utilizând status. +

Puteți verifica cantitatea de spațiu irosit pe fiecare disc utilizând `status`. Aceasta este cantitatea de spațiu pe care trebuie să o lăsați liberă pe discurile de date sau să o utilizați pentru fișiere care nu sunt incluse în matrice. Dacă această valoare este negativă, înseamnă că sunteți aproape de a umple @@ -1613,17 +1382,17 @@ aveți suficient spațiu suplimentar pentru a gestiona până la 100.000 de fișiere pe fiecare disc de date fără niciun spațiu irosit.

Un truc pentru a obține o partiție de paritate mai mare în Linux este să o formatați cu comanda: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Acest lucru duce la aproximativ 1,5% spațiu suplimentar, aproximativ 60 GB pentru un disc de 4 TB, ceea ce permite aproximativ 460.000 de fișiere pe fiecare disc de date fără niciun spațiu irosit. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Definește dimensiunea hash-ului în octeți pentru blocurile salvate.

Dimensiunea implicită a hash-ului este de 16 octeți (128 de biți), care ar trebui să funcționeze pentru majoritatea cazurilor. @@ -1654,26 +1423,22 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Salvează automat starea la sincronizare sau verificare după cantitatea specificată de GB procesați. -Această opțiune este utilă pentru a evita repornirea comenzilor sync lungi +Această opțiune este utilă pentru a evita repornirea comenzilor `sync` lungi de la zero dacă sunt întrerupte de o cădere a mașinii sau de orice alt eveniment. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Setează temperatura maximă permisă a discului în Celsius. Când este specificată, SnapRAID verifică periodic temperatura tuturor discurilor utilizând instrumentul smartctl. Temperaturile curente ale discurilor sunt afișate în timp ce SnapRAID funcționează. Dacă un disc depășește această limită, toate operațiunile se opresc, iar discurile sunt oprite (puse în standby) pentru durata -definită de opțiunea temp_sleep. După perioada de așteptare, operațiunile +definită de opțiunea `temp_sleep`. După perioada de așteptare, operațiunile reiau, putând întrerupe din nou dacă limita de temperatură este atinsă încă o dată.

În timpul funcționării, SnapRAID analizează și curba de încălzire a fiecărui @@ -1692,88 +1457,85 @@ disponibili. Dacă nu poate fi accesat niciun senzor de sistem, utilizează cea mai scăzută temperatură a discului măsurată la începutul rulării ca referință de rezervă.

În mod normal, SnapRAID arată doar temperatura celui mai fierbinte disc. Pentru a afișa temperatura tuturor discurilor, utilizați opțiunea -A sau --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Setează timpul de așteptare (standby), în minute, când limita de temperatură este atinsă. În această perioadă, discurile rămân oprite. Valoarea implicită este 5 minute. -

-
-

+

7.13 pool DIR -

+

Definește directorul de pooling unde este creată vizualizarea virtuală a matricei -de discuri utilizând comanda pool. +de discuri utilizând comanda `pool`.

Directorul trebuie să existe deja. -

-
-

+

7.14 share UNC_DIR -

+

Definește calea UNC Windows necesară pentru a accesa discurile de la distanță.

Dacă această opțiune este specificată, link-urile simbolice create în directorul pool utilizează această cale UNC pentru a accesa discurile. Fără această opțiune, link-urile simbolice generate utilizează doar căi locale, ceea ce nu permite partajarea directorului pool peste rețea.

Link-urile simbolice sunt formate utilizând calea UNC specificată, adăugând -numele discului specificat în opțiunea data și, în final, adăugând +numele discului specificat în opțiunea `data` și, în final, adăugând directorul și numele fișierului.

Această opțiune este necesară doar pentru Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Definește opțiuni smartctl personalizate pentru a obține atributele SMART pentru fiecare disc. Acest lucru poate fi necesar pentru controlerele RAID și unele discuri USB care nu pot fi detectate automat. Substituția %s este înlocuită de numele dispozitivului, dar este opțională pentru dispozitivele fixe, cum ar fi controlerele RAID. -

DISK este același nume de disc specificat în opțiunea data. -PARITY este unul dintre numele de paritate: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity sau z-parity. -

În OPȚIUNILE specificate, șirul %s este înlocuit de +

DISK este același nume de disc specificat în opțiunea `data`. +PARITY este unul dintre numele de paritate: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` sau `z-parity`. +

În OPȚIUNILE specificate, șirul `%s` este înlocuit de numele dispozitivului. Pentru controlerele RAID, dispozitivul este -probabil fix și este posibil să nu fie nevoie să utilizați %s. +probabil fix și este posibil să nu fie nevoie să utilizați `%s`.

Consultați documentația smartmontools pentru opțiuni posibile: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

De exemplu: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignoră atributul SMART specificat la calcularea probabilității de eșec a discului. Această opțiune este utilă dacă un disc raportează valori neobișnuite sau înșelătoare pentru un anumit atribut. -

DISK este același nume de disc specificat în opțiunea data. -PARITY este unul dintre numele de paritate: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity sau z-parity. +

DISK este același nume de disc specificat în opțiunea `data`. +PARITY este unul dintre numele de paritate: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` sau `z-parity`. Valoarea specială * poate fi utilizată pentru a ignora atributul pe toate discurile. -

De exemplu, pentru a ignora atributul Current Pending Sector Count pe +

De exemplu, pentru a ignora atributul `Current Pending Sector Count` pe toate discurile: -

+

+
 smartignore * 197
 
+

Pentru a-l ignora doar pe primul disc de paritate: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Exemple -

+

Un exemplu de configurare tipică pentru Unix este: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1787,8 +1549,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Un exemplu de configurare tipică pentru Windows este: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1803,274 +1567,180 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Model (Pattern) -

-

Modelele oferă o modalitate flexibilă de a filtra fișierele pentru includere sau -excludere. Folosind caractere de tip globbing, puteți defini reguli care să -se potrivească cu nume de fișiere specifice sau cu structuri întregi de directoare fără -a lista manual fiecare cale. -

Semnul întrebării ? se potrivește cu orice caracter unic, cu excepția -separatorului de directoare. Acest lucru îl face util pentru potrivirea numelor de fișiere cu -caractere variabile, păstrând în același timp modelul limitat la un singur nivel de director. -

Asteriscul simplu * se potrivește cu orice secvență de caractere, dar, la fel ca -semnul întrebării, nu trece niciodată de limitele directoarelor. Se oprește la -slash-ul înainte, ceea ce îl face potrivit pentru potrivirea în cadrul unei singure -componente a căii. Acesta este comportamentul standard al metacaracterelor, familiar -din shell globbing. -

Asteriscul dublu ** este mai puternic, se potrivește cu orice secvență de -caractere, inclusiv separatori de directoare. Acest lucru permite modelelor să se potrivească -pe mai multe niveluri de directoare. Când ** apare inserat direct într-un -model, se poate potrivi cu zero sau mai multe caractere, inclusiv slash-uri între -textul literal înconjurător. -

Cea mai importantă utilizare a lui ** este în forma specială /**/. Aceasta se potrivește cu -zero sau mai multe niveluri complete de directoare, făcând posibilă potrivirea fișierelor -la orice adâncime într-un arbore de directoare fără a cunoaște structura exactă a căii. -De exemplu, modelul src/**/main.js se potrivește cu src/main.js (sărind -peste zero directoare), src/ui/main.js (sărind peste un director) și -src/ui/components/main.js (sărind peste două directoare). -

Clasele de caractere care utilizează paranteze pătrate [] se potrivesc cu un singur caracter dintr-un -set sau interval specificat. La fel ca și celelalte modele de un singur caracter, acestea -nu se potrivesc cu separatorii de directoare. Clasele suportă intervale și negarea folosind -un semn de exclamare. -

Distincția fundamentală de reținut este că *, ? și clasele de caractere -respectă toate limitele directoarelor și se potrivesc doar în cadrul unei singure -componente a căii, în timp ce ** este singurul model care se poate potrivi peste -separatorii de directoare. + +

Modelele sunt utilizate pentru a selecta un subset de fișiere de exclus sau inclus în +proces.

Există patru tipuri diferite de modele: -

-
-
+

+ +
FILE -
-Selectează orice fișier cu numele FILE. -Acest model se aplică numai fișierelor, nu și directoarelor. -
- - -
-
-
+
+Selectează orice fișier numit FILE. Puteți utiliza orice caracter de globbing +precum * și ?, și clase de caractere precum [a-z]. +Acest model se aplică numai fișierelor, nu directoarelor. +
+ + +
DIR/ -
-Selectează orice director cu numele DIR și tot ce se află în interior. -Acest model se aplică numai directoarelor, nu și fișierelor. -
- - -
-
-
+
+Selectează orice director numit DIR și tot ce se află în interior. +Puteți utiliza orice caracter de globbing precum * și ?. +Acest model se aplică numai directoarelor, nu fișierelor. +
+ + +
/PATH/FILE -
-Selectează calea exactă a fișierului specificat. Acest model se aplică -numai fișierelor, nu și directoarelor. -
- - -
-
-
+
+Selectează calea exactă a fișierului specificat. Puteți utiliza orice +caractere de globbing precum * și ?, dar acestea nu se potrivesc niciodată cu o +bară oblică de director (directory slash). +Acest model se aplică numai fișierelor, nu directoarelor. +
+ + +
/PATH/DIR/ -
+
Selectează calea exactă a directorului specificat și tot ce se află -în interior. Acest model se aplică numai directoarelor, nu și fișierelor. - - - +în interior. Puteți utiliza orice caractere de globbing precum * și ?, dar +acestea nu se potrivesc niciodată cu o bară oblică de director. +Acest model se aplică numai directoarelor, nu fișierelor. +

Când specificați o cale absolută care începe cu /, aceasta este aplicată la directorul rădăcină al matricei, nu la directorul rădăcină al sistemului de fișiere local.

În Windows, puteți utiliza backslash-ul \ în loc de slash-ul /. Directoarele de sistem Windows, joncțiunile, punctele de montare și alte directoare speciale Windows sunt tratate ca fișiere, ceea ce înseamnă că pentru a le exclude, trebuie să utilizați o regulă de fișier, nu una de director. -

Dacă numele fișierului conține un caracter *, ?, [, -sau ], trebuie să îl escape-ați pentru a evita să fie interpretat ca un -caracter de globbing. În Unix, caracterul escape este \; în Windows, este ^. +

Dacă numele fișierului conține un caracter '*', '?', '[', +sau ']', trebuie să îl escape-ați pentru a evita să fie interpretat ca un +caracter de globbing. În Unix, caracterul escape este '\'; în Windows, este '^'. Când modelul este pe linia de comandă, trebuie să dublați caracterul escape pentru a evita ca acesta să fie interpretat de shell-ul de comandă.

În fișierul de configurare, puteți utiliza diferite strategii pentru a filtra fișierele de procesat. -Abordarea cea mai simplă este să utilizați doar reguli exclude pentru a elimina toate +Abordarea cea mai simplă este să utilizați doar reguli `exclude` pentru a elimina toate fișierele și directoarele pe care nu doriți să le procesați. De exemplu: -

-# Exclude orice fișier numit *.unrecoverable
+

+
+# Exclude orice fișier numit `*.unrecoverable`
 exclude *.unrecoverable
-# Exclude directorul rădăcină /lost+found
+# Exclude directorul rădăcină `/lost+found`
 exclude /lost+found/
-# Exclude orice subdirector numit tmp
+# Exclude orice subdirector numit `tmp`
 exclude tmp/
 
+

Abordarea opusă este să definiți doar fișierele pe care doriți să le procesați, utilizând -doar reguli include. De exemplu: -

+doar reguli `include`. De exemplu:
+

+
 # Include doar unele directoare
 include /movies/
 include /musics/
 include /pictures/
 
-

Abordarea finală este de a amesteca regulile exclude și include. În acest caz, +

+

Abordarea finală este de a amesteca regulile `exclude` și `include`. În acest caz, ordinea regulilor este importantă. Regulile anterioare au precedență față de cele ulterioare. -Pentru a simplifica, puteți lista toate regulile exclude mai întâi și apoi -toate regulile include. De exemplu: -

-# Exclude orice fișier numit *.unrecoverable
+Pentru a simplifica, puteți lista toate regulile `exclude` mai întâi și apoi
+toate regulile `include`. De exemplu:
+

+
+# Exclude orice fișier numit `*.unrecoverable`
 exclude *.unrecoverable
-# Exclude orice subdirector numit tmp
+# Exclude orice subdirector numit `tmp`
 exclude tmp/
 # Include doar unele directoare
 include /movies/
 include /musics/
 include /pictures/
 
-

Pe linia de comandă, utilizând opțiunea -f, puteți utiliza doar modele include. +

+

Pe linia de comandă, utilizând opțiunea -f, puteți utiliza doar modele `include`. De exemplu: -

+

+
 # Verifică doar fișierele .mp3.
 # În Unix, utilizați ghilimele pentru a evita expansiunea globbing de către shell.
 snapraid -f "*.mp3" check
 
+

În Unix, când utilizați caractere globbing pe linia de comandă, trebuie să le citați pentru a împiedica shell-ul să le extindă. -

-
-

-Fișiere de Ignorat (Ignore File) -

-

Pe lângă regulile globale din fișierul de configurare, puteți plasa fișiere -.snapraidignore în orice director din array pentru a defini reguli de excludere -descentralizate. -

Regulile definite în .snapraidignore sunt aplicate după regulile din fișierul -de configurare. Acest lucru înseamnă că au o prioritate mai mare și pot fi -utilizate pentru a exclude fișiere care au fost incluse anterior de configurația -globală. Efectiv, dacă o regulă locală se potrivește, fișierul este exclus -indiferent de setările globale de includere. -

Logica modelelor în .snapraidignore oglindește configurația globală, dar -ancorează modelele de directorul în care se află fișierul: -

-
-
-FILE -
-Selectează orice fișier numit FILE în acest director sau mai jos. -Acesta urmează aceleași reguli de globbing ca modelul global. -
-
-
-
-
-
-DIR/ -
-Selectează orice director numit DIR și tot ce se află în interior, -aflat în acest director sau mai jos. -
-
-
-
-
-
-/PATH/FILE -
-Selectează fișierul exact specificat raportat la locația -fișierului .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Selectează directorul exact specificat și tot ce se află în interior, -raportat la locația fișierului .snapraidignore. -
-
-
-

Spre deosebire de configurația globală, fișierele .snapraidignore suportă -doar reguli de excludere; nu puteți utiliza modele de include sau negația (!). -

De exemplu, dacă aveți un .snapraidignore în /mnt/disk1/projects/: -

-# Exclude DOAR /mnt/disk1/projects/output.bin
-/output.bin
-# Exclude orice director numit build în interiorul projects/
-build/
-# Exclude orice fișier .tmp în interiorul projects/ sau subfolderele sale
-*.tmp
-
-
-
-

+

9 Conținut (Content) -

+

SnapRAID stochează lista și sumele de control (checksums) ale fișierelor dvs. în fișierul de conținut.

Este un fișier binar care listează toate fișierele prezente în matricea dvs. de discuri, împreună cu toate sumele de control pentru a le verifica integritatea. -

Acest fișier este citit și scris de comenzile sync și scrub și -citit de comenzile fix, check și status. -

-
-

+

Acest fișier este citit și scris de comenzile `sync` și `scrub` și +citit de comenzile `fix`, `check` și `status`. +

10 Paritate (Parity) -

+

SnapRAID stochează informațiile de paritate ale matricei dvs. în fișierele de paritate.

Acestea sunt fișiere binare care conțin paritatea calculată a tuturor -blocurilor definite în fișierul de content. -

Aceste fișiere sunt citite și scrise de comenzile sync și fix și -doar citite de comenzile scrub și check. -

-
-

+blocurilor definite în fișierul de `content`. +

Aceste fișiere sunt citite și scrise de comenzile `sync` și `fix` și +doar citite de comenzile `scrub` și `check`. +

11 Codare (Encoding) -

+

SnapRAID în Unix ignoră orice codare. Citește și stochează numele fișierelor cu aceeași codare utilizată de sistemul de fișiere.

În Windows, toate numele citite din sistemul de fișiere sunt convertite și procesate în format UTF-8.

Pentru a avea numele fișierelor tipărite corect, trebuie să setați consola Windows -în modul UTF-8 cu comanda chcp 65001 și să utilizați -un font TrueType precum Lucida Console ca font al consolei. +în modul UTF-8 cu comanda `chcp 65001` și să utilizați +un font TrueType precum `Lucida Console` ca font al consolei. Acest lucru afectează doar numele de fișiere tipărite; dacă redirecționați ieșirea consolei către un fișier, fișierul rezultat este întotdeauna în format UTF-8. -

-
-

+

12 Drept de Autor (Copyright) -

+

Acest fișier este Copyright (C) 2025 Andrea Mazzoleni -

-
-

+

13 Vezi și (See Also) -

-

snapraid_log(1), snapraidd(1) -

+ +

snapraid_log(1), rsync(1) +

+

+

-
-
-
+
- - + diff --git a/manual-ru.html b/manual-ru.html index da057bb8..f9d3af90 100644 --- a/manual-ru.html +++ b/manual-ru.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID — это программа резервного копирования, разработанная для дисковых массивов, хранящая информацию четности для восстановления данных в случае сбоя до шести дисков. @@ -182,14 +127,14 @@ SnapRAID не блокирует ваши данные; вы можете пре

Для получения дополнительной информации, пожалуйста, посетите официальный сайт SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID — это гибрид программы RAID и программы резервного копирования, стремящийся объединить лучшие преимущества обеих. Однако у него есть некоторые ограничения, которые следует учитывать перед использованием. @@ -227,13 +172,11 @@ SnapRAID может восстановить данные только при о Разрешения, права владения и расширенные атрибуты не сохраняются. -

-
-

+

4 Getting Started -

+

Чтобы использовать SnapRAID, вам нужно сначала выбрать один диск в вашем дисковом массиве -для выделения под информацию четности (parity). С одним диском для четности, вы +для выделения под информацию `четности` (parity). С одним диском для четности, вы сможете восстановиться после одного сбоя диска, подобно RAID5.

Если вы хотите восстановиться после большего числа сбоев дисков, подобно RAID6, вы должны зарезервировать дополнительные диски для четности. Каждый дополнительный диск @@ -241,30 +184,33 @@ Getting Started

В качестве дисков четности вы должны выбирать самые большие диски в массиве, так как информация четности может вырасти до размера самого большого диска данных в массиве. -

Эти диски будут выделены для хранения файлов четности. +

Эти диски будут выделены для хранения файлов `четности`. Вы не должны хранить на них свои данные. -

Затем вы должны определить диски данных, которые вы хотите защитить +

Затем вы должны определить диски `данных`, которые вы хотите защитить с помощью SnapRAID. Защита более эффективна, если эти диски содержат данные, которые редко меняются. По этой причине лучше НЕ включать диск Windows C:\ или каталоги Unix /home, /var и /tmp. -

Список файлов сохраняется в файлах content, обычно +

Список файлов сохраняется в файлах `content`, обычно хранящихся на дисках данных, четности или загрузочных дисках. Этот файл содержит детали вашего резервного копирования, включая все контрольные суммы для проверки его целостности. -Файл content хранится в нескольких копиях, и каждая копия должна +Файл `content` хранится в нескольких копиях, и каждая копия должна находиться на отдельном диске, чтобы гарантировать, что даже в случае множественных сбоев дисков, хотя бы одна копия будет доступна.

Например, предположим, что вы заинтересованы только в одном уровне защиты четности, и ваши диски расположены по адресам: -

+

+
 /mnt/diskp <- выбранный диск для четности
 /mnt/disk1 <- первый диск для защиты
 /mnt/disk2 <- второй диск для защиты
 /mnt/disk3 <- третий диск для защиты
 
+

Вы должны создать файл конфигурации /etc/snapraid.conf со следующими опциями: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -273,9 +219,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Если вы используете Windows, вам следует использовать формат пути Windows, с буквами дисков и обратными слешами вместо прямых. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -284,16 +232,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Если у вас много дисков и заканчиваются буквы дисков, вы можете монтировать диски непосредственно в подпапки. См.: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

На этом этапе вы готовы запустить команду sync для создания +

+

На этом этапе вы готовы запустить команду `sync` для создания информации четности. -

+

+
 snapraid sync
 
+

Этот процесс может занять несколько часов в первый раз, в зависимости от размера данных, уже присутствующих на дисках. Если диски пустые, процесс происходит немедленно. @@ -301,53 +254,60 @@ snapraid sync возобновит работу с того места, где был прерван.

Когда эта команда завершится, ваши данные ЗАЩИЩЕНЫ.

Теперь вы можете начать использовать свой массив, как вам угодно, и периодически -обновлять информацию четности, запуская команду sync. -

-

+обновлять информацию четности, запуская команду `sync`. +

4.1 Scrubbing -

+

Для периодической проверки данных и четности на наличие ошибок, вы можете -запустить команду scrub. -

+запустить команду `scrub`.
+

+
 snapraid scrub
 
+

Эта команда сравнивает данные в вашем массиве с хэшем, вычисленным -во время команды sync, для проверки целостности. +во время команды `sync`, для проверки целостности.

Каждый запуск команды проверяет примерно 8% массива, исключая данные, уже проверенные за предыдущие 10 дней. Вы можете использовать опцию -p, --plan, чтобы указать другое количество, и опцию -o, --older-than, чтобы указать другой возраст в днях. Например, для проверки 5% массива на наличие блоков старше 20 дней, используйте: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Если во время процесса обнаруживаются скрытые ошибки или ошибки ввода/вывода, -соответствующие блоки помечаются как плохие в файле content -и перечисляются в команде status. -

+соответствующие блоки помечаются как плохие в файле `content`
+и перечисляются в команде `status`.
+

+
 snapraid status
 
-

Чтобы исправить их, вы можете использовать команду fix, фильтруя плохие блоки +

+

Чтобы исправить их, вы можете использовать команду `fix`, фильтруя плохие блоки с помощью опции -e, --filter-error: -

+

+
 snapraid -e fix
 
-

При следующем scrub ошибки исчезнут из отчета status, +

+

При следующем `scrub` ошибки исчезнут из отчета `status`, если они действительно исправлены. Чтобы ускорить процесс, вы можете использовать -p bad для проверки только блоков, помеченных как плохие. -

+

+
 snapraid -p bad scrub
 
-

Запуск scrub на несинхронизированном массиве может сообщить об ошибках, вызванных -удаленными или измененными файлами. Эти ошибки сообщаются в выводе scrub, +

+

Запуск `scrub` на несинхронизированном массиве может сообщить об ошибках, вызванных +удаленными или измененными файлами. Эти ошибки сообщаются в выводе `scrub`, но соответствующие блоки не помечаются как плохие. -

-
-

+

4.2 Pooling -

+

Примечание: Функция объединения (pooling), описанная ниже, была заменена инструментом -mergerfs, который теперь является рекомендуемым вариантом для пользователей Linux +mergefs, который теперь является рекомендуемым вариантом для пользователей Linux в сообществе SnapRAID. Mergefs предоставляет более гибкий и эффективный способ объединения нескольких дисков в единую точку монтирования, обеспечивая беспрепятственный доступ к файлам по всему массиву без @@ -355,28 +315,37 @@ mergerfs, который теперь является рекомендуемы защиты четности и обычно используется в установках, таких как OpenMediaVault (OMV) или пользовательских конфигурациях NAS.

Чтобы все файлы в вашем массиве отображались в одном дереве каталогов, -вы можете включить функцию pooling. Она создает виртуальное +вы можете включить функцию `pooling`. Она создает виртуальное представление всех файлов в вашем массиве только для чтения, используя символические ссылки. -

Вы можете настроить каталог pooling в файле конфигурации с помощью: -

+

Вы можете настроить каталог `pooling` в файле конфигурации с помощью: +

+
 pool /pool
 
+

или, если вы используете Windows, с помощью: -

+

+
 pool C:\pool
 
-

а затем запустить команду pool для создания или обновления виртуального представления. -

+
+

а затем запустить команду `pool` для создания или обновления виртуального представления. +

+
 snapraid pool
 
+

Если вы используете платформу Unix и хотите предоставить общий доступ к этому каталогу по сети как для машин Windows, так и для Unix, вы должны добавить следующие опции в ваш /etc/samba/smb.conf: -

+

+
 # В глобальном разделе smb.conf
 unix extensions = no
 
+
+
 # В разделе общего ресурса smb.conf
 [pool]
@@ -387,101 +356,115 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

В Windows совместное использование символических ссылок по сети требует, чтобы клиенты разрешали их удаленно. Чтобы включить это, помимо предоставления общего доступа к каталогу pool, вы также должны предоставить общий доступ ко всем дискам независимо, используя имена дисков, определенные в файле конфигурации, в качестве -точек общего доступа. Вы также должны указать в опции share файла +точек общего доступа. Вы также должны указать в опции `share` файла конфигурации путь UNC Windows, который удаленные клиенты должны использовать для доступа к этим общим дискам. -

Например, работая с сервера с именем darkstar, вы можете использовать +

Например, работая с сервера с именем `darkstar`, вы можете использовать опции: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

и предоставить общий доступ к следующим каталогам по сети: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

чтобы разрешить удаленным клиентам доступ ко всем файлам по адресу \\darkstar\pool.

Вам также может потребоваться настроить удаленные клиенты для включения доступа к удаленным символическим ссылкам с помощью команды: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID функционирует скорее как программа резервного копирования, чем как система RAID, и может использоваться для восстановления или отмены удаления файлов до их предыдущего состояния с помощью опции -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

или для каталога: -

+

+
 snapraid fix -f DIR/
 
+

Вы также можете использовать его для восстановления только случайно удаленных файлов внутри каталога с помощью опции -m, --filter-missing, которая восстанавливает только отсутствующие файлы, оставляя все остальные нетронутыми. -

+

+
 snapraid fix -m -f DIR/
 
+

Или для восстановления всех удаленных файлов на всех дисках с помощью: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

Случилось худшее, и вы потеряли один или несколько дисков!

НЕ ПАНИКУЙТЕ! Вы сможете их восстановить!

Первое, что вы должны сделать, это избегать дальнейших изменений в вашем дисковом массиве. Отключите любые удаленные подключения к нему и любые запланированные процессы, включая любое запланированное ночное sync или scrub SnapRAID.

Затем приступайте к следующим шагам. -

-

+

4.4.1 STEP 1 -> Reconfigure -

+

Вам нужно место для восстановления, в идеале на дополнительных запасных дисках, но внешнего USB-диска или удаленного диска будет достаточно. -

Измените файл конфигурации SnapRAID, чтобы опция data или parity +

Измените файл конфигурации SnapRAID, чтобы опция `data` или `parity` отказавшего диска указывала на место с достаточным пустым пространством для восстановления файлов. -

Например, если диск d1 вышел из строя, измените с: -

+

Например, если диск `d1` вышел из строя, измените с: +

+
 data d1 /mnt/disk1/
 
+

на: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

Если восстанавливаемый диск является диском четности, обновите соответствующую опцию parity. +

+

Если восстанавливаемый диск является диском четности, обновите соответствующую опцию `parity`. Если у вас несколько отказавших дисков, обновите все их опции конфигурации. -

-
-

+

4.4.2 STEP 2 -> Fix -

+

Запустите команду fix, сохраняя журнал во внешнем файле с помощью: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Где NAME — это имя диска, например d1 в нашем предыдущем примере. -Если восстанавливаемый диск является диском четности, используйте имена parity, 2-parity +

+

Где NAME — это имя диска, например `d1` в нашем предыдущем примере. +Если восстанавливаемый диск является диском четности, используйте имена `parity`, `2-parity` и т. д. Если у вас несколько отказавших дисков, используйте несколько опций -d, чтобы указать их все. @@ -490,274 +473,224 @@ snapraid -d NAME -l fix.log fix Запустите ее с диска с достаточным свободным местом.

Теперь вы восстановили все, что можно было восстановить. Если некоторые файлы частично или полностью невосстановимы, они будут переименованы с добавлением -расширения .unrecoverable. +расширения `.unrecoverable`.

Вы можете найти подробный список всех невосстановимых блоков в файле fix.log, -проверяя все строки, начинающиеся с unrecoverable:. +проверяя все строки, начинающиеся с `unrecoverable:`.

Если вы не удовлетворены восстановлением, вы можете повторять его столько раз, сколько пожелаете.

Например, если вы удалили файлы из массива после последнего -sync, это может привести к тому, что некоторые файлы не будут восстановлены. -В этом случае вы можете повторить fix, используя опцию -i, --import, +`sync`, это может привести к тому, что некоторые файлы не будут восстановлены. +В этом случае вы можете повторить `fix`, используя опцию -i, --import, указав, где эти файлы находятся сейчас, чтобы снова включить их в процесс восстановления.

Если вы удовлетворены восстановлением, вы можете продолжить, -но учтите, что после синхронизации вы больше не сможете повторить команду fix! -

-
-

+но учтите, что после синхронизации вы больше не сможете повторить команду `fix`! +

4.4.3 STEP 3 -> Check -

-

В качестве осторожной проверки, вы можете теперь запустить команду check, чтобы убедиться, + +

В качестве осторожной проверки, вы можете теперь запустить команду `check`, чтобы убедиться, что все в порядке на восстановленном диске. -

+

+
 snapraid -d NAME -a check
 
-

Где NAME — это имя диска, например d1 в нашем предыдущем примере. +

+

Где NAME — это имя диска, например `d1` в нашем предыдущем примере.

Опции -d и -a говорят SnapRAID проверить только указанный диск и игнорировать все данные четности.

Эта команда займет много времени, но если вы не чрезмерно осторожны, вы можете ее пропустить. -

-
-

+

4.4.4 STEP 4 -> Sync -

-

Запустите команду sync, чтобы ресинхронизировать массив с новым диском. -

+
+

Запустите команду `sync`, чтобы ресинхронизировать массив с новым диском. +

+
 snapraid sync
 
+

Если все восстановлено, эта команда выполняется немедленно. -

-
-
-
-

+

5 Commands -

+

SnapRAID предоставляет несколько простых команд, которые позволяют:

  • -Печатать статус массива -> status +Печатать статус массива -> `status`
  • -Управлять дисками -> smart, probe, up, down +Управлять дисками -> `smart`, `probe`, `up`, `down`
  • -Сделать резервную копию/снимок -> sync +Сделать резервную копию/снимок -> `sync`
  • -Периодически проверять данные -> scrub +Периодически проверять данные -> `scrub`
  • -Восстановить последнюю резервную копию/снимок -> fix. +Восстановить последнюю резервную копию/снимок -> `fix`.

Команды должны быть написаны строчными буквами. -

-

+

5.1 status -

+

Печатает сводку состояния дискового массива.

Она включает информацию о фрагментации четности, о том, насколько старые блоки без проверки, и все записанные скрытые ошибки, возникшие во время scrubbing.

Представленная информация относится к последнему времени, когда вы -запускали sync. Более поздние изменения не учитываются. +запускали `sync`. Более поздние изменения не учитываются.

Если были обнаружены плохие блоки, перечисляются их номера. -Чтобы исправить их, вы можете использовать команду fix -e. +Чтобы исправить их, вы можете использовать команду `fix -e`.

Он также показывает график, представляющий последнее время, когда каждый блок -был проверен (scrubbed) или синхронизирован (synced). Проверенные блоки -обозначены символом *, блоки, синхронизированные, но еще не проверенные, -символом o. +был проверен (`scrubbed`) или синхронизирован (`synced`). Проверенные блоки +обозначены символом '*', блоки, синхронизированные, но еще не проверенные, +символом 'o'.

Ничего не изменяется. -

-
-

+

5.2 smart -

+

Печатает отчет SMART всех дисков в системе.

Он включает оценку вероятности сбоя в следующем году, позволяя планировать плановую замену дисков, которые показывают подозрительные атрибуты.

Эта оценка вероятности получена путем корреляции атрибутов SMART дисков с данными Backblaze, доступными по адресу: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
+

Если SMART сообщает, что диск выходит из строя, для этого диска -выводится FAIL или PREFAIL, и SnapRAID возвращает ошибку. +выводится `FAIL` или `PREFAIL`, и SnapRAID возвращает ошибку. В этом случае немедленная замена диска настоятельно рекомендуется.

Другие возможные строки статуса: -

-
-
+

+ + + +
logfail -
+
В прошлом некоторые атрибуты были ниже порогового значения. - - -
-
+
logerr -
+
Журнал ошибок устройства содержит ошибки. - - -
-
+
selferr -
+
Журнал самотестирования устройства содержит ошибки. - - - +

Если указана опция -v, --verbose, предоставляется более глубокий статистический анализ. Этот анализ может помочь вам решить, нужно ли вам больше или меньше четности. -

Эта команда использует инструмент smartctl и эквивалентна запуску -smartctl -a на всех устройствах. +

Эта команда использует инструмент `smartctl` и эквивалентна запуску +`smartctl -a` на всех устройствах.

Если ваши устройства не обнаруживаются автоматически правильно, вы можете указать -пользовательскую команду, используя опцию smartctl в файле +пользовательскую команду, используя опцию `smartctl` в файле конфигурации.

Ничего не изменяется. -

-
-

+

5.3 probe -

+

Печатает состояние POWER всех дисков в системе. -

Standby означает, что диск не вращается. Active означает, +

`Standby` означает, что диск не вращается. `Active` означает, что диск вращается. -

Эта команда использует инструмент smartctl и эквивалентна запуску -smartctl -n standby -i на всех устройствах. +

Эта команда использует инструмент `smartctl` и эквивалентна запуску +`smartctl -n standby -i` на всех устройствах.

Если ваши устройства не обнаруживаются автоматически правильно, вы можете указать -пользовательскую команду, используя опцию smartctl в файле +пользовательскую команду, используя опцию `smartctl` в файле конфигурации.

Ничего не изменяется. -

-
-

+

5.4 up -

+

Раскручивает все диски массива.

Вы можете раскрутить только определенные диски, используя опцию -d, --filter-disk.

Раскручивание всех дисков одновременно требует много энергии. Убедитесь, что ваш блок питания может это выдержать.

Ничего не изменяется. -

-
-

+

5.5 down -

+

Останавливает вращение всех дисков массива. -

Эта команда использует инструмент smartctl и эквивалентна запуску -smartctl -s standby,now на всех устройствах. +

Эта команда использует инструмент `smartctl` и эквивалентна запуску +`smartctl -s standby,now` на всех устройствах.

Вы можете остановить вращение только определенных дисков, используя опцию -d, --filter-disk.

Чтобы автоматически остановить вращение при ошибке, вы можете использовать опцию -s, --spin-down-on-error с любой другой командой, что эквивалентно -ручному запуску down при возникновении ошибки. +ручному запуску `down` при возникновении ошибки.

Ничего не изменяется. -

-
-

+

5.6 diff -

-

Перечисляет все файлы, измененные с момента последнего sync, для которых + +

Перечисляет все файлы, измененные с момента последнего `sync`, для которых требуется пересчитать данные четности.

Эта команда не проверяет данные файла, а только метку времени файла, размер и inode.

После перечисления всех измененных файлов представляется сводка изменений, сгруппированных по: -

-
-
+

+ + + + + + + +
equal -
+
Файлы, не измененные по сравнению с предыдущим состоянием. - - -
-
+
added -
+
Добавленные файлы, которых не было раньше. - - -
-
+
removed -
+
Удаленные файлы. - - -
-
+
updated -
+
Файлы с другим размером или меткой времени, что означает, что они были изменены. - - -
-
+
moved -
+
Файлы, перемещенные в другой каталог на том же диске. Они идентифицируются как имеющие то же имя, размер, метку времени и inode, но другой каталог. - - -
-
+
copied -
-файлы, скопированные на тот же или другой диск, где -исходный файл все еще существует. -Они идентифицируются по совпадению имени, размера и метки -времени. -Если дробная часть метки времени равна нулю, для идентификации -должен совпадать полный путь, а не только имя. -
- -
-
-relocated -
-файлы, перемещенные на тот же или другой диск, где -оригинал исчез. -Они идентифицируются по совпадению имени, размера и метки -времени. -Если дробная часть метки времени равна нулю, для идентификации -должен совпадать полный путь. -В отличие от файлов 'moved' на том же диске, перемещенные файлы -имеют другой inode. -
-
-
-
+
+Файлы, скопированные на тот же или другой диск. Обратите внимание, что если +они действительно перемещены на другой диск, они также будут +учтены в `removed`. +Они идентифицируются как имеющие то же имя, размер и +метку времени. Если метка времени с точностью до доли секунды равна нулю, +полный путь должен совпадать, а не только имя. +
restored -
-файлы с другим inode, но совпадающим каталогом, -именем, размером и меткой времени. +
+Файлы с другим inode, но совпадающими именем, размером и меткой времени. Обычно это файлы, восстановленные после удаления. - - - -

Если требуется sync, код возврата процесса равен 2, а не +

+

Если требуется `sync`, код возврата процесса равен 2, а не по умолчанию 0. Код возврата 1 используется для общего условия ошибки.

Ничего не изменяется. -

-
-

+

5.7 sync -

+

Обновляет информацию четности. Все измененные файлы в дисковом массиве считываются, и соответствующие данные четности обновляются.

Вы можете остановить этот процесс в любое время, нажав Ctrl+C, не теряя уже проделанной работы. -При следующем запуске процесс sync возобновится с того места, +При следующем запуске процесс `sync` возобновится с того места, где был прерван.

Если во время процесса обнаруживаются скрытые ошибки или ошибки ввода/вывода, соответствующие блоки помечаются как плохие. @@ -769,13 +702,11 @@ sync тот же inode, четность не пересчитывается. Если файл перемещен на другой диск, четность пересчитывается, но ранее вычисленная информация хэша сохраняется. -

Файлы content и parity изменяются при необходимости. +

Файлы `content` и `parity` изменяются при необходимости. Файлы в массиве НЕ изменяются. -

-
-

+

5.8 scrub -

+

Проверяет массив, проверяя на наличие скрытых ошибок или ошибок ввода/вывода на дисках данных и четности.

Каждый вызов проверяет примерно 8% массива, исключая @@ -792,104 +723,92 @@ full - Проверить все. чтобы определить, насколько старым должен быть блок. Сначала проверяются самые старые блоки, обеспечивая оптимальную проверку. Если вы хотите проверить только что синхронизированные блоки, которые еще не были проверены, -используйте опцию -p new. -

Чтобы получить подробности о статусе проверки, используйте команду status. +используйте опцию `-p new`. +

Чтобы получить подробности о статусе проверки, используйте команду `status`.

При обнаружении любой скрытой ошибки или ошибки ввода/вывода соответствующие блоки -помечаются как плохие в файле content. -Эти плохие блоки перечисляются в status и могут быть исправлены с помощью fix -e. +помечаются как плохие в файле `content`. +Эти плохие блоки перечисляются в `status` и могут быть исправлены с помощью `fix -e`. После исправления при следующем scrub они будут перепроверены, и если обнаружатся исправленными, плохая метка будет удалена. -Чтобы проверить только плохие блоки, вы можете использовать команду scrub -p bad. -

Рекомендуется запускать scrub только на синхронизированном массиве, чтобы избежать +Чтобы проверить только плохие блоки, вы можете использовать команду `scrub -p bad`. +

Рекомендуется запускать `scrub` только на синхронизированном массиве, чтобы избежать сообщений об ошибках, вызванных несинхронизированными данными. Эти ошибки распознаются как не являющиеся скрытыми ошибками, и блоки не помечаются как плохие, но такие ошибки сообщаются в выводе команды. -

Файл content изменяется для обновления времени последней проверки +

Файл `content` изменяется для обновления времени последней проверки для каждого блока и для пометки плохих блоков. -Файлы parity НЕ изменяются. +Файлы `parity` НЕ изменяются. Файлы в массиве НЕ изменяются. -

-
-

+

5.9 fix -

+

Исправляет все файлы и данные четности.

Все файлы и данные четности сравниваются с состоянием снимка, -сохраненным при последнем sync. +сохраненным при последнем `sync`. Если обнаружено различие, оно возвращается к сохраненному снимку. -

ВНИМАНИЕ! Команда fix не различает ошибки и +

ВНИМАНИЕ! Команда `fix` не различает ошибки и преднамеренные изменения. Она безусловно возвращает состояние файла -к последнему sync. +к последнему `sync`.

Если не указана другая опция, обрабатывается весь массив. Используйте опции фильтрации, чтобы выбрать подмножество файлов или дисков для работы. -

Чтобы исправить только блоки, помеченные как плохие во время sync и scrub, +

Чтобы исправить только блоки, помеченные как плохие во время `sync` и `scrub`, используйте опцию -e, --filter-error. В отличие от других опций фильтрации, эта применяет исправления только к файлам, -которые не были изменены с момента последнего sync. +которые не были изменены с момента последнего `sync`.

SnapRAID переименовывает все файлы, которые не могут быть исправлены, добавляя -расширение .unrecoverable. +расширение `.unrecoverable`.

Перед исправлением сканируется весь массив, чтобы найти файлы, перемещенные -с момента последней операции sync. +с момента последней операции `sync`. Эти файлы идентифицируются по их метке времени, игнорируя их имя и каталог, и используются в процессе восстановления при необходимости. Если вы переместили некоторые из них за пределы массива, вы можете использовать опцию -i, --import, чтобы указать дополнительные каталоги для сканирования.

Файлы идентифицируются только по пути, а не по inode. -

Файл content НЕ изменяется. -Файлы parity изменяются при необходимости. +

Файл `content` НЕ изменяется. +Файлы `parity` изменяются при необходимости. Файлы в массиве изменяются при необходимости. -

-
-

+

5.10 check -

+

Проверяет все файлы и данные четности. -

Он работает как fix, но только имитирует восстановление, и никакие изменения +

Он работает как `fix`, но только имитирует восстановление, и никакие изменения не записываются в массив.

Эта команда в основном предназначена для ручной проверки, например, после процесса восстановления или в других особых условиях. -Для периодических и запланированных проверок используйте scrub. +Для периодических и запланированных проверок используйте `scrub`.

Если вы используете опцию -a, --audit-only, проверяются только данные файла, а данные четности игнорируются для более быстрого выполнения.

Файлы идентифицируются только по пути, а не по inode.

Ничего не изменяется. -

-
-

+

5.11 list -

+

Перечисляет все файлы, содержащиеся в массиве на момент -последнего sync. +последнего `sync`.

С -v или --verbose также отображается время с точностью до доли секунды.

Ничего не изменяется. -

-
-

+

5.12 dup -

+

Перечисляет все дублирующиеся файлы. Два файла считаются равными, если их хэши совпадают. Данные файла не считываются; используются только предварительно вычисленные хэши.

Ничего не изменяется. -

-
-

+

5.13 pool -

+

Создает или обновляет виртуальное представление всех -файлов в вашем дисковом массиве в каталоге pooling. +файлов в вашем дисковом массиве в каталоге `pooling`.

Файлы не копируются, а связываются с помощью символических ссылок.

При обновлении все существующие символические ссылки и пустые подкаталоги удаляются и заменяются новым представлением массива. Любые другие обычные файлы остаются на месте.

Ничего не изменяется за пределами каталога pool. -

-
-

+

5.14 devices -

+

Печатает низкоуровневые устройства, используемые массивом.

Эта команда отображает ассоциации устройств в массиве и в основном предназначена как интерфейс для скриптов. @@ -900,11 +819,9 @@ devices массиве, но в некоторых более сложных конфигурациях у вас может быть несколько низкоуровневых устройств, используемых одним диском в массиве.

Ничего не изменяется. -

-
-

+

5.15 touch -

+

Устанавливает произвольную метку времени с точностью до доли секунды для всех файлов, у которых она установлена в ноль.

Это улучшает способность SnapRAID распознавать перемещенные @@ -917,11 +834,9 @@ touch полный путь, размер и метка времени.

Метка времени с точностью до секунды не изменяется, поэтому все даты и время ваших файлов будут сохранены. -

-
-

+

5.16 rehash -

+

Планирует перехэширование всего массива.

Эта команда изменяет используемый тип хэша, обычно при обновлении с 32-разрядной системы на 64-разрядную, для переключения с @@ -929,156 +844,122 @@ MurmurHash3 на более быстрый SpookyHash.

Если вы уже используете оптимальный хэш, эта команда ничего не делает и информирует вас, что никакие действия не требуются.

Перехэширование не выполняется немедленно, а происходит -постепенно во время sync и scrub. -

Вы можете проверить состояние перехэширования с помощью status. +постепенно во время `sync` и `scrub`. +

Вы можете проверить состояние перехэширования с помощью `status`.

Во время перехэширования SnapRAID сохраняет полную функциональность, -за единственным исключением, что dup не может обнаружить дублирующиеся +за единственным исключением, что `dup` не может обнаружить дублирующиеся файлы, использующие другой хэш. -

-
-

-locate -

-

Находит файлы, хранящиеся на дисках четности. Для каждого найденного файла -выводится его расположение внутри файла четности и количество занимаемых -им фрагментов. -

Вы можете использовать параметр -t, --tail, чтобы ограничить операцию файлами, -занимающими указанную хвостовую часть четности. -

Если вы хотите перераспределить эти файлы, вы можете использовать параметр --W, --force-realloc-tail. -Имейте в виду, что такие файлы не будут защищены четностью во время процесса -перераспределения. -

-
-
-

+

6 Options -

+

SnapRAID предоставляет следующие опции: -

-
-
+

+ +
-c, --conf CONFIG -
+
Выбирает файл конфигурации для использования. Если не указан, в Unix -используется файл /usr/local/etc/snapraid.conf, если он существует, -в противном случае /etc/snapraid.conf. -В Windows используется файл snapraid.conf в том же -каталоге, что и snapraid.exe. - - - -
-
-
+используется файл `/usr/local/etc/snapraid.conf`, если он существует, +в противном случае `/etc/snapraid.conf`. +В Windows используется файл `snapraid.conf` в том же +каталоге, что и `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Фильтрует файлы для обработки в check и fix. +
+Фильтрует файлы для обработки в `check` и `fix`. Обрабатываются только файлы, соответствующие указанному шаблону. Эту опцию можно использовать несколько раз. Подробнее о спецификациях шаблонов см. в разделе PATTERN. В Unix убедитесь, что символы глоббинга заключены в кавычки, если используются. -Эту опцию можно использовать только с check и fix. -Ее нельзя использовать с sync и scrub, так как они всегда +Эту опцию можно использовать только с `check` и `fix`. +Ее нельзя использовать с `sync` и `scrub`, так как они всегда обрабатывают весь массив. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Фильтрует диски для обработки в check, fix, up и down. +
+Фильтрует диски для обработки в `check`, `fix`, `up` и `down`. Вы должны указать имя диска, определенное в файле конфигурации. -Вы также можете указать диски четности с именами: parity, 2-parity, -3-parity и т. д., чтобы ограничить операции конкретным диском четности. +Вы также можете указать диски четности с именами: `parity`, `2-parity`, +`3-parity` и т. д., чтобы ограничить операции конкретным диском четности. Если вы комбинируете несколько опций --filter, --filter-disk и --filter-missing, выбираются только файлы, соответствующие всем фильтрам. Эту опцию можно использовать несколько раз. -Эту опцию можно использовать только с check, fix, up и down. -Ее нельзя использовать с sync и scrub, так как они всегда +Эту опцию можно использовать только с `check`, `fix`, `up` и `down`. +Ее нельзя использовать с `sync` и `scrub`, так как они всегда обрабатывают весь массив. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Фильтрует файлы для обработки в check и fix. +
+Фильтрует файлы для обработки в `check` и `fix`. Обрабатываются только файлы, отсутствующие или удаленные из массива. -При использовании с fix, это действует как команда undelete. +При использовании с `fix`, это действует как команда `undelete`. Если вы комбинируете несколько опций --filter, --filter-disk и --filter-missing, выбираются только файлы, соответствующие всем фильтрам. -Эту опцию можно использовать только с check и fix. -Ее нельзя использовать с sync и scrub, так как они всегда +Эту опцию можно использовать только с `check` и `fix`. +Ее нельзя использовать с `sync` и `scrub`, так как они всегда обрабатывают весь массив. - - - -
-
-
+
+ + +
-e, --filter-error -
-Обрабатывает файлы с ошибками в check и fix. +
+Обрабатывает файлы с ошибками в `check` и `fix`. Он обрабатывает только файлы, блоки которых помечены скрытыми -ошибками или ошибками ввода/вывода во время sync и scrub, как -перечислено в status. -Эту опцию можно использовать только с check и fix. - - - -
-
-
+ошибками или ошибками ввода/вывода во время `sync` и `scrub`, как +перечислено в `status`. +Эту опцию можно использовать только с `check` и `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
-Выбирает план проверки (scrub). Если PERC — это числовое значение от 0 до 100, +
+Выбирает план проверки (`scrub`). Если PERC — это числовое значение от 0 до 100, оно интерпретируется как процент блоков для проверки. Вместо процента вы можете указать план: -bad проверяет плохие блоки, new проверяет блоки, которые еще не были проверены, -и full проверяет все. -Эту опцию можно использовать только с scrub. - - - -
-
-
+`bad` проверяет плохие блоки, `new` проверяет блоки, которые еще не были проверены, +и `full` проверяет все. +Эту опцию можно использовать только с `scrub`. +
+ + +
-o, --older-than DAYS -
-Выбирает самую старую часть массива для обработки в scrub. +
+Выбирает самую старую часть массива для обработки в `scrub`. DAYS — это минимальный возраст в днях для блока, который будет проверен; по умолчанию — 10. Блоки, помеченные как плохие, всегда проверяются независимо от этой опции. -Эту опцию можно использовать только с scrub. - - - -
-
-
+Эту опцию можно использовать только с `scrub`. +
+ + +
-a, --audit-only -
-В check, проверяет хэш файлов без +
+В `check`, проверяет хэш файлов без проверки данных четности. Если вы заинтересованы только в проверке данных файла, эта опция может значительно ускорить процесс проверки. -Эту опцию можно использовать только с check. - - - -
-
-
+Эту опцию можно использовать только с `check`. +
+ + +
-h, --pre-hash -
-В sync, запускает предварительную фазу хэширования всех новых данных +
+В `sync`, запускает предварительную фазу хэширования всех новых данных для дополнительной проверки перед вычислением четности. -Обычно в sync предварительное хэширование не выполняется, и новые +Обычно в `sync` предварительное хэширование не выполняется, и новые данные хэшируются непосредственно перед вычислением четности, когда они считываются в первый раз. Этот процесс происходит, когда система находится под @@ -1086,73 +967,52 @@ DAYS — это минимальный возраст в днях для бло Это экстремальное условие для машины, и если у нее есть скрытая аппаратная проблема, скрытые ошибки могут остаться незамеченными, потому что данные еще не хэшированы. -Чтобы избежать этого риска, вы можете включить режим pre-hash, чтобы +Чтобы избежать этого риска, вы можете включить режим `pre-hash`, чтобы все данные считывались дважды для обеспечения их целостности. Эта опция также проверяет файлы, перемещенные внутри массива, чтобы убедиться, что операция перемещения прошла успешно, и, при необходимости, -позволяет запустить операцию исправления (fix) перед продолжением. -Эту опцию можно использовать только с sync. - - - -
-
-
+позволяет запустить операцию исправления (`fix`) перед продолжением. +Эту опцию можно использовать только с `sync`. +
+ + +
-i, --import DIR -
+
Импортирует из указанного каталога любые файлы, удаленные -из массива после последнего sync. -Если у вас все еще есть такие файлы, они могут использоваться check -и fix для улучшения процесса восстановления. +из массива после последнего `sync`. +Если у вас все еще есть такие файлы, они могут использоваться `check` +и `fix` для улучшения процесса восстановления. Файлы считываются, включая подкаталоги, и идентифицируются независимо от их имени. -Эту опцию можно использовать только с check и fix. - - - -
-
-
+Эту опцию можно использовать только с `check` и `fix`. +
+ + +
-s, --spin-down-on-error -
+
При любой ошибке останавливает вращение всех управляемых дисков перед выходом с ненулевым кодом состояния. Это предотвращает оставление дисков активными и вращающимися после прерванной операции, помогая избежать ненужного нагрева и энергопотребления. Используйте эту опцию, чтобы гарантировать безопасную остановку дисков, даже когда команда завершается неудачей. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Применяет глобальное ограничение пропускной способности для всех дисков. RATE — это количество байтов в секунду. Вы можете указать множитель, например K, M или G (например, --bw-limit 1G). - - - -
-
-
--t, --tail РАЗМЕР -
-Ограничивает список файлов теми, которые используют не более -указанного размера хвоста дисков четности. -Можно использовать множители, такие как K, M, G или T (например, --tail 1G). -Этот параметр действителен только при использовании вместе с -командой locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Включает расширенный вид статуса, который показывает дополнительную информацию. На экране отображаются два графика: Первый график показывает количество буферизованных полос для каждого @@ -1171,14 +1031,12 @@ DAYS — это минимальный возраст в днях для бло Следовательно, пока есть измеримое время ожидания для хотя бы одного диска, это указывает на то, что ЦП достаточно быстр, чтобы справляться с рабочей нагрузкой. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Форсирует небезопасную операцию синхронизации файла с нулевым размером, который ранее был ненулевым. Если SnapRAID обнаруживает такое условие, он прекращает выполнение, @@ -1186,15 +1044,13 @@ DAYS — это минимальный возраст в днях для бло Это позволяет легко обнаружить, когда после сбоя системы некоторые доступные файлы были усечены. Это возможное условие в Linux с файловыми системами ext3/ext4. -Эту опцию можно использовать только с sync. - - - -
-
-
+Эту опцию можно использовать только с `sync`. +
+ + +
-E, --force-empty -
+
Форсирует небезопасную операцию синхронизации диска, на котором отсутствуют все исходные файлы. Если SnapRAID обнаруживает, что все файлы, изначально присутствующие @@ -1202,15 +1058,13 @@ DAYS — это минимальный возраст в днях для бло если вы не укажете эту опцию. Это позволяет легко обнаружить, когда файловая система данных не смонтирована. -Эту опцию можно использовать только с sync. - - - -
-
-
+Эту опцию можно использовать только с `sync`. +
+ + +
-U, --force-uuid -
+
Форсирует небезопасную операцию синхронизации, проверки и исправления с дисками, у которых изменился UUID. Если SnapRAID обнаруживает, что у некоторых дисков изменился UUID, @@ -1220,32 +1074,28 @@ DAYS — это минимальный возраст в днях для бло Однако допускается однократное изменение UUID с одиночной четностью, и больше с множественной четностью, потому что это нормальный случай при замене дисков после восстановления. -Эту опцию можно использовать только с sync, check или -fix. - - - -
-
-
+Эту опцию можно использовать только с `sync`, `check` или +`fix`. +
+ + +
-D, --force-device -
+
Форсирует небезопасную операцию исправления с недоступными дисками или с дисками на том же физическом устройстве. Например, если вы потеряли два диска данных и у вас есть запасной диск для восстановления только первого, вы можете игнорировать второй недоступный диск. Или, если вы хотите восстановить диск в свободное место, оставшееся на уже используемом диске, совместно использующем то же физическое устройство. -Эту опцию можно использовать только с fix. - - - -
-
-
+Эту опцию можно использовать только с `fix`. +
+ + +
-N, --force-nocopy -
-В sync, check и fix, отключает эвристику обнаружения копирования. +
+В `sync`, `check` и `fix`, отключает эвристику обнаружения копирования. Без этой опции SnapRAID предполагает, что файлы с одинаковыми атрибутами, такими как имя, размер и метка времени, являются копиями с одинаковыми данными. @@ -1255,135 +1105,93 @@ DAYS — это минимальный возраст в днях для бло В некоторых редких случаях это поведение может привести к ложным срабатываниям или замедлению процесса из-за большого количества проверок хэша, и эта опция позволяет решить такие проблемы. -Эту опцию можно использовать только с sync, check и fix. - - - -
-
-
+Эту опцию можно использовать только с `sync`, `check` и `fix`. +
+ + +
-F, --force-full -
-В sync, форсирует полный пересчет четности. +
+В `sync`, форсирует полный пересчет четности. Эту опцию можно использовать, когда вы добавляете новый уровень четности или если вы вернулись к старому файлу content, используя более свежие данные четности. Вместо того чтобы воссоздавать четность с нуля, это позволяет повторно использовать хэши, присутствующие в файле content, для проверки данных -и поддержания защиты данных во время процесса sync с использованием +и поддержания защиты данных во время процесса `sync` с использованием существующих данных четности. -Эту опцию можно использовать только с sync. - - - -
-
-
+Эту опцию можно использовать только с `sync`. +
+ + +
-R, --force-realloc -
-В sync, форсирует полное перераспределение файлов и перестроение четности. +
+В `sync`, форсирует полное перераспределение файлов и перестроение четности. Эту опцию можно использовать для полного перераспределения всех файлов, удаления фрагментации, при этом повторно используя хэши, присутствующие в файле content, для проверки данных. -Эту опцию можно использовать только с sync. +Эту опцию можно использовать только с `sync`. ВНИМАНИЕ! Эта опция предназначена только для экспертов, и настоятельно не рекомендуется ее использовать. -У вас НЕТ защиты данных во время операции sync. - - - -
-
-
--W, --force-realloc-tail РАЗМЕР -
-Работает как -R, --force-realloc, но ограничивается указанной хвостовой -частью (последние РАЗМЕР байт) каждого файла четности. -Принудительно перераспределяет (перемещает) любые фрагменты/блоки файлов, -хранящиеся в данный момент в этой хвостовой части, позволяя разместить -их в любом месте файла(ов) четности, где есть свободное место -(включая существующие пустоты). -Основная цель этого параметра — уменьшить занимаемый на диске -размер файла четности. -Если перераспределение успешно очистит всю хвостовую часть -(в ней не останется блоков), файл четности будет обрезан, высвобождая -неиспользуемое хвостовое пространство. -Можно использовать множители, такие как K, M, G или T (например, ---force-realloc-tail 1G). -Вы можете использовать locate -t, --tail, чтобы заранее узнать -затронутые файлы. -ВНИМАНИЕ! -Этот параметр предназначен только для экспертов, и его настоятельно -не рекомендуется использовать. -Во время операции sync защита данных для затронутых файлов -ОТСУТСТВУЕТ. -
-
-
-
-
-
+У вас НЕТ защиты данных во время операции `sync`. +
+ + +
-l, --log FILE -
+
Записывает подробный журнал в указанный файл. Если эта опция не указана, непредвиденные ошибки выводятся на экран, что потенциально может привести к чрезмерному выводу в случае множества ошибок. Когда указана -l, --log, на экран выводятся только фатальные ошибки, которые приводят к остановке SnapRAID. -Если путь начинается с >>, файл открывается -в режиме добавления. Вхождения %D и %T в имени +Если путь начинается с '>>', файл открывается +в режиме добавления. Вхождения '%D' и '%T' в имени заменяются датой и временем в формате ГГГГММДД и ЧЧММСС. В пакетных файлах Windows вы должны удвоить -символ %, например, result-%%D.log. Чтобы использовать >>, вы должны -заключить имя в кавычки, например, ">>result.log". +символ '%', например, result-%%D.log. Чтобы использовать '>>', вы должны +заключить имя в кавычки, например, `">>result.log"`. Для вывода журнала на стандартный вывод или стандартную ошибку, -вы можете использовать ">&1" и ">&2" соответственно. +вы можете использовать `">&1"` и `">&2"` соответственно. Описание тегов журнала см. в файле snapraid_log.txt или man-странице. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Устанавливает новый лимит ошибок до остановки выполнения. По умолчанию SnapRAID останавливается, если обнаруживает более 100 ошибок ввода/вывода, что указывает на вероятный сбой диска. -Эта опция влияет на sync и scrub, которым разрешено +Эта опция влияет на `sync` и `scrub`, которым разрешено продолжать работу после первого набора дисковых ошибок, чтобы попытаться завершить свои операции. -Однако check и fix всегда останавливаются при первой ошибке. - - - -
-
-
+Однако `check` и `fix` всегда останавливаются при первой ошибке. +
+ + +
-S, --start BLKSTART -
+
Начинает обработку с указанного номера блока. Это может быть полезно для повторной попытки проверить или исправить конкретные блоки в случае поврежденного диска. Эта опция в основном предназначена для расширенного ручного восстановления. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Обрабатывает только указанное количество блоков. Эта опция в основном предназначена для расширенного ручного восстановления. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Генерирует фиктивный файл конфигурации из существующего файла content. Файл конфигурации записывается на стандартный вывод @@ -1391,69 +1199,57 @@ SnapRAID. Этот файл конфигурации также содержит информацию, необходимую для восстановления точек монтирования дисков в случае, если вы потеряете всю систему. - - - -
-
-
+
+ + +
-v, --verbose -
+
Печатает больше информации на экран. Если указана один раз, печатает исключенные файлы и дополнительную статистику. Эта опция не влияет на файлы журнала. - - - -
-
-
+
+ + +
-q, --quiet -
+
Печатает меньше информации на экран. Если указана один раз, удаляет индикатор выполнения; дважды, текущие операции; трижды, информационные сообщения; четырежды, сообщения о статусе. Фатальные ошибки всегда выводятся на экран. Эта опция не влияет на файлы журнала. - - - -
-
-
+
+ + +
-H, --help -
+
Печатает краткий экран справки. - - - -
-
-
+
+ + +
-V, --version -
+
Печатает версию программы. - - - - -
-

+

+

7 Configuration -

+

SnapRAID требует файл конфигурации, чтобы знать, где находится ваш дисковый массив и где хранить информацию четности. -

В Unix используется файл /usr/local/etc/snapraid.conf, если он существует, -в противном случае /etc/snapraid.conf. -В Windows используется файл snapraid.conf в том же -каталоге, что и snapraid.exe. +

В Unix используется файл `/usr/local/etc/snapraid.conf`, если он существует, +в противном случае `/etc/snapraid.conf`. +В Windows используется файл `snapraid.conf` в том же +каталоге, что и `snapraid.exe`.

Он должен содержать следующие опции (чувствительные к регистру): -

-

+

7.1 parity FILE [,FILE] ... -

+

Определяет файлы для использования для хранения информации четности. Четность обеспечивает защиту от одного сбоя диска, подобно RAID5. @@ -1468,11 +1264,9 @@ parity FILE [,FILE] ...

В Windows 256 МБ остается неиспользованным на каждом диске, чтобы избежать предупреждения о полных дисках.

Эта опция является обязательной и может использоваться только один раз. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Определяет файлы для использования для хранения дополнительной информации четности.

Для каждого указанного уровня четности включается один дополнительный уровень защиты:

    @@ -1493,45 +1287,39 @@ parity FILE [,FILE] ...

Каждый уровень четности требует наличия всех предыдущих уровней четности. -

Применяются те же соображения, что и для опции parity. +

Применяются те же соображения, что и для опции 'parity'.

Эти опции являются необязательными и могут использоваться только один раз. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Определяет альтернативный файл и формат для хранения тройной четности. -

Эта опция является альтернативой 3-parity, в основном предназначенной для +

Эта опция является альтернативой '3-parity', в основном предназначенной для слабых процессоров, таких как ARM или AMD Phenom, Athlon и Opteron, которые не поддерживают набор инструкций SSSE3. В таких случаях она обеспечивает лучшую производительность.

Этот формат похож на тот, который используется ZFS RAIDZ3, но быстрее. Как и ZFS, он не работает за пределами тройной четности. -

При использовании 3-parity вы будете предупреждены, если рекомендуется использовать -формат z-parity для повышения производительности. +

При использовании '3-parity' вы будете предупреждены, если рекомендуется использовать +формат 'z-parity' для повышения производительности.

Возможно преобразование из одного формата в другой путем настройки файла конфигурации с желаемым файлом z-parity или 3-parity -и использования fix для его воссоздания. -

-
-

+и использования 'fix' для его воссоздания. +

7.4 content FILE -

+

Определяет файл для использования для хранения списка и контрольных сумм всех файлов, присутствующих в вашем дисковом массиве.

Он может быть размещен на диске, используемом для данных, четности, или любом другом доступном диске. Если вы используете диск данных, этот файл автоматически исключается -из процесса sync. +из процесса `sync`.

Эта опция является обязательной и может использоваться несколько раз для сохранения нескольких копий одного и того же файла.

Вы должны хранить как минимум одну копию для каждого используемого диска четности плюс одну. Использование дополнительных копий не повредит. -

-
-

+

7.5 data NAME DIR -

+

Определяет имя и точку монтирования дисков данных в массиве. NAME используется для идентификации диска и должно быть уникальным. DIR — это точка монтирования диска в @@ -1540,49 +1328,31 @@ data NAME DIR сохраняете NAME фиксированным.

Вы должны использовать одну опцию для каждого диска данных в массиве.

Вы можете переименовать диск позже, изменив NAME непосредственно -в файле конфигурации, а затем запустив команду sync. +в файле конфигурации, а затем запустив команду 'sync'. В случае переименования, ассоциация выполняется с использованием сохраненного UUID дисков. -

-
-

-extra NAME DIR -

-

Определяет имя и точку монтирования дополнительных дисков для -мониторинга с помощью команд smart и probe. -

Это полезно для мониторинга дисков, которые не являются частью -массива, но необходимы для функционирования системы, таких как -загрузочный диск. -

Обратите внимание, что такие диски не затрагиваются командами up и -down, так как предполагается, что они всегда вращаются. -

-
-

+

7.6 nohidden -

+

Исключает все скрытые файлы и каталоги. -В Unix скрытые файлы — это те, которые начинаются с .. +В Unix скрытые файлы — это те, которые начинаются с `.`. В Windows — это те, у которых есть скрытый атрибут. -

-
-

+

7.7 exclude/include PATTERN -

+

Определяет шаблоны файлов или каталогов для исключения или включения в процесс синхронизации. Все шаблоны обрабатываются в указанном порядке. -

Если первый совпадающий шаблон — это exclude, файл -исключается. Если это include, файл включается. +

Если первый совпадающий шаблон — это `exclude`, файл +исключается. Если это `include`, файл включается. Если ни один шаблон не совпадает, файл исключается, если последний -указанный шаблон — это include, или включается, если последний шаблон -— это exclude. +указанный шаблон — это `include`, или включается, если последний шаблон +— это `exclude`.

Подробнее о спецификациях шаблонов см. в разделе PATTERN.

Эту опцию можно использовать несколько раз. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Определяет базовый размер блока в кибибайтах для четности. Один кибибайт — это 1024 байта.

Размер блока по умолчанию — 256, что должно работать в большинстве случаев. @@ -1603,7 +1373,7 @@ blocksize SIZE_IN_KIBIBYTES теряется для каждого файла. Например, при 100 000 файлов и размере блока 256 КиБ вы потеряете 12,8 ГБ четности, что может привести к уменьшению доступного пространства на диске данных на 12,8 ГБ. -

Вы можете проверить количество потерянного пространства на каждом диске с помощью status. +

Вы можете проверить количество потерянного пространства на каждом диске с помощью `status`. Это количество пространства, которое вы должны оставить свободным на дисках данных или использовать для файлов, не включенных в массив. Если это значение отрицательное, это означает, что вы близки к заполнению @@ -1614,17 +1384,17 @@ blocksize SIZE_IN_KIBIBYTES файлов на каждом диске данных без каких-либо потерь пространства.

Хитрость для получения большего раздела четности в Linux — отформатировать его командой: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Это приводит к примерно 1,5% дополнительного пространства, приблизительно 60 ГБ для диска 4 ТБ, что позволяет разместить около 460 000 файлов на каждом диске данных без каких-либо потерь пространства. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Определяет размер хэша в байтах для сохраненных блоков.

Размер хэша по умолчанию — 16 байт (128 бит), что должно работать в большинстве случаев. @@ -1655,26 +1425,22 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Автоматически сохраняет состояние при синхронизации или проверке после обработки указанного количества ГБ. -Эта опция полезна, чтобы избежать перезапуска длительных команд sync +Эта опция полезна, чтобы избежать перезапуска длительных команд `sync` с нуля, если они были прерваны сбоем машины или любым другим событием. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Устанавливает максимально допустимую температуру диска в Цельсиях. Если указано, SnapRAID периодически проверяет температуру всех дисков с помощью инструмента smartctl. Текущие температуры дисков отображаются во время работы SnapRAID. Если какой-либо диск превышает этот лимит, все операции останавливаются, и диски останавливают вращение (переходят в режим ожидания) на время, -определенное опцией temp_sleep. После периода ожидания операции +определенное опцией `temp_sleep`. После периода ожидания операции возобновляются, потенциально снова приостанавливаясь, если лимит температуры достигается еще раз.

Во время работы SnapRAID также анализирует кривую нагрева каждого @@ -1695,88 +1461,85 @@ SnapRAID периодически проверяет температуру вс резервного эталона.

Обычно SnapRAID показывает только температуру самого горячего диска. Чтобы отобразить температуру всех дисков, используйте опцию -A или --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Устанавливает время ожидания, в минутах, когда достигается предел температуры. В течение этого периода диски остаются остановленными. По умолчанию — 5 минут. -

-
-

+

7.13 pool DIR -

+

Определяет каталог объединения (pooling), где создается виртуальное представление -дискового массива с помощью команды pool. +дискового массива с помощью команды `pool`.

Каталог должен уже существовать. -

-
-

+

7.14 share UNC_DIR -

+

Определяет путь UNC Windows, необходимый для удаленного доступа к дискам.

Если указана эта опция, символические ссылки, созданные в каталоге pool, используют этот путь UNC для доступа к дискам. Без этой опции сгенерированные символические ссылки используют только локальные пути, что не позволяет предоставлять общий доступ к каталогу pool по сети.

Символические ссылки формируются с использованием указанного пути UNC, добавлением -имени диска, как указано в опции data, и, наконец, добавлением +имени диска, как указано в опции `data`, и, наконец, добавлением каталога и имени файла.

Эта опция требуется только для Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Определяет пользовательские опции smartctl для получения атрибутов SMART для каждого диска. Это может потребоваться для контроллеров RAID и некоторых USB-дисков, которые не могут быть обнаружены автоматически. Заполнитель %s заменяется именем устройства, но он необязателен для фиксированных устройств, таких как контроллеры RAID. -

DISK — это то же имя диска, указанное в опции data. -PARITY — это одно из имен четности: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity или z-parity. -

В указанных OPTIONS строка %s заменяется +

DISK — это то же имя диска, указанное в опции `data`. +PARITY — это одно из имен четности: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` или `z-parity`. +

В указанных OPTIONS строка `%s` заменяется именем устройства. Для контроллеров RAID устройство, -вероятно, фиксировано, и вам может не потребоваться использовать %s. +вероятно, фиксировано, и вам может не потребоваться использовать `%s`.

Возможные опции см. в документации smartmontools: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Например: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Игнорирует указанный атрибут SMART при вычислении вероятности сбоя диска. Эта опция полезна, если диск сообщает необычные или вводящие в заблуждение значения для конкретного атрибута. -

DISK — это то же имя диска, указанное в опции data. -PARITY — это одно из имен четности: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity или z-parity. +

DISK — это то же имя диска, указанное в опции `data`. +PARITY — это одно из имен четности: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` или `z-parity`. Специальное значение * может использоваться для игнорирования атрибута на всех дисках. -

Например, чтобы игнорировать атрибут Current Pending Sector Count на +

Например, чтобы игнорировать атрибут `Current Pending Sector Count` на всех дисках: -

+

+
 smartignore * 197
 
+

Чтобы игнорировать его только на первом диске четности: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Пример типичной конфигурации для Unix: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1790,8 +1553,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Пример типичной конфигурации для Windows: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1806,262 +1571,172 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

Шаблоны обеспечивают гибкий способ фильтрации файлов для включения или -исключения. Используя символы подстановки (globbing), вы можете определить правила, -которые соответствуют конкретным именам файлов или целым структурам каталогов без -ручного перечисления каждого пути. -

Вопросительный знак ? соответствует любому одиночному символу, кроме -разделителя каталогов. Это делает его полезным для сопоставления имен файлов с -переменными символами, при этом шаблон ограничивается одним уровнем каталога. -

Одиночная звездочка * соответствует любой последовательности символов, но, как и -вопросительный знак, она никогда не пересекает границы каталогов. Она останавливается на -прямой косой черте, что делает ее подходящей для сопоставления внутри одного -компонента пути. Это стандартное поведение подстановочных знаков, знакомое -по оболочке (shell). -

Двойная звездочка ** более мощная, она соответствует любой последовательности -символов, включая разделители каталогов. Это позволяет шаблонам соответствовать -нескольким уровням каталогов. Когда ** появляется непосредственно в -шаблоне, она может соответствовать нулю или более символам, включая косые черты между -окружающим буквальным текстом. -

Наиболее важным использованием ** является специальная форма /**/. Она соответствует -нулю или более полным уровням каталогов, что позволяет сопоставлять файлы -на любой глубине в дереве каталогов, не зная точной структуры пути. -Например, шаблон src/**/main.js соответствует src/main.js (пропуск -ноля каталогов), src/ui/main.js (пропуск одного каталога) и -src/ui/components/main.js (пропуск двух каталогов). -

Классы символов с использованием квадратных скобок [] соответствуют одному символу из -заданного набора или диапазона. Как и другие односимвольные шаблоны, они -не соответствуют разделителям каталогов. Классы поддерживают диапазоны и отрицание с -использованием восклицательного знака. -

Фундаментальное различие, которое следует помнить, заключается в том, что *, ? и классы -символов соблюдают границы каталогов и соответствуют только внутри одного -компонента пути, в то время как ** — единственный шаблон, который может соответствовать -через разделители каталогов. + +

Шаблоны используются для выбора подмножества файлов для исключения или включения +в процесс.

Существует четыре различных типа шаблонов: -

-
-
+

+ +
FILE -
-Выбирает любой файл с именем FILE. -Этот шаблон применяется только к файлам, но не к директориям. -
- - -
-
-
+
+Выбирает любой файл с именем FILE. Вы можете использовать любые символы +глоббинга, такие как * и ?, и классы символов, такие как [a-z]. +Этот шаблон применяется только к файлам, а не к каталогам. +
+ + +
DIR/ -
-Выбирает любую директорию с именем DIR и все, что находится внутри нее. -Этот шаблон применяется только к директориям, но не к файлам. -
- - -
-
-
+
+Выбирает любой каталог с именем DIR и все внутри. +Вы можете использовать любые символы глоббинга, такие как * и ?. +Этот шаблон применяется только к каталогам, а не к файлам. +
+ + +
/PATH/FILE -
-Выбирает точно указанный путь к файлу. Этот шаблон применяется -только к файлам, но не к директориям. -
- - -
-
-
+
+Выбирает точно указанный путь к файлу. Вы можете использовать любые +символы глоббинга, такие как * и ?, но они никогда не совпадают с +косой чертой каталога. +Этот шаблон применяется только к файлам, а не к каталогам. +
+ + +
/PATH/DIR/ -
-Выбирает точно указанный путь к директории и все, что находится -внутри нее. Этот шаблон применяется только к директориям, но не к файлам. -
- - +
+Выбирает точно указанный путь к каталогу и все внутри. +Вы можете использовать любые символы глоббинга, такие как * и ?, но +они никогда не совпадают с косой чертой каталога. +Этот шаблон применяется только к каталогам, а не к файлам. +

Когда вы указываете абсолютный путь, начинающийся с /, он применяется к корневому каталогу массива, а не к корневому каталогу локальной файловой системы.

В Windows вы можете использовать обратную косую черту \ вместо прямой /. Системные каталоги Windows, точки соединения, точки монтирования и другие специальные каталоги Windows рассматриваются как файлы, что означает, что для их исключения вы должны использовать правило файла, а не каталога. -

Если имя файла содержит символы *, ?, [, -или ], вы должны экранировать их, чтобы избежать их интерпретации как -символов глоббинга. В Unix символом экранирования является \; в Windows — ^. +

Если имя файла содержит символы '*', '?', '[', +или ']', вы должны экранировать их, чтобы избежать их интерпретации как +символов глоббинга. В Unix символом экранирования является '\'; в Windows — '^'. Когда шаблон находится в командной строке, вы должны удвоить символ экранирования, чтобы избежать его интерпретации командной оболочкой.

В файле конфигурации вы можете использовать различные стратегии для фильтрации файлов для обработки. -Самый простой подход — использовать только правила exclude для удаления всех +Самый простой подход — использовать только правила `exclude` для удаления всех файлов и каталогов, которые вы не хотите обрабатывать. Например: -

-# Исключает любой файл с именем *.unrecoverable
+

+
+# Исключает любой файл с именем `*.unrecoverable`
 exclude *.unrecoverable
-# Исключает корневой каталог /lost+found
+# Исключает корневой каталог `/lost+found`
 exclude /lost+found/
-# Исключает любой подкаталог с именем tmp
+# Исключает любой подкаталог с именем `tmp`
 exclude tmp/
 
+

Противоположный подход — определить только файлы, которые вы хотите обрабатывать, используя -только правила include. Например: -

+только правила `include`. Например:
+

+
 # Включает только некоторые каталоги
 include /movies/
 include /musics/
 include /pictures/
 
-

Конечный подход — смешивать правила exclude и include. В этом случае +

+

Конечный подход — смешивать правила `exclude` и `include`. В этом случае порядок правил важен. Более ранние правила имеют преимущество над более поздними. -Для упрощения вы можете сначала перечислить все правила exclude, а затем -все правила include. Например: -

-# Исключает любой файл с именем *.unrecoverable
+Для упрощения вы можете сначала перечислить все правила `exclude`, а затем
+все правила `include`. Например:
+

+
+# Исключает любой файл с именем `*.unrecoverable`
 exclude *.unrecoverable
-# Исключает любой подкаталог с именем tmp
+# Исключает любой подкаталог с именем `tmp`
 exclude tmp/
 # Включает только некоторые каталоги
 include /movies/
 include /musics/
 include /pictures/
 
-

В командной строке, используя опцию -f, вы можете использовать только шаблоны include. +

+

В командной строке, используя опцию -f, вы можете использовать только шаблоны `include`. Например: -

+

+
 # Проверяет только файлы .mp3.
 # В Unix используйте кавычки, чтобы избежать расширения глоббинга оболочкой.
 snapraid -f "*.mp3" check
 
+

В Unix при использовании символов глоббинга в командной строке вы должны заключить их в кавычки, чтобы предотвратить их расширение оболочкой. -

-
-

-Ignore File -

-

В дополнение к глобальным правилам в файле конфигурации, вы можете -размещать файлы .snapraidignore в любом каталоге внутри массива для -определения децентрализованных правил исключения. -

Правила, определенные в .snapraidignore, применяются после правил в -конфигурационном файле. Это означает, что они имеют более высокий приоритет -и могут использоваться для исключения файлов, которые ранее были включены -глобальной конфигурацией. Фактически, если локальное правило совпадает, файл -исключается независимо от глобальных настроек включения. -

Логика шаблонов в .snapraidignore повторяет глобальную конфигурацию, но -привязывает шаблоны к каталогу, в котором находится файл: -

-
-
-FILE -
-Выбирает любой файл с именем FILE в этом каталоге или ниже. -Здесь действуют те же правила подстановки, что и в глобальном шаблоне. -
-
-
-
-
-
-DIR/ -
-Выбирает любой каталог с именем DIR и все его содержимое, -находящееся в этом каталоге или ниже. -
-
-
-
-
-
-/PATH/FILE -
-Выбирает точно указанный файл относительно местоположения -файла .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Выбирает точно указанный каталог и все его содержимое -относительно местоположения файла .snapraidignore. -
-
-
-

В отличие от глобальной конфигурации, файлы .snapraidignore поддерживают -только правила исключения; вы не можете использовать шаблоны include или отрицание (!). -

Например, если у вас есть .snapraidignore в /mnt/disk1/projects/: -

-# Исключает ТОЛЬКО /mnt/disk1/projects/output.bin
-/output.bin
-# Исключает любой каталог с именем build внутри projects/
-build/
-# Исключает любой .tmp файл внутри projects/ или его подпапок
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID хранит список и контрольные суммы ваших файлов в файле content.

Это бинарный файл, который перечисляет все файлы, присутствующие в вашем дисковом массиве, вместе со всеми контрольными суммами для проверки их целостности. -

Этот файл считывается и записывается командами sync и scrub и -считывается командами fix, check и status. -

-
-

+

Этот файл считывается и записывается командами `sync` и `scrub` и +считывается командами `fix`, `check` и `status`. +

10 Parity -

+

SnapRAID хранит информацию четности вашего массива в файлах parity.

Это бинарные файлы, содержащие вычисленную четность всех -блоков, определенных в файле content. -

Эти файлы считываются и записываются командами sync и fix и -только считываются командами scrub и check. -

-
-

+блоков, определенных в файле `content`. +

Эти файлы считываются и записываются командами `sync` и `fix` и +только считываются командами `scrub` и `check`. +

11 Encoding -

+

SnapRAID в Unix игнорирует любое кодирование. Он считывает и хранит имена файлов с тем же кодированием, которое используется файловой системой.

В Windows все имена, считанные из файловой системы, преобразуются и обрабатываются в формате UTF-8.

Чтобы имена файлов печатались правильно, вы должны установить консоль Windows -в режим UTF-8 командой chcp 65001 и использовать -шрифт TrueType, такой как Lucida Console, в качестве шрифта консоли. +в режим UTF-8 командой `chcp 65001` и использовать +шрифт TrueType, такой как `Lucida Console`, в качестве шрифта консоли. Это влияет только на печатаемые имена файлов; если вы перенаправляете вывод консоли в файл, результирующий файл всегда в формате UTF-8. -

+

+

+

-
-
-
+
- - + diff --git a/manual-sv.html b/manual-sv.html index 07128f84..7d2310b3 100644 --- a/manual-sv.html +++ b/manual-sv.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Beskrivning -

+

SnapRAID är ett säkerhetskopieringsprogram designat för disk-arrayer, som lagrar paritetsinformation för dataåterställning vid upp till sex diskfel. @@ -183,14 +128,14 @@ vilket sparar ström och minskar buller.

För mer information, besök den officiella SnapRAID-webbplatsen: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Begränsningar -

+

SnapRAID är en hybrid mellan ett RAID- och ett säkerhetskopieringsprogram, som syftar till att kombinera de bästa fördelarna med båda. Den har dock vissa begränsningar som du bör överväga innan du använder den. @@ -228,13 +173,11 @@ Endast filnamn, tidsstämplar, symboliska länkar och hårda länkar sparas. Behörigheter, ägarskap och utökade attribut sparas inte. -

-
-

+

4 Kom igång -

+

För att använda SnapRAID måste du först välja en disk i din disk-array -som ska dediceras till parity-information. Med en disk för paritet, +som ska dediceras till `parity`-information. Med en disk för paritet, kommer du att kunna återställa från ett enda diskfel, liknande RAID5.

Om du vill återställa från fler diskfel, liknande RAID6, måste du reservera ytterligare diskar för paritet. Varje ytterligare @@ -242,31 +185,34 @@ paritetsdisk möjliggör återställning från ett diskfel till.

Som paritetsdiskar måste du välja de största diskarna i arrayen, eftersom paritetsinformationen kan växa till storleken av den största datadisken i arrayen. -

Dessa diskar kommer att dediceras till att lagra parity-filerna. +

Dessa diskar kommer att dediceras till att lagra `parity`-filerna. Du bör inte lagra din data på dem. -

Sedan måste du definiera de data-diskar som du vill skydda +

Sedan måste du definiera de `data`-diskar som du vill skydda med SnapRAID. Skyddet är mer effektivt om dessa diskar innehåller data som sällan ändras. Av denna anledning är det bäst att INTE inkludera Windows C:\-disken eller Unix /home, /var och /tmp katalogerna. -

Listan över filer sparas i content-filerna, som vanligtvis +

Listan över filer sparas i `content`-filerna, som vanligtvis lagras på data-, paritets- eller startdiskarna. Denna fil innehåller detaljerna för din säkerhetskopia, inklusive alla checksummor för att verifiera dess integritet. -content-filen lagras i flera kopior, och varje kopia måste +`content`-filen lagras i flera kopior, och varje kopia måste finnas på en annan disk för att säkerställa att, även vid flera diskfel, minst en kopia är tillgänglig.

Anta till exempel att du bara är intresserad av en paritetsnivå av skydd, och dina diskar finns på: -

+

+
 /mnt/diskp <- vald disk för paritet
 /mnt/disk1 <- första disken att skydda
 /mnt/disk2 <- andra disken att skydda
 /mnt/disk3 <- tredje disken att skydda
 
+

Du måste skapa konfigurationsfilen /etc/snapraid.conf med följande alternativ: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -275,9 +221,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Om du använder Windows bör du använda Windows sökvägsformat, med enhetsbeteckningar och omvända snedstreck istället för snedstreck. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -286,16 +234,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Om du har många diskar och får slut på enhetsbeteckningar kan du montera diskar direkt i undermappar. Se: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

Vid denna punkt är du redo att köra kommandot sync för att bygga +

+

Vid denna punkt är du redo att köra kommandot `sync` för att bygga paritetsinformationen. -

+

+
 snapraid sync
 
+

Denna process kan ta flera timmar första gången, beroende på storleken på datan som redan finns på diskarna. Om diskarna är tomma är processen omedelbar. @@ -303,53 +256,60 @@ processen omedelbar. återupptas det där det avbröts.

När detta kommando är klart är din data SÄKER.

Nu kan du börja använda din array som du vill och periodiskt -uppdatera paritetsinformationen genom att köra kommandot sync. -

-

+uppdatera paritetsinformationen genom att köra kommandot `sync`. +

4.1 Skrubbning (Scrubbing) -

+

För att periodiskt kontrollera data och paritet för fel kan du -köra kommandot scrub. -

+köra kommandot `scrub`.
+

+
 snapraid scrub
 
+

Detta kommando jämför data i din array med den hash som beräknades -under kommandot sync för att verifiera integriteten. +under kommandot `sync` för att verifiera integriteten.

Varje körning av kommandot kontrollerar ungefär 8% av arrayen, exklusive data som redan skrubbats under de föregående 10 dagarna. Du kan använda alternativet -p, --plan för att specificera en annan mängd och alternativet -o, --older-than för att specificera en annan ålder i dagar. Till exempel, för att kontrollera 5% av arrayen för block äldre än 20 dagar, använd: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Om tysta eller input/output-fel hittas under processen, -markeras de motsvarande blocken som dåliga i content-filen -och listas i kommandot status. -

+markeras de motsvarande blocken som dåliga i `content`-filen
+och listas i kommandot `status`.
+

+
 snapraid status
 
-

För att fixa dem kan du använda kommandot fix, filtrera efter dåliga block med +

+

För att fixa dem kan du använda kommandot `fix`, filtrera efter dåliga block med alternativet -e, --filter-error: -

+

+
 snapraid -e fix
 
-

Vid nästa scrub kommer felen att försvinna från status-rapporten +

+

Vid nästa `scrub` kommer felen att försvinna från `status`-rapporten om de verkligen är fixade. För att göra det snabbare kan du använda -p bad för att skrubba endast block markerade som dåliga. -

+

+
 snapraid -p bad scrub
 
-

Att köra scrub på en osynkad array kan rapportera fel orsakade av -borttagna eller modifierade filer. Dessa fel rapporteras i scrub- +

+

Att köra `scrub` på en osynkad array kan rapportera fel orsakade av +borttagna eller modifierade filer. Dessa fel rapporteras i `scrub`- utdata, men de relaterade blocken markeras inte som dåliga. -

-
-

+

4.2 Poolning -

+

Obs: Poolningsfunktionen som beskrivs nedan har ersatts av verktyget -mergerfs, som nu är det rekommenderade alternativet för Linux-användare i +mergefs, som nu är det rekommenderade alternativet för Linux-användare i SnapRAID-communityt. Mergefs ger ett mer flexibelt och effektivt sätt att poola flera enheter till en enda enhetlig monteringspunkt, vilket möjliggör sömlös åtkomst till filer över din array utan att förlita sig @@ -357,27 +317,36 @@ på symboliska länkar. Det integreras väl med SnapRAID för paritetsskydd och används ofta i installationer som OpenMediaVault (OMV) eller anpassade NAS-konfigurationer.

För att visa alla filer i din array i samma katalogträd, -kan du aktivera funktionen pooling. Den skapar en skrivskyddad virtuell +kan du aktivera funktionen `pooling`. Den skapar en skrivskyddad virtuell vy av alla filer i din array med hjälp av symboliska länkar. -

Du kan konfigurera pooling-katalogen i konfigurationsfilen med: -

+

Du kan konfigurera `pooling`-katalogen i konfigurationsfilen med: +

+
 pool /pool
 
+

eller, om du använder Windows, med: -

+

+
 pool C:\pool
 
-

och kör sedan kommandot pool för att skapa eller uppdatera den virtuella vyn. -

+
+

och kör sedan kommandot `pool` för att skapa eller uppdatera den virtuella vyn. +

+
 snapraid pool
 
+

Om du använder en Unix-plattform och vill dela denna katalog över nätverket till antingen Windows- eller Unix-maskiner, bör du lägga till följande alternativ till din /etc/samba/smb.conf: -

+

+
 # I den globala sektionen av smb.conf
 unix extensions = no
 
+
+
 # I delningssektionen av smb.conf
 [pool]
@@ -388,101 +357,115 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

I Windows kräver delning av symboliska länkar över ett nätverk att klienter löser dem på distans. För att aktivera detta måste du, förutom att dela pool-katalogen, även dela alla diskar oberoende, med hjälp av de disk-namn som definieras i konfigurationsfilen som delningspunkter. Du måste också specificera -i alternativet share i konfigurationsfilen den Windows UNC-sökväg som +i alternativet `share` i konfigurationsfilen den Windows UNC-sökväg som fjärrklienter behöver använda för att få åtkomst till dessa delade diskar. -

Till exempel, om du arbetar från en server som heter darkstar, kan du använda +

Till exempel, om du arbetar från en server som heter `darkstar`, kan du använda alternativen: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

och dela följande kataloger över nätverket: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

för att tillåta fjärrklienter att få åtkomst till alla filer på \\darkstar\pool.

Du kan också behöva konfigurera fjärrklienter för att möjliggöra åtkomst till fjärrsymboliska länkar med kommandot: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Ångra radering (Undeleting) -

+

SnapRAID fungerar mer som ett säkerhetskopieringsprogram än ett RAID-system, och det kan användas för att återställa eller ångra radering av filer till deras tidigare tillstånd med hjälp av alternativet -f, --filter: -

+

+
 snapraid fix -f FIL
 
+

eller för en katalog: -

+

+
 snapraid fix -f KATALOG/
 
+

Du kan också använda det för att återställa endast oavsiktligt raderade filer inuti en katalog med hjälp av alternativet -m, --filter-missing, som återställer endast saknade filer, och lämnar alla andra orörda. -

+

+
 snapraid fix -m -f KATALOG/
 
+

Eller för att återställa alla raderade filer på alla enheter med: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Återställning -

+

Det värsta har hänt, och du har förlorat en eller flera diskar!

FÅ INTE PANIK! Du kommer att kunna återställa dem!

Det första du måste göra är att undvika ytterligare ändringar i din disk-array. Inaktivera alla fjärranslutningar till den och alla schemalagda processer, inklusive alla schemalagda SnapRAID nattliga sync- eller scrub-körningar.

Fortsätt sedan med följande steg. -

-

+

4.4.1 STEG 1 -> Omkonfigurera -

+

Du behöver lite utrymme för att återställa, helst på ytterligare reservdiskar, men en extern USB-disk eller fjärrdisk räcker. -

Ändra SnapRAID-konfigurationsfilen för att få alternativet data eller parity +

Ändra SnapRAID-konfigurationsfilen för att få alternativet `data` eller `parity` för den felaktiga disken att peka på en plats med tillräckligt tomt utrymme för att återställa filerna. -

Om till exempel disk d1 har misslyckats, ändra från: -

+

Om till exempel disk `d1` har misslyckats, ändra från: +

+
 data d1 /mnt/disk1/
 
+

till: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

Om disken som ska återställas är en paritetsdisk, uppdatera det lämpliga parity- +

+

Om disken som ska återställas är en paritetsdisk, uppdatera det lämpliga `parity`- alternativet. Om du har flera felaktiga diskar, uppdatera alla deras konfigurationsalternativ. -

-
-

+

4.4.2 STEG 2 -> Fixa -

+

Kör kommandot fix och lagra loggen i en extern fil med: -

+

+
 snapraid -d NAMN -l fix.log fix
 
-

Där NAMN är namnet på disken, till exempel d1 i vårt tidigare exempel. -Om disken som ska återställas är en paritetsdisk, använd namnen parity, 2-parity, +

+

Där NAMN är namnet på disken, till exempel `d1` i vårt tidigare exempel. +Om disken som ska återställas är en paritetsdisk, använd namnen `parity`, `2-parity`, etc. Om du har flera felaktiga diskar, använd flera -d-alternativ för att specificera alla av dem. @@ -491,275 +474,225 @@ av dem. Kör den från en disk med tillräckligt med ledigt utrymme.

Nu har du återställt allt som är återställningsbart. Om vissa filer är delvis eller helt icke-återställningsbara, kommer de att döpas om genom att lägga till tillägget -.unrecoverable. +`.unrecoverable`.

Du kan hitta en detaljerad lista över alla icke-återställningsbara block i fix.log-filen -genom att kontrollera alla rader som börjar med unrecoverable:. +genom att kontrollera alla rader som börjar med `unrecoverable:`.

Om du inte är nöjd med återställningen kan du försöka igen hur många gånger du vill.

Om du till exempel har tagit bort filer från arrayen efter den senaste -sync, kan detta leda till att vissa filer inte återställs. -I detta fall kan du försöka igen fix med alternativet -i, --import, +`sync`, kan detta leda till att vissa filer inte återställs. +I detta fall kan du försöka igen `fix` med alternativet -i, --import, specificera var dessa filer nu finns för att inkludera dem igen i återställningsprocessen.

Om du är nöjd med återställningen kan du fortsätta, -men notera att efter synkronisering kan du inte försöka igen kommandot fix +men notera att efter synkronisering kan du inte försöka igen kommandot `fix` längre! -

-
-

+

4.4.3 STEG 3 -> Kontrollera -

-

Som en försiktighetsåtgärd kan du nu köra ett check-kommando för att säkerställa att + +

Som en försiktighetsåtgärd kan du nu köra ett `check`-kommando för att säkerställa att allt är korrekt på den återställda disken. -

+

+
 snapraid -d NAMN -a check
 
-

Där NAMN är namnet på disken, till exempel d1 i vårt tidigare exempel. +

+

Där NAMN är namnet på disken, till exempel `d1` i vårt tidigare exempel.

Alternativen -d och -a talar om för SnapRAID att endast kontrollera den specificerade disken och ignorera all paritetsdata.

Detta kommando kommer att ta lång tid, men om du inte är alltför försiktig, kan du hoppa över det. -

-
-

+

4.4.4 STEG 4 -> Synkronisera -

-

Kör kommandot sync för att synkronisera arrayen igen med den nya disken. -

+
+

Kör kommandot `sync` för att synkronisera arrayen igen med den nya disken. +

+
 snapraid sync
 
+

Om allt är återställt är detta kommando omedelbart. -

-
-
-
-

+

5 Kommandon -

+

SnapRAID tillhandahåller några enkla kommandon som låter dig:

  • -Skriva ut statusen för arrayen -> status +Skriva ut statusen för arrayen -> `status`
  • -Kontrollera diskarna -> smart, probe, up, down +Kontrollera diskarna -> `smart`, `probe`, `up`, `down`
  • -Göra en säkerhetskopia/ögonblicksbild -> sync +Göra en säkerhetskopia/ögonblicksbild -> `sync`
  • -Periodiskt kontrollera data -> scrub +Periodiskt kontrollera data -> `scrub`
  • -Återställa den senaste säkerhetskopian/ögonblicksbilden -> fix. +Återställa den senaste säkerhetskopian/ögonblicksbilden -> `fix`.

Kommandon måste skrivas med gemener. -

-

+

5.1 status -

+

Skriver ut en sammanfattning av tillståndet för disk-arrayen.

Det inkluderar information om paritetsfragmentering, hur gamla blocken är utan kontroll, och alla registrerade tysta fel som påträffats under skrubbning.

Informationen som presenteras hänvisar till den senaste tidpunkten du -körde sync. Senare modifieringar beaktas inte. +körde `sync`. Senare modifieringar beaktas inte.

Om dåliga block upptäcktes, listas deras blocknummer. -För att fixa dem kan du använda kommandot fix -e. +För att fixa dem kan du använda kommandot `fix -e`.

Det visar också ett diagram som representerar den senaste tidpunkten då varje block -skrubbades eller synkroniserades. Skrubbade block visas med *, -block synkroniserade men ännu inte skrubbade med o. +skrubbades eller synkroniserades. Skrubbade block visas med '*', +block synkroniserade men ännu inte skrubbade med 'o'.

Inget ändras. -

-
-

+

5.2 smart -

+

Skriver ut en SMART-rapport över alla diskar i systemet.

Det inkluderar en uppskattning av sannolikheten för fel under det kommande året, vilket gör att du kan planera underhållsersättningar av diskar som visar misstänkta attribut.

Denna sannolikhetsuppskattning erhålls genom att korrelera SMART-attributen för diskarna med Backblaze-data som finns tillgänglig på: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

Om SMART rapporterar att en disk håller på att misslyckas, skrivs FAIL eller PREFAIL ut +

+

Om SMART rapporterar att en disk håller på att misslyckas, skrivs `FAIL` eller `PREFAIL` ut för den disken, och SnapRAID returnerar med ett fel. I detta fall rekommenderas omedelbar ersättning av disken starkt.

Andra möjliga statussträngar är: -

-
-
+

+ + + +
logfail -
+
Tidigare var vissa attribut lägre än tröskelvärdet. - - -
-
+
logerr -
+
Enhetens fellogg innehåller fel. - - -
-
+
selferr -
+
Enhetens självtestlogg innehåller fel. - - - +

Om alternativet -v, --verbose specificeras, tillhandahålls en djupare statistisk analys. Denna analys kan hjälpa dig att bestämma om du behöver mer eller mindre paritet. -

Detta kommando använder verktyget smartctl och är ekvivalent med att köra -smartctl -a på alla enheter. +

Detta kommando använder verktyget `smartctl` och är ekvivalent med att köra +`smartctl -a` på alla enheter.

Om dina enheter inte upptäcks automatiskt korrekt kan du specificera -ett anpassat kommando med hjälp av alternativet smartctl i konfigurations- +ett anpassat kommando med hjälp av alternativet `smartctl` i konfigurations- filen.

Inget ändras. -

-
-

+

5.3 probe -

+

Skriver ut STRÖM-tillståndet för alla diskar i systemet. -

Standby betyder att disken inte snurrar. Active betyder +

`Standby` betyder att disken inte snurrar. `Active` betyder att disken snurrar. -

Detta kommando använder verktyget smartctl och är ekvivalent med att köra -smartctl -n standby -i på alla enheter. +

Detta kommando använder verktyget `smartctl` och är ekvivalent med att köra +`smartctl -n standby -i` på alla enheter.

Om dina enheter inte upptäcks automatiskt korrekt kan du specificera -ett anpassat kommando med hjälp av alternativet smartctl i konfigurations- +ett anpassat kommando med hjälp av alternativet `smartctl` i konfigurations- filen.

Inget ändras. -

-
-

+

5.4 up -

+

Snurrar upp alla diskar i arrayen.

Du kan snurra upp endast specifika diskar med hjälp av alternativet -d, --filter-disk.

Att snurra upp alla diskar samtidigt kräver mycket ström. Se till att din strömförsörjning kan klara det.

Inget ändras. -

-
-

+

5.5 down -

+

Snurrar ner alla diskar i arrayen. -

Detta kommando använder verktyget smartctl och är ekvivalent med att köra -smartctl -s standby,now på alla enheter. +

Detta kommando använder verktyget `smartctl` och är ekvivalent med att köra +`smartctl -s standby,now` på alla enheter.

Du kan snurra ner endast specifika diskar med hjälp av alternativet -d, --filter-disk alternativet.

För att automatiskt snurra ner vid fel kan du använda alternativet -s, --spin-down-on-error -med alla andra kommandon, vilket är ekvivalent med att köra down manuellt +med alla andra kommandon, vilket är ekvivalent med att köra `down` manuellt när ett fel inträffar.

Inget ändras. -

-
-

+

5.6 diff -

-

Listar alla filer som modifierats sedan den senaste sync och som behöver få + +

Listar alla filer som modifierats sedan den senaste `sync` och som behöver få sin paritetsdata omberäknad.

Detta kommando kontrollerar inte filens data, utan endast filens tidsstämpel, storlek och inode.

Efter att ha listat alla ändrade filer presenteras en sammanfattning av ändringarna, grupperade efter: -

-
-
+

+ + + + + + + +
equal -
+
Filer oförändrade från tidigare. - - -
-
+
added -
+
Filer tillagda som inte fanns tidigare. - - -
-
+
removed -
+
Filer borttagna. - - -
-
+
updated -
+
Filer med en annan storlek eller tidsstämpel, vilket innebär att de modifierades. - - -
-
+
moved -
+
Filer flyttade till en annan katalog på samma disk. De identifieras genom att ha samma namn, storlek, tidsstämpel och inode, men en annan katalog. - - -
-
+
copied -
-Filer som kopierats på samma eller en annan disk där -originalfilen fortfarande finns kvar. +
+Filer kopierade på samma eller en annan disk. Observera att om +de verkligen flyttas till en annan disk, kommer de också att +räknas i `removed`. De identifieras genom att ha samma namn, storlek och -tidsstämpel. -Om tidsstämpeln för undersekunder är noll måste hela sökvägen -matcha för att identifieras, inte bara namnet. - - -
-
-relocated -
-Filer som flyttats på samma eller en annan disk där -originalet har försvunnit. -De identifieras genom att ha samma namn, storlek och -tidsstämpel. -Om tidsstämpeln för undersekunder är noll måste hela sökvägen -matcha för att identifieras. -Till skillnad från 'moved' filer på samma disk har omlokaliserade -filer en annan inode. -
-
-
-
+tidsstämpel. Om undertidsstämpeln är noll, +måste hela sökvägen matcha, inte bara namnet. +
restored -
-Filer med en annan inode men matchande katalog, namn, -storlek och tidsstämpel. +
+Filer med en annan inode men matchande namn, storlek och tidsstämpel. Dessa är vanligtvis filer som återställts efter att ha raderats. - - - -

Om en sync krävs är processens returkod 2, istället för standard 0. +

+

Om en `sync` krävs är processens returkod 2, istället för standard 0. Returkoden 1 används för ett generiskt feltillstånd.

Inget ändras. -

-
-

+

5.7 sync -

+

Uppdaterar paritetsinformationen. Alla modifierade filer i disk-arrayen läses, och motsvarande paritets- data uppdateras.

Du kan stoppa denna process när som helst genom att trycka Ctrl+C, utan att förlora det arbete som redan utförts. -Vid nästa körning kommer sync-processen att återupptas där +Vid nästa körning kommer `sync`-processen att återupptas där den avbröts.

Om tysta eller input/output-fel hittas under processen, markeras de motsvarande blocken som dåliga. @@ -771,13 +704,11 @@ Om filen flyttas eller döps om på samma disk, samtidigt som samma inode behålls, beräknas inte pariteten om. Om filen flyttas till en annan disk, beräknas pariteten om, men den tidigare beräknade hash-informationen behålls. -

content- och parity-filerna modifieras vid behov. +

`content`- och `parity`-filerna modifieras vid behov. Filerna i arrayen modifieras INTE. -

-
-

+

5.8 scrub -

+

Skrubbar arrayen och söker efter tysta eller input/output-fel i data- och paritetsdiskar.

Varje anrop kontrollerar ungefär 8% av arrayen, exklusive @@ -794,104 +725,92 @@ full - Skrubbar allt. för att definiera hur gammalt blocket ska vara. De äldsta blocken skrubbas först, vilket säkerställer en optimal kontroll. Om du bara vill skrubba de nyligen synkroniserade blocken som ännu inte skrubbats, -använd alternativet -p new. -

För att få detaljer om skrubbstatusen, använd kommandot status. +använd alternativet `-p new`. +

För att få detaljer om skrubbstatusen, använd kommandot `status`.

För alla tysta eller input/output-fel som hittas, markeras de motsvarande blocken -som dåliga i content-filen. -Dessa dåliga block listas i status och kan fixas med fix -e. +som dåliga i `content`-filen. +Dessa dåliga block listas i `status` och kan fixas med `fix -e`. Efter fixningen, vid nästa skrubb, kommer de att kontrolleras igen, och om de befinns korrigerade, tas det dåliga märket bort. -För att skrubba endast de dåliga blocken kan du använda kommandot scrub -p bad. -

Det rekommenderas att köra scrub endast på en synkroniserad array för att undvika +För att skrubba endast de dåliga blocken kan du använda kommandot `scrub -p bad`. +

Det rekommenderas att köra `scrub` endast på en synkroniserad array för att undvika rapporterade fel orsakade av osynkad data. Dessa fel känns igen som att de inte är tysta fel, och blocken markeras inte som dåliga, men sådana fel rapporteras i kommandots utdata. -

content-filen modifieras för att uppdatera tiden för den senaste kontrollen +

`content`-filen modifieras för att uppdatera tiden för den senaste kontrollen för varje block och för att markera dåliga block. -parity-filerna modifieras INTE. +`parity`-filerna modifieras INTE. Filerna i arrayen modifieras INTE. -

-
-

+

5.9 fix -

+

Fixar alla filer och paritetsdata.

Alla filer och paritetsdata jämförs med ögonblicksbilds- -tillståndet som sparades i den senaste sync. +tillståndet som sparades i den senaste `sync`. Om en skillnad hittas, återställs den till det lagrade ögonblicksbildstillståndet. -

VARNING! Kommandot fix skiljer inte mellan fel och +

VARNING! Kommandot `fix` skiljer inte mellan fel och avsiktliga modifieringar. Det återställer ovillkorligen filtillståndet -till den senaste sync. +till den senaste `sync`.

Om inget annat alternativ specificeras, behandlas hela arrayen. Använd filteralternativen för att välja en delmängd av filer eller diskar att arbeta med. -

För att fixa endast blocken markerade som dåliga under sync och scrub, +

För att fixa endast blocken markerade som dåliga under `sync` och `scrub`, använd alternativet -e, --filter-error. Till skillnad från andra filteralternativ tillämpar detta fixar endast på filer som är -oförändrade sedan den senaste sync. +oförändrade sedan den senaste `sync`.

SnapRAID döper om alla filer som inte kan fixas genom att lägga till tillägget -.unrecoverable. +`.unrecoverable`.

Innan fixningen skannas hela arrayen för att hitta alla filer som flyttats -sedan den senaste sync-operationen. +sedan den senaste `sync`-operationen. Dessa filer identifieras av deras tidsstämpel, ignorera deras namn och katalog, och används i återställningsprocessen vid behov. Om du flyttade några av dem utanför arrayen kan du använda alternativet -i, --import för att specificera ytterligare kataloger att skanna.

Filer identifieras endast med sökväg, inte med inode. -

content-filen modifieras INTE. -parity-filerna modifieras vid behov. +

`content`-filen modifieras INTE. +`parity`-filerna modifieras vid behov. Filerna i arrayen modifieras vid behov. -

-
-

+

5.10 check -

+

Verifierar alla filer och paritetsdata. -

Det fungerar som fix, men det simulerar endast en återställning och inga ändringar +

Det fungerar som `fix`, men det simulerar endast en återställning och inga ändringar skrivs till arrayen.

Detta kommando är i första hand avsett för manuell verifiering, som efter en återställningsprocess eller under andra speciella förhållanden. -För periodiska och schemalagda kontroller, använd scrub. +För periodiska och schemalagda kontroller, använd `scrub`.

Om du använder alternativet -a, --audit-only, kontrolleras endast fil- datan, och paritetsdatan ignoreras för en snabbare körning.

Filer identifieras endast med sökväg, inte med inode.

Inget ändras. -

-
-

+

5.11 list -

+

Listar alla filer som finns i arrayen vid tidpunkten för den -senaste sync. +senaste `sync`.

Med -v eller --verbose visas även undertiden.

Inget ändras. -

-
-

+

5.12 dup -

+

Listar alla dubblettfiler. Två filer antas vara lika om deras hashar matchar. Filens data läses inte; endast de förberäknade hasharna används.

Inget ändras. -

-
-

+

5.13 pool -

+

Skapar eller uppdaterar en virtuell vy av alla -filer i din disk-array i pooling-katalogen. +filer i din disk-array i `pooling`-katalogen.

Filerna kopieras inte utan länkas med hjälp av symboliska länkar.

Vid uppdatering raderas alla befintliga symboliska länkar och tomma underkataloger och ersätts med den nya vyn av arrayen. Alla andra vanliga filer lämnas kvar.

Inget ändras utanför pool-katalogen. -

-
-

+

5.14 devices -

+

Skriver ut de lågnivåenheter som används av arrayen.

Detta kommando visar enhetsassociationerna i arrayen och är främst avsett som ett skriptgränssnitt. @@ -902,11 +821,9 @@ Den sista kolumnen är diskens namn i arrayen. arrayen, men i vissa mer komplexa konfigurationer kan du ha flera lågnivåenheter som används av en enda disk i arrayen.

Inget ändras. -

-
-

+

5.15 touch -

+

Anger en godtycklig undertidsstämpel för alla filer som har den satt till noll.

Detta förbättrar SnapRAIDs förmåga att känna igen flyttade @@ -919,11 +836,9 @@ namn, storlek och tidsstämpel. Om undertidsstämpeln storlek och tidsstämpel alla matchar.

Tidsstämpeln med sekundprecision modifieras inte, så alla datum och tider för dina filer bevaras. -

-
-

+

5.16 rehash -

+

Schemalägger en omhashning av hela arrayen.

Detta kommando ändrar den hash-typ som används, vanligtvis vid uppgradering från ett 32-bitars system till ett 64-bitars system, för att byta från @@ -931,156 +846,123 @@ MurmurHash3 till den snabbare SpookyHash.

Om du redan använder den optimala hashen, gör detta kommando ingenting och informerar dig om att ingen åtgärd behövs.

Omhashningen utförs inte omedelbart utan sker -progressivt under sync och scrub. -

Du kan kontrollera omhashningstillståndet med hjälp av status. +progressivt under `sync` och `scrub`. +

Du kan kontrollera omhashningstillståndet med hjälp av `status`.

Under omhashningen bibehåller SnapRAID full funktionalitet, -med det enda undantaget att dup inte kan upptäcka dubbletter +med det enda undantaget att `dup` inte kan upptäcka dubbletter med hjälp av en annan hash. -

-
-

-locate -

-

Lokaliserar filer som lagras på paritetsdiskarna. För varje matchande fil -skrivs dess plats i paritetsfilen och antalet fragment den upptar ut. -

Du kan använda alternativet -t, --tail för att begränsa åtgärden till filer som -upptar den angivna slutdelen (tail) av pariteten. -

Om du vill omallokera dessa filer kan du använda alternativet --W, --force-realloc-tail. -Var medveten om att sådana filer inte skyddas av paritet under -omallokeringsprocessen. -

-
-
-

+

6 Alternativ -

+

SnapRAID tillhandahåller följande alternativ: -

-
-
+

+ +
-c, --conf CONFIG -
+
Väljer den konfigurationsfil som ska användas. Om den inte specificeras, i Unix -används filen /usr/local/etc/snapraid.conf om den finns, -annars /etc/snapraid.conf. -I Windows används filen snapraid.conf i samma -katalog som snapraid.exe. - - - -
-
-
+används filen `/usr/local/etc/snapraid.conf` om den finns, +annars `/etc/snapraid.conf`. +I Windows används filen `snapraid.conf` i samma +katalog som `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filtrerar filerna att behandla i check och fix. +
+Filtrerar filerna att behandla i `check` och `fix`. Endast filerna som matchar det specificerade mönstret behandlas. Detta alternativ kan användas flera gånger. Se avsnittet MÖNSTER för mer information om mönsterspecifikationer. I Unix, se till att globbing-tecken citeras om de används. -Detta alternativ kan endast användas med check och fix. -Det kan inte användas med sync och scrub, eftersom de alltid +Detta alternativ kan endast användas med `check` och `fix`. +Det kan inte användas med `sync` och `scrub`, eftersom de alltid behandlar hela arrayen. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filtrerar diskarna att behandla i check, fix, up och down. +
+Filtrerar diskarna att behandla i `check`, `fix`, `up` och `down`. Du måste specificera ett disk-namn som definieras i konfigurations- filen. -Du kan också specificera paritetsdiskar med namnen: parity, 2-parity, -3-parity, etc., för att begränsa operationer till en specifik paritetsdisk. +Du kan också specificera paritetsdiskar med namnen: `parity`, `2-parity`, +`3-parity`, etc., för att begränsa operationer till en specifik paritetsdisk. Om du kombinerar flera --filter, --filter-disk och --filter-missing alternativ, väljs endast filer som matchar alla filter. Detta alternativ kan användas flera gånger. -Detta alternativ kan endast användas med check, fix, up och down. -Det kan inte användas med sync och scrub, eftersom de alltid +Detta alternativ kan endast användas med `check`, `fix`, `up` och `down`. +Det kan inte användas med `sync` och `scrub`, eftersom de alltid behandlar hela arrayen. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filtrerar filerna att behandla i check och fix. +
+Filtrerar filerna att behandla i `check` och `fix`. Endast filerna som saknas eller har raderats från arrayen behandlas. -När det används med fix, fungerar detta som ett undelete-kommando. +När det används med `fix`, fungerar detta som ett `undelete`-kommando. Om du kombinerar flera --filter, --filter-disk och --filter-missing alternativ, väljs endast filer som matchar alla filter. -Detta alternativ kan endast användas med check och fix. -Det kan inte användas med sync och scrub, eftersom de alltid +Detta alternativ kan endast användas med `check` och `fix`. +Det kan inte användas med `sync` och `scrub`, eftersom de alltid behandlar hela arrayen. - - - -
-
-
+
+ + +
-e, --filter-error -
-Behandlar filerna med fel i check och fix. +
+Behandlar filerna med fel i `check` och `fix`. Det behandlar endast filer som har block markerade med tysta -eller input/output-fel under sync och scrub, som listas i status. -Detta alternativ kan endast användas med check och fix. - - - -
-
-
+eller input/output-fel under `sync` och `scrub`, som listas i `status`. +Detta alternativ kan endast användas med `check` och `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Väljer skrubbplanen. Om PERC är ett numeriskt värde från 0 till 100, tolkas det som procentandelen av block som ska skrubbas. Istället för en procentsats kan du specificera en plan: -bad skrubbar dåliga block, new skrubbar block som ännu inte skrubbats, -och full skrubbar allt. -Detta alternativ kan endast användas med scrub. - - - -
-
-
+`bad` skrubbar dåliga block, `new` skrubbar block som ännu inte skrubbats, +och `full` skrubbar allt. +Detta alternativ kan endast användas med `scrub`. +
+ + +
-o, --older-than DAYS -
-Väljer den äldsta delen av arrayen att behandla i scrub. +
+Väljer den äldsta delen av arrayen att behandla i `scrub`. DAYS är den minsta åldern i dagar för ett block att skrubbas; standard är 10. Block markerade som dåliga skrubbas alltid oavsett detta alternativ. -Detta alternativ kan endast användas med scrub. - - - -
-
-
+Detta alternativ kan endast användas med `scrub`. +
+ + +
-a, --audit-only -
-I check, verifierar hashen av filerna utan +
+I `check`, verifierar hashen av filerna utan att kontrollera paritetsdata. Om du bara är intresserad av att kontrollera filens data, kan detta alternativ avsevärt påskynda kontrollprocessen. -Detta alternativ kan endast användas med check. - - - -
-
-
+Detta alternativ kan endast användas med `check`. +
+ + +
-h, --pre-hash -
-I sync, kör en preliminär hash-fas av all ny data +
+I `sync`, kör en preliminär hash-fas av all ny data för ytterligare verifiering innan paritetsberäkningen. -Vanligtvis görs ingen preliminär hashning i sync, och den nya +Vanligtvis görs ingen preliminär hashning i `sync`, och den nya datan hashberäknas precis innan paritetsberäkningen när den läses för första gången. Denna process sker när systemet är under @@ -1088,73 +970,52 @@ tung belastning, med alla diskar snurrande och en upptagen CPU. Detta är ett extremt tillstånd för maskinen, och om den har ett latent hårdvaruproblem, kan tysta fel gå obemärkt förbi eftersom datan ännu inte har hashberäknats. -För att undvika denna risk kan du aktivera pre-hash-läget för att få +För att undvika denna risk kan du aktivera `pre-hash`-läget för att få all data läst två gånger för att säkerställa dess integritet. Detta alternativ verifierar också filer som flyttats inom arrayen för att säkerställa att flyttoperationen lyckades och, om nödvändigt, låter dig köra en fix-operation innan du fortsätter. -Detta alternativ kan endast användas med sync. - - - -
-
-
+Detta alternativ kan endast användas med `sync`. +
+ + +
-i, --import DIR -
+
Importerar från den specificerade katalogen alla filer som raderats -från arrayen efter den senaste sync. -Om du fortfarande har sådana filer, kan de användas av check -och fix för att förbättra återställningsprocessen. +från arrayen efter den senaste `sync`. +Om du fortfarande har sådana filer, kan de användas av `check` +och `fix` för att förbättra återställningsprocessen. Filerna läses, inklusive i underkataloger, och identifieras oavsett deras namn. -Detta alternativ kan endast användas med check och fix. - - - -
-
-
+Detta alternativ kan endast användas med `check` och `fix`. +
+ + +
-s, --spin-down-on-error -
+
Vid något fel, snurrar ner alla hanterade diskar innan den avslutas med en statuskod som inte är noll. Detta förhindrar att enheterna förblir aktiva och snurrar efter en avbruten operation, vilket hjälper till att undvika onödig värmeuppbyggnad och ström- förbrukning. Använd detta alternativ för att säkerställa att diskar stoppas säkert även när ett kommando misslyckas. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Tillämpar en global bandbreddsbegränsning för alla diskar. RATE är antalet byte per sekund. Du kan specificera en multiplikator som K, M eller G (t.ex. --bw-limit 1G). - - - -
-
-
--t, --tail STORLEK -
-Begränsa fillistan till de som inte använder mer än den angivna -slutstorleken på paritetsdiskarna. -Du kan använda multiplikatorer som K, M, G eller T (t.ex. --tail 1G). -Detta alternativ är endast giltigt när det används tillsammans med -kommandot locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Aktiverar en utökad statusvy som visar ytterligare information. Skärmen visar två diagram: Det första diagrammet visar antalet buffrade strippar för varje @@ -1172,14 +1033,12 @@ Alla beräkningar körs parallellt med diskoperationer. Därför, så länge det finns mätbar väntetid för minst en disk, indikerar det att CPU:n är snabb nog att hålla jämna steg med arbetsbelastningen. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Tvingar den osäkra operationen att synkronisera en fil med noll storlek som tidigare var icke-noll. Om SnapRAID upptäcker ett sådant tillstånd, stoppar det att fortsätta @@ -1187,15 +1046,13 @@ om du inte specificerar detta alternativ. Detta gör att du enkelt kan upptäcka när, efter en systemkrasch, vissa filer som användes trunkerades. Detta är ett möjligt tillstånd i Linux med filsystemen ext3/ext4. -Detta alternativ kan endast användas med sync. - - - -
-
-
+Detta alternativ kan endast användas med `sync`. +
+ + +
-E, --force-empty -
+
Tvingar den osäkra operationen att synkronisera en disk där alla ursprungliga filer saknas. Om SnapRAID upptäcker att alla filer som ursprungligen fanns @@ -1203,15 +1060,13 @@ på disken saknas eller har skrivits om, stoppar det att fortsätta om du inte specificerar detta alternativ. Detta gör att du enkelt kan upptäcka när ett datafilsystem inte är monterat. -Detta alternativ kan endast användas med sync. - - - -
-
-
+Detta alternativ kan endast användas med `sync`. +
+ + +
-U, --force-uuid -
+
Tvingar den osäkra operationen att synkronisera, kontrollera och fixa med diskar som har ändrat sin UUID. Om SnapRAID upptäcker att vissa diskar har ändrat UUID, @@ -1221,32 +1076,28 @@ monteringspunkter. Det är dock tillåtet att ha en enda UUID-ändring med enkel paritet, och fler med multipel paritet, eftersom detta är det normala fallet när man byter ut diskar efter en återställning. -Detta alternativ kan endast användas med sync, check eller -fix. - - - -
-
-
+Detta alternativ kan endast användas med `sync`, `check` eller +`fix`. +
+ + +
-D, --force-device -
+
Tvingar den osäkra operationen att fixa med otillgängliga diskar eller med diskar på samma fysiska enhet. Till exempel, om du förlorade två datadisker och har en reservdisk för att återställa endast den första, kan du ignorera den andra otillgängliga disken. Eller, om du vill återställa en disk i det lediga utrymme som finns kvar på en redan använd disk, dela samma fysiska enhet. -Detta alternativ kan endast användas med fix. - - - -
-
-
+Detta alternativ kan endast användas med `fix`. +
+ + +
-N, --force-nocopy -
-I sync, check och fix, inaktiverar heuristiken för kopieringsdetektering. +
+I `sync`, `check` och `fix`, inaktiverar heuristiken för kopieringsdetektering. Utan detta alternativ antar SnapRAID att filer med samma attribut, såsom namn, storlek och tidsstämpel, är kopior med samma data. @@ -1256,134 +1107,93 @@ för att upptäcka tysta fel eller för att återställa saknade filer. I vissa sällsynta fall kan detta beteende leda till falska positiva eller en långsam process på grund av många hash-verifieringar, och detta alternativ låter dig lösa sådana problem. -Detta alternativ kan endast användas med sync, check och fix. - - - -
-
-
+Detta alternativ kan endast användas med `sync`, `check` och `fix`. +
+ + +
-F, --force-full -
-I sync, tvingar en fullständig omberäkning av pariteten. +
+I `sync`, tvingar en fullständig omberäkning av pariteten. Detta alternativ kan användas när du lägger till en ny paritetsnivå eller om du återgick till en gammal content-fil med mer aktuell paritetsdata. Istället för att återskapa pariteten från grunden låter detta dig återanvända hasharna som finns i content-filen för att validera data -och bibehålla dataskyddet under sync-processen med hjälp av +och bibehålla dataskyddet under `sync`-processen med hjälp av den befintliga paritetsdatan. -Detta alternativ kan endast användas med sync. - - - -
-
-
+Detta alternativ kan endast användas med `sync`. +
+ + +
-R, --force-realloc -
-I sync, tvingar en fullständig omallokering av filer och ombyggnad av pariteten. +
+I `sync`, tvingar en fullständig omallokering av filer och ombyggnad av pariteten. Detta alternativ kan användas för att helt omallokera alla filer, ta bort fragmentering, samtidigt som hasharna som finns i content- filen återanvänds för att validera data. -Detta alternativ kan endast användas med sync. +Detta alternativ kan endast användas med `sync`. VARNING! Detta alternativ är endast för experter, och det rekommenderas starkt att inte använda det. -Du HAR INGET dataskydd under sync-operationen. - - - -
-
-
--W, --force-realloc-tail STORLEK -
-Fungerar som -R, --force-realloc, men begränsat till den angivna -slutdelen (de sista STORLEK byten) av varje paritetsfil. -Den tvingar omallokering (flytt) av alla filfragment/block som för -närvarande lagras i den slutsektionen, vilket gör att de kan placeras -var som helst i paritetsfilen/filerna där ledigt utrymme finns -(inklusive befintliga hål). -Huvudsyftet med detta alternativ är att minska paritetsfilens storlek -på disken. -Om omallokeringen lyckas rensa hela slutsektionen (inga block är kvar -som använder den), trunkeras paritetsfilen och det oanvända -slututrymmet återtas. -Du kan använda multiplikatorer som K, M, G eller T (t.ex. ---force-realloc-tail 1G). -Du kan använda locate -t, --tail för att i förväg veta vilka filer -som påverkas. -VARNING! -Detta alternativ är endast för experter, och det rekommenderas -starkt att inte använda det. -Du har INGET dataskydd under sync-åtgärden för de berörda filerna. -
-
-
-
-
-
+Du HAR INGET dataskydd under `sync`-operationen. +
+ + +
-l, --log FILE -
+
Skriver en detaljerad logg till den specificerade filen. Om detta alternativ inte specificeras, skrivs oväntade fel ut på skärmen, vilket potentiellt kan leda till överdriven utdata i händelse av många fel. När -l, --log specificeras, skrivs endast fatala fel som får SnapRAID att stoppa ut på skärmen. -Om sökvägen börjar med >>, öppnas filen -i tilläggsläge. Förekomster av %D och %T i namnet ersätts +Om sökvägen börjar med '>>', öppnas filen +i tilläggsläge. Förekomster av '%D' och '%T' i namnet ersätts med datum och tid i formatet YYYYMMDD respektive HHMMSS. I Windows batch-filer måste du dubblera -%-tecknet, t.ex. result-%%D.log. För att använda >> måste du -omsluta namnet i citattecken, t.ex. ">>result.log". +'%'-tecknet, t.ex. result-%%D.log. För att använda '>>' måste du +omsluta namnet i citattecken, t.ex. `">>result.log"`. För att skicka ut loggen till standardutdata eller standardfel, -kan du använda ">&1" respektive ">&2". +kan du använda `">&1"` respektive `">&2"`. Se filen snapraid_log.txt eller man-sidan för beskrivningar av logg-taggar. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Anger en ny felgräns innan körningen stoppas. Som standard stoppar SnapRAID om det stöter på mer än 100 input/output-fel, vilket indikerar att en disk troligen håller på att misslyckas. -Detta alternativ påverkar sync och scrub, som tillåts +Detta alternativ påverkar `sync` och `scrub`, som tillåts att fortsätta efter den första uppsättningen diskfel för att försöka slutföra sina operationer. -Däremot stoppar check och fix alltid vid det första felet. - - - -
-
-
+Däremot stoppar `check` och `fix` alltid vid det första felet. +
+ + +
-S, --start BLKSTART -
+
Börjar behandlingen från det specificerade blocknumret. Detta kan vara användbart för att försöka igen att kontrollera eller fixa specifika block i händelse av en skadad disk. Detta alternativ är främst för avancerad manuell återställning. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Behandlar endast det specificerade antalet block. Detta alternativ är främst för avancerad manuell återställning. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Genererar en dummy-konfigurationsfil från en befintlig content-fil. Konfigurationsfilen skrivs till standardutdata @@ -1391,69 +1201,57 @@ och skriver inte över en befintlig fil. Denna konfigurationsfil innehåller också den information som behövs för att rekonstruera diskmonteringspunkterna om du förlorar hela systemet. - - - -
-
-
+
+ + +
-v, --verbose -
+
Skriver ut mer information på skärmen. Om det specificeras en gång, skrivs exkluderade filer och ytterligare statistik ut. Detta alternativ har ingen effekt på loggfilerna. - - - -
-
-
+
+ + +
-q, --quiet -
+
Skriver ut mindre information på skärmen. Om det specificeras en gång, tas förloppsindikatorn bort; två gånger, de pågående operationerna; tre gånger, informations- meddelandena; fyra gånger, statusmeddelandena. Fatala fel skrivs alltid ut på skärmen. Detta alternativ har ingen effekt på loggfilerna. - - - -
-
-
+
+ + +
-H, --help -
+
Skriver ut en kort hjälpskärm. - - - -
-
-
+
+ + +
-V, --version -
+
Skriver ut programversionen. - - - - -
-

+

+

7 Konfiguration -

+

SnapRAID kräver en konfigurationsfil för att veta var din disk-array finns och var paritetsinformationen ska lagras. -

I Unix används filen /usr/local/etc/snapraid.conf om den finns, -annars /etc/snapraid.conf. -I Windows används filen snapraid.conf i samma -katalog som snapraid.exe. +

I Unix används filen `/usr/local/etc/snapraid.conf` om den finns, +annars `/etc/snapraid.conf`. +I Windows används filen `snapraid.conf` i samma +katalog som `snapraid.exe`.

Den måste innehålla följande alternativ (skiftlägeskänsligt): -

-

+

7.1 parity FIL [,FIL] ... -

+

Definierar de filer som ska användas för att lagra paritetsinformationen. Pariteten möjliggör skydd från ett enda disk- fel, liknande RAID5. @@ -1468,11 +1266,9 @@ de inte blir fragmenterade, vilket förbättrar prestandan.

I Windows lämnas 256 MB oanvänt på varje disk för att undvika varningen om fulla diskar.

Detta alternativ är obligatoriskt och kan endast användas en gång. -

-
-

+

7.2 (2,3,4,5,6)-parity FIL [,FIL] ... -

+

Definierar de filer som ska användas för att lagra extra paritetsinformation.

För varje paritetsnivå som specificeras aktiveras en ytterligare skyddsnivå:

    @@ -1494,45 +1290,39 @@ varningen om fulla diskar.

Varje paritetsnivå kräver närvaro av alla föregående paritets- nivåer. -

Samma överväganden som för alternativet parity gäller. +

Samma överväganden som för alternativet 'parity' gäller.

Dessa alternativ är valfria och kan endast användas en gång. -

-
-

+

7.3 z-parity FIL [,FIL] ... -

+

Definierar en alternativ fil och ett format för att lagra trippel paritet. -

Detta alternativ är ett alternativ till 3-parity, främst avsett för +

Detta alternativ är ett alternativ till '3-parity', främst avsett för lågpresterande processorer som ARM eller AMD Phenom, Athlon och Opteron som inte stöder SSSE3-instruktionsuppsättningen. I sådana fall ger det bättre prestanda.

Detta format liknar, men är snabbare än, det som används av ZFS RAIDZ3. Liksom ZFS fungerar det inte utöver trippel paritet. -

När du använder 3-parity kommer du att varnas om det rekommenderas att använda -formatet z-parity för prestandaförbättring. +

När du använder '3-parity' kommer du att varnas om det rekommenderas att använda +formatet 'z-parity' för prestandaförbättring.

Det är möjligt att konvertera från ett format till ett annat genom att justera konfigurationsfilen med önskad z-parity eller 3-parity fil -och använda fix för att återskapa den. -

-
-

+och använda 'fix' för att återskapa den. +

7.4 content FIL -

+

Definierar den fil som ska användas för att lagra listan och checksummorna för alla filer som finns i din disk-array.

Den kan placeras på en disk som används för data, paritet eller någon annan tillgänglig disk. Om du använder en datadisk exkluderas denna fil automatiskt -från sync-processen. +från `sync`-processen.

Detta alternativ är obligatoriskt och kan användas flera gånger för att spara flera kopior av samma fil.

Du måste lagra minst en kopia för varje paritetsdisk som används plus en. Att använda ytterligare kopior skadar inte. -

-
-

+

7.5 data NAMN KATALOG -

+

Definierar namnet och monteringspunkten för datadiskarna i arrayen. NAMN används för att identifiera disken och måste vara unikt. KATALOG är monteringspunkten för disken i @@ -1541,50 +1331,32 @@ filsystemet. du behåller NAMN fixerat.

Du bör använda ett alternativ för varje datadisk i arrayen.

Du kan byta namn på en disk senare genom att ändra NAMN direkt -i konfigurationsfilen och sedan köra ett sync-kommando. +i konfigurationsfilen och sedan köra ett 'sync'-kommando. I händelse av namnbyte görs associationen med hjälp av den lagrade UUID:n för diskarna. -

-
-

-extra NAME DIR -

-

Definierar namn och monteringspunkt för ytterligare diskar som ska -övervakas med kommandona smart och probe. -

Detta är användbart för att övervaka diskar som inte ingår i arrayen -men som krävs för att systemet ska fungera, till exempel -startdisken. -

Observera att sådana diskar inte påverkas av kommandona up och -down eftersom de förväntas alltid snurra. -

-
-

+

7.6 nohidden -

+

Exkluderar alla dolda filer och kataloger. -I Unix är dolda filer de som börjar med .. +I Unix är dolda filer de som börjar med `.`. I Windows är de de med det dolda attributet. -

-
-

+

7.7 exclude/include MÖNSTER -

+

Definierar fil- eller katalogmönstren att exkludera eller inkludera i sync-processen. Alla mönster behandlas i den specificerade ordningen. -

Om det första mönstret som matchar är ett exclude-mönster, -exkluderas filen. Om det är ett include-mönster, inkluderas filen. +

Om det första mönstret som matchar är ett `exclude`-mönster, +exkluderas filen. Om det är ett `include`-mönster, inkluderas filen. Om inget mönster matchar, exkluderas filen om det sista mönstret -som specificerats är ett include-mönster, eller inkluderas om det sista mönstret -som specificerats är ett exclude-mönster. +som specificerats är ett `include`-mönster, eller inkluderas om det sista mönstret +som specificerats är ett `exclude`-mönster.

Se avsnittet MÖNSTER för mer information om mönster- specifikationer.

Detta alternativ kan användas flera gånger. -

-
-

+

7.8 blocksize STORLEK_I_KIBIBYTES -

+

Definierar den grundläggande blockstorleken i kibibytes för pariteten. En kibibyte är 1024 byte.

Standard blockstorlek är 256, vilket bör fungera för de flesta fall. @@ -1604,7 +1376,7 @@ mängden data på den datadisken, inte andra. bortkastad för varje fil. Till exempel, med 100 000 filer och en 256 KiB blockstorlek, kommer du att slösa 12,8 GB paritet, vilket kan resultera i 12,8 GB mindre utrymme tillgängligt på datadisken. -

Du kan kontrollera mängden bortkastat utrymme på varje disk med hjälp av status. +

Du kan kontrollera mängden bortkastat utrymme på varje disk med hjälp av `status`. Detta är mängden utrymme du måste lämna ledigt på data- diskarna eller använda för filer som inte ingår i arrayen. Om detta värde är negativt betyder det att du är nära att fylla @@ -1615,17 +1387,17 @@ har du tillräckligt med extra utrymme för att hantera upp till 100 000 filer på varje datadisk utan något bortkastat utrymme.

Ett trick för att få en större paritetspartition i Linux är att formatera den med kommandot: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Detta resulterar i cirka 1,5% extra utrymme, ungefär 60 GB för en 4 TB-disk, vilket möjliggör cirka 460 000 filer på varje datadisk utan något bortkastat utrymme. -

-
-

+

7.9 hashsize STORLEK_I_BYTE -

+

Definierar hash-storleken i byte för de sparade blocken.

Standard hash-storlek är 16 byte (128 bitar), vilket bör fungera för de flesta fall. @@ -1656,26 +1428,22 @@ 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
 
-
-
-

+

7.10 autosave STORLEK_I_GIGABYTES -

+

Sparar automatiskt tillståndet vid synkronisering eller skrubbning efter att den specificerade mängden GB har behandlats. -Detta alternativ är användbart för att undvika att starta om långa sync- +Detta alternativ är användbart för att undvika att starta om långa `sync`- kommandon från början om de avbryts av en maskinkrasch eller någon annan händelse. -

-
-

+

7.11 temp_limit TEMPERATUR_CELSIUS -

+

Anger den maximalt tillåtna disk-temperaturen i Celsius. När den specificeras, kontrollerar SnapRAID periodiskt temperaturen på alla diskar med hjälp av verktyget smartctl. De aktuella disk-temperaturerna visas medan SnapRAID är igång. Om någon disk överskrider denna gräns, stoppas alla operationer och diskarna snurras ner (sätts i standby) under den tid -som definieras av alternativet temp_sleep. Efter viloperioden återupptas operationerna, +som definieras av alternativet `temp_sleep`. Efter viloperioden återupptas operationerna, och kan potentiellt pausas igen om temperaturgränsen nås ännu en gång.

Under drift analyserar SnapRAID också värmekurvan för varje @@ -1694,88 +1462,85 @@ sensorer. Om ingen system-sensor kan nås, används den lägsta disk- temperaturen som mättes vid start av körningen som en reservreferens.

Normalt visar SnapRAID endast temperaturen på den hetaste disken. För att visa temperaturen på alla diskar, använd alternativet -A eller --stats. -

-
-

+

7.12 temp_sleep TID_I_MINUTER -

+

Anger standby-tiden, i minuter, när temperaturgränsen har nåtts. Under denna period förblir diskarna nedsnurrade. Standard är 5 minuter. -

-
-

+

7.13 pool KATALOG -

+

Definierar poolningskatalogen där den virtuella vyn av disk- -arrayen skapas med hjälp av kommandot pool. +arrayen skapas med hjälp av kommandot `pool`.

Katalogen måste redan existera. -

-
-

+

7.14 share UNC_KATALOG -

+

Definierar Windows UNC-sökvägen som krävs för att få åtkomst till diskarna på distans.

Om detta alternativ specificeras, använder de symboliska länkarna som skapats i pool- katalogen denna UNC-sökväg för att få åtkomst till diskarna. Utan detta alternativ använder de genererade symboliska länkarna endast lokala sökvägar, vilket inte tillåter delning av pool-katalogen över nätverket.

De symboliska länkarna bildas med hjälp av den specificerade UNC-sökvägen, lägger till -disk-namnet som specificeras i data-alternativet, och lägger slutligen till filens +disk-namnet som specificeras i `data`-alternativet, och lägger slutligen till filens katalog och namn.

Detta alternativ krävs endast för Windows. -

-
-

+

7.15 smartctl DISK/PARITY ALTERNATIV... -

+

Definierar anpassade smartctl-alternativ för att få SMART-attributen för varje disk. Detta kan krävas för RAID-kontroller och vissa USB- diskar som inte kan upptäckas automatiskt. Platsinnehavaren %s ersätts av enhetens namn, men är valfri för fixerade enheter som RAID-kontroller. -

DISK är samma disk-namn som specificeras i data-alternativet. -PARITY är ett av paritetsnamnen: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity eller z-parity. -

I de specificerade ALTERNATIVEN ersätts strängen %s med +

DISK är samma disk-namn som specificeras i `data`-alternativet. +PARITY är ett av paritetsnamnen: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` eller `z-parity`. +

I de specificerade ALTERNATIVEN ersätts strängen `%s` med enhetens namn. För RAID-kontroller är enheten -sannolikt fixerad, och du kanske inte behöver använda %s. +sannolikt fixerad, och du kanske inte behöver använda `%s`.

Se smartmontools dokumentation för möjliga alternativ: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Till exempel: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignorerar det specificerade SMART-attributet vid beräkning av sannolikheten för diskfel. Detta alternativ är användbart om en disk rapporterar ovanliga eller vilseledande värden för ett visst attribut. -

DISK är samma disk-namn som specificeras i data-alternativet. -PARITY är ett av paritetsnamnen: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity eller z-parity. +

DISK är samma disk-namn som specificeras i `data`-alternativet. +PARITY är ett av paritetsnamnen: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity` eller `z-parity`. Det speciella värdet * kan användas för att ignorera attributet på alla diskar. -

Till exempel, för att ignorera attributet Current Pending Sector Count på +

Till exempel, för att ignorera attributet `Current Pending Sector Count` på alla diskar: -

+

+
 smartignore * 197
 
+

För att ignorera det endast på den första paritetsdisken: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Exempel -

+

Ett exempel på en typisk konfiguration för Unix är: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1789,8 +1554,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Ett exempel på en typisk konfiguration för Windows är: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1805,275 +1572,181 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

-Mönster (Pattern) -

-

Mönster ger ett flexibelt sätt att filtrera filer för inkludering eller -exkludering. Genom att använda jokertecken kan du definiera regler som -matchar specifika filnamn eller hela katalogstrukturer utan att -lista varje sökväg manuellt. -

Frågetecknet ? matchar valfritt enskilt tecken utom katalogavgränsaren. -Detta gör det användbart för att matcha filnamn med variabla tecken -samtidigt som mönstret hålls begränsat till en enda katalognivå. -

Den enkla stjärnan * matchar valfri teckensekvens, men precis som -frågetecknet korsar den aldrig kataloggränser. Den stannar vid -snedstrecket, vilket gör den lämplig för matchning inom en enskild -sökvägskomponent. Detta är det standardbeteende för jokertecken som är -bekant från skal-globbing. -

Den dubbla stjärnan ** är mer kraftfull; den matchar valfri teckensekvens -inklusive katalogavgränsare. Detta gör att mönster kan matcha över -flera katalognivåer. När ** förekommer direkt i ett mönster kan det -matcha noll eller fler tecken inklusive snedstreck mellan den -omkringliggande bokstavliga texten. -

Den viktigaste användningen av ** är i den speciella formen /**/. Detta matchar -noll eller flera kompletta katalognivåer, vilket gör det möjligt att matcha filer -på valfritt djup i ett katalogträd utan att känna till den exakta sökvägsstrukturen. -Till exempel matchar mönstret src/**/main.js filerna src/main.js (hoppar över -noll kataloger), src/ui/main.js (hoppar över en katalog) och -src/ui/components/main.js (hoppar över två kataloger). -

Teckenklasser som använder hakparenteser [] matchar ett enskilt tecken från en -angiven uppsättning eller ett intervall. Precis som de andra mönstren för enskilda -tecken matchar de inte katalogavgränsare. Klasser stöder intervall och -negering med ett utropstecken. -

Den grundläggande skillnaden att komma ihåg är att *, ? och teckenklasser -alla respekterar kataloggränser och endast matchar inom en enskild -sökvägskomponent, medan ** är det enda mönstret som kan matcha över -katalogavgränsare. +

+

8 +Mönster +

+

Mönster används för att välja en delmängd av filer att exkludera eller inkludera i +processen.

Det finns fyra olika typer av mönster: -

-
-
-FILE -
-Väljer valfri fil med namnet FILE. -Detta mönster gäller endast filer, inte kataloger. -
-
-
-
-
-
-DIR/ -
-Väljer valfri katalog med namnet DIR och allt innehåll. -Detta mönster gäller endast kataloger, inte filer. -
-
-
-
-
-
-/PATH/FILE -
-Väljer den exakt angivna filsökvägen. Detta mönster gäller -endast filer, inte kataloger. -
-
-
-
-
-
-/PATH/DIR/ -
-Väljer den exakt angivna katalogsökvägen och allt innehåll. -Detta mönster gäller endast kataloger, inte filer. -
-
-
+

+ +
+FIL +
+Väljer alla filer som heter FIL. Du kan använda alla globbing- +tecken som * och ?, och teckenklasser som [a-z]. +Detta mönster gäller endast för filer, inte kataloger. +
+ + +
+KATALOG/ +
+Väljer alla kataloger som heter KATALOG och allt inuti. +Du kan använda alla globbing-tecken som * och ?. +Detta mönster gäller endast för kataloger, inte filer. +
+ + +
+/SÖKVÄG/FIL +
+Väljer den exakt specificerade filsökvägen. Du kan använda alla +globbing-tecken som * och ?, men de matchar aldrig ett +katalog-snedstreck. +Detta mönster gäller endast för filer, inte kataloger. +
+ + +
+/SÖKVÄG/KATALOG/ +
+Väljer den exakt specificerade katalogsökvägen och allt +inuti. Du kan använda alla globbing-tecken som * och ?, men +de matchar aldrig ett katalog-snedstreck. +Detta mönster gäller endast för kataloger, inte filer. +

När du specificerar en absolut sökväg som börjar med /, tillämpas den vid array-rotkatalogen, inte den lokala filsystemets rotkatalog.

I Windows kan du använda bakåtsnedstrecket \ istället för framåtsnedstrecket /. Windows systemkataloger, junction points, monteringspunkter och andra Windows speciella kataloger behandlas som filer, vilket innebär att för att exkludera dem måste du använda en fil-regel, inte en katalog-regel. -

Om filnamnet innehåller tecknet *, ?, [, -eller ], måste du undvika det för att förhindra att det tolkas som ett -globbing-tecken. I Unix är undvikande-tecknet \; i Windows är det ^. +

Om filnamnet innehåller tecknet '*', '?', '[', +eller ']', måste du undvika det för att förhindra att det tolkas som ett +globbing-tecken. I Unix är undvikande-tecknet '\'; i Windows är det '^'. När mönstret är på kommandoraden måste du dubbla undvikande- tecknet för att förhindra att det tolkas av kommandoskalet.

I konfigurationsfilen kan du använda olika strategier för att filtrera filerna som ska behandlas. -Det enklaste tillvägagångssättet är att endast använda exclude-regler för att ta bort alla +Det enklaste tillvägagångssättet är att endast använda `exclude`-regler för att ta bort alla filer och kataloger du inte vill behandla. Till exempel: -

-# Exkluderar alla filer som heter *.unrecoverable
+

+
+# Exkluderar alla filer som heter `*.unrecoverable`
 exclude *.unrecoverable
-# Exkluderar rotkatalogen /lost+found
+# Exkluderar rotkatalogen `/lost+found`
 exclude /lost+found/
-# Exkluderar alla underkataloger som heter tmp
+# Exkluderar alla underkataloger som heter `tmp`
 exclude tmp/
 
+

Det motsatta tillvägagångssättet är att definiera endast de filer du vill behandla, med -endast include-regler. Till exempel: -

+endast `include`-regler. Till exempel:
+

+
 # Inkluderar endast vissa kataloger
 include /movies/
 include /musics/
 include /pictures/
 
-

Det sista tillvägagångssättet är att blanda exclude- och include-regler. I detta fall +

+

Det sista tillvägagångssättet är att blanda `exclude`- och `include`-regler. I detta fall är ordningen på reglerna viktig. Tidigare regler har företräde framför senare. -För att förenkla kan du lista alla exclude-regler först och sedan -alla include-regler. Till exempel: -

-# Exkluderar alla filer som heter *.unrecoverable
+För att förenkla kan du lista alla `exclude`-regler först och sedan
+alla `include`-regler. Till exempel:
+

+
+# Exkluderar alla filer som heter `*.unrecoverable`
 exclude *.unrecoverable
-# Exkluderar alla underkataloger som heter tmp
+# Exkluderar alla underkataloger som heter `tmp`
 exclude tmp/
 # Inkluderar endast vissa kataloger
 include /movies/
 include /musics/
 include /pictures/
 
-

På kommandoraden, med hjälp av alternativet -f, kan du bara använda include- +

+

På kommandoraden, med hjälp av alternativet -f, kan du bara använda `include`- mönster. Till exempel: -

+

+
 # Kontrollerar endast .mp3-filerna.
 # I Unix, använd citattecken för att undvika globbing-expansion av skalet.
 snapraid -f "*.mp3" check
 
+

I Unix, när du använder globbing-tecken på kommandoraden, måste du citattecken dem för att förhindra att skalet expanderar dem. -

-
-

-Ignorera filer (Ignore File) -

-

Utöver de globala reglerna i konfigurationsfilen kan du placera -.snapraidignore-filer i vilken katalog som helst i arrayen för att definiera -decentraliserade exkluderingsregler. -

Regler som definieras i .snapraidignore tillämpas efter reglerna i -konfigurationsfilen. Detta innebär att de har högre prioritet och kan -användas för att exkludera filer som tidigare inkluderats av den globala -konfigurationen. I praktiken innebär det att om en lokal regel matchar, så -exkluderas filen oavsett de globala inkluderingsinställningarna. -

Mönsterlogiken i .snapraidignore speglar den globala konfigurationen men -förankrar mönstren till den katalog där filen finns: -

-
-
-FILE -
-Väljer alla filer med namnet FILE i denna katalog eller under. -Detta följer samma globbing-regler som det globala mönstret. -
-
-
-
-
-
-DIR/ -
-Väljer alla kataloger med namnet DIR och allt innehåll, som finns -i denna katalog eller under. -
-
-
-
-
-
-/PATH/FILE -
-Väljer den exakt angivna filen relativt platsen för -.snapraidignore-filen. -
-
-
-
-
-
-/PATH/DIR/ -
-Väljer den exakt angivna katalogen och allt innehåll, relativt -platsen för .snapraidignore-filen. -
-
-
-

Till skillnad från den globala konfigurationen stöder .snapraidignore-filer -endast exkluderingsregler; du kan inte använda include-mönster eller negation (!). -

Till exempel, om du har en .snapraidignore i /mnt/disk1/projects/: -

-# Exkluderar ENDAST /mnt/disk1/projects/output.bin
-/output.bin
-# Exkluderar alla kataloger med namnet build inuti projects/
-build/
-# Exkluderar alla .tmp-filer inuti projects/ eller dess undermappar
-*.tmp
-
-
-
-

+

9 Innehåll (Content) -

+

SnapRAID lagrar listan och checksummorna för dina filer i content-filen.

Det är en binär fil som listar alla filer som finns i din disk-array, tillsammans med alla checksummor för att verifiera deras integritet. -

Denna fil läses och skrivs av kommandona sync och scrub och -läses av kommandona fix, check och status. -

-
-

+

Denna fil läses och skrivs av kommandona `sync` och `scrub` och +läses av kommandona `fix`, `check` och `status`. +

10 Paritet (Parity) -

+

SnapRAID lagrar paritetsinformationen för din array i parity- filerna.

Dessa är binära filer som innehåller den beräknade pariteten för alla -block definierade i content-filen. -

Dessa filer läses och skrivs av kommandona sync och fix och -läses endast av kommandona scrub och check. -

-
-

+block definierade i `content`-filen. +

Dessa filer läses och skrivs av kommandona `sync` och `fix` och +läses endast av kommandona `scrub` och `check`. +

11 Kodning -

+

SnapRAID i Unix ignorerar all kodning. Det läser och lagrar filnamnen med samma kodning som används av filsystemet.

I Windows konverteras alla namn som läses från filsystemet och behandlas i UTF-8-format.

För att få filnamn utskrivna korrekt måste du ställa in Windows- -konsolen till UTF-8-läge med kommandot chcp 65001 och använda -ett TrueType-typsnitt som Lucida Console som konsoltypsnitt. +konsolen till UTF-8-läge med kommandot `chcp 65001` och använda +ett TrueType-typsnitt som `Lucida Console` som konsoltypsnitt. Detta påverkar endast de utskrivna filnamnen; om du omdirigerar konsolutdata till en fil, är den resulterande filen alltid i UTF-8-format. -

-
-

+

12 Upphovsrätt (Copyright) -

+

Denna fil är Copyright (C) 2025 Andrea Mazzoleni -

-
-

+

13 Se Även (See Also) -

-

snapraid_log(1), snapraidd(1) -

+ +

snapraid_log(1), rsync(1) +

+

+

-
-
-
+
- - + diff --git a/manual-uk.html b/manual-uk.html index f8983236..9c91e904 100644 --- a/manual-uk.html +++ b/manual-uk.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Короткий опис -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Опис -

+

SnapRAID — це програма резервного копіювання, розроблена для дискових масивів, яка зберігає інформацію парності для відновлення даних у випадку відмови до шести дисків. @@ -186,14 +131,14 @@ SnapRAID не блокує ваші дані; ви можете припинит

Для отримання додаткової інформації відвідайте офіційний сайт SnapRAID: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Обмеження -

+

SnapRAID є гібридом між RAID та програмою резервного копіювання, прагнучи поєднати найкращі переваги обох. Однак, він має деякі обмеження, які слід врахувати перед його використанням. @@ -237,14 +182,12 @@ SnapRAID може відновлювати дані лише з обмежено розширені атрибути не зберігаються. -

-
-

+

4 Початок роботи -

+

Щоб використовувати SnapRAID, спершу потрібно вибрати один диск у вашому дисковому масиві, щоб присвятити його інформації -парності. З одним диском для парності ви зможете відновити +`парності`. З одним диском для парності ви зможете відновити дані після відмови одного диска, подібно до RAID5.

Якщо ви хочете відновити дані після більшої кількості дисків, що відмовили, подібно до RAID6, ви повинні зарезервувати @@ -253,32 +196,35 @@ SnapRAID може відновлювати дані лише з обмежено

Як диски парності ви повинні вибрати найбільші диски в масиві, оскільки інформація парності може зрости до розміру найбільшого диска даних у масиві. -

Ці диски будуть присвячені зберіганню файлів парності. Ви +

Ці диски будуть присвячені зберіганню файлів `парності`. Ви не повинні зберігати на них свої дані. -

Потім ви повинні визначити диски даних, які ви хочете +

Потім ви повинні визначити диски `даних`, які ви хочете захистити за допомогою SnapRAID. Захист є більш ефективним, якщо ці диски містять дані, що рідко змінюються. З цієї причини краще НЕ включати диск Windows C:\ або каталоги Unix /home, /var та /tmp. -

Список файлів зберігається у файлах content (вміст), які +

Список файлів зберігається у файлах `content` (вміст), які зазвичай зберігаються на дисках даних, парності або завантажувальних дисках. Цей файл містить деталі вашої резервної копії, включаючи всі контрольні суми для перевірки її цілісності. -Файл content зберігається в кількох копіях, і кожна копія +Файл `content` зберігається в кількох копіях, і кожна копія повинна бути на окремому диску, щоб гарантувати, що навіть у разі відмови кількох дисків, принаймні одна копія буде доступна.

Наприклад, припустимо, вас цікавить лише один рівень захисту парності, а ваші диски розташовані за адресами: -

+

+
 /mnt/diskp <- вибраний диск для парності
 /mnt/disk1 <- перший диск для захисту
 /mnt/disk2 <- другий диск для захисту
 /mnt/disk3 <- третій диск для захисту
 
+

Ви повинні створити конфігураційний файл /etc/snapraid.conf з наступними опціями: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -287,10 +233,12 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

Якщо ви працюєте в Windows, ви повинні використовувати формат шляху Windows, з літерами дисків та зворотними скісними рисками замість прямих. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -299,16 +247,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

Якщо у вас багато дисків і закінчилися літери дисків, ви можете монтувати диски безпосередньо у вкладені папки. Див: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

На цьому етапі ви готові запустити команду sync для побудови +

+

На цьому етапі ви готові запустити команду `sync` для побудови інформації парності. -

+

+
 snapraid sync
 
+

Цей процес може зайняти кілька годин вперше, залежно від розміру даних, які вже є на дисках. Якщо диски порожні, процес відбувається миттєво. @@ -317,18 +270,19 @@ snapraid sync де був перерваний.

Коли ця команда завершиться, ваші дані БЕЗПЕЧНІ.

Тепер ви можете почати використовувати свій масив як вам подобається -і періодично оновлювати інформацію парності, запускаючи команду sync. -

-

+і періодично оновлювати інформацію парності, запускаючи команду `sync`. +

4.1 Скрабування (Scrubbing) -

+

Щоб періодично перевіряти дані та парність на наявність помилок, -ви можете запустити команду scrub. -

+ви можете запустити команду `scrub`.
+

+
 snapraid scrub
 
+

Ця команда порівнює дані у вашому масиві з хешем, обчисленим -під час команди sync, для перевірки цілісності. +під час команди `sync`, для перевірки цілісності.

Кожен запуск команди перевіряє приблизно 8% масиву, виключаючи дані, які вже були скрабовані протягом попередніх 10 днів. Ви можете використовувати опцію -p, --plan, щоб вказати іншу @@ -336,38 +290,44 @@ snapraid scrub у днях. Наприклад, щоб перевірити 5% масиву на блоки старші за 20 днів, використовуйте: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

Якщо під час процесу виявлено приховані помилки або помилки введення/виведення, відповідні блоки позначаються як погані у -файлі content і перераховуються у команді status. -

+файлі `content` і перераховуються у команді `status`.
+

+
 snapraid status
 
-

Щоб їх виправити, ви можете використовувати команду fix, +

+

Щоб їх виправити, ви можете використовувати команду `fix`, фільтруючи погані блоки за допомогою опції -e, --filter-error: -

+

+
 snapraid -e fix
 
-

Під час наступного scrub помилки зникнуть зі звіту status, +

+

Під час наступного `scrub` помилки зникнуть зі звіту `status`, якщо вони справді виправлені. Щоб зробити це швидше, ви можете використовувати -p bad, щоб скрабувати лише блоки, позначені як погані. -

+

+
 snapraid -p bad scrub
 
-

Запуск scrub на несинхронізованому масиві може повідомити +

+

Запуск `scrub` на несинхронізованому масиві може повідомити про помилки, спричинені видаленими або зміненими файлами. -Ці помилки відображаються у виведенні scrub, але пов'язані +Ці помилки відображаються у виведенні `scrub`, але пов'язані блоки не позначаються як погані. -

-
-

+

4.2 Об'єднання (Pooling) -

+

Примітка: Функція об'єднання, описана нижче, була замінена -інструментом mergerfs, який тепер є рекомендованою опцією для +інструментом mergefs, який тепер є рекомендованою опцією для користувачів Linux у спільноті SnapRAID. Mergefs забезпечує більш гнучкий та ефективний спосіб об'єднання кількох дисків в єдину уніфіковану точку монтування, дозволяючи безперешкодний @@ -376,31 +336,40 @@ snapraid -p bad scrub парності і зазвичай використовується в налаштуваннях, таких як OpenMediaVault (OMV) або користувацьких конфігураціях NAS.

Щоб відобразити всі файли у вашому масиві в одному дереві -каталогів, ви можете ввімкнути функцію pooling (об'єднання). +каталогів, ви можете ввімкнути функцію `pooling` (об'єднання). Вона створює віртуальне представлення всіх файлів у вашому масиві лише для читання, використовуючи символічні посилання. -

Ви можете налаштувати каталог pooling у конфігураційному +

Ви можете налаштувати каталог `pooling` у конфігураційному файлі за допомогою: -

+

+
 pool /pool
 
+

або, якщо ви працюєте в Windows, за допомогою: -

+

+
 pool C:\pool
 
-

а потім запустити команду pool для створення або оновлення +

+

а потім запустити команду `pool` для створення або оновлення віртуального представлення. -

+

+
 snapraid pool
 
+

Якщо ви використовуєте платформу Unix і хочете надати спільний доступ до цього каталогу через мережу для машин Windows або Unix, ви повинні додати наступні опції до вашого /etc/samba/smb.conf: -

+

+
 # У глобальному розділі smb.conf
 unix extensions = no
 
+
+
 # У розділі спільного доступу smb.conf
 [pool]
@@ -411,70 +380,81 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

У Windows спільний доступ до символічних посилань через мережу вимагає від клієнтів віддаленого їх розпізнавання. Щоб увімкнути це, окрім спільного доступу до каталогу pool, ви також повинні надати спільний доступ до всіх дисків незалежно, використовуючи імена дисків, визначені у конфігураційному файлі, як точки спільного доступу. Ви також повинні вказати у -опції share конфігураційного файлу шлях Windows UNC, який +опції `share` конфігураційного файлу шлях Windows UNC, який потрібен віддаленим клієнтам для доступу до цих спільних дисків. -

Наприклад, працюючи з сервера з іменем darkstar, ви можете +

Наприклад, працюючи з сервера з іменем `darkstar`, ви можете використовувати опції: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

і надати спільний доступ до наступних каталогів через мережу: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

щоб дозволити віддаленим клієнтам отримати доступ до всіх файлів за адресою \\darkstar\pool.

Вам також може знадобитися налаштувати віддалені клієнти, щоб увімкнути доступ до віддалених символічних посилань за допомогою команди: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Відновлення видалених файлів (Undeleting) -

+

SnapRAID функціонує більше як програма резервного копіювання, ніж система RAID, і його можна використовувати для відновлення або повернення файлів до їх попереднього стану за допомогою опції -f, --filter: -

+

+
 snapraid fix -f FILE
 
+

або для каталогу: -

+

+
 snapraid fix -f DIR/
 
+

Ви також можете використовувати його для відновлення лише випадково видалених файлів усередині каталогу за допомогою опції -m, --filter-missing, яка відновлює лише відсутні файли, залишаючи всі інші недоторканими. -

+

+
 snapraid fix -m -f DIR/
 
+

Або для відновлення всіх видалених файлів на всіх дисках за допомогою: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Відновлення (Recovering) -

+

Сталося найгірше, і ви втратили один або кілька дисків!

НЕ ПАНІКУЙТЕ! Ви зможете їх відновити!

Перше, що ви повинні зробити, це уникнути подальших змін у @@ -483,42 +463,45 @@ snapraid fix -m включаючи будь-яку заплановану нічну синхронізацію або скрабування SnapRAID.

Потім виконайте наступні кроки. -

-

+

4.4.1 КРОК 1 -> Переналаштування -

+

Вам потрібен деякий простір для відновлення, в ідеалі на додаткових запасних дисках, але зовнішній USB-диск або віддалений диск підійде. -

Змініть конфігураційний файл SnapRAID, щоб опція data або -parity диска, що вийшов з ладу, вказувала на місце розташування +

Змініть конфігураційний файл SnapRAID, щоб опція `data` або +`parity` диска, що вийшов з ладу, вказувала на місце розташування з достатньою кількістю вільного місця для відновлення файлів. -

Наприклад, якщо диск d1 вийшов з ладу, змініть з: -

+

Наприклад, якщо диск `d1` вийшов з ладу, змініть з: +

+
 data d1 /mnt/disk1/
 
+

на: -

+

+
 data d1 /mnt/new_spare_disk/
 
+

Якщо диск, який потрібно відновити, є диском парності, оновіть -відповідну опцію parity. +відповідну опцію `parity`. Якщо у вас кілька дисків, що вийшли з ладу, оновіть усі їхні конфігураційні опції. -

-
-

+

4.4.2 КРОК 2 -> Виправлення (Fix) -

+

Запустіть команду fix, зберігаючи журнал у зовнішньому файлі за допомогою: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Де NAME — це ім'я диска, наприклад d1 у нашому попередньому +

+

Де NAME — це ім'я диска, наприклад `d1` у нашому попередньому прикладі. Якщо диск, який потрібно відновити, є диском парності, -використовуйте імена parity, 2-parity, тощо. +використовуйте імена `parity`, `2-parity`, тощо. Якщо у вас кілька дисків, що вийшли з ладу, використовуйте кілька опцій -d, щоб вказати їх усі.

Ця команда займе багато часу. @@ -527,285 +510,238 @@ snapraid -d NAME -l fix.log fix Запустіть її з диска з достатньою кількістю вільного місця.

Тепер ви відновили все, що можна відновити. Якщо деякі файли частково або повністю неможливо відновити, вони будуть перейменовані -з додаванням розширення .unrecoverable. +з додаванням розширення `.unrecoverable`.

Ви можете знайти детальний список усіх невідновлюваних блоків у файлі fix.log, перевіривши всі рядки, що починаються з -unrecoverable:. +`unrecoverable:`.

Якщо ви не задоволені відновленням, ви можете повторити його стільки разів, скільки забажаєте.

Наприклад, якщо ви видалили файли з масиву після останньої -sync, це може призвести до того, що деякі файли не будуть +`sync`, це може призвести до того, що деякі файли не будуть відновлені. -У цьому випадку ви можете повторити fix, використовуючи +У цьому випадку ви можете повторити `fix`, використовуючи опцію -i, --import, вказавши, де ці файли знаходяться зараз, щоб знову включити їх у процес відновлення.

Якщо ви задоволені відновленням, ви можете продовжити, але зауважте, що після синхронізації ви більше не зможете повторити -команду fix! -

-
-

+команду `fix`! +

4.4.3 КРОК 3 -> Перевірка (Check) -

+

Як обережну перевірку, ви можете тепер запустити команду -check, щоб переконатися, що на відновленому диску все +`check`, щоб переконатися, що на відновленому диску все правильно. -

+

+
 snapraid -d NAME -a check
 
-

Де NAME — це ім'я диска, наприклад d1 у нашому попередньому +

+

Де NAME — це ім'я диска, наприклад `d1` у нашому попередньому прикладі.

Опції -d та -a вказують SnapRAID перевіряти лише вказаний диск та ігнорувати всі дані парності.

Ця команда займе багато часу, але якщо ви не надто обережні, ви можете її пропустити. -

-
-

+

4.4.4 КРОК 4 -> Синхронізація (Sync) -

-

Запустіть команду sync, щоб повторно синхронізувати масив + +

Запустіть команду `sync`, щоб повторно синхронізувати масив з новим диском. -

+

+
 snapraid sync
 
+

Якщо все відновлено, ця команда виконується миттєво. -

-
-
-
-

+

5 Команди -

+

SnapRAID надає кілька простих команд, які дозволяють:

  • -Вивести статус масиву -> status +Вивести статус масиву -> `status`
  • -Керувати дисками -> smart, probe, up, down +Керувати дисками -> `smart`, `probe`, `up`, `down`
  • -Створити резервну копію/знімок -> sync +Створити резервну копію/знімок -> `sync`
  • -Періодично перевіряти дані -> scrub +Періодично перевіряти дані -> `scrub`
  • -Відновити останню резервну копію/знімок -> fix. +Відновити останню резервну копію/знімок -> `fix`.

Команди повинні бути написані малими літерами. -

-

+

5.1 status -

+

Виводить зведення стану дискового масиву.

Включає інформацію про фрагментацію парності, вік блоків без перевірки та всі записані приховані помилки, виявлені під час скрабування.

Представлена інформація стосується останнього часу, коли ви -запустили sync. Пізніші модифікації не враховуються. +запустили `sync`. Пізніші модифікації не враховуються.

Якщо виявлено погані блоки, перераховуються їхні номери блоків. -Щоб їх виправити, ви можете використовувати команду fix -e. +Щоб їх виправити, ви можете використовувати команду `fix -e`.

Також показує графік, що представляє останній час, коли кожен блок був скрабований або синхронізований. Скрабовані -блоки позначаються символом *, блоки, синхронізовані, -але ще не скрабовані, - o. +блоки позначаються символом '*', блоки, синхронізовані, +але ще не скрабовані, - 'o'.

Нічого не змінюється. -

-
-

+

5.2 smart -

+

Виводить звіт SMART усіх дисків у системі.

Включає оцінку ймовірності відмови протягом наступного року, дозволяючи вам планувати планову заміну дисків, які виявляють підозрілі атрибути.

Ця оцінка ймовірності отримана шляхом кореляції атрибутів SMART дисків з даними Backblaze, доступними за адресою: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
+

Якщо SMART повідомляє, що диск виходить з ладу, для цього -диска виводиться FAIL або PREFAIL, і SnapRAID повертає +диска виводиться `FAIL` або `PREFAIL`, і SnapRAID повертає помилку. У цьому випадку настійно рекомендується негайна заміна диска.

Інші можливі рядки стану: -

-
-
+

+ + + +
logfail -
+
У минулому деякі атрибути були нижчими за поріг. - - -
-
+
logerr -
+
Журнал помилок пристрою містить помилки. - - -
-
+
selferr -
+
Журнал самотестування пристрою містить помилки. - - - +

Якщо вказано опцію -v, --verbose, надається глибший статистичний аналіз. Цей аналіз може допомогти вам вирішити, чи потрібна вам більша або менша парність. -

Ця команда використовує інструмент smartctl і еквівалентна -запуску smartctl -a на всіх пристроях. +

Ця команда використовує інструмент `smartctl` і еквівалентна +запуску `smartctl -a` на всіх пристроях.

Якщо ваші пристрої не виявляються автоматично правильно, ви можете вказати користувацьку команду, використовуючи опцію -smartctl у конфігураційному файлі. +`smartctl` у конфігураційному файлі.

Нічого не змінюється. -

-
-

+

5.3 probe -

+

Виводить стан ЖИВЛЕННЯ всіх дисків у системі. -

Standby означає, що диск не обертається. Active означає, +

`Standby` означає, що диск не обертається. `Active` означає, що диск обертається. -

Ця команда використовує інструмент smartctl і еквівалентна -запуску smartctl -n standby -i на всіх пристроях. +

Ця команда використовує інструмент `smartctl` і еквівалентна +запуску `smartctl -n standby -i` на всіх пристроях.

Якщо ваші пристрої не виявляються автоматично правильно, ви можете вказати користувацьку команду, використовуючи опцію -smartctl у конфігураційному файлі. +`smartctl` у конфігураційному файлі.

Нічого не змінюється. -

-
-

+

5.4 up -

+

Розкручує всі диски масиву.

Ви можете розкрутити лише певні диски, використовуючи опцію -d, --filter-disk.

Одночасне розкручування всіх дисків вимагає багато енергії. Переконайтеся, що ваш блок живлення може це витримати.

Нічого не змінюється. -

-
-

+

5.5 down -

+

Зупиняє всі диски масиву. -

Ця команда використовує інструмент smartctl і еквівалентна -запуску smartctl -s standby,now на всіх пристроях. +

Ця команда використовує інструмент `smartctl` і еквівалентна +запуску `smartctl -s standby,now` на всіх пристроях.

Ви можете зупинити лише певні диски, використовуючи опцію -d, --filter-disk.

Для автоматичної зупинки при помилці ви можете використовувати опцію -s, --spin-down-on-error з будь-якою -іншою командою, що еквівалентно ручному запуску down +іншою командою, що еквівалентно ручному запуску `down` при виникненні помилки.

Нічого не змінюється. -

-
-

+

5.6 diff -

+

Виводить список усіх файлів, змінених з моменту останньої -sync, для яких необхідно перерахувати дані парності. +`sync`, для яких необхідно перерахувати дані парності.

Ця команда не перевіряє дані файлів, а лише часову мітку файлу, розмір та inode.

Після перерахування всіх змінених файлів представляється зведення змін, згруповане за: -

-
-
+

+ + + + + + + +
equal (рівні) -
+
Файли, незмінені з попереднього стану. - - -
-
+
added (додані) -
+
Файли, додані, яких не було раніше. - - -
-
+
removed (видалені) -
+
Файли, видалені. - - -
-
+
updated (оновлені) -
+
Файли з іншим розміром або часовою міткою, що означає, що вони були змінені. - - -
-
+
moved (переміщені) -
+
Файли, переміщені в інший каталог на тому ж диску. Вони ідентифікуються за тим же іменем, розміром, часовою міткою та inode, але іншим каталогом. - - -
-
-copied -
-файли, скопійовані на той самий або інший диск, де -оригінальний файл все ще існує. -Вони ідентифікуються за однаковою назвою, розміром та міткою -часу. -Якщо мітка часу з точністю до часток секунди дорівнює нулю, для -ідентифікації має збігатися повний шлях, а не лише назва. -
-
-
-
-relocated -
-файли, переміщені на той самий або інший диск, де -оригінал зник. -Вони ідентифікуються за однаковою назвою, розміром та міткою -часу. -Якщо мітка часу з точністю до часток секунди дорівнює нулю, для -ідентифікації має збігатися повний шлях. -На відміну від файлів 'moved' на тому ж диску, переміщені файли -мають інший inode. -
-
-
-
-restored -
-файли з іншим inode, але зі збігом каталогу, назви, -розміру та мітки часу. -Зазвичай це файли, відновлені після видалення. -
-
- -

Якщо потрібна sync, код повернення процесу дорівнює 2, +

+copied (скопійовані) + +Файли, скопійовані на тому ж +або іншому диску. Зауважте, що якщо вони справді +переміщені на інший диск, вони також будуть враховані +як `removed`. +Вони ідентифікуються за тим же іменем, розміром +та часовою міткою. Якщо часова мітка з точністю +до долі секунди дорівнює нулю, повний шлях повинен +збігатися, а не лише ім'я. +
+restored (відновлені) + +Файли з іншим inode, але +збігаються ім'я, розмір та часова мітка. Це +зазвичай файли, відновлені після видалення. +
+

Якщо потрібна `sync`, код повернення процесу дорівнює 2, замість стандартного 0. Код повернення 1 використовується для загальної умови помилки.

Нічого не змінюється. -

-
-

+

5.7 sync -

+

Оновлює інформацію парності. Всі змінені файли у дисковому масиві зчитуються, і відповідні дані парності оновлюються.

Ви можете зупинити цей процес у будь-який час, натиснувши Ctrl+C, не втрачаючи вже виконану роботу. -Під час наступного запуску процес sync відновить роботу +Під час наступного запуску процес `sync` відновить роботу з місця, де був перерваний.

Якщо під час процесу виявлено приховані помилки або помилки введення/виведення, відповідні блоки позначаються як погані. @@ -817,13 +753,11 @@ Ctrl+C, не втрачаючи вже виконану роботу. зберігаючи той самий inode, парність не перераховується. Якщо файл переміщено на інший диск, парність перераховується, але раніше обчислена інформація хешу зберігається. -

Файли content та parity змінюються за потреби. +

Файли `content` та `parity` змінюються за потреби. Файли в масиві НЕ змінюються. -

-
-

+

5.8 scrub -

+

Скрабує масив, перевіряючи на наявність прихованих помилок або помилок введення/виведення на дисках даних та парності.

Кожен виклик перевіряє приблизно 8% масиву, виключаючи @@ -834,74 +768,70 @@ scrub за допомогою опції -p, --plan, яка приймає: bad - Скрабувати блоки, позначені як погані. new - Скрабувати щойно синхронізовані блоки, які ще не були -

скрабовані. -

-
-
+

+

скрабовані. +

+ + + +
full -
+
Скрабувати все. - - -
-
+
0-100 -
+
Скрабувати вказаний відсоток блоків. - - - +

Якщо ви вказуєте відсоткове значення, ви також можете використовувати опцію -o, --older-than, щоб визначити, яким має бути вік блоку. Найстаріші блоки скрабуються першими, забезпечуючи оптимальну перевірку. Якщо ви хочете скрабувати лише щойно синхронізовані блоки, -які ще не були скрабовані, використовуйте опцію -p new. +які ще не були скрабовані, використовуйте опцію `-p new`.

Щоб отримати деталі статусу скрабування, використовуйте команду -status. +`status`.

Для будь-якої знайденої прихованої помилки або помилки введення/виведення відповідні блоки позначаються як погані -у файлі content. -Ці погані блоки перераховуються у status і можуть бути -виправлені за допомогою fix -e. +у файлі `content`. +Ці погані блоки перераховуються у `status` і можуть бути +виправлені за допомогою `fix -e`. Після виправлення, під час наступного скрабування, вони будуть повторно перевірені, і якщо виявиться, що вони виправлені, позначка "поганий" буде видалена. Щоб скрабувати лише погані блоки, ви можете використовувати -команду scrub -p bad. -

Рекомендується запускати scrub лише на синхронізованому +команду `scrub -p bad`. +

Рекомендується запускати `scrub` лише на синхронізованому масиві, щоб уникнути повідомлень про помилки, спричинені несинхронізованими даними. Ці помилки розпізнаються як не приховані помилки, і блоки не позначаються як погані, але такі помилки повідомляються у виведенні команди. -

Файл content змінюється для оновлення часу останньої перевірки +

Файл `content` змінюється для оновлення часу останньої перевірки для кожного блоку та для позначення поганих блоків. -Файли parity НЕ змінюються. +Файли `parity` НЕ змінюються. Файли в масиві НЕ змінюються. -

-
-

+

5.9 fix -

+

Виправляє всі файли та дані парності.

Усі файли та дані парності порівнюються зі станом знімка, -збереженим під час останньої sync. +збереженим під час останньої `sync`. Якщо знайдено різницю, вона повертається до збереженого знімка. -

УВАГА! Команда fix не розрізняє помилки та навмисні +

УВАГА! Команда `fix` не розрізняє помилки та навмисні модифікації. Вона безумовно повертає стан файлу до останньої -sync. +`sync`.

Якщо не вказано жодної іншої опції, обробляється весь масив. Використовуйте опції фільтра, щоб вибрати підмножину файлів або дисків для роботи. -

Щоб виправити лише блоки, позначені як погані під час sync -та scrub, використовуйте опцію -e, --filter-error. +

Щоб виправити лише блоки, позначені як погані під час `sync` +та `scrub`, використовуйте опцію -e, --filter-error. На відміну від інших опцій фільтра, ця застосовує виправлення -лише до файлів, які не змінилися з моменту останньої sync. +лише до файлів, які не змінилися з моменту останньої `sync`.

SnapRAID перейменовує всі файли, які не можуть бути виправлені, -додаючи розширення .unrecoverable. +додаючи розширення `.unrecoverable`.

Перед виправленням сканується весь масив, щоб знайти будь-які -файли, переміщені з моменту останньої sync. +файли, переміщені з моменту останньої `sync`. Ці файли ідентифікуються за їхньою часовою міткою, ігноруючи їхнє ім'я та каталог, і використовуються в процесі відновлення, якщо це необхідно. @@ -909,52 +839,44 @@ fix використовувати опцію -i, --import, щоб вказати додаткові каталоги для сканування.

Файли ідентифікуються лише за шляхом, а не за inode. -

Файл content НЕ змінюється. -Файли parity змінюються за потреби. +

Файл `content` НЕ змінюється. +Файли `parity` змінюються за потреби. Файли в масиві змінюються за потреби. -

-
-

+

5.10 check -

+

Перевіряє всі файли та дані парності. -

Працює як fix, але лише імітує відновлення, і жодні зміни +

Працює як `fix`, але лише імітує відновлення, і жодні зміни не записуються в масив.

Ця команда в першу чергу призначена для ручної перевірки, наприклад, після процесу відновлення або в інших особливих умовах. Для періодичних та запланованих перевірок використовуйте -scrub. +`scrub`.

Якщо ви використовуєте опцію -a, --audit-only, перевіряється лише хеш файлів, а дані парності ігноруються для швидшого запуску.

Файли ідентифікуються лише за шляхом, а не за inode.

Нічого не змінюється. -

-
-

+

5.11 list -

+

Виводить список усіх файлів, що містяться в масиві на момент -останньої sync. +останньої `sync`.

З -v або --verbose також показується час з точністю до долі секунди.

Нічого не змінюється. -

-
-

+

5.12 dup -

+

Виводить список усіх дублікатів файлів. Два файли вважаються рівними, якщо їхні хеші збігаються. Дані файлів не зчитуються; використовуються лише попередньо обчислені хеші.

Нічого не змінюється. -

-
-

+

5.13 pool -

+

Створює або оновлює віртуальне представлення всіх файлів -у вашому дисковому масиві в каталозі pooling. +у вашому дисковому масиві в каталозі `pooling`.

Файли не копіюються, а пов'язуються за допомогою символічних посилань.

Під час оновлення всі існуючі символічні посилання та порожні @@ -962,11 +884,9 @@ pool представленням масиву. Будь-які інші звичайні файли залишаються на місці.

Нічого не змінюється за межами каталогу pool. -

-
-

+

5.14 devices -

+

Виводить низькорівневі пристрої, які використовуються масивом.

Ця команда відображає асоціації пристроїв у масиві і в основному призначена як інтерфейс для сценаріїв. @@ -980,11 +900,9 @@ devices у вас може бути кілька низькорівневих пристроїв, які використовуються одним диском у масиві.

Нічого не змінюється. -

-
-

+

5.15 touch -

+

Встановлює довільну часову мітку з точністю до долі секунди для всіх файлів, у яких вона встановлена на нуль.

Це покращує здатність SnapRAID розпізнавати переміщені та @@ -998,11 +916,9 @@ touch часова мітка збігаються.

Часова мітка з точністю до секунди не змінюється, тому всі дати та час ваших файлів будуть збережені. -

-
-

+

5.16 rehash -

+

Планує повторне хешування всього масиву.

Ця команда змінює тип хешу, що використовується, як правило, при оновленні з 32-розрядної системи на 64-розрядну, щоб @@ -1010,166 +926,132 @@ rehash

Якщо ви вже використовуєте оптимальний хеш, ця команда нічого не робить і повідомляє, що жодних дій не потрібно.

Повторне хешування не виконується негайно, а відбувається -поступово під час sync та scrub. +поступово під час `sync` та `scrub`.

Ви можете перевірити стан повторного хешування за допомогою -status. +`status`.

Під час повторного хешування SnapRAID зберігає повну -функціональність, за єдиним винятком, що dup не може +функціональність, за єдиним винятком, що `dup` не може виявити дублікати файлів, використовуючи інший хеш. -

-
-

-locate -

-

Знаходить файли, що зберігаються на дисках парності. Для кожного знайденого -файлу виводиться його розташування всередині файлу парності та кількість -фрагментів, які він займає. -

Ви можете використовувати параметр -t, --tail, щоб обмежити операцію файлами, -що займають зазначену кінцеву частину (хвіст) парності. -

Якщо ви хочете перерозподілити ці файли, ви можете скористатися параметром --W, --force-realloc-tail. -Майте на увазі, що такі файли не будуть захищені парністю під час процесу -перерозподілу. -

-
-
-

+

6 Опції -

+

SnapRAID надає наступні опції: -

-
-
+

+ +
-c, --conf CONFIG -
+
Вибирає конфігураційний файл для використання. Якщо не -вказано, в Unix використовується файл /usr/local/etc/snapraid.conf, -якщо він існує, інакше /etc/snapraid.conf. -У Windows використовується файл snapraid.conf у тому -самому каталозі, що й snapraid.exe. - - - -
-
-
+вказано, в Unix використовується файл `/usr/local/etc/snapraid.conf`, +якщо він існує, інакше `/etc/snapraid.conf`. +У Windows використовується файл `snapraid.conf` у тому +самому каталозі, що й `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Фільтрує файли для обробки у check та fix. +
+Фільтрує файли для обробки у `check` та `fix`. Обробляються лише файли, що відповідають вказаному шаблону. Цю опцію можна використовувати кілька разів. Дивіться розділ PATTERN для отримання додаткової інформації про специфікації шаблонів. В Unix переконайтеся, що символи глоббінгу взяті в лапки, якщо вони використовуються. -Цю опцію можна використовувати лише з check та fix. -Її не можна використовувати з sync та scrub, оскільки +Цю опцію можна використовувати лише з `check` та `fix`. +Її не можна використовувати з `sync` та `scrub`, оскільки вони завжди обробляють весь масив. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Фільтрує диски для обробки у check, fix, up та down. +
+Фільтрує диски для обробки у `check`, `fix`, `up` та `down`. Ви повинні вказати ім'я диска, як визначено у конфігураційному файлі. Ви також можете вказати диски парності з іменами: -parity, 2-parity, 3-parity, тощо, щоб обмежити +`parity`, `2-parity`, `3-parity`, тощо, щоб обмежити операції певним диском парності. Якщо ви поєднуєте кілька опцій --filter, --filter-disk та --filter-missing, вибираються лише файли, що відповідають усім фільтрам. Цю опцію можна використовувати кілька разів. -Цю опцію можна використовувати лише з check, fix, -up та down. -Її не можна використовувати з sync та scrub, оскільки +Цю опцію можна використовувати лише з `check`, `fix`, +`up` та `down`. +Її не можна використовувати з `sync` та `scrub`, оскільки вони завжди обробляють весь масив. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Фільтрує файли для обробки у check та fix. +
+Фільтрує файли для обробки у `check` та `fix`. Обробляються лише файли, що відсутні або видалені з -масиву. При використанні з fix це діє як команда -undelete (відновлення видалених файлів). +масиву. При використанні з `fix` це діє як команда +`undelete` (відновлення видалених файлів). Якщо ви поєднуєте кілька опцій --filter, --filter-disk та --filter-missing, вибираються лише файли, що відповідають усім фільтрам. -Цю опцію можна використовувати лише з check та fix. -Її не можна використовувати з sync та scrub, оскільки +Цю опцію можна використовувати лише з `check` та `fix`. +Її не можна використовувати з `sync` та `scrub`, оскільки вони завжди обробляють весь масив. - - - -
-
-
+
+ + +
-e, --filter-error -
-Обробляє файли з помилками у check та fix. +
+Обробляє файли з помилками у `check` та `fix`. Обробляє лише файли, які мають блоки, позначені прихованими помилками або помилками введення/виведення -під час sync та scrub, як зазначено у status. -Цю опцію можна використовувати лише з check та fix. - - - -
-
-
+під час `sync` та `scrub`, як зазначено у `status`. +Цю опцію можна використовувати лише з `check` та `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Вибирає план скрабування. Якщо PERC є числовим значенням від 0 до 100, воно інтерпретується як відсоток блоків для скрабування. -Замість відсотка ви можете вказати план: bad -скрабує погані блоки, new скрабує блоки, які ще не -були скрабовані, і full скрабує все. -Цю опцію можна використовувати лише з scrub. - - - -
-
-
+Замість відсотка ви можете вказати план: `bad` +скрабує погані блоки, `new` скрабує блоки, які ще не +були скрабовані, і `full` скрабує все. +Цю опцію можна використовувати лише з `scrub`. +
+ + +
-o, --older-than DAYS -
-Вибирає найстарішу частину масиву для обробки у scrub. +
+Вибирає найстарішу частину масиву для обробки у `scrub`. DAYS — це мінімальний вік у днях для блоку, який повинен бути скрабований; за замовчуванням 10. Блоки, позначені як погані, завжди скрабуються незалежно від цієї опції. -Цю опцію можна використовувати лише з scrub. - - - -
-
-
+Цю опцію можна використовувати лише з `scrub`. +
+ + +
-a, --audit-only -
-У check перевіряє хеш файлів без перевірки даних +
+У `check` перевіряє хеш файлів без перевірки даних парності. Якщо вас цікавить лише перевірка даних файлів, ця опція може значно прискорити процес перевірки. -Цю опцію можна використовувати лише з check. - - - -
-
-
+Цю опцію можна використовувати лише з `check`. +
+ + +
-h, --pre-hash -
-У sync запускає попередню фазу хешування всіх нових +
+У `sync` запускає попередню фазу хешування всіх нових даних для додаткової перевірки перед обчисленням -парності. Зазвичай у sync не виконується попереднє +парності. Зазвичай у `sync` не виконується попереднє хешування, а нові дані хешуються безпосередньо перед обчисленням парності, коли вони зчитуються вперше. Цей процес відбувається, коли система знаходиться під @@ -1179,37 +1061,33 @@ DAYS — це мінімальний вік у днях для блоку, як можуть залишитися невиявленими, оскільки дані ще не були хешовані. Щоб уникнути цього ризику, ви можете ввімкнути режим -pre-hash, щоб усі дані були зчитані двічі для +`pre-hash`, щоб усі дані були зчитані двічі для забезпечення їх цілісності. Ця опція також перевіряє файли, переміщені в межах масиву, щоб переконатися, що операція переміщення була успішною, і, якщо необхідно, дозволяє запустити операцію виправлення перед продовженням. -Цю опцію можна використовувати лише з sync. - - - -
-
-
+Цю опцію можна використовувати лише з `sync`. +
+ + +
-i, --import DIR -
+
Імпортує з вказаного каталогу будь-які файли, видалені -з масиву після останньої sync. +з масиву після останньої `sync`. Якщо у вас все ще є такі файли, вони можуть бути -використані check та fix для покращення процесу +використані `check` та `fix` для покращення процесу відновлення. Файли зчитуються, включаючи підкаталоги, та ідентифікуються незалежно від їхнього імені. -Цю опцію можна використовувати лише з check та fix. - - - -
-
-
+Цю опцію можна використовувати лише з `check` та `fix`. +
+ + +
-s, --spin-down-on-error -
+
При будь-якій помилці зупиняє всі керовані диски перед завершенням з ненульовим кодом стану. Це запобігає тому, щоб диски залишалися активними та оберталися @@ -1218,38 +1096,22 @@ DAYS — це мінімальний вік у днях для блоку, як Використовуйте цю опцію, щоб забезпечити безпечну зупинку дисків, навіть коли команда завершується помилкою. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Застосовує глобальне обмеження пропускної здатності для всіх дисків. RATE — це кількість байтів на секунду. Ви можете вказати множник, такий як K, M або G (наприклад, --bw-limit 1G). - - - -
-
-
--t, --tail РОЗМІР -
-Обмежує список файлів тими, що використовують не більше зазначеного -розміру хвоста дисків парності. -Можна використовувати множники, такі як K, M, G або T (наприклад, --tail 1G). -Цей параметр дійсний лише при використанні разом із командою locate. -
-
-
-
-
-
+
+ + +
-A, --stats -
+
Вмикає розширений перегляд стану, який показує додаткову інформацію. На екрані відображаються два графіки: @@ -1271,14 +1133,12 @@ DAYS — це мінімальний вік у днях для блоку, як диска. Тому, доки є вимірюваний час очікування принаймні для одного диска, це вказує на те, що ЦП достатньо швидкий, щоб справлятися з робочим навантаженням. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Форсує небезпечну операцію синхронізації файлу з нульовим розміром, який раніше був ненульовим. Якщо SnapRAID виявляє таку умову, він припиняє @@ -1287,15 +1147,13 @@ DAYS — це мінімальний вік у днях для блоку, як деякі доступні файли були обрізані. Це можлива умова в Linux з файловими системами ext3/ext4. -Цю опцію можна використовувати лише з sync. - - - -
-
-
+Цю опцію можна використовувати лише з `sync`. +
+ + +
-E, --force-empty -
+
Форсує небезпечну операцію синхронізації диска, на якому відсутні всі оригінальні файли. Якщо SnapRAID виявляє, що всі файли, які спочатку @@ -1303,15 +1161,13 @@ ext3/ext4. припиняє продовження, якщо ви не вкажете цю опцію. Це дозволяє легко виявити, коли файлова система даних не змонтована. -Цю опцію можна використовувати лише з sync. - - - -
-
-
+Цю опцію можна використовувати лише з `sync`. +
+ + +
-U, --force-uuid -
+
Форсує небезпечну операцію синхронізації, перевірки та виправлення з дисками, які змінили свій UUID. Якщо SnapRAID виявляє, що деякі диски змінили UUID, @@ -1321,16 +1177,14 @@ ext3/ext4. Однак, дозволено мати одну зміну UUID з однією парністю і більше з множинною парністю, оскільки це нормальний випадок при заміні дисків після відновлення. -Цю опцію можна використовувати лише з sync, check -або fix. - - - -
-
-
+Цю опцію можна використовувати лише з `sync`, `check` +або `fix`. +
+ + +
-D, --force-device -
+
Форсує небезпечну операцію виправлення з недоступними дисками або з дисками на тому ж фізичному пристрої. Наприклад, якщо ви втратили два диски даних і маєте @@ -1339,16 +1193,14 @@ ext3/ext4. Або, якщо ви хочете відновити диск у вільному місці, залишеному на вже використовуваному диску, що використовує той самий фізичний пристрій. -Цю опцію можна використовувати лише з fix. - - - -
-
-
+Цю опцію можна використовувати лише з `fix`. +
+ + +
-N, --force-nocopy -
-У sync, check та fix вимикає евристику +
+У `sync`, `check` та `fix` вимикає евристику виявлення копій. Без цієї опції SnapRAID припускає, що файли з однаковими атрибутами, такими як ім'я, розмір та часова мітка, є копіями з тими ж даними. @@ -1361,17 +1213,15 @@ ext3/ext4. призвести до хибних спрацьовувань або повільного процесу через багато перевірок хешу, і ця опція дозволяє вирішити такі проблеми. -Цю опцію можна використовувати лише з sync, check -та fix. - - - -
-
-
+Цю опцію можна використовувати лише з `sync`, `check` +та `fix`. +
+ + +
-F, --force-full -
-У sync форсує повне переобчислення парності. +
+У `sync` форсує повне переобчислення парності. Цю опцію можна використовувати, коли ви додаєте новий рівень парності або якщо ви повернулися до старого файлу вмісту, використовуючи більш @@ -1379,129 +1229,91 @@ ext3/ext4. Замість створення парності з нуля, це дозволяє повторно використовувати хеші, присутні у файлі вмісту, для перевірки даних та підтримки захисту -даних під час процесу sync, використовуючи +даних під час процесу `sync`, використовуючи існуючі дані парності. -Цю опцію можна використовувати лише з sync. - - - -
-
-
+Цю опцію можна використовувати лише з `sync`. +
+ + +
-R, --force-realloc -
-У sync форсує повне перерозподілення файлів +
+У `sync` форсує повне перерозподілення файлів та перебудову парності. Цю опцію можна використовувати для повного перерозподілу всіх файлів, усуваючи фрагментацію, повторно використовуючи хеші, присутні у файлі вмісту, для перевірки даних. -Цю опцію можна використовувати лише з sync. +Цю опцію можна використовувати лише з `sync`. УВАГА! Ця опція лише для експертів, і настійно не рекомендується її використовувати. -Ви НЕ маєте захисту даних під час операції sync. - - - -
-
-
--W, --force-realloc-tail РОЗМІР -
-Працює як -R, --force-realloc, але обмежується вказаною кінцевою -частиною (останні РОЗМІР байт) кожного файлу парності. -Примусово перерозподіляє (переміщує) будь-які фрагменти/блоки файлів, -що наразі зберігаються в цій кінцевій секції, дозволяючи розмістити -їх будь-де у файлі(ах) парності, де є вільне місце (включно з -наявними пустотами). -Основна мета цього параметра — зменшити розмір файлу парності на диску. -Якщо перерозподіл успішно очистить всю кінцеву секцію (у ній не -залишиться блоків), файл парності буде обрізаний, вивільняючи -невикористаний простір хвоста. -Можна використовувати множники, такі як K, M, G або T (наприклад, ---force-realloc-tail 1G). -Ви можете використовувати locate -t, --tail, щоб заздалегідь дізнатися -про зачеплені файли. -УВАГА! -Цей параметр призначений лише для експертів, і його настійно -не рекомендується використовувати. -Під час операції sync захист даних для зачеплених файлів ВІДСУТНІЙ. -
-
-
-
-
-
+Ви НЕ маєте захисту даних під час операції `sync`. +
+ + +
-l, --log FILE -
+
Записує детальний журнал у вказаний файл. Якщо ця опція не вказана, несподівані помилки виводяться на екран, що потенційно призводить до надмірного виведення у випадку багатьох помилок. Коли вказано -l, --log, на екран виводяться лише фатальні помилки, які спричиняють зупинку SnapRAID. -Якщо шлях починається з >>, файл відкривається -у режимі доповнення. Входження %D та %T в +Якщо шлях починається з '>>', файл відкривається +у режимі доповнення. Входження '%D' та '%T' в імені замінюються датою та часом у форматі YYYYMMDD та HHMMSS. У пакетних файлах Windows ви повинні -подвоїти символ %, наприклад, result-%%D.log. -Щоб використовувати >>, ви повинні взяти ім'я -в лапки, наприклад, ">>result.log". +подвоїти символ '%', наприклад, result-%%D.log. +Щоб використовувати '>>', ви повинні взяти ім'я +в лапки, наприклад, `">>result.log"`. Щоб вивести журнал на стандартний вивід або стандартну помилку, ви можете використовувати -">&1" та ">&2" відповідно. +`">&1"` та `">&2"` відповідно. Дивіться файл snapraid_log.txt або man-сторінку для описів тегів журналу. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Встановлює новий ліміт помилок перед зупинкою виконання. За замовчуванням SnapRAID зупиняється, якщо зустрічає більше 100 помилок введення/виведення, що вказує на ймовірну відмову диска. -Ця опція впливає на sync та scrub, яким +Ця опція впливає на `sync` та `scrub`, яким дозволено продовжувати після першого набору помилок диска, щоб спробувати завершити -свої операції. Однак check та fix завжди +свої операції. Однак `check` та `fix` завжди зупиняються при першій помилці. - - - -
-
-
+
+ + +
-S, --start BLKSTART -
+
Починає обробку з вказаного номера блоку. Це може бути корисно для повторної спроби перевірки або виправлення певних блоків у випадку пошкодженого диска. Ця опція в основному для розширеного ручного відновлення. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Обробляє лише вказану кількість блоків. Ця опція в основному для розширеного ручного відновлення. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Генерує фіктивний конфігураційний файл з існуючого файлу вмісту. Конфігураційний файл записується на стандартний @@ -1509,70 +1321,58 @@ ext3/ext4. Цей конфігураційний файл також містить інформацію, необхідну для реконструкції точок монтування диска у випадку втрати всієї системи. - - - -
-
-
+
+ + +
-v, --verbose -
+
Виводить більше інформації на екран. Якщо вказано один раз, виводить виключені файли та додаткову статистику. Ця опція не впливає на файли журналу. - - - -
-
-
+
+ + +
-q, --quiet -
+
Виводить менше інформації на екран. Якщо вказано один раз, видаляє індикатор прогресу; двічі — поточні операції; тричі — інформаційні повідомлення; чотири рази — повідомлення про статус. Фатальні помилки завжди виводяться на екран. Ця опція не впливає на файли журналу. - - - -
-
-
+
+ + +
-H, --help -
+
Виводить короткий довідковий екран. - - - -
-
-
+
+ + +
-V, --version -
+
Виводить версію програми. - - - - -
-

+

+

7 Конфігурація -

+

SnapRAID вимагає конфігураційний файл, щоб знати, де розташований ваш дисковий масив і де зберігати інформацію парності. -

В Unix використовується файл /usr/local/etc/snapraid.conf, -якщо він існує, інакше /etc/snapraid.conf. -У Windows використовується файл snapraid.conf у тому -самому каталозі, що й snapraid.exe. +

В Unix використовується файл `/usr/local/etc/snapraid.conf`, +якщо він існує, інакше `/etc/snapraid.conf`. +У Windows використовується файл `snapraid.conf` у тому +самому каталозі, що й `snapraid.exe`.

Він повинен містити наступні опції (чутливі до регістру): -

-

+

7.1 parity FILE [,FILE] ... -

+

Визначає файли, які потрібно використовувати для зберігання інформації парності. Парність забезпечує захист від відмови одного диска, подібно до RAID5. @@ -1589,11 +1389,9 @@ parity FILE [,FILE] ...

У Windows 256 МБ залишається невикористаними на кожному диску, щоб уникнути попередження про повні диски.

Ця опція є обов'язковою і може бути використана лише один раз. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Визначає файли, які потрібно використовувати для зберігання додаткової інформації парності.

Для кожного вказаного рівня парності вмикається один @@ -1617,52 +1415,46 @@ parity FILE [,FILE] ...

Кожен рівень парності вимагає наявності всіх попередніх рівнів парності. -

Застосовуються ті самі міркування, що й для опції parity. +

Застосовуються ті самі міркування, що й для опції 'parity'.

Ці опції є необов'язковими і можуть бути використані лише один раз. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Визначає альтернативний файл та формат для зберігання потрійної парності. -

Ця опція є альтернативою 3-parity, в першу чергу +

Ця опція є альтернативою '3-parity', в першу чергу призначена для ЦП низького класу, таких як ARM або AMD Phenom, Athlon та Opteron, які не підтримують набір інструкцій SSSE3. У таких випадках вона забезпечує кращу продуктивність.

Цей формат схожий, але швидший, ніж той, що використовується ZFS RAIDZ3. Як і ZFS, він не працює далі потрійної парності. -

При використанні 3-parity ви будете попереджені, -якщо рекомендується використовувати формат z-parity +

При використанні '3-parity' ви будете попереджені, +якщо рекомендується використовувати формат 'z-parity' для покращення продуктивності.

Можна конвертувати з одного формату в інший, налаштувавши конфігураційний файл з бажаним файлом z-parity або -3-parity та використовуючи fix для його відтворення. -

-
-

+3-parity та використовуючи 'fix' для його відтворення. +

7.4 content FILE -

+

Визначає файл, який потрібно використовувати для зберігання списку та контрольних сум усіх файлів, присутніх у вашому дисковому масиві.

Він може бути розміщений на диску, що використовується для даних, парності або будь-якому іншому доступному диску. Якщо ви використовуєте диск даних, цей файл автоматично -виключається з процесу sync. +виключається з процесу `sync`.

Ця опція є обов'язковою і може бути використана кілька разів для збереження кількох копій одного і того ж файлу.

Ви повинні зберігати принаймні одну копію для кожного використаного диска парності плюс одну. Використання додаткових копій не зашкодить. -

-
-

+

7.5 data NAME DIR -

+

Визначає ім'я та точку монтування дисків даних у масиві. NAME використовується для ідентифікації диска і має бути унікальним. DIR — це точка монтування @@ -1673,51 +1465,33 @@ data NAME DIR диска даних у масиві.

Ви можете перейменувати диск пізніше, змінивши NAME безпосередньо у конфігураційному файлі, а потім -запустивши команду sync. У випадку перейменування +запустивши команду 'sync'. У випадку перейменування асоціація здійснюється за допомогою збереженого UUID дисків. -

-
-

-extra NAME DIR -

-

Визначає назву та точку монтування додаткових дисків для -моніторингу за допомогою команд smart та probe. -

Це корисно для моніторингу дисків, які не є частиною масиву, але -необхідні для функціонування системи, наприклад, завантажувального -диска. -

Зверніть увагу, що на такі диски не впливають команди up та down, -оскільки очікується, що вони завжди обертаються. -

-
-

+

7.6 nohidden -

+

Виключає всі приховані файли та каталоги. -В Unix приховані файли — це ті, що починаються з .. +В Unix приховані файли — це ті, що починаються з `.`. У Windows це ті, що мають прихований атрибут. -

-
-

+

7.7 exclude/include PATTERN -

+

Визначає шаблони файлів або каталогів для виключення або включення у процес синхронізації. Усі шаблони обробляються у вказаному порядку. -

Якщо перший шаблон, який збігається, є exclude (виключити), -файл виключається. Якщо він є include (включити), +

Якщо перший шаблон, який збігається, є `exclude` (виключити), +файл виключається. Якщо він є `include` (включити), файл включається. Якщо жоден шаблон не збігається, файл виключається, -якщо останній вказаний шаблон є include, або -включається, якщо останній вказаний шаблон є exclude. +якщо останній вказаний шаблон є `include`, або +включається, якщо останній вказаний шаблон є `exclude`.

Дивіться розділ PATTERN для отримання додаткової інформації про специфікації шаблонів.

Цю опцію можна використовувати кілька разів. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Визначає основний розмір блоку в кібібайтах для парності. Один кібібайт дорівнює 1024 байтам.

Розмір блоку за замовчуванням становить 256, що має @@ -1744,7 +1518,7 @@ blocksize SIZE_IN_KIBIBYTES ви витратите 12,8 ГБ парності, що може призвести до того, що на диску даних буде на 12,8 ГБ менше місця.

Ви можете перевірити кількість витраченого місця на -кожному диску за допомогою status. Це кількість +кожному диску за допомогою `status`. Це кількість місця, яку ви повинні залишити вільною на дисках даних або використовувати для файлів, не включених у масив. Якщо це значення від'ємне, це означає, що ви @@ -1759,18 +1533,18 @@ blocksize SIZE_IN_KIBIBYTES

Хитрість, щоб отримати більший розділ парності в Linux, полягає в тому, щоб відформатувати його командою: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

Це призводить до приблизно 1,5% додаткового місця, приблизно 60 ГБ для диска 4 ТБ, що дозволяє приблизно 460 000 файлів на кожному диску даних без будь-якого витраченого місця. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Визначає розмір хешу в байтах для збережених блоків.

Розмір хешу за замовчуванням становить 16 байтів (128 біт), що має працювати для більшості випадків. @@ -1804,21 +1578,17 @@ RAM = $(8 \times 4 \times 10^{12}) \times (1+16) / (512 \times 2^{10}) = 0.96$

 RAM = $(8 \times 4 \times 10^{12}) \times (1+8) / (512 \times 2^{10}) = 0.51$ ГіБ
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Автоматично зберігає стан під час синхронізації або скрабування після обробки вказаної кількості ГБ. Ця опція корисна, щоб уникнути перезапуску довгих -команд sync з нуля, якщо вони були перервані +команд `sync` з нуля, якщо вони були перервані збоєм машини або будь-якою іншою подією. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Встановлює максимальну дозволену температуру диска в Цельсіях. Якщо вказано, SnapRAID періодично перевіряє температуру всіх дисків за допомогою інструменту @@ -1826,7 +1596,7 @@ smartctl. Поточні температури дисків відобража під час роботи SnapRAID. Якщо будь-який диск перевищує цей ліміт, усі операції зупиняються, і диски зупиняються (переходять у режим очікування) на час, -визначений опцією temp_sleep. Після періоду +визначений опцією `temp_sleep`. Після періоду очікування операції відновлюються, потенційно знову призупиняючись, якщо ліміт температури знову досягнутий. @@ -1855,29 +1625,23 @@ smartctl. Поточні температури дисків відобража

Зазвичай SnapRAID показує лише температуру найгарячішого диска. Щоб відобразити температуру всіх дисків, використовуйте опцію -A або --stats. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Встановлює час очікування, у хвилинах, коли досягнуто ліміту температури. Протягом цього періоду диски залишаються зупиненими. За замовчуванням 5 хвилин. -

-
-

+

7.13 pool DIR -

+

Визначає каталог об'єднання, де створюється віртуальне представлення дискового масиву за -допомогою команди pool. +допомогою команди `pool`.

Каталог повинен вже існувати. -

-
-

+

7.14 share UNC_DIR -

+

Визначає шлях Windows UNC, необхідний для віддаленого доступу до дисків.

Якщо ця опція вказана, символічні посилання, @@ -1889,14 +1653,12 @@ share UNC_DIR через мережу.

Символічні посилання формуються за допомогою вказаного шляху UNC, додаючи ім'я диска, як -зазначено в опції data, і, нарешті, +зазначено в опції `data`, і, нарешті, додаючи каталог та ім'я файлу.

Ця опція потрібна лише для Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Визначає користувацькі опції smartctl для отримання атрибутів SMART для кожного диска. Це може знадобитися для RAID-контролерів та @@ -1905,55 +1667,60 @@ smartctl DISK/PARITY OPTIONS... замінюється іменем пристрою, але він необов'язковий для фіксованих пристроїв, таких як RAID-контролери. -

DISK — це те саме ім'я диска, вказане в опції data. -PARITY — це одне з імен парності: parity, -2-parity, 3-parity, 4-parity, 5-parity, -6-parity або z-parity. -

У вказаних OPTIONS рядок %s замінюється +

DISK — це те саме ім'я диска, вказане в опції `data`. +PARITY — це одне з імен парності: `parity`, +`2-parity`, `3-parity`, `4-parity`, `5-parity`, +`6-parity` або `z-parity`. +

У вказаних OPTIONS рядок `%s` замінюється іменем пристрою. Для RAID-контролерів пристрій ймовірно фіксований, і вам може не знадобитися -використовувати %s. +використовувати `%s`.

Зверніться до документації smartmontools для можливих опцій: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

Наприклад: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ігнорує вказаний атрибут SMART при обчисленні ймовірності відмови диска. Ця опція корисна, якщо диск повідомляє незвичайні або оманливі значення для певного атрибута. -

DISK — це те саме ім'я диска, вказане в опції data. -PARITY — це одне з імен парності: parity, -2-parity, 3-parity, 4-parity, 5-parity, -6-parity або z-parity. +

DISK — це те саме ім'я диска, вказане в опції `data`. +PARITY — це одне з імен парності: `parity`, +`2-parity`, `3-parity`, `4-parity`, `5-parity`, +`6-parity` або `z-parity`. Спеціальне значення * можна використовувати для ігнорування атрибута на всіх дисках. -

Наприклад, щоб ігнорувати атрибут Current Pending Sector Count +

Наприклад, щоб ігнорувати атрибут `Current Pending Sector Count` на всіх дисках: -

+

+
 smartignore * 197
 
+

Щоб ігнорувати його лише на першому диску парності: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Приклади -

+

Приклад типової конфігурації для Unix: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1967,8 +1734,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Приклад типової конфігурації для Windows: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1983,84 +1752,59 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Шаблон (Pattern) -

-

Шаблони забезпечують гнучкий спосіб фільтрації файлів для включення або -виключення. Використовуючи символи підстановки (globbing), ви можете визначити правила, які -відповідають конкретним іменам файлів або цілим структурам каталогів без -ручного перерахування кожного шляху. -

Знак питання ? відповідає будь-якому одному символу, крім роздільника -каталогів. Це робить його корисним для зіставлення імен файлів із змінними -символами, при цьому шаблон обмежується одним рівнем каталогу. -

Одинарна зірочка * відповідає будь-якій послідовності символів, але, як і -знак питання, вона ніколи не перетинає межі каталогів. Вона зупиняється на -прямій косій рисці, що робить її придатною для зіставлення всередині одного -компонента шляху. Це стандартна поведінка підстановочних знаків, знайома -з командної оболонки (shell globbing). -

Подвійна зірочка ** є потужнішою, вона відповідає будь-якій послідовності -символів, включаючи роздільники каталогів. Це дозволяє шаблонам відповідати -кільком рівням каталогів. Коли ** з'являється безпосередньо в шаблоні, -вона може відповідати нулю або більше символам, включаючи косі риски між -оточуючим літеральним текстом. -

Найважливішим використанням ** є спеціальна форма /**/. Вона відповідає -нулю або більше повним рівням каталогів, що дозволяє зіставляти файли -на будь-якій глибині в дереві каталогів, не знаючи точної структури шляху. -Наприклад, шаблон src/**/main.js відповідає src/main.js (пропуск -нуля каталогів), src/ui/main.js (пропуск одного каталогу) та -src/ui/components/main.js (пропуск двох каталогів). -

Класи символів із використанням квадратних дужок [] відповідають одному символу з -визначеного набору або діапазону. Як і інші односимвольні шаблони, вони -не відповідають роздільникам каталогів. Класи підтримують діапазони та заперечення за допомогою -знаку оклику. -

Фундаментальна відмінність, яку слід пам'ятати, полягає в тому, що *, ? та класи символів -усі дотримуються меж каталогів і відповідають лише в межах одного компонента -шляху, тоді як ** — єдиний шаблон, який може відповідати через роздільники -каталогів. + +

Шаблони використовуються для вибору підмножини файлів +для виключення або включення в процес.

Існує чотири різні типи шаблонів: -

-
-
+

+ +
FILE -
-Вибирає будь-який файл з ім'ям FILE. -Цей шаблон застосовується тільки до файлів, а не до директорій. -
- - -
-
-
+
+Вибирає будь-який файл з іменем FILE. Ви можете +використовувати будь-які символи глоббінгу, +такі як * та ?, та класи символів, такі як [a-z]. +Цей шаблон застосовується лише до файлів, а не +до каталогів. +
+ + +
DIR/ -
-Вибирає будь-яку директорію з ім'ям DIR і все, що знаходиться всередині. -Цей шаблон застосовується тільки до директорій, а не до файлів. -
- - -
-
-
+
+Вибирає будь-який каталог з іменем DIR та все +всередині. Ви можете використовувати будь-які +символи глоббінгу, такі як * та ?. +Цей шаблон застосовується лише до каталогів, +а не до файлів. +
+ + +
/PATH/FILE -
-Вибирає точно вказаний шлях до файлу. Цей шаблон застосовується -тільки до файлів, а не до директорій. -
- - -
-
-
+
+Вибирає точно вказаний шлях до файлу. Ви можете +використовувати будь-які символи глоббінгу, такі +як * та ?, але вони ніколи не збігаються з +похилою рискою каталогу. +Цей шаблон застосовується лише до файлів, +а не до каталогів. +
+ + +
/PATH/DIR/ -
-Вибирає точно вказаний шлях до директорії і все, що знаходиться -всередині. Цей шаблон застосовується тільки до директорій, а не до файлів. -
- - +
+Вибирає точно вказаний шлях до каталогу та все +всередині. Ви можете використовувати будь-які +символи глоббінгу, такі як * та ?, але вони +ніколи не збігаються з похилою рискою каталогу. +Цей шаблон застосовується лише до каталогів, +а не до файлів. +

Коли ви вказуєте абсолютний шлях, що починається з /, він застосовується до кореневого каталогу масиву, а не до кореневого каталогу локальної @@ -2072,10 +1816,10 @@ DIR/ розглядаються як файли, що означає, що для їх виключення ви повинні використовувати правило файлу, а не правило каталогу. -

Якщо ім'я файлу містить символи *, ?, [, -або ], ви повинні екранувати їх, щоб уникнути +

Якщо ім'я файлу містить символи '*', '?', '[', +або ']', ви повинні екранувати їх, щоб уникнути їх інтерпретації як символу глоббінгу. -В Unix символом екранування є \; у Windows — ^. +В Unix символом екранування є '\'; у Windows — '^'. Коли шаблон знаходиться в командному рядку, ви повинні подвоїти символ екранування, щоб запобігти його інтерпретації командною оболонкою. @@ -2083,126 +1827,66 @@ DIR/ різні стратегії для фільтрації файлів, які потрібно обробити. Найпростіший підхід — використовувати лише -правила exclude для видалення всіх файлів та +правила `exclude` для видалення всіх файлів та каталогів, які ви не хочете обробляти. Наприклад: -

-# Виключає будь-який файл з іменем *.unrecoverable
+

+
+# Виключає будь-який файл з іменем `*.unrecoverable`
 exclude *.unrecoverable
-# Виключає кореневий каталог /lost+found
+# Виключає кореневий каталог `/lost+found`
 exclude /lost+found/
-# Виключає будь-який підкаталог з іменем tmp
+# Виключає будь-який підкаталог з іменем `tmp`
 exclude tmp/
 
+

Протилежний підхід — визначити лише файли, які ви хочете обробити, використовуючи лише -правила include. Наприклад: -

+правила `include`. Наприклад:
+

+
 # Включає лише деякі каталоги
 include /movies/
 include /musics/
 include /pictures/
 
-

Останній підхід — змішувати правила exclude -та include. У цьому випадку порядок правил +

+

Останній підхід — змішувати правила `exclude` +та `include`. У цьому випадку порядок правил важливий. Раніші правила мають пріоритет над пізнішими. Для спрощення ви можете спочатку перерахувати -всі правила exclude, а потім усі правила include. +всі правила `exclude`, а потім усі правила `include`. Наприклад: -

-# Виключає будь-який файл з іменем *.unrecoverable
+

+
+# Виключає будь-який файл з іменем `*.unrecoverable`
 exclude *.unrecoverable
-# Виключає будь-який підкаталог з іменем tmp
+# Виключає будь-який підкаталог з іменем `tmp`
 exclude tmp/
 # Включає лише деякі каталоги
 include /movies/
 include /musics/
 include /pictures/
 
+

У командному рядку, використовуючи опцію -f, -ви можете використовувати лише шаблони include. +ви можете використовувати лише шаблони `include`. Наприклад: -

+

+
 # Перевіряє лише файли .mp3.
 # В Unix використовуйте лапки, щоб уникнути
 # розширення глоббінгу оболонкою.
 snapraid -f "*.mp3" check
 
+

В Unix, при використанні символів глоббінгу в командному рядку, ви повинні взяти їх у лапки, щоб запобігти їх розширенню оболонкою. -

-
-

-Ігнорування файлів (Ignore File) -

-

На додаток до глобальних правил у файлі конфігурації, ви можете розміщувати -файли .snapraidignore в будь-якому каталозі всередині масиву для визначення -децентралізованих правил виключення. -

Правила, визначені в .snapraidignore, застосовуються після правил у файлі -конфігурації. Це означає, що вони мають вищий пріоритет і можуть бути використані -для виключення файлів, які раніше були включені глобальною конфігурацією. -Фактично, якщо локальне правило збігається, файл виключається незалежно від -глобальних налаштувань включення. -

Логіка шаблонів у .snapraidignore повторює глобальну конфігурацію, але -прив'язує шаблони до каталогу, в якому знаходиться файл: -

-
-
-FILE -
-Вибирає будь-який файл із ім'ям FILE у цьому каталозі або нижче. -Це відповідає тим самим правилам підстановки, що і в глобальному шаблоні. -
-
-
-
-
-
-DIR/ -
-Вибирає будь-який каталог із ім'ям DIR та весь його вміст, що -знаходиться в цьому каталозі або нижче. -
-
-
-
-
-
-/PATH/FILE -
-Вибирає точно вказаний файл відносно розташування -файлу .snapraidignore. -
-
-
-
-
-
-/PATH/DIR/ -
-Вибирає точно вказаний каталог та весь його вміст відносно -розташування файлу .snapraidignore. -
-
-
-

На відміну від глобальної конфігурації, файли .snapraidignore підтримують -лише правила виключення; ви не можете використовувати шаблони include або заперечення (!). -

Наприклад, якщо у вас є .snapraidignore у /mnt/disk1/projects/: -

-# Виключає ТІЛЬКИ /mnt/disk1/projects/output.bin
-/output.bin
-# Виключає будь-який каталог із назвою build всередині projects/
-build/
-# Виключає будь-який .tmp файл всередині projects/ або його підпапок
-*.tmp
-
-
-
-

+

9 Вміст (Content) -

+

SnapRAID зберігає список та контрольні суми ваших файлів у файлі вмісту.

Це бінарний файл, який перераховує всі файли, @@ -2210,26 +1894,22 @@ build/ усіма контрольними сумами для перевірки їх цілісності.

Цей файл зчитується та записується командами -sync та scrub та зчитується командами fix, -check та status. -

-
-

+`sync` та `scrub` та зчитується командами `fix`, +`check` та `status`. +

10 Парність (Parity) -

+

SnapRAID зберігає інформацію парності вашого масиву у файлах парності.

Це бінарні файли, що містять обчислену парність усіх блоків, визначених у файлі -content. +`content`.

Ці файли зчитуються та записуються командами -sync та fix і лише зчитуються командами -scrub та check. -

-
-

+`sync` та `fix` і лише зчитуються командами +`scrub` та `check`. +

11 Кодування (Encoding) -

+

SnapRAID в Unix ігнорує будь-яке кодування. Він зчитує та зберігає імена файлів з тим самим кодуванням, що використовується @@ -2240,47 +1920,50 @@ build/

Щоб імена файлів відображалися правильно, ви повинні встановити консоль Windows у режим UTF-8 за допомогою команди -chcp 65001 та використовувати шрифт -TrueType, такий як Lucida Console, як +`chcp 65001` та використовувати шрифт +TrueType, такий як `Lucida Console`, як шрифт консолі. Це впливає лише на надруковані імена файлів; якщо ви перенаправляєте вивід консолі у файл, отриманий файл завжди буде у форматі UTF-8. -

-
-

+

12 Авторське право (Copyright) -

+

Цей файл захищений авторським правом (C) 2025 Andrea Mazzoleni -

-
-

+

13 Див. також (See Also) -

-

snapraid_log(1), snapraidd(1) -

+ +

snapraid_log(1), rsync(1) +

+

+

-
-
-
+
- - + diff --git a/manual-zh.html b/manual-zh.html index 5b86a6f6..a49cd331 100644 --- a/manual-zh.html +++ b/manual-zh.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,34 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +72,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID 是一款专为磁盘阵列设计的备份程序,它存储奇偶校验信息, 以在最多六个磁盘发生故障时进行数据恢复。

SnapRAID 主要面向拥有大型、不常更改文件的家庭媒体中心,提供以下特性: @@ -175,14 +120,14 @@ SnapRAID 不会锁定您的数据;您可以随时停止使用它,无需重

欲了解更多信息,请访问 SnapRAID 官方网站: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID 是 RAID 和备份程序之间的混合体,旨在结合两者的优点。 然而,在使用它之前,您应该考虑一些限制。

主要的限制是,如果一个磁盘发生故障而您最近没有进行同步(sync), @@ -216,38 +161,39 @@ SnapRAID 只能从有限数量的磁盘故障中恢复数据。 不保存权限、所有权和扩展属性。 -

-
-

+

4 Getting Started -

+

要使用 SnapRAID,您需要首先选择磁盘阵列中的一个磁盘专用于 -parity(奇偶校验)信息。使用一个奇偶校验磁盘, +`parity`(奇偶校验)信息。使用一个奇偶校验磁盘, 您将能够从单磁盘故障中恢复,类似于 RAID5。

如果您想从更多的磁盘故障中恢复,类似于 RAID6, 您必须预留额外的磁盘用于奇偶校验。每增加一个奇偶校验磁盘, 就可以多恢复一个磁盘故障。

作为奇偶校验磁盘,您必须选择阵列中最大的磁盘, 因为奇偶校验信息可能会增长到阵列中最大的数据磁盘的大小。 -

这些磁盘将专门用于存储 parity 文件。 +

这些磁盘将专门用于存储 `parity` 文件。 您不应该在它们上面存储您的数据。 -

然后,您必须定义要使用 SnapRAID 保护的 data(数据)磁盘。 +

然后,您必须定义要使用 SnapRAID 保护的 `data`(数据)磁盘。 如果这些磁盘包含很少更改的数据,保护会更有效。因此, 最好**不要**包含 Windows C:\ 磁盘或 Unix 的 /home、/var 和 /tmp 目录。 -

文件列表保存在 content(内容)文件中,通常存储在数据、奇偶校验或 +

文件列表保存在 `content`(内容)文件中,通常存储在数据、奇偶校验或 引导磁盘上。 该文件包含备份的详细信息,包括所有用于验证其完整性的校验和。 -content 文件存储有多个副本,每个副本必须位于不同的磁盘上, +`content` 文件存储有多个副本,每个副本必须位于不同的磁盘上, 以确保存储有多个磁盘故障时,至少有一个副本可用。

例如,假设您只对一个奇偶校验保护级别感兴趣,并且您的磁盘位于: -

+

+
 /mnt/diskp <- 选定的奇偶校验磁盘
 /mnt/disk1 <- 第一个要保护的磁盘
 /mnt/disk2 <- 第二个要保护的磁盘
 /mnt/disk3 <- 第三个要保护的磁盘
 
+

您必须创建配置文件 /etc/snapraid.conf,并包含以下选项: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -256,9 +202,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

如果您使用 Windows,您应该使用 Windows 路径格式, 用驱动器号和反斜杠代替斜杠。 -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -267,85 +215,106 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

如果您有许多磁盘且驱动器号用尽,您可以将磁盘直接挂载到子文件夹中。请参阅: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

此时,您已准备好运行 sync 命令来构建奇偶校验信息。 -

+
+

此时,您已准备好运行 `sync` 命令来构建奇偶校验信息。 +

+
 snapraid sync
 
+

第一次运行此过程可能需要几个小时,具体取决于磁盘上已存在数据的大小。 如果磁盘是空的,则过程是即时的。

您可以随时按 Ctrl+C 停止它,在下次运行时,它将从中断的地方恢复。

当此命令完成时,您的数据是**安全的**。 -

现在您可以开始随意使用您的阵列,并定期运行 sync 命令更新奇偶校验信息。 -

-

+

现在您可以开始随意使用您的阵列,并定期运行 `sync` 命令更新奇偶校验信息。 +

4.1 Scrubbing -

-

要定期检查数据和奇偶校验的错误,您可以运行 scrub 命令。 -

+
+

要定期检查数据和奇偶校验的错误,您可以运行 `scrub` 命令。 +

+
 snapraid scrub
 
-

此命令将阵列中的数据与 sync 命令期间计算的散列进行比较, +

+

此命令将阵列中的数据与 `sync` 命令期间计算的散列进行比较, 以验证完整性。

每次运行该命令会检查大约 8% 的阵列,排除在过去 10 天内 已被 scrub 的数据。 您可以使用 -p, --plan 选项来指定不同的量, 并使用 -o, --older-than 选项来指定不同的天数。 例如,要检查 20 天以上块的 5% 阵列,请使用: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

如果在过程中发现静默错误或输入/输出错误, -相应的块会在 content 文件中被标记为坏块,并列在 status 命令中。 -

+相应的块会在 `content` 文件中被标记为坏块,并列在 `status` 命令中。
+

+
 snapraid status
 
-

要修复它们,您可以使用 fix 命令,使用 -e, --filter-error 选项过滤坏块: -

+
+

要修复它们,您可以使用 `fix` 命令,使用 -e, --filter-error 选项过滤坏块: +

+
 snapraid -e fix
 
-

在下次 scrub 时,如果它们确实被修复了,错误将从 status 报告中消失。 +

+

在下次 `scrub` 时,如果它们确实被修复了,错误将从 `status` 报告中消失。 为了更快,您可以使用 -p bad 来仅 scrub 标记为坏块的块。 -

+

+
 snapraid -p bad scrub
 
-

在未同步的阵列上运行 scrub 可能会报告由已删除或已修改文件引起的错误。 -这些错误会在 scrub 输出中报告,但相关块不会被标记为坏块。 -

-
-

+

+

在未同步的阵列上运行 `scrub` 可能会报告由已删除或已修改文件引起的错误。 +这些错误会在 `scrub` 输出中报告,但相关块不会被标记为坏块。 +

4.2 Pooling -

-

注意:下面描述的 pooling 功能已被 mergerfs 工具取代, -mergerfs 现在是 SnapRAID 社区推荐的 Linux 用户选项。 + +

注意:下面描述的 pooling 功能已被 mergefs 工具取代, +mergefs 现在是 SnapRAID 社区推荐的 Linux 用户选项。 Mergefs 提供了一种更灵活、更高效的方式,将多个驱动器汇集到一个 统一的挂载点中,允许跨阵列无缝访问文件,而无需依赖符号链接。 它与 SnapRAID 很好地集成以提供奇偶校验保护,常用于 OpenMediaVault (OMV) 或自定义 NAS 配置等设置中。

要使阵列中的所有文件显示在同一个目录树中, -您可以启用 pooling 功能。它使用符号链接创建了一个 +您可以启用 `pooling` 功能。它使用符号链接创建了一个 阵列中所有文件的只读虚拟视图。 -

您可以在配置文件中使用以下选项配置 pooling 目录: -

+

您可以在配置文件中使用以下选项配置 `pooling` 目录: +

+
 pool /pool
 
+

或者,如果您使用 Windows,则使用: -

+

+
 pool C:\pool
 
-

然后运行 pool 命令创建或更新虚拟视图。 -

+
+

然后运行 `pool` 命令创建或更新虚拟视图。 +

+
 snapraid pool
 
+

如果您使用 Unix 平台并希望通过网络将此目录共享给 Windows 或 Unix 机器, 您应该在 /etc/samba/smb.conf 中添加以下选项: -

+

+
 # 在 smb.conf 的全局部分
 unix extensions = no
 
+
+
 # 在 smb.conf 的共享部分
 [pool]
@@ -356,347 +325,314 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

在 Windows 中,通过网络共享符号链接需要客户端远程解析它们。 要启用此功能,除了共享 pool 目录之外,您还必须独立共享所有磁盘, 使用配置文件中定义的磁盘名称作为共享点。 -您还必须在配置文件的 share 选项中指定远程客户端访问这些 +您还必须在配置文件的 `share` 选项中指定远程客户端访问这些 共享磁盘所需的 Windows UNC 路径。 -

例如,在名为 darkstar 的服务器上操作,您可以使用以下选项: -

+

例如,在名为 `darkstar` 的服务器上操作,您可以使用以下选项: +

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

并通过网络共享以下目录: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

以允许远程客户端访问 \\darkstar\pool 处的所有文件。

您可能还需要配置远程客户端,使用以下命令启用对远程符号链接的访问: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID 的功能更像一个备份程序而不是 RAID 系统, 它可以使用 -f, --filter 选项来恢复或取消删除文件到其以前的状态: -

+

+
 snapraid fix -f FILE
 
+

或者对于一个目录: -

+

+
 snapraid fix -f DIR/
 
+

您也可以使用 -m, --filter-missing 选项来仅恢复目录内意外删除的文件, 该选项仅恢复丢失的文件,保持所有其他文件不变。 -

+

+
 snapraid fix -m -f DIR/
 
+

或者使用以下命令恢复所有驱动器上所有已删除的文件: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

最糟糕的情况发生了,您丢失了一个或多个磁盘!

**不要惊慌!** 您将能够恢复它们!

您必须做的第一件事是避免对磁盘阵列进行进一步的更改。 禁用对其的任何远程连接以及任何计划的进程,包括任何计划的 SnapRAID 夜间同步或 scrub。

然后继续执行以下步骤。 -

-

+

4.4.1 STEP 1 -> 重新配置 -

+

您需要一些空间来恢复,理想情况下是在额外的备用磁盘上, 但外部 USB 磁盘或远程磁盘也足够。 -

修改 SnapRAID 配置文件,使故障磁盘的 data 或 parity 选项指向 +

修改 SnapRAID 配置文件,使故障磁盘的 `data` 或 `parity` 选项指向 一个具有足够空闲空间来恢复文件的位置。 -

例如,如果磁盘 d1 发生故障,则从: -

+

例如,如果磁盘 `d1` 发生故障,则从: +

+
 data d1 /mnt/disk1/
 
+

更改为: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

如果需要恢复的磁盘是奇偶校验磁盘,请更新相应的 parity 选项。 +

+

如果需要恢复的磁盘是奇偶校验磁盘,请更新相应的 `parity` 选项。 如果您有多个故障磁盘,请更新所有它们的配置选项。 -

-
-

+

4.4.2 STEP 2 -> 修复 -

+

运行 fix 命令,并将日志存储在外部文件中: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

其中 NAME 是磁盘的名称,例如我们前面例子中的 d1。 -如果需要恢复的磁盘是奇偶校验磁盘,请使用名称 parity、2-parity 等。 +

+

其中 NAME 是磁盘的名称,例如我们前面例子中的 `d1`。 +如果需要恢复的磁盘是奇偶校验磁盘,请使用名称 `parity`、`2-parity` 等。 如果您有多个故障磁盘,请使用多个 -d 选项来指定所有它们。

此命令将花费很长时间。

确保您有几 GB 的可用空间来存储 fix.log 文件。 在有足够可用空间的磁盘上运行它。

现在您已经恢复了所有可恢复的内容。如果有些文件部分或完全不可恢复, -它们将被重命名并添加 .unrecoverable 扩展名。 -

您可以通过检查所有以 unrecoverable: 开头的行,在 fix.log 文件中 +它们将被重命名并添加 `.unrecoverable` 扩展名。 +

您可以通过检查所有以 `unrecoverable:` 开头的行,在 fix.log 文件中 找到所有不可恢复块的详细列表。

如果您对恢复不满意,您可以根据需要重试多次。 -

例如,如果您在上次 sync 之后从阵列中删除了文件, +

例如,如果您在上次 `sync` 之后从阵列中删除了文件, 这可能导致某些文件无法恢复。 -在这种情况下,您可以使用 -i, --import 选项重试 fix, +在这种情况下,您可以使用 -i, --import 选项重试 `fix`, 指定这些文件现在在哪里,以便将它们再次包含在恢复过程中。

如果您对恢复感到满意,您可以继续进行, -但请注意,在同步之后,您不能再重试 fix 命令了! -

-
-

+但请注意,在同步之后,您不能再重试 `fix` 命令了! +

4.4.3 STEP 3 -> 检查 -

-

作为一项谨慎的检查,您现在可以运行 check 命令,以确保 + +

作为一项谨慎的检查,您现在可以运行 `check` 命令,以确保 恢复的磁盘上的一切都是正确的。 -

+

+
 snapraid -d NAME -a check
 
-

其中 NAME 是磁盘的名称,例如我们前面例子中的 d1。 -

-
-
+
+

其中 NAME 是磁盘的名称,例如我们前面例子中的 `d1`。 +

+ +
-d 和 -a 选项告诉 SnapRAID 只检查指定的磁盘并忽略所有奇偶校验数据。 -
-
- - +
+

此命令将花费很长时间,但如果您不是过于谨慎,可以跳过它。 -

-
-

+

4.4.4 STEP 4 -> 同步 -

-

运行 sync 命令以将阵列与新磁盘重新同步。 -

+
+

运行 `sync` 命令以将阵列与新磁盘重新同步。 +

+
 snapraid sync
 
+

如果所有内容都已恢复,此命令是即时的。 -

-
-
-
-

+

5 Commands -

+

SnapRAID 提供了一些简单的命令,允许您:

  • -打印阵列的状态 -> status +打印阵列的状态 -> `status`
  • -控制磁盘 -> smart、probe、up、down +控制磁盘 -> `smart`、`probe`、`up`、`down`
  • -进行备份/快照 -> sync +进行备份/快照 -> `sync`
  • -定期检查数据 -> scrub +定期检查数据 -> `scrub`
  • -恢复上次备份/快照 -> fix。 +恢复上次备份/快照 -> `fix`。

命令必须用小写字母书写。 -

-

+

5.1 status -

+

打印磁盘阵列状态的摘要。

它包括有关奇偶校验碎片、块未经检查有多久,以及在 scrubbing 期间遇到的所有记录的静默错误的信息。 -

所提供的信息指的是您上次运行 sync 的时间。 +

所提供的信息指的是您上次运行 `sync` 的时间。 不考虑后来的修改。

如果检测到坏块,则会列出它们的块号。 -要修复它们,您可以使用 fix -e 命令。 +要修复它们,您可以使用 `fix -e` 命令。

它还会显示一个图表,表示每个块上次被 scrub 或 sync 的时间。 -被 scrub 的块显示为 *,已同步但尚未 scrub 的块显示为 o。 +被 scrub 的块显示为 '*',已同步但尚未 scrub 的块显示为 'o'。

不会修改任何内容。 -

-
-

+

5.2 smart -

+

打印系统中所有磁盘的 SMART 报告。

它包括对明年故障概率的估计,允许您计划更换显示 可疑属性的磁盘进行维护。

此概率估计是通过将磁盘的 SMART 属性与 Backblaze 提供的以下数据进行关联获得的: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

如果 SMART 报告磁盘正在发生故障,则会为该磁盘打印 FAIL 或 PREFAIL, +

+

如果 SMART 报告磁盘正在发生故障,则会为该磁盘打印 `FAIL` 或 `PREFAIL`, 并且 SnapRAID 返回错误。 在这种情况下,**强烈建议**立即更换磁盘。

其他可能的状态字符串有: -

-
-
+

+ + + +
logfail -
+
过去,某些属性低于阈值。 - - -
-
+
logerr -
+
设备错误日志包含错误。 - - -
-
+
selferr -
+
设备自检日志包含错误。 - - - +

如果指定了 -v, --verbose 选项,则会提供更深入的统计分析。 此分析可以帮助您决定是否需要更多或更少的奇偶校验。 -

此命令使用 smartctl 工具,相当于在所有设备上运行 smartctl -a。 +

此命令使用 `smartctl` 工具,相当于在所有设备上运行 `smartctl -a`。

如果您的设备未正确自动检测,您可以使用配置 -文件中的 smartctl 选项指定自定义命令。 +文件中的 `smartctl` 选项指定自定义命令。

不会修改任何内容。 -

-
-

+

5.3 probe -

+

打印系统中所有磁盘的**电源**状态。 -

Standby(待机)表示磁盘未转动。Active(活动)表示 +

`Standby`(待机)表示磁盘未转动。`Active`(活动)表示 磁盘正在转动。 -

此命令使用 smartctl 工具,相当于在所有设备上运行 -smartctl -n standby -i。 +

此命令使用 `smartctl` 工具,相当于在所有设备上运行 +`smartctl -n standby -i`。

如果您的设备未正确自动检测,您可以使用配置 -文件中的 smartctl 选项指定自定义命令。 +文件中的 `smartctl` 选项指定自定义命令。

不会修改任何内容。 -

-
-

+

5.4 up -

+

使阵列中的所有磁盘转动起来。

您可以使用 -d, --filter-disk 选项只启动特定的磁盘。

同时启动所有磁盘需要大量的电力。 确保您的电源能够承受。

不会修改任何内容。 -

-
-

+

5.5 down -

+

使阵列中的所有磁盘停转。 -

此命令使用 smartctl 工具,相当于在所有设备上运行 -smartctl -s standby,now。 +

此命令使用 `smartctl` 工具,相当于在所有设备上运行 +`smartctl -s standby,now`。

您可以使用 -d, --filter-disk 选项只停转特定的磁盘。

要在发生错误时自动停转,您可以将 -s, --spin-down-on-error -选项与任何其他命令一起使用,这相当于在发生错误时手动运行 down。 +选项与任何其他命令一起使用,这相当于在发生错误时手动运行 `down`。

不会修改任何内容。 -

-
-

+

5.6 diff -

-

列出自上次 sync 以来所有已修改、需要重新计算奇偶校验数据的 + +

列出自上次 `sync` 以来所有已修改、需要重新计算奇偶校验数据的 文件。

此命令不检查文件数据,仅检查文件时间戳、大小和 inode。

列出所有更改的文件后,会显示更改的摘要,按以下方式分组: -

-
-
+

+ + + + + + + +
equal -
+
文件与之前相比未更改。 - - -
-
+
added -
+
之前不存在、已添加的文件。 - - -
-
+
removed -
+
已删除的文件。 - - -
-
+
updated -
+
大小或时间戳不同的文件,表示它们已被修改。 - - -
-
+
moved -
+
在同一磁盘上移动到不同目录的文件。 它们通过具有相同的名称、大小、时间戳和 inode,但目录不同来识别。 - - -
-
+
copied -
-在相同或不同磁盘上复制的文件,且原始文件仍然存在。 -它们通过具有相同的名称、大小和时间戳进行识别。 -如果亚秒级时间戳为零,则必须完整路径匹配才能识别,而不仅仅是名 -称。 -
- -
-
-relocated -
-在相同或不同磁盘上移动的文件,且原始文件已消失。 -它们通过具有相同的名称、大小和时间戳进行识别。 -如果亚秒级时间戳为零,则必须完整路径匹配才能识别。 -与同一磁盘上的 'moved' 文件不同,重定位的文件具有不同的 inode。 -
-
-
-
+
+在同一磁盘或不同磁盘上复制的文件。请注意,如果 +它们确实移动到了不同的磁盘,它们也会被计入 `removed` 中。 +它们通过具有相同的名称、大小和时间戳来识别。如果亚秒级时间戳为零, +则必须匹配完整路径,而不仅仅是名称。 +
restored -
-inode 不同但目录、名称、大小和时间戳匹配的文件。 +
+inode 不同但名称、大小和时间戳匹配的文件。 这些通常是删除后恢复的文件。 - - - -

如果需要 sync,进程返回码为 2,而不是默认的 0。 +

+

如果需要 `sync`,进程返回码为 2,而不是默认的 0。 返回码 1 用于一般错误情况。

不会修改任何内容。 -

-
-

+

5.7 sync -

+

更新奇偶校验信息。读取磁盘阵列中所有已修改的文件, 并更新相应的奇偶校验数据。

您可以随时按 Ctrl+C 停止此过程,而不会丢失已完成的工作。 -在下次运行时,sync 过程将从中断的地方恢复。 +在下次运行时,`sync` 过程将从中断的地方恢复。

如果在过程中发现静默错误或输入/输出错误, 相应的块会被标记为坏块。

文件通过路径和/或 inode 识别,并检查大小和时间戳。 @@ -704,13 +640,11 @@ sync 如果文件在同一磁盘上被移动或重命名,保持相同的 inode,则不重新计算奇偶校验。 如果文件移动到另一个磁盘,则重新计算奇偶校验, 但保留以前计算的散列信息。 -

如果需要,会修改 content 和 parity 文件。 +

如果需要,会修改 `content` 和 `parity` 文件。 阵列中的文件**不会**被修改。 -

-
-

+

5.8 scrub -

+

Scrub 阵列,检查数据和奇偶校验磁盘中的静默或输入/输出错误。

每次调用检查大约 8% 的阵列,排除在过去 10 天内 已被 scrub 的数据。 @@ -725,98 +659,86 @@ full - Scrub 所有内容。 选项来定义块应该有多旧。 最旧的块首先被 scrub,确保最佳检查。 如果您只想 scrub 刚刚同步但尚未 scrub 的块, -请使用 -p new 选项。 -

要获取 scrub 状态的详细信息,请使用 status 命令。 +请使用 `-p new` 选项。 +

要获取 scrub 状态的详细信息,请使用 `status` 命令。

对于发现的任何静默错误或输入/输出错误,相应的块 -会在 content 文件中被标记为坏块。 -这些坏块列在 status 中,可以使用 fix -e 修复。 +会在 `content` 文件中被标记为坏块。 +这些坏块列在 `status` 中,可以使用 `fix -e` 修复。 修复后,在下次 scrub 时,它们将被重新检查,如果发现已更正, 则会删除坏块标记。 -要仅 scrub 坏块,您可以使用 scrub -p bad 命令。 -

建议仅在已同步的阵列上运行 scrub,以避免 +要仅 scrub 坏块,您可以使用 `scrub -p bad` 命令。 +

建议仅在已同步的阵列上运行 `scrub`,以避免 由未同步数据引起的报告错误。这些错误被识别为不是静默错误, 并且块不会被标记为坏块,但此类错误会在命令的输出中报告。 -

content 文件会被修改以更新每个块上次检查的时间 +

`content` 文件会被修改以更新每个块上次检查的时间 并标记坏块。 -parity 文件**不会**被修改。 +`parity` 文件**不会**被修改。 阵列中的文件**不会**被修改。 -

-
-

+

5.9 fix -

+

修复所有文件和奇偶校验数据。 -

所有文件和奇偶校验数据都与上次 sync 中保存的快照 +

所有文件和奇偶校验数据都与上次 `sync` 中保存的快照 状态进行比较。 如果发现差异,则将其恢复到存储的快照。 -

**警告!** fix 命令不区分错误和 -故意修改。它**无条件地**将文件状态恢复到上次 sync。 +

**警告!** `fix` 命令不区分错误和 +故意修改。它**无条件地**将文件状态恢复到上次 `sync`。

如果未指定其他选项,则处理整个阵列。 使用过滤选项选择要操作的文件或磁盘的子集。 -

要仅修复在 sync 和 scrub 期间标记为坏块的块, +

要仅修复在 `sync` 和 `scrub` 期间标记为坏块的块, 请使用 -e, --filter-error 选项。 -与其他过滤选项不同,此选项仅对自上次 sync 以来未更改的 +与其他过滤选项不同,此选项仅对自上次 `sync` 以来未更改的 文件应用修复。

SnapRAID 会重命名所有无法修复的文件,并添加 -.unrecoverable 扩展名。 -

在修复之前,会扫描整个阵列以查找自上次 sync +`.unrecoverable` 扩展名。 +

在修复之前,会扫描整个阵列以查找自上次 `sync` 操作以来移动的任何文件。 这些文件通过它们的时间戳识别,忽略它们的名称 和目录,并在必要时用于恢复过程。 如果您将其中一些移到了阵列之外,您可以使用 -i, --import 选项指定额外的目录进行扫描。

文件仅通过路径识别,而不通过 inode 识别。 -

content 文件**不会**被修改。 -如果需要,parity 文件会被修改。 +

`content` 文件**不会**被修改。 +如果需要,`parity` 文件会被修改。 如果需要,阵列中的文件会被修改。 -

-
-

+

5.10 check -

+

验证所有文件和奇偶校验数据。 -

它的工作方式类似于 fix,但它只模拟恢复,**不会**对阵列 +

它的工作方式类似于 `fix`,但它只模拟恢复,**不会**对阵列 写入任何更改。

此命令主要用于手动验证, 例如在恢复过程之后或在其他特殊条件下。 -对于定期和计划的检查,请使用 scrub。 +对于定期和计划的检查,请使用 `scrub`。

如果您使用 -a, --audit-only 选项,则仅检查文件 数据散列,而忽略奇偶校验数据,以加快运行速度。

文件仅通过路径识别,而不通过 inode 识别。

不会修改任何内容。 -

-
-

+

5.11 list -

-

列出上次 sync 时阵列中包含的所有文件。 + +

列出上次 `sync` 时阵列中包含的所有文件。

使用 -v 或 --verbose,还会显示亚秒级时间。

不会修改任何内容。 -

-
-

+

5.12 dup -

+

列出所有重复文件。如果两个文件的散列匹配,则认为它们相等。 不读取文件数据;仅使用预先计算的散列。

不会修改任何内容。 -

-
-

+

5.13 pool -

-

在 pooling 目录中创建或更新磁盘阵列中所有文件 + +

在 `pooling` 目录中创建或更新磁盘阵列中所有文件 的虚拟视图。

文件不会被复制,而是使用符号链接连接。

更新时,所有现有的符号链接和空 子目录都会被删除,并替换为阵列的新视图。 任何其他常规文件保留在原位。

不会修改 pool 目录之外的任何内容。 -

-
-

+

5.14 devices -

+

打印阵列使用的低级设备。

此命令显示阵列中的设备关联,主要用作脚本接口。

前两列是低级设备 ID 和路径。 @@ -826,11 +748,9 @@ devices 但在一些更复杂的配置中,单个阵列磁盘可能会使用多个 低级设备。

不会修改任何内容。 -

-
-

+

5.15 touch -

+

为所有亚秒级时间戳设置为零的文件设置一个任意的 亚秒级时间戳。

这提高了 SnapRAID 识别移动和复制文件的能力, @@ -841,223 +761,171 @@ touch 大小和时间戳都匹配时才被视为副本。

不会修改秒精度时间戳, 因此会保留文件的所有日期和时间。 -

-
-

+

5.16 rehash -

+

安排对整个阵列进行重新散列。

此命令更改使用的散列类型,通常是在从 32 位系统升级到 64 位系统时, 以从 MurmurHash3 切换到更快的 SpookyHash。

如果您已经在使用最佳散列,则此命令不执行任何操作, 并通知您无需执行任何操作。 -

重新散列不会立即执行,而是在 sync 和 scrub 期间 +

重新散列不会立即执行,而是在 `sync` 和 `scrub` 期间 逐步进行。 -

您可以使用 status 检查重新散列状态。 +

您可以使用 `status` 检查重新散列状态。

在重新散列期间,SnapRAID 保持完全功能, -唯一的例外是 dup 无法使用不同的散列检测重复的文件。 -

-
-

-locate -

-

查找存储在校验盘中的文件。对于每个匹配的文件,它会打印其在校验文件中的位置 -以及占用的分片数量。 -

您可以使用 -t, --tail 选项将操作限制在占用校验盘指定尾部部分的 -文件上。 -

如果您想重新分配这些文件,可以使用 -W, --force-realloc-tail 选项。 -请注意,在重新分配过程中,此类文件将不受校验保护。 -

-
-
-

+唯一的例外是 `dup` 无法使用不同的散列检测重复的文件。 +

6 Options -

+

SnapRAID 提供以下选项: -

-
-
+

+ +
-c, --conf CONFIG -
+
选择要使用的配置文件。如果未指定,在 Unix 中, -如果存在,则使用文件 /usr/local/etc/snapraid.conf, -否则使用 /etc/snapraid.conf。 -在 Windows 中,它使用与 snapraid.exe 相同的目录中的文件 snapraid.conf。 - - - -
-
-
+如果存在,则使用文件 `/usr/local/etc/snapraid.conf`, +否则使用 `/etc/snapraid.conf`。 +在 Windows 中,它使用与 `snapraid.exe` 相同的目录中的文件 `snapraid.conf`。 +
+ + +
-f, --filter PATTERN -
-过滤要在 check 和 fix 中处理的文件。 +
+过滤要在 `check` 和 `fix` 中处理的文件。 仅处理与指定模式匹配的文件。 此选项可以多次使用。 有关模式规范的更多详细信息,请参阅 PATTERN 部分。 在 Unix 中,如果使用 globbing 字符,请确保它们被引用。 -此选项只能与 check 和 fix 一起使用。 -不能与 sync 和 scrub 一起使用,因为它们总是处理整个阵列。 - - - -
-
-
+此选项只能与 `check` 和 `fix` 一起使用。 +不能与 `sync` 和 `scrub` 一起使用,因为它们总是处理整个阵列。 +
+ + +
-d, --filter-disk NAME -
-过滤要在 check、fix、up 和 down 中处理的磁盘。 +
+过滤要在 `check`、`fix`、`up` 和 `down` 中处理的磁盘。 您必须指定配置文件中定义的磁盘名称。 -您也可以指定奇偶校验磁盘的名称:parity、2-parity、 -3-parity 等,以将操作限制到特定的奇偶校验磁盘。 +您也可以指定奇偶校验磁盘的名称:`parity`、`2-parity`、 +`3-parity` 等,以将操作限制到特定的奇偶校验磁盘。 如果您组合使用多个 --filter、--filter-disk 和 --filter-missing 选项, 则仅选择与所有过滤器匹配的文件。 此选项可以多次使用。 -此选项只能与 check、fix、up 和 down 一起使用。 -不能与 sync 和 scrub 一起使用,因为它们总是处理整个阵列。 - - - -
-
-
+此选项只能与 `check`、`fix`、`up` 和 `down` 一起使用。 +不能与 `sync` 和 `scrub` 一起使用,因为它们总是处理整个阵列。 +
+ + +
-m, --filter-missing -
-过滤要在 check 和 fix 中处理的文件。 +
+过滤要在 `check` 和 `fix` 中处理的文件。 仅处理阵列中丢失或已删除的文件。 -与 fix 一起使用时,此选项充当 undelete 命令。 +与 `fix` 一起使用时,此选项充当 `undelete` 命令。 如果您组合使用多个 --filter、--filter-disk 和 --filter-missing 选项, 则仅选择与所有过滤器匹配的文件。 -此选项只能与 check 和 fix 一起使用。 -不能与 sync 和 scrub 一起使用,因为它们总是处理整个阵列。 - - - -
-
-
+此选项只能与 `check` 和 `fix` 一起使用。 +不能与 `sync` 和 `scrub` 一起使用,因为它们总是处理整个阵列。 +
+ + +
-e, --filter-error -
-处理 check 和 fix 中有错误的文件。 -它仅处理在 sync 和 scrub 期间块被标记为静默或输入/输出错误的 -文件,如 status 中所列。 -此选项只能与 check 和 fix 一起使用。 -
- - -
-
-
+
+处理 `check` 和 `fix` 中有错误的文件。 +它仅处理在 `sync` 和 `scrub` 期间块被标记为静默或输入/输出错误的 +文件,如 `status` 中所列。 +此选项只能与 `check` 和 `fix` 一起使用。 +
+ + +
-p, --plan PERC|bad|new|full -
+
选择 scrub 计划。如果 PERC 是一个介于 0 到 100 之间的数值, 则将其解释为要 scrub 的块的百分比。 除了百分比,您还可以指定一个计划: -bad scrub 坏块,new scrub 尚未 scrub 的块, -full scrub 所有内容。 -此选项只能与 scrub 一起使用。 - - - -
-
-
+`bad` scrub 坏块,`new` scrub 尚未 scrub 的块, +`full` scrub 所有内容。 +此选项只能与 `scrub` 一起使用。 +
+ + +
-o, --older-than DAYS -
-选择要在 scrub 中处理的阵列的最旧部分。 +
+选择要在 `scrub` 中处理的阵列的最旧部分。 DAYS 是块被 scrub 的最小天数;默认值为 10。 无论此选项如何,标记为坏块的块始终会被 scrub。 -此选项只能与 scrub 一起使用。 - - - -
-
-
+此选项只能与 `scrub` 一起使用。 +
+ + +
-a, --audit-only -
-在 check 中,验证文件的散列而不 +
+在 `check` 中,验证文件的散列而不 检查奇偶校验数据。 如果您只对检查文件数据感兴趣,此选项可以显著加快 检查过程。 -此选项只能与 check 一起使用。 - - - -
-
-
+此选项只能与 `check` 一起使用。 +
+ + +
-h, --pre-hash -
-在 sync 中,运行所有新数据的初步散列阶段, +
+在 `sync` 中,运行所有新数据的初步散列阶段, 以便在奇偶校验计算之前进行额外验证。 -通常,在 sync 中,不进行初步散列,并且新 +通常,在 `sync` 中,不进行初步散列,并且新 数据仅在首次读取进行奇偶校验计算之前散列。 此过程在系统处于 重负载下发生,所有磁盘都在转动,CPU 也很忙。 这对机器来说是一种极端情况,如果它有潜在的硬件问题, 静默错误可能无法被检测到,因为数据尚未散列。 -为避免此风险,您可以启用 pre-hash 模式,将 +为避免此风险,您可以启用 `pre-hash` 模式,将 所有数据读取两次以确保其完整性。 此选项还会验证阵列内移动的文件, 以确保移动操作成功,并在必要时 允许您在继续之前运行 fix 操作。 -此选项只能与 sync 一起使用。 - - - -
-
-
+此选项只能与 `sync` 一起使用。 +
+ + +
-i, --import DIR -
-从指定目录导入自上次 sync 以来从阵列中删除的任何文件。 -如果您仍然拥有此类文件,它们可用于 check -和 fix 以改进恢复过程。 +
+从指定目录导入自上次 `sync` 以来从阵列中删除的任何文件。 +如果您仍然拥有此类文件,它们可用于 `check` +和 `fix` 以改进恢复过程。 读取文件,包括在子目录中,并且无论其名称如何都会被识别。 -此选项只能与 check 和 fix 一起使用。 - - - -
-
-
+此选项只能与 `check` 和 `fix` 一起使用。 +
+ + +
-s, --spin-down-on-error -
+
在任何错误发生时,在退出并带有非零状态码之前, 将所有托管的磁盘停转。这可以防止驱动器在中止操作后 保持活动和转动,有助于避免不必要的热量积聚和功耗。 使用此选项可确保即使命令失败,磁盘也能安全停止。 - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
对所有磁盘应用全局带宽限制。RATE 是 每秒的字节数。您可以指定乘数,例如 K、M 或 G (例如,--bw-limit 1G)。 - - - -
-
-
--t, --tail 大小 -
-将文件列表限制为那些使用校验盘指定尾部大小以内的文件。 -您可以使用乘数,如 K、M、G 或 T(例如 --tail 1G)。 -此选项仅在与 locate 命令配合使用时有效。 -
-
-
-
-
-
+
+ + +
-A, --stats -
+
启用扩展状态视图,显示附加信息。 屏幕显示两个图表: 第一个图表显示每个磁盘的缓冲条带数,以及 @@ -1073,42 +941,36 @@ DAYS 是块被 scrub 的最小天数;默认值为 10。 所有计算都与磁盘操作并行运行。 因此,只要至少一个磁盘有可测量的等待时间, 就表明 CPU 足够快,能够跟上工作负载。 - - - -
-
-
+
+ + +
-Z, --force-zero -
+
强制执行不安全的同步操作:同步大小为零但以前非零的文件。 如果 SnapRAID 检测到这种情况,它会停止进行, 除非您指定此选项。 这使您可以轻松检测到在系统崩溃后, 某些访问的文件被截断的情况。 这在带有 ext3/ext4 文件系统的 Linux 中是一种可能的情况。 -此选项只能与 sync 一起使用。 - - - -
-
-
+此选项只能与 `sync` 一起使用。 +
+ + +
-E, --force-empty -
+
强制执行不安全的同步操作:同步所有原始文件丢失的磁盘。 如果 SnapRAID 检测到磁盘上最初存在的所有文件都丢失或被重写, 它会停止进行,除非您指定此选项。 这使您可以轻松检测到数据文件系统未挂载的情况。 -此选项只能与 sync 一起使用。 - - - -
-
-
+此选项只能与 `sync` 一起使用。 +
+ + +
-U, --force-uuid -
+
强制执行不安全的同步、检查和修复操作,当磁盘更改了它们的 UUID 时。 如果 SnapRAID 检测到某些磁盘更改了 UUID, 它会停止进行,除非您指定此选项。 @@ -1116,218 +978,166 @@ DAYS 是块被 scrub 的最小天数;默认值为 10。 错误的挂载点的情况。 但是,允许在单奇偶校验下进行单个 UUID 更改, 在多奇偶校验下进行更多更改,因为这是恢复后更换磁盘时的正常情况。 -此选项只能与 sync、check 或 fix 一起使用。 - - - -
-
-
+此选项只能与 `sync`、`check` 或 `fix` 一起使用。 +
+ + +
-D, --force-device -
+
强制执行不安全的修复操作,当磁盘无法访问或位于同一物理设备上时。 例如,如果您丢失了两个数据磁盘,并且有一个备用磁盘 只能恢复第一个,您可以忽略第二个无法访问的磁盘。 或者,如果您想在已使用的磁盘上剩余的可用空间中恢复一个磁盘, 共享同一物理设备。 -此选项只能与 fix 一起使用。 - - - -
-
-
+此选项只能与 `fix` 一起使用。 +
+ + +
-N, --force-nocopy -
-在 sync、check 和 fix 中,禁用复制检测启发式。 +
+在 `sync`、`check` 和 `fix` 中,禁用复制检测启发式。 如果没有此选项,SnapRAID 假定具有相同属性(例如名称、大小和时间戳) 的文件是具有相同数据的副本。 这允许识别从一个磁盘移动到另一个磁盘的复制或移动的文件, 并重用已计算的散列信息以检测静默错误或恢复丢失的文件。 在某些罕见的情况下,此行为可能导致误报 或由于许多散列验证而导致过程缓慢,此选项允许您解决此类问题。 -此选项只能与 sync、check 和 fix 一起使用。 - - - -
-
-
+此选项只能与 `sync`、`check` 和 `fix` 一起使用。 +
+ + +
-F, --force-full -
-在 sync 中,强制完全重新计算奇偶校验。 +
+在 `sync` 中,强制完全重新计算奇偶校验。 当您添加新的奇偶校验级别或如果使用较新的奇偶校验数据恢复到旧的内容文件时, 可以使用此选项。 这允许您重用内容文件中存在的散列来验证数据, -并使用现有奇偶校验数据在 sync 过程中保持数据保护, +并使用现有奇偶校验数据在 `sync` 过程中保持数据保护, 而不是从头开始重新创建奇偶校验。 -此选项只能与 sync 一起使用。 - - - -
-
-
+此选项只能与 `sync` 一起使用。 +
+ + +
-R, --force-realloc -
-在 sync 中,强制完全重新分配文件并重建奇偶校验。 +
+在 `sync` 中,强制完全重新分配文件并重建奇偶校验。 此选项可用于完全重新分配所有文件, 消除碎片,同时重用内容文件中存在的散列来验证数据。 -此选项只能与 sync 一起使用。 +此选项只能与 `sync` 一起使用。 **警告!** 此选项仅供专家使用,强烈建议不要使用它。 -在 sync 操作期间,您**没有**数据保护。 - - - -
-
-
--W, --force-realloc-tail 大小 -
-工作方式类似于 -R, --force-realloc,但仅限于每个校验文件的 -指定尾部部分(最后“大小”字节)。 -它会强制重新分配(移动)当前存储在该尾部部分的任何文件分片/块, -允许它们被放置在校验文件中任何有可用空间的地方(包括现有的 -空隙)。 -此选项的主要目的是缩小校验文件的磁盘占用大小。 -如果重新分配成功清空了整个尾部区域(没有块继续使用它), -则校验文件将被截断,回收未使用的尾部空间。 -您可以使用乘数,如 K、M、G 或 T(例如 ---force-realloc-tail 1G)。 -您可以使用 locate -t, --tail 提前了解受影响的文件。 -警告! -此选项仅供专家使用,强烈建议不要使用。 -在执行 sync 操作期间,受影响的文件将没有数据保护。 -
-
-
-
-
-
+在 `sync` 操作期间,您**没有**数据保护。 +
+ + +
-l, --log FILE -
+
将详细日志写入指定文件。 如果未指定此选项,则会将意外错误打印到屏幕, 在出现许多错误的情况下,可能导致输出过多。 指定 -l, --log 时,仅将导致 SnapRAID 停止的**致命错误**打印到 屏幕。 -如果路径以 >> 开头,则文件以追加模式打开。 -名称中的 %D 和 %T 出现会被替换为日期和时间,格式分别为 YYYYMMDD 和 -HHMMSS。在 Windows 批处理文件中,您必须双写 % 字符, -例如 result-%%D.log。要使用 >>,您必须将名称括在引号中, -例如 ">>result.log"。 +如果路径以 '>>' 开头,则文件以追加模式打开。 +名称中的 '%D' 和 '%T' 出现会被替换为日期和时间,格式分别为 YYYYMMDD 和 +HHMMSS。在 Windows 批处理文件中,您必须双写 '%' 字符, +例如 result-%%D.log。要使用 '>>',您必须将名称括在引号中, +例如 `">>result.log"`。 要将日志输出到标准输出或标准错误, -您可以使用 ">&1" 和 ">&2"。 +您可以使用 `">&1"` 和 `">&2"`。 有关日志标签描述,请参阅 snapraid_log.txt 文件或 man 页面。 - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
设置停止执行前的新错误限制。 默认情况下,如果 SnapRAID 遇到超过 100 个 输入/输出错误,它会停止,表明磁盘可能正在发生故障。 -此选项影响 sync 和 scrub,它们被允许在第一组 +此选项影响 `sync` 和 `scrub`,它们被允许在第一组 磁盘错误后继续,以尝试完成其操作。 -但是,check 和 fix 总是会在第一次错误时停止。 - - - -
-
-
+但是,`check` 和 `fix` 总是会在第一次错误时停止。 +
+ + +
-S, --start BLKSTART -
+
从指定的块号开始处理。 在磁盘损坏的情况下,这对于重试检查或修复特定块可能很有用。 此选项主要用于高级手动恢复。 - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
仅处理指定数量的块。 此选项主要用于高级手动恢复。 - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
从现有内容文件生成一个虚拟配置文件。 配置文件写入标准输出,不会覆盖现有文件。 此配置文件还包含在您丢失整个系统的情况下 重建磁盘挂载点所需的信息。 - - - -
-
-
+
+ + +
-v, --verbose -
+
向屏幕打印更多信息。 如果指定一次,它会打印排除的文件 和附加统计信息。 此选项对日志文件没有影响。 - - - -
-
-
+
+ + +
-q, --quiet -
+
向屏幕打印更少信息。 如果指定一次,它会删除进度条;两次, 正在运行的操作;三次,信息 消息;四次,状态消息。 致命错误始终会打印到屏幕。 此选项对日志文件没有影响。 - - - -
-
-
+
+ + +
-H, --help -
+
打印简短的帮助屏幕。 - - - -
-
-
+
+ + +
-V, --version -
+
打印程序版本。 - - - - -
-

+

+

7 Configuration -

+

SnapRAID 需要一个配置文件来了解您的磁盘阵列 位于何处以及在哪里存储奇偶校验信息。 -

在 Unix 中,如果存在,它使用文件 /usr/local/etc/snapraid.conf, -否则使用 /etc/snapraid.conf。 -在 Windows 中,它使用与 snapraid.exe 相同的目录中的文件 snapraid.conf。 +

在 Unix 中,如果存在,它使用文件 `/usr/local/etc/snapraid.conf`, +否则使用 `/etc/snapraid.conf`。 +在 Windows 中,它使用与 `snapraid.exe` 相同的目录中的文件 `snapraid.conf`。

它必须包含以下选项(区分大小写): -

-

+

7.1 parity FILE [,FILE] ... -

+

定义用于存储奇偶校验信息的文件。 奇偶校验可实现针对单个磁盘 故障的保护,类似于 RAID5。 @@ -1340,11 +1150,9 @@ parity FILE [,FILE] ...

在 Windows 中,每个磁盘会留下 256 MB 未使用空间,以避免 有关磁盘已满的警告。

此选项是强制性的,并且只能使用一次。 -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

定义用于存储额外奇偶校验信息的文件。

为指定的每个奇偶校验级别启用一个额外的保护级别:

    @@ -1365,84 +1173,63 @@ parity FILE [,FILE] ...

每个奇偶校验级别都需要存在所有先前的奇偶校验级别。 -

与 parity 选项相同的注意事项适用。 +

与 'parity' 选项相同的注意事项适用。

这些选项是可选的,并且只能使用一次。 -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

定义用于存储三奇偶校验的备用文件和格式。 -

此选项是 3-parity 的替代方案,主要面向不支持 +

此选项是 '3-parity' 的替代方案,主要面向不支持 SSSE3 指令集的低端 CPU,如 ARM 或 AMD Phenom、Athlon 和 Opteron。 在这种情况下,它提供了更好的性能。

此格式类似于 ZFS RAIDZ3 使用的格式,但更快。 与 ZFS 一样,它在三奇偶校验之外不起作用。 -

当使用 3-parity 时,如果建议使用 z-parity 格式以提高性能, +

当使用 '3-parity' 时,如果建议使用 'z-parity' 格式以提高性能, 您将收到警告。

可以通过调整配置文件中的所需 z-parity 或 3-parity 文件, -并使用 fix 重新创建它,从一种格式转换为另一种格式。 -

-
-

+并使用 'fix' 重新创建它,从一种格式转换为另一种格式。 +

7.4 content FILE -

+

定义用于存储磁盘阵列中所有文件的列表和校验和的文件。

它可以放置在用于数据、奇偶校验或 任何其他可用磁盘上。 -如果您使用数据磁盘,此文件会自动从 sync 过程中排除。 +如果您使用数据磁盘,此文件会自动从 `sync` 过程中排除。

此选项是强制性的,并且可以多次使用以保存 同一文件的多个副本。

您必须为使用的每个奇偶校验磁盘存储至少一个副本, 再加上一个。使用额外的副本不会有害。 -

-
-

+

7.5 data NAME DIR -

+

定义阵列中数据磁盘的名称和挂载点。 NAME 用于标识磁盘,并且必须是唯一的。 DIR 是磁盘在文件系统中的挂载点。

您可以根据需要更改挂载点,只要保持 NAME 固定即可。

您应该为阵列中的每个数据磁盘使用一个选项。 -

您可以通过直接在配置文件中更改 NAME,然后运行 sync 命令来 +

您可以通过直接在配置文件中更改 NAME,然后运行 `sync` 命令来 稍后重命名磁盘。 在重命名的情况下,关联是使用存储的磁盘 UUID 完成的。 -

-
-

-extra NAME DIR -

-

定义要通过 smart 和 probe 命令监控的额外磁盘的名称和挂载点。 -

这对于监控不属于阵列但系统运行所必需的磁盘(例如启动盘)非常有用。 -

请注意,此类磁盘不受 up 和 down 命令的影响,因为它们被预期始终处于 -旋转状态。 -

-
-

+

7.6 nohidden -

+

排除所有隐藏文件和目录。 -在 Unix 中,隐藏文件是以 . 开头的文件。 +在 Unix 中,隐藏文件是以 `.` 开头的文件。 在 Windows 中,它们是具有隐藏属性的文件。 -

-
-

+

7.7 exclude/include PATTERN -

+

定义要从同步过程中排除或包含的文件或目录模式。 所有模式都按指定的顺序处理。 -

如果匹配的第一个模式是 exclude 模式,则排除该文件。 -如果它是 include 模式,则包含该文件。 -如果没有模式匹配,则如果指定的最后一个模式是 include,则排除该文件, -或者如果指定的最后一个模式是 exclude,则包含该文件。 +

如果匹配的第一个模式是 `exclude` 模式,则排除该文件。 +如果它是 `include` 模式,则包含该文件。 +如果没有模式匹配,则如果指定的最后一个模式是 `include`,则排除该文件, +或者如果指定的最后一个模式是 `exclude`,则包含该文件。

有关模式规范的更多详细信息,请参阅 PATTERN 部分。

此选项可以多次使用。 -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

定义奇偶校验的基本块大小(以 KiB 为单位)。 一 KiB 是 1024 字节。

默认的 blocksize 是 256,这应该适用于大多数情况。 @@ -1460,7 +1247,7 @@ blocksize SIZE_IN_KIBIBYTES

作为一个近似值,您可以假设每个文件浪费了半个块大小的空间。 例如,对于 100,000 个文件和 256 KiB 的块大小,您将浪费 12.8 GB 的奇偶校验空间, 这可能导致数据磁盘上少 12.8 GB 的可用空间。 -

您可以使用 status 检查每个磁盘上浪费的空间量。 +

您可以使用 `status` 检查每个磁盘上浪费的空间量。 这是您必须在数据磁盘上留出的空闲空间量, 或用于不包含在阵列中的文件的空间量。 如果此值为负,则表示您即将填满奇偶校验空间, @@ -1470,16 +1257,16 @@ blocksize SIZE_IN_KIBIBYTES 则您有足够的额外空间来处理每个数据磁盘上多达 100,000 个 文件而不会浪费任何空间。

在 Linux 中获得更大的奇偶校验分区的一个技巧是使用以下命令格式化它: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

这会导致大约 1.5% 的额外空间,对于 4 TB 磁盘约为 60 GB, 这允许每个数据磁盘上大约 460,000 个文件而不会浪费任何空间。 -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

定义保存块的散列大小(以字节为单位)。

默认的 hashsize 是 16 字节(128 位),这应该适用于大多数情况。

**警告!** 此选项仅供专家使用,强烈建议不要更改此值。 @@ -1507,24 +1294,20 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

在同步或 scrub 之后,处理指定数量的 GB 后,自动保存状态。 此选项有助于避免在机器崩溃或任何其他事件中断时, -从头开始重新启动长时间的 sync 命令。 -

-
-

+从头开始重新启动长时间的 `sync` 命令。 +

7.11 temp_limit TEMPERATURE_CELSIUS -

+

设置允许的最高磁盘温度(摄氏度)。指定后, SnapRAID 会使用 smartctl 工具定期检查所有磁盘的温度。 SnapRAID 运行时会显示当前磁盘温度。 如果任何磁盘超过此限制,所有操作都会停止, -并在 temp_sleep 选项定义的持续时间内将磁盘停转(置于待机状态)。 +并在 `temp_sleep` 选项定义的持续时间内将磁盘停转(置于待机状态)。 在休眠期过后,操作恢复,如果温度限制再次达到, 可能会再次暂停。

在操作期间,SnapRAID 还会分析每个磁盘的加热曲线, @@ -1541,84 +1324,81 @@ SnapRAID 运行时会显示当前磁盘温度。 作为备用参考。

通常,SnapRAID 只显示最热磁盘的温度。 要显示所有磁盘的温度,请使用 -A 或 --stats 选项。 -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

设置达到温度限制时的待机时间(以分钟为单位)。 在此期间,磁盘保持停转状态。默认值为 5 分钟。 -

-
-

+

7.13 pool DIR -

-

定义 pooling 目录,其中使用 pool 命令创建磁盘 + +

定义 `pooling` 目录,其中使用 `pool` 命令创建磁盘 阵列的虚拟视图。

目录必须已经存在。 -

-
-

+

7.14 share UNC_DIR -

+

定义远程访问磁盘所需的 Windows UNC 路径。

如果指定了此选项,则在 pool 目录中创建的符号链接会使用此 UNC 路径 来访问磁盘。 如果没有此选项,则生成的符号链接仅使用本地路径, 这不允许通过网络共享 pool 目录。 -

符号链接是使用指定的 UNC 路径,添加在 data 选项中指定的 +

符号链接是使用指定的 UNC 路径,添加在 `data` 选项中指定的 磁盘名称,最后添加文件目录和名称形成的。

此选项仅在 Windows 中需要。 -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

定义自定义 smartctl 选项以获取每个磁盘的 SMART 属性。 这对于 RAID 控制器和一些无法自动检测的 USB 磁盘可能需要。%s 占位符会被设备名称替换, 但对于固定的设备(如 RAID 控制器)是可选的。 -

DISK 是在 data 选项中指定的相同磁盘名称。 -PARITY 是奇偶校验名称之一:parity、2-parity、3-parity、 -4-parity、5-parity、6-parity 或 z-parity。 -

在指定的 OPTIONS 中,字符串 %s 被设备名称替换。 +

DISK 是在 `data` 选项中指定的相同磁盘名称。 +PARITY 是奇偶校验名称之一:`parity`、`2-parity`、`3-parity`、 +`4-parity`、`5-parity`、`6-parity` 或 `z-parity`。 +

在指定的 OPTIONS 中,字符串 `%s` 被设备名称替换。 对于 RAID 控制器,设备可能是固定的, -您可能不需要使用 %s。 +您可能不需要使用 `%s`。

请参阅 smartmontools 文档以了解可能的选项: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

例如: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

在计算磁盘故障概率时忽略指定的 SMART 属性。 如果磁盘报告了特定属性的不寻常或误导值,此选项很有用。 -

DISK 是在 data 选项中指定的相同磁盘名称。 -PARITY 是奇偶校验名称之一:parity、2-parity、3-parity、 -4-parity、5-parity、6-parity 或 z-parity。 +

DISK 是在 `data` 选项中指定的相同磁盘名称。 +PARITY 是奇偶校验名称之一:`parity`、`2-parity`、`3-parity`、 +`4-parity`、`5-parity`、`6-parity` 或 `z-parity`。 特殊值 * 可用于在所有磁盘上忽略该属性。 -

例如,要在所有磁盘上忽略 Current Pending Sector Count 属性: -

+

例如,要在所有磁盘上忽略 `Current Pending Sector Count` 属性: +

+
 smartignore * 197
 
+

要仅在第一个奇偶校验磁盘上忽略它: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

Unix 的典型配置示例如下: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1632,8 +1412,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

Windows 的典型配置示例如下: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1648,243 +1430,168 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

-

模式提供了一种灵活的方法来过滤要包含或排除的文件。通过使用通配符(globbing), -您可以定义匹配特定文件名或整个目录结构的规则,而无需手动列出每个路径。 -

问号 ? 匹配除目录分隔符以外的任何单个字符。这使得它在匹配具有变量字符 -的文件名时非常有用,同时将模式限制在单个目录层级内。 -

单星号 * 匹配任何字符序列,但与问号一样,它绝不会跨越目录边界。 -它在正斜杠处停止,因此适用于匹配单个路径组件内的内容。 -这是 Shell 通配符中常见的标准行为。 -

双星号 ** 功能更强大,它可以匹配任何字符序列,包括目录分隔符。 -这允许模式匹配跨越多个目录层级。当 ** 直接嵌入在模式中时, -它可以匹配零个或多个字符,包括周围文字文本之间的斜杠。 -

** 最重要的用法是特殊形式 /**/。它可以匹配零个或多个完整的目录层级, -从而可以在不知道确切路径结构的情况下,匹配目录树中任何深度的文件。 -例如,模式 src/**/main.js 匹配 src/main.js(跳过零个目录)、 -src/ui/main.js(跳过一个目录)以及 src/ui/components/main.js -(跳过两个目录)。 -

使用方括号 [] 的字符类匹配指定集合或范围内的单个字符。 -与其他单字符模式一样,它们不匹配目录分隔符。字符类支持使用 -感叹号进行范围指定和否定。 -

需要记住的根本区别是,*、? 和字符类都遵循目录边界, -并且仅在单个路径组件内匹配,而 ** 是唯一可以跨越目录分隔符匹配的模式。 + +

模式用于选择要排除或包含在过程中的文件子集。

有四种不同类型的模式: -

-
-
+

+ +
FILE -
-选择任何名为 FILE 的文件。 +
+选择任何名为 FILE 的文件。您可以使用任何 globbing +字符,如 * 和 ?,以及字符类,如 [a-z]。 此模式仅适用于文件,不适用于目录。 - - - -
-
-
+
+ + +
DIR/ -
+
选择任何名为 DIR 的目录及其内部的所有内容。 +您可以使用任何 globbing 字符,如 * 和 ?。 此模式仅适用于目录,不适用于文件。 - - - -
-
-
+
+ + +
/PATH/FILE -
-选择指定的确切文件路径。此模式仅适用于文件,不适用于目录。 -
- - -
-
-
+
+选择完全指定的 file path。您可以使用任何 +globbing 字符,如 * 和 ?,但它们绝不匹配 +目录斜杠。 +此模式仅适用于文件,不适用于目录。 +
+ + +
/PATH/DIR/ -
-选择指定的确切目录路径及其内部的所有内容。此模式仅适用于目录, -不适用于文件。 -
- - +
+选择完全指定的 directory path 及其内部的所有内容。 +您可以使用任何 globbing 字符,如 * 和 ?,但 +它们绝不匹配目录斜杠。 +此模式仅适用于目录,不适用于文件。 +

当您指定以 / 开头的绝对路径时,它应用于阵列**根目录**, 而不是本地文件系统根目录。

在 Windows 中,您可以使用反斜杠 \ 代替正斜杠 /。 Windows 系统目录、连接点、挂载点和其他 Windows 特殊目录被视为文件,这意味着要排除它们, 您必须使用文件规则,而不是目录规则。 -

如果文件名包含 *、?、[ -或 ] 字符,您必须对其进行转义,以避免将其解释为 -globbing 字符。在 Unix 中,转义字符是 \;在 Windows 中,它是 ^。 +

如果文件名包含 '*'、'?'、'[' +或 ']' 字符,您必须对其进行转义,以避免将其解释为 +globbing 字符。在 Unix 中,转义字符是 '\';在 Windows 中,它是 '^'。 当模式在命令行上时,您必须双写转义 字符,以避免命令 shell 对其进行解释。

在配置文件中,您可以使用不同的策略来过滤要处理的文件。 -最简单的方法是仅使用 exclude 规则来删除所有您不想处理的 +最简单的方法是仅使用 `exclude` 规则来删除所有您不想处理的 文件和目录。例如: -

-# 排除任何名为 *.unrecoverable 的文件
+

+
+# 排除任何名为 `*.unrecoverable` 的文件
 exclude *.unrecoverable
-# 排除根目录 /lost+found
+# 排除根目录 `/lost+found`
 exclude /lost+found/
-# 排除任何名为 tmp 的子目录
+# 排除任何名为 `tmp` 的子目录
 exclude tmp/
 
-

相反的方法是仅定义您想要处理的文件,仅使用 include 规则。例如: -

+
+

相反的方法是仅定义您想要处理的文件,仅使用 `include` 规则。例如: +

+
 # 仅包含一些目录
 include /movies/
 include /musics/
 include /pictures/
 
-

最后的方法是混合使用 exclude 和 include 规则。在这种情况下, +

+

最后的方法是混合使用 `exclude` 和 `include` 规则。在这种情况下, 规则的顺序很重要。较早的规则优先于 较晚的规则。 -为了简化,您可以先列出所有 exclude 规则,然后 -列出所有 include 规则。例如: -

-# 排除任何名为 *.unrecoverable 的文件
+为了简化,您可以先列出所有 `exclude` 规则,然后
+列出所有 `include` 规则。例如:
+

+
+# 排除任何名为 `*.unrecoverable` 的文件
 exclude *.unrecoverable
-# 排除任何名为 tmp 的子目录
+# 排除任何名为 `tmp` 的子目录
 exclude tmp/
 # 仅包含一些目录
 include /movies/
 include /musics/
 include /pictures/
 
-

在命令行上,使用 -f 选项,您只能使用 include +

+

在命令行上,使用 -f 选项,您只能使用 `include` 模式。例如: -

+

+
 # 仅检查 .mp3 文件。
 # 在 Unix 中,使用引号以避免 shell 扩展 globbing。
 snapraid -f "*.mp3" check
 
+

在 Unix 中,在命令行上使用 globbing 字符时,必须 引用它们以防止 shell 扩展它们。 -

-
-

-Ignore File -

-

除了配置文件中的全局规则外,您还可以在阵列内的任何目录中放置 -.snapraidignore 文件,以定义分散的排除规则。 -

在 .snapraidignore 中定义的规则会在配置文件中的规则之后应用。 -这意味着它们具有更高的优先级,可用于排除先前由全局配置包含的文件。 -实际上,如果本地规则匹配,则无论全局包含设置如何,该文件都会被排除。 -

.snapraidignore 中的模式逻辑与全局配置相同,但模式锚定在 -该文件所在的目录: -

-
-
-FILE -
-选择此目录或其下方任何名为 FILE 的文件。 -这遵循与全局模式相同的通配符规则。 -
-
-
-
-
-
-DIR/ -
-选择任何名为 DIR 的目录及其内部的所有内容, -位于此目录或其下方。 -
-
-
-
-
-
-/PATH/FILE -
-选择相对于 .snapraidignore 文件位置指定的精确文件。 -
-
-
-
-
-
-/PATH/DIR/ -
-选择相对于 .snapraidignore 文件位置指定的精确目录 -及其内部的所有内容。 -
-
-
-

与全局配置不同,.snapraidignore 文件仅支持排除规则; -您不能使用 include 模式或否定符号 (!)。 -

例如,如果您在 /mnt/disk1/projects/ 中有一个 .snapraidignore: -

-# 仅排除 /mnt/disk1/projects/output.bin
-/output.bin
-# 排除 projects/ 中任何名为 build 的目录
-build/
-# 排除 projects/ 或其子文件夹中任何 .tmp 文件
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID 将文件列表和校验和存储在 content 文件中。

它是一个二进制文件,列出了磁盘阵列中存在的所有文件, 以及用于验证其完整性的所有校验和。 -

此文件由 sync 和 scrub 命令读取和写入,并由 -fix、check 和 status 命令读取。 -

-
-

+

此文件由 `sync` 和 `scrub` 命令读取和写入,并由 +`fix`、`check` 和 `status` 命令读取。 +

10 Parity -

+

SnapRAID 将阵列的奇偶校验信息存储在 parity 文件中。 -

这些是二进制文件,包含 content 文件中定义的所有 +

这些是二进制文件,包含 `content` 文件中定义的所有 块的计算奇偶校验。 -

这些文件由 sync 和 fix 命令读取和写入, -并且仅由 scrub 和 check 命令读取。 -

-
-

+

这些文件由 `sync` 和 `fix` 命令读取和写入, +并且仅由 `scrub` 和 `check` 命令读取。 +

11 Encoding -

+

SnapRAID 在 Unix 中忽略任何编码。它读取并存储 文件系统使用的相同编码的文件名。

在 Windows 中,从文件系统读取的所有名称都会被转换并 以 UTF-8 格式处理。 -

要使文件名正确打印,您必须使用命令 chcp 65001 将 Windows -控制台设置为 UTF-8 模式,并使用 TrueType 字体,如 Lucida Console, +

要使文件名正确打印,您必须使用命令 `chcp 65001` 将 Windows +控制台设置为 UTF-8 模式,并使用 TrueType 字体,如 `Lucida Console`, 作为控制台字体。这仅影响打印的文件名;如果 您将控制台输出重定向到文件,则生成的文件始终 采用 UTF-8 格式。 -

+

+

+

-
-
-
+
- - + diff --git a/manual.html b/manual.html index 4a388827..6098fe19 100644 --- a/manual.html +++ b/manual.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID CLI Manual - - - - - - + + + + + + + + + + +SnapRAID @@ -36,86 +36,39 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
- - - -
- -
- -
-

+

1 Synopsis -

+
 snapraid [-c, --conf CONFIG]
     [-f, --filter PATTERN] [-d, --filter-disk NAME]
@@ -124,26 +77,23 @@ snapraid [-c, --conf CONFIG]
     [-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]
+    [-R, --force-realloc]
     [-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
+    |list|dup|pool|devices|touch|rehash
 
 snapraid [-V, --version] [-H, --help] [-C, --gen-conf CONTENT]
 
-
-
-

+

2 Description -

+

SnapRAID is a backup program designed for disk arrays, storing parity information for data recovery in the event of up to six disk failures. @@ -183,14 +133,14 @@ power and reducing noise.

For more information, please visit the official SnapRAID site: -

-https://www.snapraid.it/
+

+
+https://www.snapraid.it/
 
- -
-

+

+

3 Limitations -

+

SnapRAID is a hybrid between a RAID and a backup program, aiming to combine the best benefits of both. However, it has some limitations that you should consider before using it. @@ -228,13 +178,11 @@ Only file names, timestamps, symlinks, and hardlinks are saved. Permissions, ownership, and extended attributes are not saved. -

-
-

+

4 Getting Started -

+

To use SnapRAID, you need to first select one disk in your disk array -to dedicate to parity information. With one disk for parity, you +to dedicate to `parity` information. With one disk for parity, you will be able to recover from a single disk failure, similar to RAID5.

If you want to recover from more disk failures, similar to RAID6, you must reserve additional disks for parity. Each additional parity @@ -242,31 +190,34 @@ disk allows recovery from one more disk failure.

As parity disks, you must pick the largest disks in the array, as the parity information may grow to the size of the largest data disk in the array. -

These disks will be dedicated to storing the parity files. +

These disks will be dedicated to storing the `parity` files. You should not store your data on them. -

Then, you must define the data disks that you want to protect +

Then, you must define the `data` disks that you want to protect with SnapRAID. The protection is more effective if these disks contain data that rarely changes. For this reason, it's better to NOT include the Windows C:\ disk or the Unix /home, /var, and /tmp directories. -

The list of files is saved in the content files, usually +

The list of files is saved in the `content` files, usually stored on the data, parity, or boot disks. This file contains the details of your backup, including all the checksums to verify its integrity. -The content file is stored in multiple copies, and each copy must +The `content` file is stored in multiple copies, and each copy must be on a different disk to ensure that, even in case of multiple disk failures, at least one copy is available.

For example, suppose you are interested in only one parity level of protection, and your disks are located at: -

+

+
 /mnt/diskp <- selected disk for parity
 /mnt/disk1 <- first disk to protect
 /mnt/disk2 <- second disk to protect
 /mnt/disk3 <- third disk to protect
 
+

You must create the configuration file /etc/snapraid.conf with the following options: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /var/snapraid/snapraid.content
 content /mnt/disk1/snapraid.content
@@ -275,9 +226,11 @@ data d1 /mnt/disk1/
 data d2 /mnt/disk2/
 data d3 /mnt/disk3/
 
+

If you are on Windows, you should use the Windows path format, with drive letters and backslashes instead of slashes. -

+

+
 parity E:\snapraid.parity
 content C:\snapraid\snapraid.content
 content F:\array\snapraid.content
@@ -286,16 +239,21 @@ data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 
+

If you have many disks and run out of drive letters, you can mount disks directly in subfolders. See: -

-https://www.google.com/search?q=Windows+mount+point
+

+
+https://www.google.com/search?q=Windows+mount+point
 
-

At this point, you are ready to run the sync command to build the +

+

At this point, you are ready to run the `sync` command to build the parity information. -

+

+
 snapraid sync
 
+

This process may take several hours the first time, depending on the size of the data already present on the disks. If the disks are empty, the process is immediate. @@ -303,53 +261,60 @@ the process is immediate. will resume where it was interrupted.

When this command completes, your data is SAFE.

Now you can start using your array as you like and periodically -update the parity information by running the sync command. -

-

+update the parity information by running the `sync` command. +

4.1 Scrubbing -

+

To periodically check the data and parity for errors, you can -run the scrub command. -

+run the `scrub` command.
+

+
 snapraid scrub
 
+

This command compares the data in your array with the hash computed -during the sync command to verify integrity. +during the `sync` command to verify integrity.

Each run of the command checks approximately 8% of the array, excluding data already scrubbed in the previous 10 days. You can use the -p, --plan option to specify a different amount and the -o, --older-than option to specify a different age in days. For example, to check 5% of the array for blocks older than 20 days, use: -

+

+
 snapraid -p 5 -o 20 scrub
 
+

If silent or input/output errors are found during the process, -the corresponding blocks are marked as bad in the content file -and listed in the status command. -

+the corresponding blocks are marked as bad in the `content` file
+and listed in the `status` command.
+

+
 snapraid status
 
-

To fix them, you can use the fix command, filtering for bad blocks with +

+

To fix them, you can use the `fix` command, filtering for bad blocks with the -e, --filter-error option: -

+

+
 snapraid -e fix
 
-

At the next scrub, the errors will disappear from the status report +

+

At the next `scrub`, the errors will disappear from the `status` report if they are truly fixed. To make it faster, you can use -p bad to scrub only blocks marked as bad. -

+

+
 snapraid -p bad scrub
 
-

Running scrub on an unsynced array may report errors caused by -removed or modified files. These errors are reported in the scrub +

+

Running `scrub` on an unsynced array may report errors caused by +removed or modified files. These errors are reported in the `scrub` output, but the related blocks are not marked as bad. -

-
-

+

4.2 Pooling -

+

Note: The pooling feature described below has been superseded by the -mergerfs tool, which is now the recommended option for Linux users in +mergefs tool, which is now the recommended option for Linux users in the SnapRAID community. Mergefs provides a more flexible and efficient way to pool multiple drives into a single unified mount point, allowing seamless access to files across your array without relying @@ -357,27 +322,36 @@ on symbolic links. It integrates well with SnapRAID for parity protection and is commonly used in setups like OpenMediaVault (OMV) or custom NAS configurations.

To have all the files in your array shown in the same directory tree, -you can enable the pooling feature. It creates a read-only virtual +you can enable the `pooling` feature. It creates a read-only virtual view of all the files in your array using symbolic links. -

You can configure the pooling directory in the configuration file with: -

+

You can configure the `pooling` directory in the configuration file with: +

+
 pool /pool
 
+

or, if you are on Windows, with: -

+

+
 pool C:\pool
 
-

and then run the pool command to create or update the virtual view. -

+
+

and then run the `pool` command to create or update the virtual view. +

+
 snapraid pool
 
+

If you are using a Unix platform and want to share this directory over the network to either Windows or Unix machines, you should add the following options to your /etc/samba/smb.conf: -

+

+
 # In the global section of smb.conf
 unix extensions = no
 
+
+
 # In the share section of smb.conf
 [pool]
@@ -388,101 +362,115 @@ guest ok = yes
 wide links = yes
 follow symlinks = yes
 
+

In Windows, sharing symbolic links over a network requires clients to resolve them remotely. To enable this, besides sharing the pool directory, you must also share all the disks independently, using the disk names defined in the configuration file as share points. You must also specify -in the share option of the configuration file the Windows UNC path that +in the `share` option of the configuration file the Windows UNC path that remote clients need to use to access these shared disks. -

For example, operating from a server named darkstar, you can use +

For example, operating from a server named `darkstar`, you can use the options: -

+

+
 data d1 F:\array\
 data d2 G:\array\
 data d3 H:\array\
 pool C:\pool
 share \\darkstar
 
+

and share the following directories over the network: -

+

+
 \\darkstar\pool -> C:\pool
 \\darkstar\d1 -> F:\array
 \\darkstar\d2 -> G:\array
 \\darkstar\d3 -> H:\array
 
+

to allow remote clients to access all the files at \\darkstar\pool.

You may also need to configure remote clients to enable access to remote symlinks with the command: -

+

+
 fsutil behavior set SymlinkEvaluation L2L:1 R2R:1 L2R:1 R2L:1
 
- -
-

+

+

4.3 Undeleting -

+

SnapRAID functions more like a backup program than a RAID system, and it can be used to restore or undelete files to their previous state using the -f, --filter option: -

+

+
 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, which restores only missing files, leaving all others untouched. -

+

+
 snapraid fix -m -f DIR/
 
+

Or to recover all the deleted files on all drives with: -

+

+
 snapraid fix -m
 
- -
-

+

+

4.4 Recovering -

+

The worst has happened, and you have lost one or more disks!

DO NOT PANIC! You will be able to recover them!

The first thing you must do is avoid further changes to your disk array. Disable any remote connections to it and any scheduled processes, including any scheduled SnapRAID nightly sync or scrub.

Then proceed with the following steps. -

-

+

4.4.1 STEP 1 -> Reconfigure -

+

You need some space to recover, ideally on additional spare disks, but an external USB disk or remote disk will suffice. -

Modify the SnapRAID configuration file to make the data or parity +

Modify the SnapRAID configuration file to make the `data` or `parity` option of the failed disk point to a location with enough empty space to recover the files. -

For example, if disk d1 has failed, change from: -

+

For example, if disk `d1` has failed, change from: +

+
 data d1 /mnt/disk1/
 
+

to: -

+

+
 data d1 /mnt/new_spare_disk/
 
-

If the disk to recover is a parity disk, update the appropriate parity +

+

If the disk to recover is a parity disk, update the appropriate `parity` option. If you have multiple failed disks, update all their configuration options. -

-
-

+

4.4.2 STEP 2 -> Fix -

+

Run the fix command, storing the log in an external file with: -

+

+
 snapraid -d NAME -l fix.log fix
 
-

Where NAME is the name of the disk, such as d1 in our previous example. -If the disk to recover is a parity disk, use the names parity, 2-parity, +

+

Where NAME is the name of the disk, such as `d1` in our previous example. +If the disk to recover is a parity disk, use the names `parity`, `2-parity`, etc. If you have multiple failed disks, use multiple -d options to specify all of them. @@ -490,273 +478,226 @@ of them.

Ensure you have a few gigabytes free to store the fix.log file. Run it from a disk with sufficient free space.

Now you have recovered all that is recoverable. If some files are partially -or totally unrecoverable, they will be renamed by adding the .unrecoverable +or totally unrecoverable, they will be renamed by adding the `.unrecoverable` extension.

You can find a detailed list of all unrecoverable blocks in the fix.log file -by checking all lines starting with unrecoverable:. +by checking all lines starting with `unrecoverable:`.

If you are not satisfied with the recovery, you can retry it as many times as you wish.

For example, if you have removed files from the array after the last -sync, this may result in some files not being recovered. -In this case, you can retry the fix using the -i, --import option, +`sync`, this may result in some files not being recovered. +In this case, you can retry the `fix` using the -i, --import option, specifying where these files are now to include them again in the recovery process.

If you are satisfied with the recovery, you can proceed further, -but note that after syncing, you cannot retry the fix command +but note that after syncing, you cannot retry the `fix` command anymore! -

-
-

+

4.4.3 STEP 3 -> Check -

-

As a cautious check, you can now run a check command to ensure that + +

As a cautious check, you can now run a `check` command to ensure that everything is correct on the recovered disk. -

+

+
 snapraid -d NAME -a check
 
-

Where NAME is the name of the disk, such as d1 in our previous example. +

+

Where NAME is the name of the disk, such as `d1` in our previous example.

The -d and -a options tell SnapRAID to check only the specified disk and ignore all parity data.

This command will take a long time, but if you are not overly cautious, you can skip it. -

-
-

+

4.4.4 STEP 4 -> Sync -

-

Run the sync command to resynchronize the array with the new disk. -

+
+

Run the `sync` command to resynchronize the array with the new disk. +

+
 snapraid sync
 
+

If everything is recovered, this command is immediate. -

-
-
-
-

+

5 Commands -

+

SnapRAID provides a few simple commands that allow you to:

  • -Print the status of the array -> status +Print the status of the array -> `status`
  • -Control the disks -> smart, probe, up, down +Control the disks -> `smart`, `probe`, `up`, `down`
  • -Make a backup/snapshot -> sync +Make a backup/snapshot -> `sync`
  • -Periodically check data -> scrub +Periodically check data -> `scrub`
  • -Restore the last backup/snapshot -> fix. +Restore the last backup/snapshot -> `fix`.

Commands must be written in lowercase. -

-

+

5.1 status -

+

Prints a summary of the state of the disk array.

It includes information about parity fragmentation, how old the blocks are without checking, and all recorded silent errors encountered while scrubbing.

The information presented refers to the latest time you -ran sync. Later modifications are not taken into account. +ran `sync`. Later modifications are not taken into account.

If bad blocks were detected, their block numbers are listed. -To fix them, you can use the fix -e command. +To fix them, you can use the `fix -e` command.

It also shows a graph representing the last time each block -was scrubbed or synced. Scrubbed blocks are shown with *, -blocks synced but not yet scrubbed with o. +was scrubbed or synced. Scrubbed blocks are shown with '*', +blocks synced but not yet scrubbed with 'o'.

Nothing is modified. -

-
-

+

5.2 smart -

+

Prints a SMART report of all the disks in the system.

It includes an estimation of the probability of failure in the next year, allowing you to plan maintenance replacements of disks that show suspicious attributes.

This probability estimation is obtained by correlating the SMART attributes of the disks with the Backblaze data available at: -

-https://www.backblaze.com/hard-drive-test-data.html
+

+
+https://www.backblaze.com/hard-drive-test-data.html
 
-

If SMART reports that a disk is failing, FAIL or PREFAIL is printed +

+

If SMART reports that a disk is failing, `FAIL` or `PREFAIL` is printed for that disk, and SnapRAID returns with an error. In this case, immediate replacement of the disk is highly recommended.

Other possible status strings are: -

-
-
+

+ + + +
logfail -
+
In the past, some attributes were lower than the threshold. - - -
-
+
logerr -
+
The device error log contains errors. - - -
-
+
selferr -
+
The device self-test log contains errors. - - - +

If the -v, --verbose option is specified, a deeper statistical analysis is provided. This analysis can help you decide if you need more or less parity. -

This command uses the smartctl tool and is equivalent to running -smartctl -a on all devices. +

This command uses the `smartctl` tool and is equivalent to running +`smartctl -a` on all devices.

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

Nothing is modified. -

-
-

+

5.3 probe -

+

Prints the POWER state of all disks in the system. -

Standby means the disk is not spinning. Active means +

`Standby` means the disk is not spinning. `Active` means the disk is spinning. -

This command uses the smartctl tool and is equivalent to running -smartctl -n standby -i on all devices. +

This command uses the `smartctl` tool and is equivalent to running +`smartctl -n standby -i` on all devices.

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

Nothing is modified. -

-
-

+

5.4 up -

+

Spins up all the disks of the array.

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

Spinning up all the disks at the same time requires a lot of power. Ensure that your power supply can sustain it.

Nothing is modified. -

-
-

+

5.5 down -

+

Spins down all the disks of the array. -

This command uses the smartctl tool and is equivalent to running -smartctl -s standby,now on all devices. +

This command uses the `smartctl` tool and is equivalent to running +`smartctl -s standby,now` on all devices.

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

To automatically spin down on error, you can use the -s, --spin-down-on-error -option with any other command, which is equivalent to running down manually +option with any other command, which is equivalent to running `down` manually when an error occurs.

Nothing is modified. -

-
-

+

5.6 diff -

-

Lists all the files modified since the last sync that need to have + +

Lists all the files modified since the last `sync` that need to have their parity data recomputed.

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

After listing all changed files, a summary of the changes is presented, grouped by: -

-
-
+

+ + + + + + + +
equal -
+
Files unchanged from before. - - -
-
+
added -
+
Files added that were not present before. - - -
-
+
removed -
+
Files removed. - - -
-
+
updated -
+
Files with a different size or timestamp, meaning they were modified. - - -
-
+
moved -
+
Files moved to a different directory on the same disk. They are identified by having the same name, size, timestamp, and inode, but a different directory. - - -
-
+
copied -
-Files copied on the same or a different disk where the -original file still exists. They are identified by having -the same name, size, and timestamp. If the sub-second -timestamp is zero, the full path must match to be -identified, not just the name. -
- -
-
-relocated -
-Files moved on the same or a different disk where -the original has disappeared. They are identified by -having the same name, size, and timestamp. If the -sub-second timestamp is zero, the full path must match -to be identified. Unlike 'moved' files on the same disk, -relocated files have a different inode. -
-
-
-
+
+Files copied on the same or a different disk. Note that if +they are truly moved to a different disk, they will also be +counted in `removed`. +They are identified by having the same name, size, and +timestamp. If the sub-second timestamp is zero, +the full path must match, not just the name. +
restored -
-Files with a different inode but matching directory, -name, size, and timestamp. +
+Files with a different inode but matching name, size, and timestamp. These are usually files restored after being deleted. - - - -

If a sync is required, the process return code is 2, instead of the +

+

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

Nothing is modified. -

-
-

+

5.7 sync -

+

Updates the parity information. All modified files in the disk array are read, and the corresponding parity data is updated.

You can stop this process at any time by pressing Ctrl+C, without losing the work already done. -At the next run, the sync process will resume where +At the next run, the `sync` process will resume where it was interrupted.

If silent or input/output errors are found during the process, the corresponding blocks are marked as bad. @@ -768,13 +709,11 @@ If the file is moved or renamed on the same disk, keeping the same inode, the parity is not recomputed. If the file is moved to another disk, the parity is recomputed, but the previously computed hash information is retained. -

The content and parity files are modified if necessary. +

The `content` and `parity` files are modified if necessary. The files in the array are NOT modified. -

-
-

+

5.8 scrub -

+

Scrubs the array, checking for silent or input/output errors in data and parity disks.

Each invocation checks approximately 8% of the array, excluding @@ -791,104 +730,92 @@ full - Scrub everything. option to define how old the block should be. The oldest blocks are scrubbed first, ensuring an optimal check. If you want to scrub only the just-synced blocks not yet scrubbed, -use the -p new option. -

To get details of the scrub status, use the status command. +use the `-p new` option. +

To get details of the scrub status, use the `status` command.

For any silent or input/output error found, the corresponding blocks -are marked as bad in the content file. -These bad blocks are listed in status and can be fixed with fix -e. +are marked as bad in the `content` file. +These bad blocks are listed in `status` and can be fixed with `fix -e`. After the fix, at the next scrub, they will be rechecked, and if found corrected, the bad mark will be removed. -To scrub only the bad blocks, you can use the scrub -p bad command. -

It's recommended to run scrub only on a synced array to avoid +To scrub only the bad blocks, you can use the `scrub -p bad` command. +

It's recommended to run `scrub` only on a synced array to avoid reported errors caused by unsynced data. These errors are recognized as not being silent errors, and the blocks are not marked as bad, but such errors are reported in the output of the command. -

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 for each block and to mark bad blocks. -The parity files are NOT modified. +The `parity` files are NOT modified. The files in the array are NOT modified. -

-
-

+

5.9 fix -

+

Fixes all the files and the parity data.

All files and parity data are compared with the snapshot -state saved in the last sync. +state saved in the last `sync`. If a difference is found, it is reverted to the stored snapshot. -

WARNING! The fix command does not differentiate between errors and +

WARNING! The `fix` command does not differentiate between errors and intentional modifications. It unconditionally reverts the file state -to the last sync. +to the last `sync`.

If no other option is specified, the entire array is processed. Use the filter options to select a subset of files or disks to operate on. -

To fix only the blocks marked bad during sync and scrub, +

To fix only the blocks marked bad during `sync` and `scrub`, use the -e, --filter-error option. Unlike other filter options, this one applies fixes only to files that are -unchanged since the latest sync. +unchanged since the latest `sync`.

SnapRAID renames all files that cannot be fixed by adding the -.unrecoverable extension. +`.unrecoverable` extension.

Before fixing, the entire array is scanned to find any files moved -since the last sync operation. +since the last `sync` operation. These files are identified by their timestamp, ignoring their name and directory, and are used in the recovery 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.

Files are identified only by path, not by inode. -

The content file is NOT modified. -The parity files are modified if necessary. +

The `content` file is NOT modified. +The `parity` files are modified if necessary. The files in the array are modified if necessary. -

-
-

+

5.10 check -

+

Verifies all the files and the parity data. -

It works like fix, but it only simulates a recovery and no changes +

It works like `fix`, but it only simulates a recovery and no changes are written to the array.

This command is primarily intended for manual verification, such as after a recovery process or in other special conditions. -For periodic and scheduled checks, use scrub. +For periodic and scheduled checks, use `scrub`.

If you use the -a, --audit-only option, only the file data is checked, and the parity data is ignored for a faster run.

Files are identified only by path, not by inode.

Nothing is modified. -

-
-

+

5.11 list -

+

Lists all the files contained in the array at the time of the -last sync. +last `sync`.

With -v or --verbose, the subsecond time is also shown.

Nothing is modified. -

-
-

+

5.12 dup -

+

Lists all duplicate files. Two files are assumed equal if their hashes match. The file data is not read; only the precomputed hashes are used.

Nothing is modified. -

-
-

+

5.13 pool -

+

Creates or updates a virtual view of all -the files in your disk array in the pooling directory. +the files in your disk array in the `pooling` directory.

The files are not copied but linked using symbolic links.

When updating, all existing symbolic links and empty subdirectories are deleted and replaced with the new view of the array. Any other regular files are left in place.

Nothing is modified outside the pool directory. -

-
-

+

5.14 devices -

+

Prints the low-level devices used by the array.

This command displays the device associations in the array and is mainly intended as a script interface. @@ -899,11 +826,9 @@ The last column is the disk name in the array. array, but in some more complex configurations, you may have multiple low-level devices used by a single disk in the array.

Nothing is modified. -

-
-

+

5.15 touch -

+

Sets an arbitrary sub-second timestamp for all files that have it set to zero.

This improves SnapRAID's ability to recognize moved @@ -916,11 +841,9 @@ is zero, it is considered a copy only if the full path, size, and timestamp all match.

The second-precision timestamp is not modified, so all the dates and times of your files will be preserved. -

-
-

+

5.16 rehash -

+

Schedules a rehash of the entire array.

This command changes the hash kind used, typically when upgrading from a 32-bit system to a 64-bit one, to switch from @@ -928,156 +851,123 @@ MurmurHash3 to the faster SpookyHash.

If you are already using the optimal hash, this command does nothing and informs you that no action is needed.

The rehash is not performed immediately but takes place -progressively during sync and scrub. -

You can check the rehash state using status. +progressively during `sync` and `scrub`. +

You can check the rehash state using `status`.

During the rehash, SnapRAID maintains full functionality, -with the only exception that dup cannot detect duplicated +with the only exception that `dup` cannot detect duplicated files using a different hash. -

-
-

-locate -

-

Locate files stored in the parity disks. For each matching file, it -prints its location within the parity file and the number of fragments -it occupies. -

You can use the -t, --tail option to restrict the operation to files -occupying the specified tail portion of the parity. -

If you want to reallocate these files, you can then use the --W, --force-realloc-tail option. Be aware that such files will -not be protected by parity during the reallocation process. -

-
-
-

+

6 Options -

+

SnapRAID provides the following options: -

-
-
+

+ +
-c, --conf CONFIG -
+
Selects the configuration file to use. If not specified, in Unix -it uses the file /usr/local/etc/snapraid.conf if it exists, -otherwise /etc/snapraid.conf. -In Windows, it uses the file snapraid.conf in the same -directory as snapraid.exe. - - - -
-
-
+it uses the file `/usr/local/etc/snapraid.conf` if it exists, +otherwise `/etc/snapraid.conf`. +In Windows, it uses the file `snapraid.conf` in the same +directory as `snapraid.exe`. +
+ + +
-f, --filter PATTERN -
-Filters the files to process in check and fix. +
+Filters the files to process in `check` and `fix`. Only the files matching the specified pattern are processed. This option can be used multiple times. See the PATTERN section for more details on pattern specifications. In Unix, ensure globbing characters are quoted if used. -This option can be used only with check and fix. -It cannot be used with sync and scrub, as they always +This option can be used only with `check` and `fix`. +It cannot be used with `sync` and `scrub`, as they always process the entire array. - - - -
-
-
+
+ + +
-d, --filter-disk NAME -
-Filters the disks to process in check, fix, up, and down. +
+Filters the disks to process in `check`, `fix`, `up`, and `down`. You must specify a disk name as defined in the configuration file. -You can also specify parity disks with the names: parity, 2-parity, -3-parity, etc., to limit operations to a specific parity disk. +You can also specify parity disks with the names: `parity`, `2-parity`, +`3-parity`, etc., to limit operations to a specific parity disk. If you combine multiple --filter, --filter-disk, and --filter-missing options, only files matching all the filters are selected. This option can be used multiple times. -This option can be used only with check, fix, up, and down. -It cannot be used with sync and scrub, as they always +This option can be used only with `check`, `fix`, `up`, and `down`. +It cannot be used with `sync` and `scrub`, as they always process the entire array. - - - -
-
-
+
+ + +
-m, --filter-missing -
-Filters the files to process in check and fix. +
+Filters the files to process in `check` and `fix`. Only the files missing or deleted from the array are processed. -When used with fix, this acts as an undelete command. +When used with `fix`, this acts as an `undelete` command. If you combine multiple --filter, --filter-disk, and --filter-missing options, only files matching all the filters are selected. -This option can be used only with check and fix. -It cannot be used with sync and scrub, as they always +This option can be used only with `check` and `fix`. +It cannot be used with `sync` and `scrub`, as they always process the entire array. - - - -
-
-
+
+ + +
-e, --filter-error -
-Processes the files with errors in check and fix. +
+Processes the files with errors in `check` and `fix`. It processes only files that have blocks marked with silent -or input/output errors during sync and scrub, as listed in status. -This option can be used only with check and fix. - - - -
-
-
+or input/output errors during `sync` and `scrub`, as listed in `status`. +This option can be used only with `check` and `fix`. +
+ + +
-p, --plan PERC|bad|new|full -
+
Selects the scrub plan. If PERC is a numeric value from 0 to 100, it is interpreted as the percentage of blocks to scrub. Instead of a percentage, you can specify a plan: -bad scrubs bad blocks, new scrubs blocks not yet scrubbed, -and full scrubs everything. -This option can be used only with scrub. - - - -
-
-
+`bad` scrubs bad blocks, `new` scrubs blocks not yet scrubbed, +and `full` scrubs everything. +This option can be used only with `scrub`. +
+ + +
-o, --older-than DAYS -
-Selects the oldest part of the array to process in scrub. +
+Selects the oldest part of the array to process in `scrub`. DAYS is the minimum age in days for a block to be scrubbed; the default is 10. Blocks marked as bad are always scrubbed regardless of this option. -This option can be used only with scrub. - - - -
-
-
+This option can be used only with `scrub`. +
+ + +
-a, --audit-only -
-In check, verifies the hash of the files without +
+In `check`, verifies the hash of the files without checking the parity data. If you are interested only in checking the file data, this option can significantly speed up the checking process. -This option can be used only with check. - - - -
-
-
+This option can be used only with `check`. +
+ + +
-h, --pre-hash -
-In sync, runs a preliminary hashing phase of all new data +
+In `sync`, runs a preliminary hashing phase of all new data for additional verification before the parity computation. -Usually, in sync, no preliminary hashing is done, and the new +Usually, in `sync`, no preliminary hashing is done, and the new data is hashed just before the parity computation when it is read for the first time. This process occurs when the system is under @@ -1085,73 +975,52 @@ heavy load, with all disks spinning and a busy CPU. This is an extreme condition for the machine, and if it has a latent hardware problem, silent errors may go undetected because the data is not yet hashed. -To avoid this risk, you can enable the pre-hash mode to have +To avoid this risk, you can enable the `pre-hash` mode to have all the data read twice to ensure its integrity. This option also verifies files moved within the array to ensure the move operation was successful and, if necessary, allows you to run a fix operation before proceeding. -This option can be used only with sync. - - - -
-
-
+This option can be used only with `sync`. +
+ + +
-i, --import DIR -
+
Imports from the specified directory any files deleted -from the array after the last sync. -If you still have such files, they can be used by check -and fix to improve the recovery process. +from the array after the last `sync`. +If you still have such files, they can be used by `check` +and `fix` to improve the recovery process. The files are read, including in subdirectories, and are identified regardless of their name. -This option can be used only with check and fix. - - - -
-
-
+This option can be used only with `check` and `fix`. +
+ + +
-s, --spin-down-on-error -
+
On any error, spins down all managed disks before exiting with a non-zero status code. This prevents the drives from remaining active and spinning after an aborted operation, helping to avoid unnecessary heat buildup and power consumption. Use this option to ensure disks are safely stopped even when a command fails. - - - -
-
-
+
+ + +
-w, --bw-limit RATE -
+
Applies a global bandwidth limit for all disks. The RATE is the number of bytes per second. You can specify a multiplier -such as K, M, G, or T (e.g., --bw-limit 1G). - - - -
-
-
--t, --tail SIZE -
-Limit file listing to those using no more than the specified -tail size of the parity disks. -You can use multipliers such as K, M, G, or T (e.g. --tail 1G). -This option is only valid when used together with the locate -command. -
-
-
-
-
-
+such as K, M, or G (e.g., --bw-limit 1G). +
+ + +
-A, --stats -
+
Enables an extended status view that shows additional information. The screen displays two graphs: The first graph shows the number of buffered stripes for each @@ -1169,14 +1038,12 @@ All computations run in parallel with disk operations. Therefore, as long as there is measurable wait time for at least one disk, it indicates that the CPU is fast enough to keep up with the workload. - - - -
-
-
+
+ + +
-Z, --force-zero -
+
Forces the insecure operation of syncing a file with zero size that was previously non-zero. If SnapRAID detects such a condition, it stops proceeding @@ -1185,15 +1052,13 @@ This allows you to easily detect when, after a system crash, some accessed files were truncated. This is a possible condition in Linux with the ext3/ext4 file systems. -This option can be used only with sync. - - - -
-
-
+This option can be used only with `sync`. +
+ + +
-E, --force-empty -
+
Forces the insecure operation of syncing a disk with all the original files missing. If SnapRAID detects that all the files originally present @@ -1201,15 +1066,13 @@ on the disk are missing or rewritten, it stops proceeding unless you specify this option. This allows you to easily detect when a data file system is not mounted. -This option can be used only with sync. - - - -
-
-
+This option can be used only with `sync`. +
+ + +
-U, --force-uuid -
+
Forces the insecure operation of syncing, checking, and fixing with disks that have changed their UUID. If SnapRAID detects that some disks have changed UUID, @@ -1219,32 +1082,28 @@ wrong mount points. It is, however, allowed to have a single UUID change with single parity, and more with multiple parity, because this is the normal case when replacing disks after a recovery. -This option can be used only with sync, check, or -fix. - - - -
-
-
+This option can be used only with `sync`, `check`, or +`fix`. +
+ + +
-D, --force-device -
+
Forces the insecure operation of fixing with inaccessible disks or with disks on the same physical device. For example, if you lost two data disks and have a spare disk to recover only the first one, you can ignore the second inaccessible disk. Or, if you want to recover a disk in the free space left on an already used disk, sharing the same physical device. -This option can be used only with fix. - - - -
-
-
+This option can be used only with `fix`. +
+ + +
-N, --force-nocopy -
-In sync, check, and fix, disables the copy detection heuristic. +
+In `sync`, `check`, and `fix`, disables the copy detection heuristic. Without this option, SnapRAID assumes that files with the same attributes, such as name, size, and timestamp, are copies with the same data. @@ -1254,133 +1113,93 @@ to detect silent errors or to recover missing files. In some rare cases, this behavior may result in false positives or a slow process due to many hash verifications, and this option allows you to resolve such issues. -This option can be used only with sync, check, and fix. - - - -
-
-
+This option can be used only with `sync`, `check`, and `fix`. +
+ + +
-F, --force-full -
-In sync, forces a full recomputation of the parity. +
+In `sync`, forces a full recomputation of the parity. This option can be used when you add a new parity level or if you reverted to an old content file using more recent parity data. Instead of recreating the parity from scratch, this allows you to reuse the hashes present in the content file to validate data -and maintain data protection during the sync process using +and maintain data protection during the `sync` process using the existing parity data. -This option can be used only with sync. - - - -
-
-
+This option can be used only with `sync`. +
+ + +
-R, --force-realloc -
-In sync, forces a full reallocation of files and rebuild of the parity. +
+In `sync`, forces a full reallocation of files and rebuild of the parity. This option can be used to completely reallocate all files, removing fragmentation, while reusing the hashes present in the content file to validate data. -This option can be used only with sync. +This option can be used only with `sync`. WARNING! This option is for experts only, and it is highly recommended not to use it. -You DO NOT have data protection during the sync operation. - - - -
-
-
--W, --force-realloc-tail SIZE -
-Works like -R, --force-realloc, but limited to the specified -tail portion (last SIZE bytes) of each parity file. -It forces reallocation (movement) of any file fragments/blocks -currently stored in that tail section, allowing them to be -placed anywhere in the parity file(s) where free space is -available (including existing holes). -The main purpose of this option is to shrink the on-disk size -of the parity file. If the reallocation successfully clears -the entire tail section (no blocks remain using it), the -parity file is truncated, reclaiming the unused tail space. -You can use multipliers such as K, M, G, or T (e.g. ---force-realloc-tail 1G). -You can use locate -t, --tail to know in advance the affected -files. -WARNING! This option is for experts only, and it is highly -recommended not to use it. -You DO NOT have data protection during the sync operation -for the affected files. -
-
-
-
-
-
+You DO NOT have data protection during the `sync` operation. +
+ + +
-l, --log FILE -
+
Writes a detailed log to the specified file. If this option is not specified, unexpected errors are printed to the screen, potentially resulting in excessive output in case of many errors. When -l, --log is specified, only fatal errors that cause SnapRAID to stop are printed to the screen. -If the path starts with >>, the file is opened -in append mode. Occurrences of %D and %T in the name are +If the path starts with '>>', the file is opened +in append mode. Occurrences of '%D' and '%T' in the name are replaced with the date and time in the format YYYYMMDD and HHMMSS. In Windows batch files, you must double -the % character, e.g., result-%%D.log. To use >>, you must -enclose the name in quotes, e.g., ">>result.log". +the '%' character, e.g., result-%%D.log. To use '>>', you must +enclose the name in quotes, e.g., `">>result.log"`. To output the log to standard output or standard error, -you can use ">&1" and ">&2", respectively. +you can use `">&1"` and `">&2"`, respectively. See the snapraid_log.txt file or man page for log tag descriptions. - - - -
-
-
+
+ + +
-L, --error-limit NUMBER -
+
Sets a new error limit before stopping execution. By default, SnapRAID stops if it encounters more than 100 input/output errors, indicating that a disk is likely failing. -This option affects sync and scrub, which are allowed +This option affects `sync` and `scrub`, which are allowed to continue after the first set of disk errors to try to complete their operations. -However, check and fix always stop at the first error. - - - -
-
-
+However, `check` and `fix` always stop at the first error. +
+ + +
-S, --start BLKSTART -
+
Starts processing from the specified block number. This can be useful for retrying to check or fix specific blocks in case of a damaged disk. This option is mainly for advanced manual recovery. - - - -
-
-
+
+ + +
-B, --count BLKCOUNT -
+
Processes only the specified number of blocks. This option is mainly for advanced manual recovery. - - - -
-
-
+
+ + +
-C, --gen-conf CONTENT -
+
Generates a dummy configuration file from an existing content file. The configuration file is written to standard output @@ -1388,69 +1207,57 @@ and does not overwrite an existing one. This configuration file also contains the information needed to reconstruct the disk mount points in case you lose the entire system. - - - -
-
-
+
+ + +
-v, --verbose -
+
Prints more information to the screen. If specified once, it prints excluded files and additional statistics. This option has no effect on the log files. - - - -
-
-
+
+ + +
-q, --quiet -
+
Prints less information to the screen. If specified once, it removes the progress bar; twice, the running operations; three times, the info messages; four times, the status messages. Fatal errors are always printed to the screen. This option has no effect on the log files. - - - -
-
-
+
+ + +
-H, --help -
+
Prints a short help screen. - - - -
-
-
+
+ + +
-V, --version -
+
Prints the program version. - - - - -
-

+

+

7 Configuration -

+

SnapRAID requires a configuration file to know where your disk array is located and where to store the parity information. -

In Unix, it uses the file /usr/local/etc/snapraid.conf if it exists, -otherwise /etc/snapraid.conf. -In Windows, it uses the file snapraid.conf in the same -directory as snapraid.exe. +

In Unix, it uses the file `/usr/local/etc/snapraid.conf` if it exists, +otherwise `/etc/snapraid.conf`. +In Windows, it uses the file `snapraid.conf` in the same +directory as `snapraid.exe`.

It must contain the following options (case-sensitive): -

-

+

7.1 parity FILE [,FILE] ... -

+

Defines the files to use to store the parity information. The parity enables protection from a single disk failure, similar to RAID5. @@ -1465,11 +1272,9 @@ they do not become fragmented, improving performance.

In Windows, 256 MB is left unused on each disk to avoid the warning about full disks.

This option is mandatory and can be used only once. -

-
-

+

7.2 (2,3,4,5,6)-parity FILE [,FILE] ... -

+

Defines the files to use to store extra parity information.

For each parity level specified, one additional level of protection is enabled: @@ -1492,45 +1297,39 @@ is enabled:

Each parity level requires the presence of all previous parity levels. -

The same considerations as for the parity option apply. +

The same considerations as for the 'parity' option apply.

These options are optional and can be used only once. -

-
-

+

7.3 z-parity FILE [,FILE] ... -

+

Defines an alternate file and format to store triple parity. -

This option is an alternative to 3-parity, primarily intended for +

This option is an alternative to '3-parity', primarily intended for low-end CPUs like ARM or AMD Phenom, Athlon, and Opteron that do not support the SSSE3 instruction set. In such cases, it provides better performance.

This format is similar to but faster than the one used by ZFS RAIDZ3. Like ZFS, it does not work beyond triple parity. -

When using 3-parity, you will be warned if it is recommended to use -the z-parity format for performance improvement. +

When using '3-parity', you will be warned if it is recommended to use +the 'z-parity' format for performance improvement.

It is possible to convert from one format to another by adjusting the configuration file with the desired z-parity or 3-parity file -and using fix to recreate it. -

-
-

+and using 'fix' to recreate it. +

7.4 content FILE -

+

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

It can be placed on a disk used for data, parity, or any other disk available. If you use a data disk, this file is automatically excluded -from the sync process. +from the `sync` process.

This option is mandatory and can be used multiple times to save multiple copies of the same file.

You must store at least one copy for each parity disk used plus one. Using additional copies does not hurt. -

-
-

+

7.5 data NAME DIR -

+

Defines the name and mount point of the data disks in the array. NAME is used to identify the disk and must be unique. DIR is the mount point of the disk in the @@ -1539,50 +1338,32 @@ file system. you keep the NAME fixed.

You should use one option for each data disk in the array.

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

-
-

-extra NAME DIR -

-

Defines the name and mount point of additional disks to monitor -with the smart and probe commands. -

This is useful for monitoring disks that are not part of the -array but are required for the system to function, such as -the boot disk. -

Note that such disks are not affected by the up and down commands -because they are expected to be always spinning. -

-
-

+

7.6 nohidden -

+

Excludes all hidden files and directories. -In Unix, hidden files are those starting with .. +In Unix, hidden files are those starting with `.`. In Windows, they are those with the hidden attribute. -

-
-

+

7.7 exclude/include PATTERN -

+

Defines the file or directory patterns to exclude or include in the sync process. All patterns are processed in the specified order. -

If the first pattern that matches is an exclude one, the file -is excluded. If it is an include one, the file is included. +

If the first pattern that matches is an `exclude` one, the file +is excluded. If it is an `include` one, the file is included. If no pattern matches, the file is excluded if the last pattern -specified is an include, or included if the last pattern -specified is an exclude. +specified is an `include`, or included if the last pattern +specified is an `exclude`.

See the PATTERN section for more details on pattern specifications.

This option can be used multiple times. -

-
-

+

7.8 blocksize SIZE_IN_KIBIBYTES -

+

Defines the basic block size in kibibytes for the parity. One kibibyte is 1024 bytes.

The default blocksize is 256, which should work for most cases. @@ -1602,7 +1383,7 @@ the amount of data on that data disk, not others. wasted for each file. For example, with 100,000 files and a 256 KiB block size, you will waste 12.8 GB of parity, which may result in 12.8 GB less space available on the data disk. -

You can check the amount of wasted space on each disk using status. +

You can check the amount of wasted space on each disk using `status`. This is the amount of space you must leave free on the data disks or use for files not included in the array. If this value is negative, it means you are close to filling @@ -1613,17 +1394,17 @@ you have enough extra space to handle up to 100,000 files on each data disk without any wasted space.

A trick to get a larger parity partition in Linux is to format it with the command: -

+

+
 mkfs.ext4 -m 0 -T largefile4 DEVICE
 
+

This results in about 1.5% extra space, approximately 60 GB for a 4 TB disk, which allows about 460,000 files on each data disk without any wasted space. -

-
-

+

7.9 hashsize SIZE_IN_BYTES -

+

Defines the hash size in bytes for the saved blocks.

The default hashsize is 16 bytes (128 bits), which should work for most cases. @@ -1654,26 +1435,22 @@ 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
 
-
-
-

+

7.10 autosave SIZE_IN_GIGABYTES -

+

Automatically saves the state when syncing or scrubbing after the specified amount of GB processed. -This option is useful to avoid restarting long sync +This option is useful to avoid restarting long `sync` commands from scratch if interrupted by a machine crash or any other event. -

-
-

+

7.11 temp_limit TEMPERATURE_CELSIUS -

+

Sets the maximum allowed disk temperature in Celsius. When specified, SnapRAID periodically checks the temperature of all disks using the smartctl tool. The current disk temperatures are displayed while SnapRAID is operating. If any disk exceeds this limit, all operations stop, and the disks are spun down (put into standby) for the duration -defined by the temp_sleep option. After the sleep period, operations +defined by the `temp_sleep` option. After the sleep period, operations resume, potentially pausing again if the temperature limit is reached once more.

During operation, SnapRAID also analyzes the heating curve of each @@ -1692,88 +1469,85 @@ sensors. If no system sensor can be accessed, it uses the lowest disk temperature measured at the start of the run as a fallback reference.

Normally, SnapRAID shows only the temperature of the hottest disk. To display the temperature of all disks, use the -A or --stats option. -

-
-

+

7.12 temp_sleep TIME_IN_MINUTES -

+

Sets the standby time, in minutes, when the temperature limit is reached. During this period, the disks remain spun down. The default is 5 minutes. -

-
-

+

7.13 pool DIR -

+

Defines the pooling directory where the virtual view of the disk -array is created using the pool command. +array is created using the `pool` command.

The directory must already exist. -

-
-

+

7.14 share UNC_DIR -

+

Defines the Windows UNC path required to access the disks remotely.

If this option is specified, the symbolic links created in the pool directory use this UNC path to access the disks. Without this option, the symbolic links generated use only local paths, which does not allow sharing the pool directory over the network.

The symbolic links are formed using the specified UNC path, adding the -disk name as specified in the data option, and finally adding the +disk name as specified in the `data` option, and finally adding the file directory and name.

This option is required only for Windows. -

-
-

+

7.15 smartctl DISK/PARITY OPTIONS... -

+

Defines custom smartctl options to obtain the SMART attributes for each disk. This may be required for RAID controllers and some USB disks that cannot be auto-detected. The %s placeholder is replaced by the device name, but it is optional for fixed devices like RAID controllers. -

DISK is the same disk name specified in the data option. -PARITY is one of the parity names: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity, or z-parity. -

In the specified OPTIONS, the %s string is replaced by the +

DISK is the same disk name specified in the `data` option. +PARITY is one of the parity names: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity`, or `z-parity`. +

In the specified OPTIONS, the `%s` string is replaced by the device name. For RAID controllers, the device is -likely fixed, and you may not need to use %s. +likely fixed, and you may not need to use `%s`.

Refer to the smartmontools documentation for possible options: -

-https://www.smartmontools.org/wiki/Supported_RAID-Controllers
-https://www.smartmontools.org/wiki/Supported_USB-Devices
+

+
+https://www.smartmontools.org/wiki/Supported_RAID-Controllers
+https://www.smartmontools.org/wiki/Supported_USB-Devices
 
+

For example: -

+

+
 smartctl parity -d sat %s
 
- -
-

+

+

7.16 smartignore DISK/PARITY ATTR [ATTR...] -

+

Ignores the specified SMART attribute when computing the probability of disk failure. This option is useful if a disk reports unusual or misleading values for a particular attribute. -

DISK is the same disk name specified in the data option. -PARITY is one of the parity names: parity, 2-parity, 3-parity, -4-parity, 5-parity, 6-parity, or z-parity. +

DISK is the same disk name specified in the `data` option. +PARITY is one of the parity names: `parity`, `2-parity`, `3-parity`, +`4-parity`, `5-parity`, `6-parity`, or `z-parity`. The special value * can be used to ignore the attribute on all disks. -

For example, to ignore the Current Pending Sector Count attribute on +

For example, to ignore the `Current Pending Sector Count` attribute on all disks: -

+

+
 smartignore * 197
 
+

To ignore it only on the first parity disk: -

+

+
 smartignore parity 197
 
- -
-

+

+

7.17 Examples -

+

An example of a typical configuration for Unix is: -

+

+
 parity /mnt/diskp/snapraid.parity
 content /mnt/diskp/snapraid.content
 content /var/snapraid/snapraid.content
@@ -1787,8 +1561,10 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/sg0
 smartctl 2-parity -d areca,2/1 /dev/sg0
 
+

An example of a typical configuration for Windows is: -

+

+
 parity E:\snapraid.parity
 content E:\snapraid.content
 content C:\snapraid\snapraid.content
@@ -1803,262 +1579,173 @@ smartctl d2 -d usbjmicron %s
 smartctl parity -d areca,1/1 /dev/arcmsr0
 smartctl 2-parity -d areca,2/1 /dev/arcmsr0
 
- - -
-

+

+

8 Pattern -

+

Patterns are used to select a subset of files to exclude or include in -the process. Globbing characters can be used to match files and paths -in a flexible way. -

The question mark ? matches any single character except the directory -separator. This makes it useful for matching filenames with variable -characters while keeping the pattern confined to a single directory level. -

The single star * matches any sequence of characters, but like the -question mark, it never crosses directory boundaries. It stops at the -forward slash, making it suitable for matching within a single path -component. This is the standard wildcard behavior familiar from shell -globbing. -

The double star ** is more powerful, it matches any sequence of -characters including directory separators. This allows patterns to match -across multiple directory levels. When ** appears embedded directly in -a pattern, it can match zero or more characters including slashes between -the surrounding literal text. -

The most important use of ** is in the special form /**/. This matches -zero or more complete directory levels, making it possible to match files -at any depth in a directory tree without knowing the exact path structure. -For example, the pattern src/**/main.js matches src/main.js (skipping -zero directories), src/ui/main.js (skipping one directory), and -src/ui/components/main.js (skipping two directories). -

Character classes using square brackets match a single character from a -specified set or range. Like the other single character patterns, they do -not match directory separators. Classes support ranges and negation using -an exclamation mark. -

The fundamental distinction to remember is that *, ?, and character -classes all respect directory boundaries and only match within a single path -component, while ** is the only pattern that can match across directory -separators. +the process.

There are four different types of patterns: -

-
-
+

+ +
FILE -
-Selects any file named FILE. +
+Selects any file named FILE. You can use any globbing +characters like * and ?, and character classes like [a-z]. This pattern applies only to files, not directories. - - - -
-
-
+
+ + +
DIR/ -
+
Selects any directory named DIR and everything inside. +You can use any globbing characters like * and ?. This pattern applies only to directories, not files. - - - -
-
-
+
+ + +
/PATH/FILE -
-Selects the exact specified file path. This pattern applies -only to files, not directories. -
- - -
-
-
+
+Selects the exact specified file path. You can use any +globbing characters like * and ?, but they never match a +directory slash. +This pattern applies only to files, not directories. +
+ + +
/PATH/DIR/ -
+
Selects the exact specified directory path and everything -inside.    This pattern applies only to directories, not files. - - - +inside. You can use any globbing characters like * and ?, but +they never match a directory slash. +This pattern applies only to directories, not files. +

When you specify an absolute path starting with /, it is applied at the array root directory, not the local file system root directory.

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

If the file name contains a *, ?, [, -or ] character, you must escape it to avoid having it interpreted as a -globbing character. In Unix, the escape character is \; in Windows, it is ^. +

If the file name contains a '*', '?', '[', +or ']' character, you must escape it to avoid having it interpreted as a +globbing character. In Unix, the escape character is '\'; in Windows, it is '^'. When the pattern is on the command line, you must double the escape character to avoid having it interpreted by the command shell.

In the configuration file, you can use different strategies to filter the files to process. -The simplest approach is to use only exclude rules to remove all the +The simplest approach is to use only `exclude` rules to remove all the files and directories you do not want to process. For example: -

-# Excludes any file named *.unrecoverable
+

+
+# Excludes any file named `*.unrecoverable`
 exclude *.unrecoverable
-# Excludes the root directory /lost+found
+# Excludes the root directory `/lost+found`
 exclude /lost+found/
-# Excludes any subdirectory named tmp
+# Excludes any subdirectory named `tmp`
 exclude tmp/
 
+

The opposite approach is to define only the files you want to process, using -only include rules. For example: -

+only `include` rules. For example:
+

+
 # Includes only some directories
 include /movies/
 include /musics/
 include /pictures/
 
-

The final approach is to mix exclude and include rules. In this case, +

+

The final approach is to mix `exclude` and `include` rules. In this case, the order of rules is important. Earlier rules take precedence over later ones. -To simplify, you can list all the exclude rules first and then -all the include rules. For example: -

-# Excludes any file named *.unrecoverable
+To simplify, you can list all the `exclude` rules first and then
+all the `include` rules. For example:
+

+
+# Excludes any file named `*.unrecoverable`
 exclude *.unrecoverable
-# Excludes any subdirectory named tmp
+# Excludes any subdirectory named `tmp`
 exclude tmp/
 # Includes only some directories
 include /movies/
 include /musics/
 include /pictures/
 
-

On the command line, using the -f option, you can only use include +

+

On the command line, using the -f option, you can only use `include` patterns. For example: -

+

+
 # Checks only the .mp3 files.
 # In Unix, use quotes to avoid globbing expansion by the shell.
 snapraid -f "*.mp3" check
 
+

In Unix, when using globbing characters on the command line, you must quote them to prevent the shell from expanding them. -

-
-

-Ignore File -

-

In addition to the global rules in the configuration file, you can -place .snapraidignore files in any directory within the array to -define decentralized exclusion rules. -

Rules defined in .snapraidignore are applied after the rules in the -configuration file. This means they have a higher priority and can be -used to exclude files that were previously included by the global -configuration. Effectively, if a local rule matches, the file is -excluded regardless of the global include settings. -

The pattern logic in .snapraidignore mirrors the global configuration -but anchors patterns to the directory where the file is located: -

-
-
-FILE -
-Selects any file named FILE in this directory or below. -This follows the same globbing rules as the global pattern. -
-
-
-
-
-
-DIR/ -
-Selects any directory named DIR and everything inside, -residing in this directory or below. -
-
-
-
-
-
-/PATH/FILE -
-Selects the exact specified file relative to the location -of the .snapraidignore file. -
-
-
-
-
-
-/PATH/DIR/ -
-Selects the exact specified directory and everything inside, -relative to the location of the .snapraidignore file. -
-
-
-

Unlike the global configuration, .snapraidignore files only support -exclusion rules; you cannot use include patterns or negation (!). -

For example, if you have a .snapraidignore in /mnt/disk1/projects/: -

-# Excludes ONLY /mnt/disk1/projects/output.bin
-/output.bin
-# Excludes any directory named build inside projects/
-build/
-# Excludes any .tmp file inside projects/ or its subfolders
-*.tmp
-
-
-
-

+

9 Content -

+

SnapRAID stores the list and checksums of your files in the content file.

It is a binary file that lists all the files present in your disk array, along with all the checksums to verify their integrity. -

This file is read and written by the sync and scrub commands and -read by the fix, check, and status commands. -

-
-

+

This file is read and written by the `sync` and `scrub` commands and +read by the `fix`, `check`, and `status` commands. +

10 Parity -

+

SnapRAID stores the parity information of your array in the parity files.

These are binary files containing the computed parity of all the -blocks defined in the content file. -

These files are read and written by the sync and fix commands and -only read by the scrub and check commands. -

-
-

+blocks defined in the `content` file. +

These files are read and written by the `sync` and `fix` commands and +only read by the `scrub` and `check` commands. +

11 Encoding -

+

SnapRAID in Unix ignores any encoding. It reads and stores the file names with the same encoding used by the file system.

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

To have file names printed correctly, you must set the Windows -console to UTF-8 mode with the command chcp 65001 and use -a TrueType font like Lucida Console as the console font. +console to UTF-8 mode with the command `chcp 65001` and use +a TrueType font like `Lucida Console` as the console font. This affects only the printed file names; if you redirect the console output to a file, the resulting file is always in UTF-8 format. -

+

+

+

-
-
-
+
- - + diff --git a/paypal.png b/paypal.png new file mode 100644 index 00000000..3b67b8f8 Binary files /dev/null and b/paypal.png differ diff --git a/phone-dashboard-light.png b/phone-dashboard-light.png deleted file mode 100644 index 2daf3408..00000000 Binary files a/phone-dashboard-light.png and /dev/null differ diff --git a/phone-dashboard.png b/phone-dashboard.png deleted file mode 100644 index d20300b2..00000000 Binary files a/phone-dashboard.png and /dev/null differ diff --git a/phone-differences-light.png b/phone-differences-light.png deleted file mode 100644 index 7c608a14..00000000 Binary files a/phone-differences-light.png and /dev/null differ diff --git a/phone-differences.png b/phone-differences.png deleted file mode 100644 index bd62ab57..00000000 Binary files a/phone-differences.png and /dev/null differ diff --git a/phone-disks-light.png b/phone-disks-light.png deleted file mode 100644 index 8e0baeca..00000000 Binary files a/phone-disks-light.png and /dev/null differ diff --git a/phone-disks.png b/phone-disks.png deleted file mode 100644 index 5cd1c081..00000000 Binary files a/phone-disks.png and /dev/null differ diff --git a/phone-menu-light.png b/phone-menu-light.png deleted file mode 100644 index 968c10e5..00000000 Binary files a/phone-menu-light.png and /dev/null differ diff --git a/phone-menu.png b/phone-menu.png deleted file mode 100644 index e0d7332c..00000000 Binary files a/phone-menu.png and /dev/null differ diff --git a/phone-recovery-light.png b/phone-recovery-light.png deleted file mode 100644 index e41e4750..00000000 Binary files a/phone-recovery-light.png and /dev/null differ diff --git a/phone-recovery.png b/phone-recovery.png deleted file mode 100644 index 5ea9e5bc..00000000 Binary files a/phone-recovery.png and /dev/null differ diff --git a/phone-settings-light.png b/phone-settings-light.png deleted file mode 100644 index de56cb8e..00000000 Binary files a/phone-settings-light.png and /dev/null differ diff --git a/phone-settings.png b/phone-settings.png deleted file mode 100644 index a6d2088f..00000000 Binary files a/phone-settings.png and /dev/null differ diff --git a/phone-smart-light.png b/phone-smart-light.png deleted file mode 100644 index 7d930862..00000000 Binary files a/phone-smart-light.png and /dev/null differ diff --git a/phone-smart.png b/phone-smart.png deleted file mode 100644 index 44a6afdc..00000000 Binary files a/phone-smart.png and /dev/null differ diff --git a/phone-tasks-light.png b/phone-tasks-light.png deleted file mode 100644 index 19e162c3..00000000 Binary files a/phone-tasks-light.png and /dev/null differ diff --git a/phone-tasks.png b/phone-tasks.png deleted file mode 100644 index 76f137de..00000000 Binary files a/phone-tasks.png and /dev/null differ diff --git a/site.webmanifest b/site.webmanifest index 94d1a969..539cfaa1 100644 --- a/site.webmanifest +++ b/site.webmanifest @@ -1 +1 @@ -{"name":"SnapRAID","short_name":"SnapRAID","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#f8fafc","background_color":"#020617","display":"standalone"} +{"name":"SnapRAID","short_name":"SnapRAID","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} diff --git a/sourceforge.png b/sourceforge.png new file mode 100644 index 00000000..2ec04ae1 Binary files /dev/null and b/sourceforge.png differ diff --git a/style.css b/style.css index 210e1f69..11982bc0 100644 --- a/style.css +++ b/style.css @@ -1,1004 +1,240 @@ -:root { - /* Color Palette - Deep Dark Mode */ - /* https://htmlcolorcodes.com/color-chart/tailwind-color-chart/ */ - --c-slate-50: #F8FAFC; - --c-slate-100: #F1F5F9; - --c-slate-200: #E2E8F0; - --c-slate-300: #CAD5E2; - --c-slate-400: #90A1B9; - --c-slate-500: #62748E; - --c-slate-600: #45556C; - --c-slate-700: #314158; - --c-slate-800: #1D293D; - --c-slate-900: #0F172B; - --c-slate-950: #020618; - - /* Interpolated */ - --c-slate-905: hsl(224 51% 11%); - --c-slate-910: hsl(224 55% 10%); - --c-slate-915: hsl(225 59% 10%); - --c-slate-920: hsl(225 63% 9%); - --c-slate-925: hsl(226 66% 8%); - --c-slate-930: hsl(227 70% 7%); - --c-slate-935: hsl(227 74% 7%); - --c-slate-940: hsl(228 78% 6%); - --c-slate-945: hsl(228 81% 6%); - - --c-sky-50: #F0F9FF; - --c-sky-100: #DFF2FE; - --c-sky-200: #B8E6FE; - --c-sky-300: #74D4FF; - --c-sky-400: #21BCFF; - --c-sky-500: #34A6F4; - --c-sky-600: #2984D1; - --c-sky-700: #1C69A8; - --c-sky-800: #10598A; - --c-sky-900: #024A70; - --c-sky-950: #052F4A; - - --c-blue-50: #EFF6FF; - --c-blue-100: #DBEAFE; - --c-blue-200: #BEDBFF; - --c-blue-300: #8EC5FF; - --c-blue-400: #51A2FF; - --c-blue-500: #2B7FFF; - --c-blue-600: #155DFC; - --c-blue-700: #1447E6; - --c-blue-800: #193CB8; - --c-blue-900: #1C398E; - --c-blue-950: #162456; - - --c-orange-50: #FFF7ED; - --c-orange-100: #FFEDD4; - --c-orange-200: #FFD6A7; - --c-orange-300: #FFB86A; - --c-orange-400: #FF8904; - --c-orange-500: #FF692A; - --c-orange-600: #F54927; - --c-orange-700: #CA3519; - --c-orange-800: #9F2D01; - --c-orange-900: #7E2A0C; - --c-orange-950: #441306; - - --bg-body: var(--c-slate-950); - --bg-surface: var(--c-slate-910); - --bg-surface-hover: var(--c-slate-800); - --border-color: var(--c-slate-800); - - --header-bg: rgba(2, 6, 23, 0.9); - --overlay-bg: rgba(2, 6, 23, 0.85); - --bg-code: #000000; - - --text-code: #e2e8f0; - - --table-header-bg: rgba(255, 255, 255, 0.02); - --table-row-even-bg: rgba(255, 255, 255, 0.02); - - --text-primary: var(--c-slate-50); - --text-secondary: var(--c-slate-400); - --text-accent: var(--c-sky-400); - - --primary: var(--c-blue-500); - --primary-hover: var(--c-blue-600); - --primary-glow: rgba(59, 130, 246, 0.5); /* --c-blue-500 */ - - --success: #10b981; - --warning: #f59e0b; - --danger: #ef4444; - - /* Spacing & Layout */ - --container-width: 1200px; - --header-height: 70px; - --radius: 8px; - --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; - --font-mono: "SF Mono", "Segoe UI Mono", "Roboto Mono", monospace; +/* Reset all white-space to 0 for consistency across browsers */ +{ + margin:0px; + padding:0px; } -:root.light-theme { - --bg-body: var(--c-slate-100); - --bg-surface: #ffffff; - --bg-surface-hover: var(--c-slate-200); - --border-color: var(--c-slate-200); - - --header-bg: rgba(248, 250, 252, 0.9); - --overlay-bg: rgba(248, 250, 252, 0.85); - --bg-code: var(--c-slate-200); - - --text-code: var(--c-slate-900); - - --table-header-bg: rgba(0, 0, 0, 0.05); - --table-row-even-bg: rgba(0, 0, 0, 0.02); - - --text-primary: var(--c-slate-900); - --text-secondary: var(--c-slate-600); - --text-accent: var(--c-sky-500); - - --primary: var(--c-blue-600); - --primary-hover: var(--c-blue-700); - --primary-glow: rgba(37, 99, 235, 0.2); /* --c-blue-600 */ +/* Get some padding between paragraphs and some line spacing */ +p { + line-height:1.4em; } -* { - box-sizing: border-box; - margin: 0; - padding: 0; +/* Bye bye ugly blue border */ +a img { + border:0px; } +/* No dots around clicked links */ +a, a:active { + outline:none; +} + +/* Class to any floated elements */ +.clear { + clear:both; +} + +/* styles */ + +a { + text-decoration:none; +} + +a:link { + color:#0c5da5; +} + +a:visited { + color:#0c5da5; +} + +a:hover { + color:#679fd2; + text-decoration:underline; +} + +hr { + color:#B0B0B0; +} + +h1, h2, h3 { + color:#0c5da5; + margin-left:-1em; +} + +table, td +{ + border:0px; + border-style:none; +} + +.bold { + color:#0c5da5; + font-weight:bold; +} + +.danger { + color:#ff0000; + font-weight:bold; + font-size:150%; +} + +.highlight { + color:#408dd2; + font-weight:bold; + font-size:150%; +} + +.sg { + color:#B00000; +} + +.nw { + white-space:nowrap; +} + +/* structure */ + body { - background-color: var(--bg-body); - color: var(--text-primary); - font-family: var(--font-main); - line-height: 1.6; - -webkit-font-smoothing: antialiased; + background-color:#ffffff; + margin:0px; + padding:0px; + /* always show the vertical scroll bar */ + overflow-y:scroll; } -/* --- Layout Utilities --- */ -.container { - max-width: var(--container-width); - margin: 0 auto; - padding: 0 20px; -} - -.grid { - display: grid; - gap: 2rem; -} - -.grid-2-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } -.grid-3-cols { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); } -.grid-4-cols { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); } - -.theme-transitioning, -.theme-transitioning *, -.theme-transitioning *::before, -.theme-transitioning *::after { - transition: none !important; -} - -/* --- Typography --- */ -h1, h2, h3, h4 { - font-weight: 700; - line-height: 1.2; - margin-bottom: 1rem; - color: var(--text-primary); -} - -h1 { font-size: 3.5rem; letter-spacing: -0.05em; } -h2 { font-size: 2.25rem; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; } -h3 { font-size: 1.5rem; color: var(--text-primary); } -p { margin-bottom: 1.5rem; color: var(--text-secondary); } -a { color: var(--primary); text-decoration: none; transition: 0.2s; } -a:hover { color: var(--text-accent); } -.accent-text { color: var(--primary); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.875rem; } - -code, pre { - font-family: var(--font-mono); -} - -/* --- Header & Navigation --- */ -header { - height: var(--header-height); - background: var(--header-bg); - backdrop-filter: blur(10px); - border-bottom: 1px solid var(--border-color); - position: sticky; - top: 0; - z-index: 1000; -} - -.nav-container { - display: flex; - justify-content: space-between; - align-items: center; - height: 100%; -} - -.logo { - font-size: 1.5rem; - font-weight: 800; - color: var(--text-primary); - display: flex; - align-items: center; - gap: 10px; -} - -.logo svg { height: 32px; width: 32px; fill: var(--text-primary); } -.logo-accent { fill: var(--primary); } - -nav ul { - display: flex; - list-style: none; - gap: 20px; - align-items: center; -} - -nav a { - font-size: 0.95rem; - color: var(--text-secondary); - font-weight: 500; -} - -nav a:hover, nav a.active { - color: var(--primary); -} - -.nav-cta { - background: var(--primary); - color: white !important; - padding: 0.5rem 1rem; - border-radius: var(--radius); -} - -.nav-cta:hover { - background: var(--primary-hover); -} - -.theme-toggle { - background: transparent; - border: none; - color: var(--text-secondary); - cursor: pointer; - display: flex; - align-items: center; - justify-content: center; - padding: 0.5rem; - border-radius: var(--radius); - transition: background-color 0.2s, color 0.2s; -} - -.theme-toggle:hover { - background: var(--bg-surface-hover); - color: var(--primary); -} - -.theme-toggle svg { - width: 20px; - height: 20px; -} - -.theme-toggle .sun-icon { - display: none; -} - -:root.light-theme .theme-toggle .sun-icon { - display: block; -} - -:root.light-theme .theme-toggle .moon-icon { - display: none; -} - -/* --- Buttons --- */ -.btn { - display: inline-flex; - align-items: center; - justify-content: center; - gap: 8px; - padding: 0.75rem 1.5rem; - border-radius: var(--radius); - font-weight: 600; - cursor: pointer; - border: none; - transition: all 0.2s ease; - text-decoration: none; -} - -.btn-primary { - background: var(--primary); - color: white; - box-shadow: 0 0 15px var(--primary-glow); -} - -.btn-primary:hover { - background: var(--primary-hover); - transform: translateY(-1px); - color: white; -} - -.btn-secondary { - background: transparent; - border: 1px solid var(--border-color); - color: var(--text-primary); -} - -.btn-secondary:hover { - background: var(--bg-surface); - border-color: var(--text-accent); - color: var(--text-accent); -} - -.btn-block { width: 100%; } - -/* --- Sections --- */ -.hero-section { - padding: 6rem 0; - text-align: center; -} - -.hero-subtext { - font-size: 1.25rem; - max-width: 700px; - margin: 1.5rem auto; -} - -.hero-actions { - display: flex; - justify-content: center; - gap: 1rem; - margin-top: 2.5rem; -} - -.daemon-section { - background: linear-gradient(180deg, var(--bg-body) 0%, var(--bg-surface) 100%); - padding: 5rem 0; - border-top: 1px solid var(--border-color); - border-bottom: 1px solid var(--border-color); -} - -.daemon-layout { - align-items: center; -} - -.feature-list { - list-style: none; - margin-bottom: 2rem; -} - -.feature-list li { - margin-bottom: 10px; - display: flex; - align-items: center; - gap: 10px; - color: var(--text-secondary); -} - -.icon-check { - width: 20px; - height: 20px; - fill: var(--success); -} - -.link-arrow { - font-weight: 600; - display: inline-flex; - align-items: center; -} - -/* --- Terminal Mockup --- */ -.terminal-mockup { - background: #000; - border: 1px solid var(--border-color); - border-radius: var(--radius); - padding: 0; - box-shadow: 0 0 30px rgba(59, 130, 246, 0.5); - font-family: var(--font-mono); - overflow: hidden; -} - -.terminal-header { - background: var(--bg-surface); - padding: 10px 15px; - display: flex; - gap: 8px; - border-bottom: 1px solid var(--border-color); -} - -.dot { width: 10px; height: 10px; border-radius: 50%; } -.red { background: #ef4444; } -.yellow { background: #f59e0b; } -.green { background: #10b981; } - -.terminal-body { - padding: 20px; - color: #e2e8f0; - font-size: 0.85rem; -} - -.term-line { margin-bottom: 4px; } -.term-line.success { color: var(--success); } -.term-line.warning { color: var(--warning); } -.term-line.info { color: var(--text-accent); } -.term-line.separator { color: var(--border-color); margin: 8px 0; } - -/* --- Cards --- */ -.features-section { padding: 5rem 0; } -.section-title { text-align: center; margin-bottom: 3rem; } - -.card { - background: var(--bg-surface); - border: 1px solid var(--border-color); - padding: 2rem; - border-radius: var(--radius); - transition: transform 0.2s, border-color 0.2s; -} - -.card:hover { - border-color: var(--primary); - transform: translateY(-2px); -} - -.card-subtitle { - color: var(--text-accent); - margin-bottom: 0.5rem; - font-style: italic; - font-weight: 500; -} - -.card-icon-wrapper { - width: 48px; - height: 48px; - background: rgba(59, 130, 246, 0.1); - border-radius: 12px; - display: flex; - align-items: center; - justify-content: center; - margin-bottom: 1rem; -} - -.card-icon { width: 24px; height: 24px; fill: var(--primary); } - -/* --- Tables --- */ -.data-table { - width: 100%; - border-collapse: collapse; - margin: 2rem 0; - background: var(--bg-surface); - border-radius: var(--radius); - overflow: hidden; -} - -.data-table th, .data-table td { - text-align: left; - padding: 1rem; - border-bottom: 1px solid var(--border-color); -} - -.data-table th { - color: var(--text-accent); - font-weight: 600; - background: var(--table-header-bg); -} - -.data-table tr:last-child td { border-bottom: none; } -.data-table tr:hover td { background: var(--bg-surface-hover); } - -/* --- Search Input --- */ -.search-input { - width: 100%; - padding: 1rem 1.5rem; - font-size: 1rem; - background: var(--bg-surface); - border: 1px solid var(--border-color); - border-radius: var(--radius); - color: var(--text-primary); - transition: border-color 0.2s, box-shadow 0.2s; - outline: none; - margin-bottom: 2rem; -} - -.search-input:focus { - border-color: var(--primary); - box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); -} - -.search-input::placeholder { - color: var(--text-secondary); -} - -/* --- FAQ Specific Styling --- */ -#faq-content { - max-width: 100%; /* Changed from 900px since it's now in a grid cell */ -} - -.faq-section { - margin-bottom: 4rem; -} - -.faq-section h2 { - margin-top: 1rem; - margin-bottom: 2rem; - color: var(--primary); - border-bottom: 1px solid var(--border-color); - padding-bottom: 0.5rem; - font-size: 2rem; - letter-spacing: -0.02em; - scroll-margin-top: 100px; -} - -.faq-item { - border-bottom: 1px solid var(--border-color); - margin-bottom: 2rem; - padding-bottom: 2rem; -} - -.faq-item:last-child { - border-bottom: none; - margin-bottom: 0; - padding-bottom: 0; -} - -.faq-question { - margin-top: 0; - margin-bottom: 1rem; - font-size: 1.4rem; - color: var(--text-primary); - font-weight: 700; - scroll-margin-top: 100px; /* Offset for sticky header */ -} - -/* The wrapper for the answer content */ -.faq-answer { - padding-left: 1.5rem; - border-left: 3px solid var(--bg-surface-hover); - margin-top: 1rem; -} - -.faq-answer:hover { - border-left-color: var(--primary); -} - -/* Styles for content INSIDE .faq-answer */ -.faq-answer p { - margin-bottom: 1rem; - color: var(--text-secondary); - line-height: 1.7; - background: transparent; - padding: 0; - border: none; -} - -.faq-answer ul, .faq-answer ol { - margin-bottom: 1.5rem; - padding-left: 1.5rem; - color: var(--text-secondary); - list-style-position: outside; -} - -.faq-answer li { - margin-bottom: 0.5rem; - padding-left: 0.5rem; -} - -.faq-answer table { - width: 100%; - border-collapse: collapse; - margin: 1.5rem 0; - font-size: 0.95rem; - background: var(--bg-surface); - border: 1px solid var(--border-color); - border-radius: var(--radius); - display: block; - overflow-x: auto; - white-space: nowrap; -} - -@media (min-width: 768px) { - .faq-answer table { - display: table; - white-space: normal; - } -} - -.faq-answer th, .faq-answer td { - padding: 0.75rem 1rem; - border: 1px solid var(--border-color); - text-align: left; - vertical-align: top; -} - -.faq-answer th { - background: rgba(59, 130, 246, 0.1); - color: var(--text-primary); - font-weight: 600; -} - -.faq-answer td { - background: transparent; -} - -.faq-answer tr:nth-child(even) td { - background: var(--table-row-even-bg); -} - -.faq-answer a { - text-decoration: underline; - text-underline-offset: 2px; -} +/* header */ -/* --- Footer --- */ -footer { - border-top: 1px solid var(--border-color); - padding: 2rem 0; - margin-top: 4rem; - background: var(--bg-surface); +#header { + background:#0a64a4; + padding:0px; } -.footer-content { - display: flex; - justify-content: space-between; - flex-wrap: wrap; - gap: 2rem; +#header img { + width:100%; + /* avoid to scale up the image */ + max-width:1200px; + height:auto; } -.footer-col h3 { color: var(--text-primary); margin-bottom: 0.5rem; } -.footer-col h4 { color: var(--text-accent); font-size: 0.9rem; text-transform: uppercase; margin-bottom: 1rem; border: none; } -.footer-col ul { list-style: none; } -.footer-col ul li { margin-bottom: 0.5rem; } -.license { font-size: 0.8rem; color: var(--text-secondary); margin-top: 1rem; } - -/* --- Mobile Menu --- */ -#menu-toggle { display: none; } -.menu-icon { display: none; cursor: pointer; color: var(--text-primary); } - -@media (max-width: 768px) { - h1 { font-size: 2.5rem; } - .hero-actions { flex-direction: column; } - .menu-icon { display: block; } - - nav ul { - display: none; - flex-direction: column; - position: absolute; - top: var(--header-height); - left: 0; - width: 100%; - background: var(--bg-surface); - padding: 1rem; - border-bottom: 1px solid var(--border-color); - align-items: flex-start; - } - nav ul li { width: 100%; } - nav a { display: block; padding: 0.5rem 0; } - nav .nav-cta { text-align: center; } - nav .theme-toggle { justify-content: flex-start; padding: 0.5rem 0; } - - #menu-toggle:checked ~ ul { display: flex; } - - .manual-layout, .faq-layout { grid-template-columns: 1fr; } - .manual-sidebar { position: static; margin-bottom: 2rem; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; } -} +/* menu */ -/* --- Specific Page: Manual --- */ -.manual-layout, .faq-layout { - display: grid; - grid-template-columns: 250px 1fr; - gap: 3rem; - padding-top: 2rem; - padding-bottom: 4rem; +#menu { + background-color:#bacad9; + padding:8px; + padding-left:5%; + padding-right:5%; } -.manual-sidebar { - position: sticky; - top: 90px; - height: fit-content; - max-height: calc(100vh - 100px); - overflow-y: auto; - padding-right: 5px; - - /* Hide scrollbar for IE, Edge and Firefox */ - -ms-overflow-style: none; /* IE and Edge */ - scrollbar-width: none; /* Firefox */ +#menu a { + color:#0c5da5; + font-family:sans-serif; + padding-left:1em; + font-weight:bold; } -/* Hide scrollbar for Chrome, Safari and Opera */ -.manual-sidebar::-webkit-scrollbar { - display: none; +#menu .bold { + color:#0c5da5; } -.manual-sidebar h4 { color: var(--text-primary); margin-bottom: 1rem; } -.manual-sidebar ul { list-style: none; } -.manual-sidebar a { display: block; padding: 0.5rem 0; color: var(--text-secondary); border-left: 2px solid transparent; padding-left: 10px; } -.manual-sidebar a:hover, .manual-sidebar a.current { color: var(--primary); border-left-color: var(--primary); } +/* footer */ -/* Nested TOC for FAQ */ -.manual-sidebar ul ul { - margin-left: 10px; - margin-bottom: 10px; - border-left: 1px solid var(--border-color); -} -.manual-sidebar ul ul a { - font-size: 0.85rem; - padding: 0.25rem 0 0.25rem 10px; - border-left: none; -} -.manual-sidebar ul ul a:hover { - color: var(--text-accent); +#footer { + background-color:#bacad9; + min-height:90px; + padding-top:16px; + padding-bottom:16px; + padding-left:5%; + padding-right:5%; + /* extend it to contain all the inside elements */ + overflow:auto; } -/* --- Manual Content Styling (NEW) --- */ -.manual-doc { - font-family: var(--font-main); - color: var(--text-secondary); - line-height: 1.7; - max-width: 900px; +#footer a { + color:#0c5da5; + font-family:sans-serif; + padding-left:1em; } -/* Level 1 Sections */ -.manual-section-level-1 { - margin-bottom: 4rem; - padding-bottom: 2rem; - border-bottom: 1px solid var(--border-color); -} -.manual-section-level-1:last-child { - border-bottom: none; +#footer img { + /* scale down the image if there is no space */ + max-width:50%; + height:auto; } -.manual-title-level-1 { - font-size: 2rem; - color: var(--text-primary); - margin-bottom: 1.5rem; - border-bottom: none; - scroll-margin-top: 100px; +#footer .bold { + color:#0c5da5; } -/* Level 2 Sections */ -.manual-section-level-2 { - margin-top: 3rem; - margin-left: 1.5rem; - padding-left: 1.5rem; - border-left: 2px solid var(--border-color); +.column { + float:left; + width:50%; } -.manual-title-level-2 { - font-size: 1.4rem; - color: var(--text-accent); - margin-bottom: 1rem; - border-bottom: none; - scroll-margin-top: 100px; -} +/* main */ -/* Level 3 Sections */ -.manual-section-level-3 { - margin-top: 2rem; - margin-left: 1.5rem; - padding-left: 1rem; - border-left: 1px dashed var(--border-color); +#main { + padding:2px; + padding-left:5%; + padding-right:5%; + max-width:1024px; } -.manual-title-level-3 { - font-size: 1.1rem; - color: var(--text-primary); - text-transform: uppercase; - letter-spacing: 0.05em; - margin-bottom: 0.75rem; - scroll-margin-top: 100px; +.text { + margin:16px; + margin-left:32px } -/* Common Text Elements */ -.manual-doc p { margin-bottom: 1rem; } -.manual-doc ul { margin-bottom: 1.5rem; padding-left: 2rem; list-style-type: disc; } -.manual-doc li { margin-bottom: 0.5rem; } +/* table download */ -.manual-doc b { - font-weight: bold; - font-family: var(--font-mono); - color: var(--text-accent); +.download +{ + border-collapse:collapse; } - -/* The Pre Tag */ -.manual-doc pre { - background: var(--bg-code); - color: var(--text-code); - padding: 1.25rem; - border: 1px solid var(--border-color); - border-radius: var(--radius); - font-family: var(--font-mono); - font-size: 0.9rem; - overflow-x: auto; - margin: 1.5rem 0; - white-space: pre; +.download td +{ + border:2px solid black; + text-align:left; + padding:5px; } - -.manual-indent { - margin-left: 2rem; - border-left: 3px solid var(--primary); +.download th +{ + border:2px solid black; + font-size:1.1em; + text-align:left; + padding:5px; + background-color:#bacad9; + color:#0c5da5; } -/* Option and Tag Lists (Vertical Layout) */ -.manual-option-list, .manual-tag-list { - display: flex; - flex-direction: column; - gap: 1.5rem; - margin: 1.5rem 0; -} +/* table compare */ -.manual-option-entry, .manual-tag-entry { - display: block; +.compare +{ + border-collapse:collapse; } - -.manual-option-name, .manual-tag-name { - font-family: var(--font-mono); - color: var(--warning); - font-weight: 700; - display: block; - margin-bottom: 0.0rem; - /* word-break: break-all; - Removed to prevent awkward breaking of short words, allow natural flow */ +.compare td +{ + border:2px solid black; + text-align:center; } - -.manual-option-description, .manual-tag-description { - color: var(--text-secondary); - margin-left: 2.5rem; /* Distinct indentation */ - line-height: 1.6; -} - -/* Compare Grid */ -.compare-container { overflow-x: auto; position: relative; } -.compare-table { min-width: 900px; } -.compare-table th { text-align: center; } -.compare-table td { text-align: center; vertical-align: middle; } -.feature-cell { text-align: left !important; font-weight: 600; color: var(--text-primary); } -.cell-subtext { font-size: 0.8rem; color: var(--text-secondary); font-weight: 400; margin-top: 2px; } -.check { color: var(--success); } -.cross { color: var(--danger); } -.partial { color: var(--warning); } -.snapraid-col { background: rgba(59, 130, 246, 0.1); border-left: 1px solid var(--primary); border-right: 1px solid var(--primary); } -.snapraid-header { color: var(--primary) !important; font-size: 1.2rem; } - -/* Info Button and Popover */ -.info-wrapper { - display: inline-block; - vertical-align: middle; - margin-left: 5px; +.compare th +{ + border:2px solid black; + font-size:1.1em; + padding:5px; + background-color:#bacad9; + color:#0c5da5; } -.info-btn { - background: none; - border: none; - cursor: pointer; - padding: 0; - color: var(--primary); - display: flex; - align-items: center; - transition: color 0.2s; -} +/* table community */ -.info-btn:hover { - color: var(--text-accent); +.community +{ + border-collapse:collapse; } - -.global-popover { - display: none; - position: absolute; - width: 300px; - max-width: 90vw; - background: var(--bg-surface); - border: 1px solid var(--border-color); - padding: 1.25rem; - border-radius: var(--radius); - box-shadow: 0 10px 40px rgba(0,0,0,0.6); - z-index: 2000; - font-size: 0.9rem; - line-height: 1.6; - color: var(--text-secondary); - text-align: left; +.community td +{ + border:2px solid black; + text-align:left; + padding:5px; } - -.global-popover.active { - display: block; - animation: popIn 0.2s ease-out; -} - -@keyframes popIn { - from { opacity: 0; transform: translateY(10px); } - to { opacity: 1; transform: translateY(0); } -} - -.popover-overlay { - display: none; - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: 1999; +.community th +{ + border:2px solid black; + font-size:1.1em; + padding:5px; + background-color:#bacad9; + color:#0c5da5; } -.popover-overlay.active { - display: block; -} - -/* Support Cards */ -.support-card { display: flex; gap: 1rem; align-items: start; } -.support-icon { min-width: 40px; height: 40px; fill: var(--text-secondary); } - -.donation-card { - background: rgba(245, 158, 11, 0.1); - border: 1px solid var(--warning); - border-radius: 4px; - text-align: center; - color: var(--warning); - padding: 1rem; - margin-bottom: 1.5rem; - } - -.donation-card p { - color: var(--warning); -} - -.donation-card a { - font-weight: bold; - font-size: 1.1rem; -} - -.warning-card { - background: rgba(245, 158, 11, 0.1); - border: 1px solid var(--warning); - color: var(--warning); - padding: 1rem; - border-radius: 4px; - margin-bottom: 1.5rem; - display: flex; - gap: 0.5rem; - align-items: start; -} - -/* UI Gallery */ -.ui-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-top: 2rem; } -.ui-phone-gallery { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); } -.ui-shot { - border: 1px solid var(--border-color); - border-radius: var(--radius); - overflow: hidden; - height: 280px; - background: #000; - position: relative; - cursor: pointer; -} -.ui-shot img { - width: 100%; - height: 100%; - object-fit: cover; - display: block; - transition: transform 0.3s ease; -} -.ui-shot:hover img { - transform: scale(1.25); -} -.ui-shot-caption { - position: absolute; - bottom: 0; - left: 0; - right: 0; - background: rgba(0,0,0,0.8); - color: white; - padding: 0.5rem; - font-size: 0.8rem; - text-align: center; -} - -/* Preview Overlay */ -#ui-preview-overlay { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - background: var(--overlay-bg); - backdrop-filter: blur(8px); - z-index: 2000; - display: flex; - align-items: center; - justify-content: center; - opacity: 0; - pointer-events: none; /* Allows hover events to pass through to underlying elements */ - transition: opacity 0.3s ease; -} - -#ui-preview-overlay.active { - opacity: 1; - pointer-events: auto; /* Enable clicks when active */ - cursor: zoom-out; -} - -#ui-preview-img { - max-width: 90%; - max-height: 90%; - border-radius: var(--radius); - box-shadow: 0 0 50px rgba(0,0,0,0.5); - transform: scale(0.95); - transition: transform 0.3s ease; -} - -#ui-preview-overlay.active #ui-preview-img { - transform: scale(1); -} diff --git a/support.html b/support.html index df30f475..c72bb14d 100644 --- a/support.html +++ b/support.html @@ -1,17 +1,17 @@ - + - - - - - SnapRAID Support - - - - - - + + + + + + + + + + +SnapRAID @@ -36,111 +36,94 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); - + -
- -
+ + +
-
-

Community Support

- - +

+

+

-
-

Community Guides & Tutorials

- - - - - - - - - - - +

+Before posting, check existing threads, many questions are already answered. When you post, include your SnapRAID version, your OS, configuration file, error logs or output, and steps you already tried. +

+ +

+SnapRAID +has also inspired a wide range of tutorials, videos, and technical articles +created by users, system administrators, and storage enthusiasts around the world. +

+ +

+This page collects some of the best resources from the community and the media +to help new and experienced users learn, configure, and explore SnapRAID. +

+ +

Community Guides, Articles and Tools

+ +
PlatformTitlePublishedDescription
+ + + + + + + + + - + - - - + + + + + + + - + - + - + - + - + - - - -
PlatformTitlePublishedDescription
Linux Encrypted SnapRAIDMay 11,
2024
May 11, 2024 Tutorial for setting up encrypted SnapRAID storage with dm-crypt and LUKS.
Linux (MergerFS + SnapRAID) is the new RAID 5Feb 3,
2023
Feb 3, 2023 Explains why MergerFS + SnapRAID offers RAID 5/6-like protection with more flexibility.
LinuxSnapRAID Split Parity Sync ScriptNov 17, 2016Script for dual parity syncing across multiple disks in SnapRAID setups.
Linux SnapRAID - Perfect Media ServerDec 27,
2023
Dec 27, 2023 Overview of SnapRAID for flexible, snapshot-based data backup and parity protection on a Perfect Media Server.
OpenMediaVault SnapRAID Plugin For OMV7Jan 18,
2025
Jan 18, 2025 Guide for installing and configuring the SnapRAID plugin on OpenMediaVault 7 for data protection and recovery.
OpenMediaVault SnapRAID Upgrade DriveJul 18,
2024
Jul 18, 2024 Step-by-step guide to upgrading drives in a SnapRAID array while maintaining data integrity.
MANS A Hybrid NAS Approach with SnapRAID and MergerFSFeb 7,
2024
Feb 7, 2024 Guide to building a robust NAS stack with SnapRAID, MergerFS, and Docker for efficient storage and media management.
Windows ElucidateSep 9,
2025
Sep 9, 2025 Elucidate is a Windows GUI front-end for the command-line SnapRAID application.
-
- + + + - - -
-

Video Tutorials

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PlatformTitlePublishedDescription
LinuxHow to install and setup SnapraidJun 26,
2023
Step-by-step guide to compiling, installing, and automating SnapRAID parity protection.
LinuxHow to recover a failed drive using SnapraidJul 31,
2023
Demonstrates recovering data from a failed drive in a MergerFS + SnapRAID setup.
LinuxHow to install and setup MergerFSJun 26,
2023
How to install and setup MergerFS for SnapRAID.
LinuxMergerFS + SnapRAID : Forget about RAID 5 in your Home Server !Feb 21,
2023
Explains setting up MergerFS and SnapRAID for home server safety equivalent to RAID 5, with Slack notifications.
LinuxDIY Unraid-like functionalityJun 12,
2025
Builds Unraid-style setup with SnapRAID overview, install, and use starting at 11:26.
LinuxHow to build the Perfect Media Server | Part 1 - The Tech StackApr 22,
2025
Overview of building a media server stack, including SnapRAID integration at 19:28.
LinuxHow to setup a Linux Fileserver with Snapraid and Mergerfs Re-ExportApr 23,
2018
Guides through setting up SnapRAID with MergerFS on Linux for a simple fileserver, including add/remove drives.
Linux (Italian)Il RAID è OBSOLETO: la migliore ALTERNATIVA in ambito domesticoJun 18,
2023
Review di SnapRAID da parte di Morro Linux
OpenMediaVaultSetting up SnapRAID + mergerfs on OpenMediaVaultNov 19,
2023
Tutorial for configuring SnapRAID and MergerFS on OpenMediaVault, including drive additions.
OpenMediaVaultSetting up MergerFS SnapRaid and file server on OpenMediaVaultSep 10,
2023
Guides through creating a protected storage pool and file server with MergerFS and SnapRAID.
WindowsSetting up SnapRAID for Windows (and DrivePool) PART 1Apr 28,
2023
A detailed guide on installing and configuring SnapRAID on Windows, including integration with DrivePool for disk pooling.
WindowsSnapRAID for Windows (and DrivePool) Part 2 - RecoveryMay 12,
2023
The second part of the series, focusing on array modification, data recovery from deletions or corruption, and disk replacement.
WindowsHow to setup Snapraid and DrivePool in WindowsSep 29,
2017
Shows how to set up SnapRAID and DrivePool to create a large volume with parity backup for files.
-
+

Video Tutorials

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PlatformTitlePublishedDescription
LinuxHow to install and setup SnapraidJun 26, 2023Step-by-step guide to compiling, installing, and automating SnapRAID parity protection.
LinuxHow to recover a failed drive using SnapraidJul 31, 2023Demonstrates recovering data from a failed drive in a MergerFS + SnapRAID setup.
LinuxHow to install and setup MergerFSJun 26, 2023How to install and setup MergerFS for SnapRAID.
LinuxMergerFS + SnapRAID : Forget about RAID 5 in your Home Server !Feb 21, 2023Explains setting up MergerFS and SnapRAID for home server safety equivalent to RAID 5, with Slack notifications.
LinuxDIY Unraid-like functionalityJun 12, 2025Builds Unraid-style setup with SnapRAID overview, install, and use starting at 11:26.
LinuxHow to build the Perfect Media Server | Part 1 - The Tech StackApr 22, 2025Overview of building a media server stack, including SnapRAID integration at 19:28.
LinuxHow to setup a Linux Fileserver with Snapraid and Mergerfs Re-ExportApr 23, 2018Guides through setting up SnapRAID with MergerFS on Linux for a simple fileserver, including add/remove drives.
Linux (Italian)Il RAID è OBSOLETO: la migliore ALTERNATIVA in ambito domesticoJun 18, 2023Review di SnapRAID da parte di Morro Linux
OpenMediaVaultSetting up SnapRAID + mergerfs on OpenMediaVaultNov 19, 2023Tutorial for configuring SnapRAID and MergerFS on OpenMediaVault, including drive additions.
OpenMediaVaultSetting up MergerFS SnapRaid and file server on OpenMediaVaultSep 10, 2023Guides through creating a protected storage pool and file server with MergerFS and SnapRAID.
WindowsSetting up SnapRAID for Windows (and DrivePool) PART 1Apr 28, 2023A detailed guide on installing and configuring SnapRAID on Windows, including integration with DrivePool for disk pooling.
WindowsSnapRAID for Windows (and DrivePool) Part 2 - RecoveryMay 12, 2023The second part of the series, focusing on array modification, data recovery from deletions or corruption, and disk replacement.
WindowsHow to setup Snapraid and DrivePool in WindowsSep 29, 2017Shows how to set up SnapRAID and DrivePool to create a large volume with parity backup for files.
-
+

+Disclaimer +The resources listed below are shared for information only and are not endorsed by SnapRAID. +They are created by third parties, and we’re not responsible for their accuracy or opinions. +Please check them out yourself and refer to SnapRAID’s official documentation for trusted guidance. +

- - +

+

+ +
+ + diff --git a/travisci.png b/travisci.png new file mode 100644 index 00000000..6859e645 Binary files /dev/null and b/travisci.png differ