X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=scripts%2Fzpool-config%2Flo-raid10.sh;h=f9fe3c064689c1975cc84d29e2c9a26a51e0ee2e;hb=ca8b5af89d2c5826af7385bf18f3b377b0efde11;hp=5350930bb2cb3cb02a5831b9bd312ca2a95105e0;hpb=0ee8118bd31d1c160123d0aac9c55455706d5975;p=zfs.git diff --git a/scripts/zpool-config/lo-raid10.sh b/scripts/zpool-config/lo-raid10.sh index 5350930..f9fe3c0 100644 --- a/scripts/zpool-config/lo-raid10.sh +++ b/scripts/zpool-config/lo-raid10.sh @@ -46,6 +46,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}"