From b1963ead44f5cac88a436866a5b81c6c6dfd7619 Mon Sep 17 00:00:00 2001 From: Alexander Motin Date: Fri, 5 Feb 2016 18:17:37 +0000 Subject: [PATCH] Update script for modern `zpool status` output. --- etc/periodic/daily/800.scrub-zfs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/periodic/daily/800.scrub-zfs b/etc/periodic/daily/800.scrub-zfs index b7a009d2c1e9..64eac99c38a1 100755 --- a/etc/periodic/daily/800.scrub-zfs +++ b/etc/periodic/daily/800.scrub-zfs @@ -78,11 +78,14 @@ case "$daily_scrub_zfs_enable" in continue fi - _status="$(zpool status ${pool} | grep scrub:)" + _status="$(zpool status ${pool} | grep scan:)" case "${_status}" in *"scrub in progress"*) echo " scrubbing of pool '${pool}' already in progress, skipping:" ;; + *"resilver in progress"*) + echo " resilvering of pool '${pool}' is in progress, skipping:" + ;; *"none requested"*) echo " starting first scrub (since reboot) of pool '${pool}':" zpool scrub ${pool}