zfs scrub enable by default

Karl Denninger karl at denninger.net
Mon Aug 3 18:11:14 UTC 2020


On 8/3/2020 14:05, Peter Eriksson wrote:
> On our pretty big ZFS fileservers (home directories) we run scrubs manually but every now and then - but I have a script that pauses the scrubs during “prime time” since a full scrub run takes a day or so...
>
>
> Crontab:
>
> # zpool-scrub-pause
> 0 8 * * 1-5 /sbin/zpool-scrub pause all >/var/liu/log/zpool-scrub-pause 2>&1
> # zpool-scrub-resume
> 0 21 * * 1-5 /sbin/zpool-scrub resume all >/var/liu/log/zpool-scrub-resume 2>&1
>
>
> The script can be downloaded from:
>
>     https://www.grebo.net/~peter/zfs/ <https://www.grebo.net/~peter/zfs/>
>
>
> Perhaps something similar could be used with configurable “prime time hours”)?
>
> - Peter
>
>
>> On 3 Aug 2020, at 18:35, Walter Cramer <wfc at mintsol.com> wrote:
>>
>> Assuming a fairly-idle system, or one with a tiny zpool - scrubs from 'periodic daily' can work fine.
>>
>> In cases where that assumption is false - the resources consumed by an hours-long scrub, slowing down a system which people expect to be "as responsive as it usually it"...
>>
>> Our defaults should try to minimize the nasty surprises.
>>
>> -Walter
>>
>>
>> On Mon, 3 Aug 2020, Steve Wills wrote:
>>
>>> Hi,
>>>
>>> I wonder why we don't enable zfs periodic scrub by default?
>>>
>>> https://svnweb.freebsd.org/base/head/usr.sbin/periodic/periodic.conf?view=markup#l162
>>>
>>> Anyone happen to know?
>>>
>>> Thanks,
>>> Steve

I will pipe up AGAINST making this a default "do on its own" thing.

It is trivially automated in the cron, and this allows it to be tailored 
by the load pattern and expectations of the individual configuration.   
A documentation entry explaining the value and need to do it on *some* 
sort of schedule makes sense, but automating it is IMHO just begging for 
trouble.

The "very small" ZFS system (where there's no actual enhancement to 
redundancy) is one degenerate case where a noted error can only tell you 
that you need to find the impacted file(s) and restore them from backup, 
since there is no ability to work around the fault.  On the other hand 
larger systems where the time required to complete a scan impacts 
"working hours" (whatever that means in the context of the usual load) 
will be materially impacted by an automated scan in most cases, and thus 
should be hand-tuned anyway.

-- 
Karl Denninger
karl at denninger.net <mailto:karl at denninger.net>
/The Market Ticker/
/[S/MIME encrypted email preferred]/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4897 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20200803/164f16b7/attachment.bin>


More information about the freebsd-fs mailing list