Another attempt at fixing the NFS race.

This commit is contained in:
2025-10-24 13:59:39 +01:00
parent 1dc219d08f
commit cf2210ec77
2 changed files with 75 additions and 17 deletions

View File

@@ -4,15 +4,18 @@
# Mounts from data-services.service.consul (Consul DNS for automatic failover)
# The NFS server registers itself in Consul, so this will automatically
# point to whichever host is currently running the NFS server
#
# Uses persistent mount (not automount) with nofail to prevent blocking boot.
# The mount is established at boot time and persists - no auto-unmount.
# This prevents issues with Docker bind mounts seeing empty automount stubs.
fileSystems."/data/services" = {
device = "data-services.service.consul:/persist/services";
fsType = "nfs";
options = [
"x-systemd.automount" # Auto-mount on access
"noauto" # Don't mount at boot (automount handles it)
"x-systemd.idle-timeout=60" # Unmount after 60s of inactivity
"_netdev" # Network filesystem (wait for network)
"nofail" # Don't block boot if mount fails
"x-systemd.mount-timeout=30s" # Timeout for mount attempts
"_netdev" # Network filesystem (wait for network)
];
};