Skip to content

Commit

Permalink
Merge pull request #1115 from flyingcircusio/PL-133015-switch-nfs-to-…
Browse files Browse the repository at this point in the history
…hard-mounts

nfs: switch to hard recovery to avoid potential data consistency issues
  • Loading branch information
dpausp authored Sep 27, 2024
2 parents afaa49d + d32d15d commit add0144
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
14 changes: 11 additions & 3 deletions nixos/roles/nfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 12 additions & 1 deletion tests/nfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit add0144

Please sign in to comment.