diff --git a/etc/periodic/daily/800.scrub-zfs b/etc/periodic/daily/800.scrub-zfs index f60588abf142..01577c1c1f09 100755 --- a/etc/periodic/daily/800.scrub-zfs +++ b/etc/periodic/daily/800.scrub-zfs @@ -24,13 +24,17 @@ case "$daily_scrub_zfs_enable" in for pool in ${daily_scrub_zfs_pools}; do # sanity check - zpool list ${pool} >/dev/null 2>&1 + _status=$(zpool list ${pool} | sed -n -e '$p') if [ $? -ne 0 ]; then echo " WARNING: pool '${pool}' specified in" echo " '/etc/periodic.conf:daily_scrub_zfs_pools'" echo " does not exist" continue fi + if echo ${_status} | grep -q FAULTED; then + echo "Skipping faulted pool: ${pool}" + continue + fi # successful only if there is at least one pool to scrub rc=0