diff options
author | Lassulus <github@lassul.us> | 2020-08-22 15:42:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-22 15:42:32 +0200 |
commit | 6a2c73031a48752e247beab5c8a297cb6c01266b (patch) | |
tree | ed87b28d7102af4254601c8d7ca12ab5a5053f11 /nixos | |
parent | c0d6bccb7edd5596c227d1747ff6f7a8bd4a46e1 (diff) | |
parent | e2341359953dcf1361c47e80d6ca3bdb83cfbdc6 (diff) | |
download | nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.tar nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.tar.gz nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.tar.bz2 nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.tar.lz nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.tar.xz nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.tar.zst nixpkgs-6a2c73031a48752e247beab5c8a297cb6c01266b.zip |
Merge pull request #89353 from wizeman/u/fix-zfs-ebusy
stage-1: retry mounting ZFS root a few times
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/stage-1-init.sh | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index 54e3a691b2f..0c1be71cf53 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -378,12 +378,14 @@ mountFS() { mkdir -p "/mnt-root$mountPoint" - # For CIFS mounts, retry a few times before giving up. + # For ZFS and CIFS mounts, retry a few times before giving up. + # We do this for ZFS as a workaround for issue NixOS/nixpkgs#25383. local n=0 while true; do mount "/mnt-root$mountPoint" && break - if [ "$fsType" != cifs -o "$n" -ge 10 ]; then fail; break; fi + if [ \( "$fsType" != cifs -a "$fsType" != zfs \) -o "$n" -ge 10 ]; then fail; break; fi echo "retrying..." + sleep 1 n=$((n + 1)) done |