add retry block of zfs mount

This commit is contained in:
Jörg Thalheim 2016-01-09 10:09:05 +00:00
parent e045e7e5e1
commit c77d54b16b

View File

@ -15,5 +15,14 @@ echo
echo $password | cryptsetup luksOpen /dev/sda3 zfs_hd_1
echo $password | cryptsetup luksOpen /dev/sdb3 zfs_hd_2
echo "import zfs pool"
retry=0
until [ $retry -ge 10 ]; do
zpool list | grep -q data && break || true
zpool import -f data
retry=$[$retry+1]
sleep 1
done
zfs mount -a
mount -a