zfs scrub enable by default

Grzegorz Junka list1 at gjunka.com
Mon Aug 3 22:20:12 UTC 2020


On 03/08/2020 21:41, John Long via freebsd-fs wrote:
> On 03/08/2020 20:25, Allan Jude wrote:
>> On 2020-08-03 12:10, 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
>>>
>>> _______________________________________________
>>> freebsd-fs at freebsd.org mailing list
>>> https://lists.freebsd.org/mailman/listinfo/freebsd-fs
>>> To unsubscribe, send any mail to "freebsd-fs-unsubscribe at freebsd.org"
>>
>> I think switching this to on-by-default is a good thing.
>>
>> To be clear, which the check is part of 'periodic daily', it only
>> triggers a scrub if it has been more than 35 days since the last scrub.
>>
>> FreeNAS already has does this, and that accounts for a large number of
>> FreeBSD ZFS deployments.
>
> There is a difference. FreeNAS is an appliance. It should minimize the 
> need for management.
>
> FreeBSD is the base OS. It should do as little as possible so people 
> can set it up the way we want rather than spend days or weeks 
> unbreaking surprising, non-standard behavior and hundreds of tweaks 
> for everybody who requested them.
>
>> There is tuning you can do in ZFS to try to lessen the impact of a scrub
>> on your production workloads.
>
> That's up to the guy running the box to do or not to do.
>
>> The periodic script lets you select which pools to include (defaults to
>> all), so you can tune it to only scrub your root pool every 35 days, and
>> not the large pool that might take too long to scrub or whatever. It
>> also lets you set a different threshold for each pool.
>
> A NAS appliance could benefit from something like this. A generic OS 
> cannot.
>
>> So I don't see any reason not to enable it by default, and just document
>> how to adjust it if people really need to disable it. Honestly, I think
>> those who are disabling it are doing themselves a disservice.
>
> It's offensive for you to presume to think you know better what the 
> other guy needs than he does himself. Thank you for clarifying it 
> though, I think it's valuable to understand the thinking of people who 
> want to coopt the OS into their personal playground.
>

Thanks John, I couldn't agree more. If I wanted to let my OS decide 
what's better for me I would run my server on Windows or Mac.

That having said, FreeBSD does come with a few nice defaults that I 
wouldn't know how to set up myself otherwise. For example, once the 
sendmail is configured it automatically sends daily weekly and monthly 
health reports for the host and all jails, including disk usage, 
configuration changes, security checks, cleaning runs, failed su login 
attempts, etc.

One might say they are similar to the scrubbing, i.e. if I don't 
configure sendmail the system will be collecting them in the host's 
mailbox eventually potentially impacting the server.

I am not advocating for making scrub the default, just pointing out that 
FreeBSD does come with some potentially impacting defaults already.

GrzegorzJ



More information about the freebsd-fs mailing list