Problem with the periodic scrub of ZFS pools
Borja Marcos
borjam at sarenet.es
Wed Sep 27 11:25:39 UTC 2017
Hi,
There’s a problem with the periodic script for ZFS pool scrubbing (/etc/periodic/daily/800.scrub-zfs).
It can be configured with an interval between scrubs (daily_scrub_zfs_default_threshold=“17”) but
the feature depends on making searches in the pool history. In a very active ZFS pool (Mine has
a lot of zfs dataset replications and there is a lot of zfs snapshot creation/deletion/replication the
scrub entries will disappear (the history has a finite length).
In my case, for example, I configured 17 days between scrubs, I actually get a weekly one.
A better mechanism should be used to store the timestamp of the last automated scrub. Custom attributes
are a good candidate, but zpool doesn’t have that option. What about adding it as a custom attribute to the
root dataset of the pool?
Ie, for a pool called “tank” we could use “zfs set freebsd_period:last_scrub=timestamp” or something slmilar.
Ideas?
Thanks!
Borja.
More information about the freebsd-fs
mailing list