Skip to content

cron: Do not error if already scrubbing

Richard Laager requested to merge rlaager/zfs:handle-long-scrubs into master

If a pool is already scrubbing, zpool scrub will return an error. This breaks the cron scrub script. It outputs that error and then does not scrub any further pools.

This change checks to see if the pool is scrubbing before attempting to start a scrub. This addresses long-running scrubs. Note that a "long-running" scrub here is not necessarily a month long. If the system is shut off or the pool is exported, the scrub will resume later.

Merge request reports

Loading