From eee28f57fc6c1c6942cb8df814858cf7a9bd0d32 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Sun, 18 Jan 2026 14:00:16 +0100 Subject: [PATCH] System: Replace NFS mounts "soft" option with "hard" --- system/nixinator/hardware-configuration.nix | 14 ++++++++------ system/servenix/hardware-configuration.nix | 12 ++++++------ system/thinknix/hardware-configuration.nix | 8 ++++---- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/system/nixinator/hardware-configuration.nix b/system/nixinator/hardware-configuration.nix index f3dea76c..e3a1219a 100644 --- a/system/nixinator/hardware-configuration.nix +++ b/system/nixinator/hardware-configuration.nix @@ -76,7 +76,9 @@ # options = ["defaults" "rw" "noatime"]; # }; - # If the bg option is specified, a timeout or failure causes the mount(8) command + # NOTE: By mounting NFS shares here, we risk the system becoming unusable when they disconnect (unless unmounted). + + # If the bg option is specified, a timeout or failure causes the mount(8) command # to fork a child which continues to attempt to mount the export. # The parent immediately returns with a zero exit code. # This is known as a "background" mount. @@ -94,7 +96,7 @@ "/home/${username}/Restic" = { device = "192.168.86.15:/volume1/NixinatorPersistence"; fsType = "nfs"; - options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"]; }; # TrueNAS @@ -102,25 +104,25 @@ "/home/${username}/Movies" = { device = "192.168.86.20:/mnt/Seagate4TB/Movies"; fsType = "nfs"; - options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"]; }; "/home/${username}/Shows" = { device = "192.168.86.20:/mnt/Seagate4TB/Shows"; fsType = "nfs"; - options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"]; }; "/home/${username}/Music" = { device = "192.168.86.20:/mnt/Seagate4TB/Music"; fsType = "nfs"; - options = ["defaults" "rw" "noatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "noatime" "_netdev" "bg" "hard"]; }; "/media/Box" = { device = "192.168.86.20:/mnt/Seagate4TB/Box"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; }; diff --git a/system/servenix/hardware-configuration.nix b/system/servenix/hardware-configuration.nix index b50de257..b670419c 100644 --- a/system/servenix/hardware-configuration.nix +++ b/system/servenix/hardware-configuration.nix @@ -41,7 +41,7 @@ "/media/synology-syncthing" = { device = "192.168.86.15:/volume1/DockerVolumes"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; # TrueNAS @@ -49,31 +49,31 @@ "/media/Movie" = { device = "192.168.86.20:/mnt/Seagate4TB/Movies"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; "/media/Show" = { device = "192.168.86.20:/mnt/Seagate4TB/Shows"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; "/media/TV-Music" = { device = "192.168.86.20:/mnt/Seagate4TB/Music"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; "/media/MusicVideos" = { device = "192.168.86.20:/mnt/Seagate4TB/MusicVideos"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; "/media/Box" = { device = "192.168.86.20:/mnt/Seagate4TB/Box"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; }; diff --git a/system/thinknix/hardware-configuration.nix b/system/thinknix/hardware-configuration.nix index 585704bb..4b855430 100644 --- a/system/thinknix/hardware-configuration.nix +++ b/system/thinknix/hardware-configuration.nix @@ -37,7 +37,7 @@ "/media/synology-syncthing" = { device = "192.168.86.15:/volume1/DockerVolumes"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; # TrueNAS @@ -45,19 +45,19 @@ "/media/Movie" = { device = "192.168.86.20:/mnt/Seagate4TB/Movies"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; "/media/Show" = { device = "192.168.86.20:/mnt/Seagate4TB/Shows"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; "/media/TV-Music" = { device = "192.168.86.20:/mnt/Seagate4TB/Music"; fsType = "nfs"; - options = ["defaults" "rw" "relatime" "_netdev" "bg" "soft"]; + options = ["defaults" "rw" "relatime" "_netdev" "bg" "hard"]; }; };