Skip to content

Commit

Permalink
Merge pull request #239 from nix-community/zfs-fix
Browse files Browse the repository at this point in the history
umount /mnt prior to exporting zpool
  • Loading branch information
phaer authored Oct 27, 2023
2 parents c1d2893 + 5f9948d commit 12d5c4d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/nixos-anywhere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ if [[ ${copy_host_keys-n} == "y" ]]; then
fi
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
if command -v zpool >/dev/null; then
zpool export -a || : # we always want to export the zfs pools so people can boot from it without force import
# we always want to export the zfs pools so people can boot from it without force import
umount -Rv /mnt/
zpool export -a || true
fi
# We will reboot in background so we can cleanly finish the script before the hosts go down.
# This makes integration into scripts easier
Expand Down

0 comments on commit 12d5c4d

Please sign in to comment.