From: Alan J. Pippin Date: Sat, 31 Dec 2022 16:54:27 +0000 (-0700) Subject: Add -f to zpool import commands X-Git-Url: http://git.pippins.net/embedvideo/.git/static/images/%7Blink_ppi%7D?a=commitdiff_plain;h=d10b901de697a124d6b2223f0fab23800e87f5b8;p=zfs-ubuntu%2F.git Add -f to zpool import commands Change-Id: I37bd5b1989b546e32f81fe0a559372134d158700 --- diff --git a/zfs-replicate-all b/zfs-replicate-all index c8a8b03..5dde8b2 100755 --- a/zfs-replicate-all +++ b/zfs-replicate-all @@ -101,7 +101,7 @@ for backup_pool in $backup_pools; do zpool list -H $backup_pool > $tmpfile 2>&1 if [ $? != 0 ]; then if [[ $import_export_backup_pool == 1 ]]; then - zpool import $backup_pool >> $tmpfile 2>&1 + zpool import -f $backup_pool >> $tmpfile 2>&1 if [ $? != 0 ]; then msgs=`cat $tmpfile` fatal_and_exit "-E- unable to import the backup pool '$backup_pool' on $hostname: $msgs" "$mailto" diff --git a/zfs-scrub b/zfs-scrub index 5388f54..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