Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Sep 2017 13:17:24 +0200
From:      Borja Marcos <borjam@sarenet.es>
To:        FreeBSD FS <freebsd-fs@freebsd.org>
Subject:   Problem with the periodic scrub of ZFS pools
Message-ID:  <BDF5D737-DF1A-431E-8928-9603AB2AD283@sarenet.es>

next in thread | raw e-mail | index | archive | help


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.






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BDF5D737-DF1A-431E-8928-9603AB2AD283>