X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=scripts%2Fzpool-config%2Flo-raidz2.sh;fp=scripts%2Fzpool-config%2Flo-raidz2.sh;h=53a032ec5f433bda20e5d8ceb26d32f86bf8e568;hb=608860b6d06aaaa647e03fc3f3fc1b49f025155e;hp=c6381eaffa62e028af2b60d36b5266745877491a;hpb=36391312afdfac5584ca40ef1af7721108ce4c20;p=zfs.git diff --git a/scripts/zpool-config/lo-raidz2.sh b/scripts/zpool-config/lo-raidz2.sh index c6381ea..53a032e 100644 --- a/scripts/zpool-config/lo-raidz2.sh +++ b/scripts/zpool-config/lo-raidz2.sh @@ -31,6 +31,9 @@ zpool_destroy() { msg ${ZPOOL} destroy ${ZPOOL_NAME} ${ZPOOL} destroy ${ZPOOL_NAME} + # Delay to ensure device is closed before removing loop device + sleep 1 + for FILE in ${FILES}; do DEVICE=`${LOSETUP} -a | grep ${FILE} | head -n1|cut -f1 -d:` msg "Removing ${FILE} using loopback device ${DEVICE}"