forked from mirrors/nixpkgs
Merge pull request #16901 from Baughn/zfs-nvme-fix
zfs: Keep trying root import until it works
This commit is contained in:
commit
c2e5fd959d
|
@ -247,8 +247,19 @@ in
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
''] ++ (map (pool: ''
|
''] ++ (map (pool: ''
|
||||||
echo "importing root ZFS pool \"${pool}\"..."
|
echo -n "importing root ZFS pool \"${pool}\"..."
|
||||||
zpool import -d ${cfgZfs.devNodes} -N $ZFS_FORCE "${pool}"
|
trial=0
|
||||||
|
until msg="$(zpool import -d ${cfgZfs.devNodes} -N $ZFS_FORCE '${pool}' 2>&1)"; do
|
||||||
|
sleep 0.25
|
||||||
|
echo -n .
|
||||||
|
trial=$(($trial + 1))
|
||||||
|
if [[ $trial -eq 60 ]]; then
|
||||||
|
echo
|
||||||
|
echo "$msg"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo
|
||||||
'') rootPools));
|
'') rootPools));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue