We have several Ubuntu ZFS servers that we’re reinstalling with Rocky 8. I noticed that Ubuntu ZFS performs a scrub once in a while, the second Sunday it looks like, but they’re not automatically running on Rocky 8. I was wondering if anyone has a preferred/recommended way of scheduling ZFS scrubs in Rocky?
I have an cronned pipeline that asks zpool history which pool was least recently scrubbed and starts a scrub on it, but that’s because the distribution of our pools is more dynamic than is ideal. If you have a more straightforward setup, it’s probably easiest to use the systemd timers documented at the end of the zpool-scrub(8) man-page.
That worked @quartsize thanks for your help! I forgot that one of our servers is still running EL7–this systemd timer doesn’t seem to be available but I can probably duplicate it w/ cron until we can upgrade to Rocky 8.