Change the default scrub percentage to 15%

This is done to take into account that now
synced blocks are scrubbed with priority.
This commit is contained in:
Andrea Mazzoleni 2015-11-08 16:52:29 +01:00
parent 9be125dfb9
commit 7f17d667e6
5 changed files with 32 additions and 35 deletions

View file

@ -12,6 +12,9 @@ SnapRAID HISTORY
the already scrubbed ones.
This allows to verify as early as possible that the written
parity during sync is really correct.
This means that the selected percentage to scrub should take care
also of the just synced blocks. For this reason the default scrub
percentage is now increased to the 15%.
The "status" command reports the amount of scrub necessary to
ensure to scrub all the synced blocks.
* The -p, --percentage option supports the new the arguments:

View file

@ -605,8 +605,8 @@ int state_scrub(struct snapraid_state* state, int percentage, int olderthan)
if (percentage >= 0) {
countlimit = md(blockmax, percentage, 100);
} else {
/* by default scrub 1/12 of the array */
countlimit = md(blockmax, 1, 12);
/* by default scrub 15% of the array (100*3/20=15) */
countlimit = md(blockmax, 3, 20);
}
if (olderthan >= 0) {

View file

@ -18,11 +18,11 @@ snapraid [\-c, \-\-conf CONFIG]
.PD 0
.PP
.PD
[\-p, \-\-percentage PERC] [\-o, \-\-older\-than DAYS]
[\-p, \-\-percentage PERC|bad|sync|full]
.PD 0
.PP
.PD
[\-l, \-\-log FILE]
[\-o, \-\-older\-than DAYS] [\-l, \-\-log FILE]
.PD 0
.PP
.PD
@ -307,8 +307,8 @@ snapraid scrub
This command verifies the data in your array comparing it with
the hash computed in the \[dq]sync\[dq] command.
.PP
Every run of the command checks about 12% of the array, but not data newer
than 10 days.
Every run of the command checks the 15% of the array, but not data
already scrubbed in the previous 10 days.
You can use the \-p, \-\-percentage 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 older than 20 days use:
@ -774,15 +774,13 @@ The files in the array are NOT modified.
Scrubs the array, checking for silent or input/output errors in data
and parity disks.
.PP
For each command invocation, the 12% of the array is checked, but
For each command invocation, the 15% of the array is checked, but
nothing that was already scrubbed in the last 10 days.
This means that scrubbing once a week, every bit of data is checked
at least one time every two months.
.PP
You can define a different scrub amount using the \-p, \-\-percentage
option that takes as argument:
bad \- Scrub blocks marked bad.
synch \- Scrub new synced blocks never scrubbed.
sync \- Scrub new synced blocks never scrubbed.
full \- Scrub everything.
0\-100 \- Scrub the exact percentage of blocks.
.PP
@ -981,10 +979,10 @@ This option can be used only with \[dq]check\[dq] and \[dq]fix\[dq].
.TP
.B \-p, \-\-percentage PERC|bad|sync|full
Selects the part of the array to process in \[dq]scrub\[dq].
PERC is a numeric value from 0 to 100, default is 12.
PERC is a numeric value from 0 to 100, default is 20.
Instead of a percentage, you can also specify the kind of scrub
you want: \[dq]bad\[dq] scrubs bad blocks, \[dq]sync\[dq] the synced block
not yet scrubbed, and \[dq]full\[dq] everything.
you want: \[dq]bad\[dq] scrubs bad blocks, \[dq]sync\[dq] the blocks not yet
scrubbed, and \[dq]full\[dq] for everything.
This option can be used only with \[dq]scrub\[dq].
.TP
.B \-o, \-\-older\-than DAYS

View file

@ -6,8 +6,8 @@ Synopsis
: [-f, --filter PATTERN] [-d, --filter-disk NAME]
: [-m, --filter-missing] [-e, --filter-error]
: [-a, --audit-only] [-h, --pre-hash] [-i, --import DIR]
: [-p, --percentage PERC] [-o, --older-than DAYS]
: [-l, --log FILE]
: [-p, --percentage PERC|bad|sync|full]
: [-o, --older-than DAYS] [-l, --log FILE]
: [-Z, --force-zero] [-E, --force-empty]
: [-U, --force-uuid] [-D, --force-device]
: [-N, --force-nocopy] [-F, --force-full]
@ -171,8 +171,8 @@ Getting Started
This command verifies the data in your array comparing it with
the hash computed in the "sync" command.
Every run of the command checks about 12% of the array, but not data newer
than 10 days.
Every run of the command checks the 15% of the array, but not data
already scrubbed in the previous 10 days.
You can use the -p, --percentage 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 older than 20 days use:
@ -482,15 +482,13 @@ Commands
Scrubs the array, checking for silent or input/output errors in data
and parity disks.
For each command invocation, the 12% of the array is checked, but
For each command invocation, the 15% of the array is checked, but
nothing that was already scrubbed in the last 10 days.
This means that scrubbing once a week, every bit of data is checked
at least one time every two months.
You can define a different scrub amount using the -p, --percentage
option that takes as argument:
bad - Scrub blocks marked bad.
synch - Scrub new synced blocks never scrubbed.
sync - Scrub new synced blocks never scrubbed.
full - Scrub everything.
0-100 - Scrub the exact percentage of blocks.
@ -695,10 +693,10 @@ Options
-p, --percentage PERC|bad|sync|full
Selects the part of the array to process in "scrub".
PERC is a numeric value from 0 to 100, default is 12.
PERC is a numeric value from 0 to 100, default is 20.
Instead of a percentage, you can also specify the kind of scrub
you want: "bad" scrubs bad blocks, "sync" the synced block
not yet scrubbed, and "full" everything.
you want: "bad" scrubs bad blocks, "sync" the blocks not yet
scrubbed, and "full" for everything.
This option can be used only with "scrub".
-o, --older-than DAYS

View file

@ -10,8 +10,8 @@ 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, --percentage PERC] [-o, --older-than DAYS]
[-l, --log FILE]
[-p, --percentage PERC|bad|sync|full]
[-o, --older-than DAYS] [-l, --log FILE]
[-Z, --force-zero] [-E, --force-empty]
[-U, --force-uuid] [-D, --force-device]
[-N, --force-nocopy] [-F, --force-full]
@ -186,8 +186,8 @@ run the "scrub" command.
This command verifies the data in your array comparing it with
the hash computed in the "sync" command.
Every run of the command checks about 12% of the array, but not data newer
than 10 days.
Every run of the command checks the 15% of the array, but not data
already scrubbed in the previous 10 days.
You can use the -p, --percentage 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 older than 20 days use:
@ -520,15 +520,13 @@ The files in the array are NOT modified.
Scrubs the array, checking for silent or input/output errors in data
and parity disks.
For each command invocation, the 12% of the array is checked, but
For each command invocation, the 15% of the array is checked, but
nothing that was already scrubbed in the last 10 days.
This means that scrubbing once a week, every bit of data is checked
at least one time every two months.
You can define a different scrub amount using the -p, --percentage
option that takes as argument:
bad - Scrub blocks marked bad.
synch - Scrub new synced blocks never scrubbed.
sync - Scrub new synced blocks never scrubbed.
full - Scrub everything.
0-100 - Scrub the exact percentage of blocks.
@ -754,10 +752,10 @@ SnapRAID provides the following options:
-p, --percentage PERC|bad|sync|full
Selects the part of the array to process in "scrub".
PERC is a numeric value from 0 to 100, default is 12.
PERC is a numeric value from 0 to 100, default is 20.
Instead of a percentage, you can also specify the kind of scrub
you want: "bad" scrubs bad blocks, "sync" the synced block
not yet scrubbed, and "full" everything.
you want: "bad" scrubs bad blocks, "sync" the blocks not yet
scrubbed, and "full" for everything.
This option can be used only with "scrub".
-o, --older-than DAYS