Add -f to zpool import commands
[zfs-ubuntu/.git] / zfs-scrub
index 5388f542b112006994ecab19a9de36171322f8b0..4e220276666308cea8b63eb3b8e0b3c092928d75 100755 (executable)
--- 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