add retry block of zfs mount
This commit is contained in:
parent
e045e7e5e1
commit
c77d54b16b
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user