X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fzpool-config%2Flo-raidz2.sh;h=53a032ec5f433bda20e5d8ceb26d32f86bf8e568;hb=ea1fdf46e2d37e9eb048f9add0fb06e77e9ee6e2;hp=c6381eaffa62e028af2b60d36b5266745877491a;hpb=0ee8118bd31d1c160123d0aac9c55455706d5975;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}"