X-Git-Url: http://git.pippins.net/embedvideo/.git/?a=blobdiff_plain;f=zfs-scrub;h=4e220276666308cea8b63eb3b8e0b3c092928d75;hb=4d5e8199929308142509eaae652bbfdc559dfca3;hp=50813fce69192f9dbbed769914f574c098bdba20;hpb=7efa74b7c3ad633378498822fe408b3d2da2dcca;p=zfs-ubuntu%2F.git diff --git a/zfs-scrub b/zfs-scrub index 50813fc..4e22027 100755 --- a/zfs-scrub +++ b/zfs-scrub @@ -35,7 +35,7 @@ do zpool list -H "$i" >/dev/null 2>&1 if [ $? != 0 ]; then if [[ $import_export_backup_pool == 1 ]] && [[ "$backup_pool" =~ "$i" ]]; then - zpool import $i + zpool import -f $i if [ $? != 0 ]; then fatal_and_exit "-E- unable to import the pool $i" fi @@ -85,7 +85,7 @@ do zpool list -H "$i" >/dev/null 2>&1 if [ $? != 0 ]; then if [[ $import_export_backup_pool == 1 ]] && [[ "$backup_pool" =~ "$i" ]]; then - zpool import $i + zpool import -f $i if [ $? != 0 ]; then fatal_and_exit "-E- unable to import the pool $i" fi @@ -96,7 +96,7 @@ do # Check for any scrub errors zpool status $i | grep scan: - zpool status $i | grep scan: | grep "with 0 errors" > /dev/null 2>&1 + zpool status $i | grep scan: | grep -e "with 0 errors" -e "in progress" > /dev/null 2>&1 if [ $? != 0 ]; then # The scrub found errors zpool status $i | $mailx -s "zpool scrub on $hostname $i found errors" "$mailto"