diff --git a/nixos/roles/nfs.nix b/nixos/roles/nfs.nix index 3edbdcd4f..1de84f360 100644 --- a/nixos/roles/nfs.nix +++ b/nixos/roles/nfs.nix @@ -73,15 +73,23 @@ in (lib.mkIf (cfg.roles.nfs_rg_client.enable && service != null) { fileSystems = { - # WARNING: those settings are duplicated in the tests to - # fix a deficiency of the test harness. "${mountpoint}" = { device = "${service.address}:${export}"; fsType = "nfs4"; + ############################################################# + # WARNING: those settings are DUPLICATED in tests/nfs.nix to + # work around a deficiency of the test harness. + ############################################################# options = [ "rw" "noauto" - "soft" + # Retry infinitely + "hard" + # Start over the retry process after 10 tries + "retrans=10" + # Start with a 3s (30 deciseconds) interval and add 3s as linear + # backoff + "timeo=30" "rsize=8192" "wsize=8192" "nfsvers=4" diff --git a/tests/nfs.nix b/tests/nfs.nix index 8bd3744a0..de2e9cb60 100644 --- a/tests/nfs.nix +++ b/tests/nfs.nix @@ -59,9 +59,20 @@ in { "${cdir}" = { device = "server:${sdir}"; fsType = "nfs4"; + ################################################################ + # WARNING: those settings are DUPLICATED in nixos/roles/nfs.nix + # to work around a deficiency of the test harness. + ################################################################ options = [ "rw" - "soft" + "noauto" + # Retry infinitely + "hard" + # Start over the retry process after 10 tries + "retrans=10" + # Start with a 3s (30 deciseconds) interval and add 3s as linear + # backoff + "timeo=30" "rsize=8192" "wsize=8192" "nfsvers=4"