You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,8 @@ Contributions are welcome!
32
32
- After some preliminary checks, the script will execute `snapraid diff` to figure out if parity info is out of date, which means checking for changes since the last execution. During this step, the script will ensure drives are fine by reading parity and content files.
33
33
- One of the following will happen:
34
34
- If parity info is out of sync **and** the number of deleted or changed files exceed the threshold you have configured it **stops**. You may want to take a look to the output log.
35
-
- If parity info is out of sync **and** the number of deleted or changed files exceed the threshold, you can still **force a sync** after a number of warnings. It's useful If you often get a false alarm but you're confident enough. This is called "Sync with threshold warnings"
35
+
- If parity info is out of sync **and** the number of deleted or changed files exceed the threshold, you can still **force a sync** after a number of warnings. It's useful If you often get a false alarm but you're confident enough. This is called "Sync with threshold warnings"
36
+
- Instead of forcing a sync based on the number of deleted files, you may consider the `ADD_DEL_THRESHOLD` feature, by allowing a sync that would otherwise violate the delete threshold, if the ratio of added to deleted files is greater than the value set.
36
37
- If parity info is out of sync **but** the number of deleted or changed files did not exceed the threshold, it **executes a sync** to update the parity info.
37
38
- When the parity info is in sync, either because nothing has changed or after a successfully sync, it runs the `snapraid scrub` command to validate the integrity of the data, both the files and the parity info. If sync was cancelled or other issues were found, scrub will not be run.
38
39
- Note that each run of the scrub command will validate only a configurable portion of parity info to avoid having a long running job and affecting the performance of the server.
@@ -64,15 +65,21 @@ If you don't know what to do, I recommend using the default values and see how i
64
65
- Sync always (forced sync).
65
66
- Sync after a number of breached threshold warnings.
66
67
- Sync only if thresholds warnings are not breached (enabled by default).
68
+
- Sync even if the delete threshold has been breached, but the ratio of added to deleted files is greater than the value set.
67
69
- User definable thresholds for deleted and updated files.
68
70
- Scrub options
69
71
- Enable or disable scrub job.
70
72
- Delayed option, disabled by default. Run scrub only after a number of script executions, e.g. every 7 times. If you don't want to scrub your array every time, this one is for you.
71
73
- Data to be scrubbed - by default 5% older than 10 days.
72
-
- Pre-hashing - enabled by default. Mitigate the lack of ECC memory, reading data twice to avoid silent read errors.
74
+
- Scrub new data - scrub the data that was just added by the sync.
75
+
- Pre-hashing - enabled by default. Mitigate the lack of ECC memory, reading data twice to avoid silent read errors.
76
+
- Force zero size sync - disabled by default. Forces the operation of syncing a file with zero size that before was not. Use with caution!
73
77
- Snapraid Status - shows the status of the array, disabled by default.
74
78
- SMART Log - enabled by default. A SnapRAID report for disks health status.
75
79
- Verbosity option - disabled by default. When enabled, includes the TOUCH and DIFF commands output. Please note email will be huge and mostly unreadable.
80
+
- SnapRAID Output (log) retention - disabled by default (log is overriden every run)
81
+
- Detailed output retention for each run
82
+
- You can choose the amount of days and the path, by default set to the user home
76
83
- Healthchecks.io, Telegram and Discord integration
77
84
- If you don't read your emails every day, this is a great one for you, since you can be quickly informed if things go wrong.
78
85
- The script will report to Healthchecks.io, Telegram and Discord when is started and when is completed. If there's a failure it's included as well.
@@ -82,7 +89,7 @@ If you don't know what to do, I recommend using the default values and see how i
82
89
- Made for external services or mail binaries with different commands than `mailx`.
83
90
- Configure the path of the script or the mail binary to be invoked.
84
91
- You can still use native services since it only replaces the standard email.
85
-
- Container management - disabled by default.
92
+
-Docker Container management
86
93
- A list of containers you want to be interrupted before running actions and restored when completed.
87
94
- Docker mode - choose to pause/unpause or to stop/restart your containers
88
95
- Docker remote - if docker is running on a remote machine
@@ -98,7 +105,7 @@ You can also change more advanced options such SnapRAID binary location, log fil
98
105
## A nice email report
99
106
This script produces emails that don't contain a list of changed files to improve clarity.
100
107
101
-
You can re-enable full output in the email by switching the option `VERBOSITY`. The full report will always be available in `/tmp/snapRAID.out` but will be replaced after each run, or deleted when the system is shut down. You can change the location of the file if you need to keep it.
108
+
You can re-enable full output in the email by switching the option `VERBOSITY`. The full report is available in `/tmp/snapRAID.out` but will be replaced after each run, or deleted when the system is shut down. You can enable the retention policy to keep logs for some days and customize the folder location.
102
109
103
110
Here's an example email report.
104
111
@@ -279,7 +286,7 @@ If you start with empty disks, you cannot use (yet) this script, since it expect
279
286
First run `snapraid sync`. Once completed, the array will be ready to be used with this script.
280
287
281
288
## OMV5/6 and SnapRAID plugin
282
-
Ignore what you see at _OMV GUI > Services > SnapRAID > Diff Script Settings_, since it only applies to the plugin's built-in script. Also don't forget to remove the built-in `omv-snapraid-diff`script from _OMV GUI > System > Scheduled Tasks_, either by deleting the job, or simply disabling it.
289
+
Ignore what you see at _OMV GUI > Services > SnapRAID > Diff Script Settings_, since it only applies to the plugin's built-in script. Also don't forget to remove the built-in `omv-snapraid-diff`job from _OMV GUI > System > Scheduled Tasks_, either by deleting the job, or simply disabling it.
283
290
284
291
## Installing `hd-idle` for Automatic Disk Spindown
285
292
If you would like to enable automatic disk spindown after the script job runs, then you will need to install `hd-idle`. The version included in default Debian and Ubuntu repositories is buggy and out of date - fortunately developer [adelolmo](https://github.com/adelolmo/hd-idle) has improved the project and released an updated version.
@@ -318,3 +325,4 @@ This script would not exist without:
0 commit comments