You are not logged in.

#1 2025-02-19 06:30:38

Kmartinez501
Member
Registered: 2025-02-18
Posts: 15

[SOLVED] NFS fails to mount during boot

Hi,

My NFS mount configured in /etc/fstab fails to mount during boot despite sudo mount -a working. For additional info I am using NetworkManager. I get the following errors by glancing at journalctl:

└─[01:17]-(^_^)-[$] sudo journalctl -b | grep nfs
[sudo] password for kmadmin: 
Feb 19 01:16:50 arch-rig systemd[1]: Mounting /mnt/steam-nfs...
Feb 19 01:16:50 arch-rig prometheus-node-exporter[751]: ts=2025-02-19T06:16:50.780Z caller=node_exporter.go:118 level=info collector=nfs
Feb 19 01:16:50 arch-rig prometheus-node-exporter[751]: ts=2025-02-19T06:16:50.780Z caller=node_exporter.go:118 level=info collector=nfsd
Feb 19 01:16:50 arch-rig mount[752]: mount.nfs: Network is unreachable for 192.168.70.148:/mnt/Steam/games on /mnt/steam-nfs
Feb 19 01:16:50 arch-rig systemd[1]: mnt-steam\x2dnfs.mount: Mount process exited, code=exited, status=32/n/a
Feb 19 01:16:50 arch-rig systemd[1]: mnt-steam\x2dnfs.mount: Failed with result 'exit-code'.
Feb 19 01:16:50 arch-rig systemd[1]: Failed to mount /mnt/steam-nfs.

In addition verifying systemctl mnt-steam yields the following:

┌─[kmadmin@arch-rig]─(~)
└─[01:35]-(T_T)-[$] sudo systemctl status mnt-steam\\x2dnfs.mount 
× mnt-steam\x2dnfs.mount - /mnt/steam-nfs
     Loaded: loaded (/etc/fstab; generated)
     Active: failed (Result: exit-code) since Wed 2025-02-19 01:16:50 EST; 18min ago
 Invocation: d537919589ad433d90ff24bb93403e74
      Where: /mnt/steam-nfs
       What: 192.168.70.148:/mnt/Steam/games
       Docs: man:fstab(5)
             man:systemd-fstab-generator(8)
   Mem peak: 1.6M
        CPU: 5ms

Feb 19 01:16:50 arch-rig systemd[1]: Mounting /mnt/steam-nfs...
Feb 19 01:16:50 arch-rig mount[752]: mount.nfs: Network is unreachable for 192.168.70.148:/mnt/Steam/games on>
Feb 19 01:16:50 arch-rig systemd[1]: mnt-steam\x2dnfs.mount: Mount process exited, code=exited, status=32/n/a
Feb 19 01:16:50 arch-rig systemd[1]: mnt-steam\x2dnfs.mount: Failed with result 'exit-code'.
Feb 19 01:16:50 arch-rig systemd[1]: Failed to mount /mnt/steam-nfs.

Some logs from /var/log/boot.log:

------------ Tue Feb 18 11:42:11 EST 2025 ------------
/dev/sda3: clean, 304297/58892288 files, 8582467/235539456 blocks
[  OK  ] Finished Tell Plymouth To Write Out Runtime Data.
[  OK  ] Finished Automatic Boot Loader Update.
[  OK  ] Finished Create System Files and Directories.
         Starting Rebuild Dynamic Linker Cache...
         Starting Rebuild Journal Catalog...
         Starting Record System Boot/Shutdown in UTMP...
[  OK  ] Finished Record System Boot/Shutdown in UTMP.
[  OK  ] Finished Rebuild Journal Catalog.
[  OK  ] Finished Rebuild Dynamic Linker Cache.
         Starting Update is Completed...
[  OK  ] Finished Update is Completed.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Refresh existing PGP keys of archlinux-keyring regularly.
[  OK  ] Started Discard unused filesystem blocks once a week.
[  OK  ] Started Daily man-db regeneration.
[  OK  ] Started Discard unused packages weekly.
[  OK  ] Started Daily verification of password and group files.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timer Units.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Listening on GnuPG network certifi…ent daemon for /etc/pacman.d/gnupg.
         Starting Docker Socket for the API...
[  OK  ] Listening on GnuPG cryptographic a… browsers) for /etc/pacman.d/gnupg.
[  OK  ] Listening on GnuPG cryptographic a…estricted) for /etc/pacman.d/gnupg.
[  OK  ] Listening on GnuPG cryptographic a…emulation) for /etc/pacman.d/gnupg.
[  OK  ] Listening on GnuPG cryptographic a…rase cache for /etc/pacman.d/gnupg.
[  OK  ] Listening on GnuPG public key mana…nt service for /etc/pacman.d/gnupg.
[  OK  ] Listening on OpenSSH Server Socket…temd-ssh-generator, AF_UNIX Local).
[  OK  ] Listening on Hostname Service Socket.
         Starting D-Bus System Message Bus...
[  OK  ] Listening on Docker Socket for the API.
[  OK  ] Reached target Socket Units.
[  OK  ] Started D-Bus System Message Bus.
[  OK  ] Reached target Basic System.
         Starting Network Manager...
         Starting User Login Management...
[  OK  ] Started User Login Management.
         Starting Hostname Service...
[  OK  ] Started Hostname Service.
         Starting Network Manager Script Dispatcher Service...
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
[  OK  ] Started Network Manager Script Dispatcher Service.
[  OK  ] Started Network Manager.
[  OK  ] Reached target Network.
         Starting Network Manager Wait Online...
         Starting containerd container runtime...
         Starting Network Time Service...
[  OK  ] Started Network Time Service.
[  OK  ] Started containerd container runtime.
[  OK  ] Finished Network Manager Wait Online.
[  OK  ] Reached target Network is Online.
         Mounting /mnt/steam-nfs...
         Starting Docker Application Container Engine...
[  OK  ] Started Prometheus exporter for machine metrics.
[FAILED] Failed to mount /mnt/steam-nfs.
See 'systemctl status "mnt-steam\\x2dnfs.mount"' for details.
[DEPEND] Dependency failed for Remote File Systems.
         Starting Permit User Sessions...
[  OK  ] Finished Permit User Sessions.
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...

My current fstab config:

# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/sda3
UUID=a8448123-2409-407b-9239-5f153320a2f1       /               ext4            rw,relatime     0 1

# /dev/sda1
UUID=8C7A-A931          /boot           vfat            rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro 0 2

# /dev/sda2r
UUID=e9371d9e-af0d-45ba-bc4a-ef992dac1058       none            swap            defaults        0 0

# Steam Games NFS
192.168.70.148:/mnt/Steam/games   /mnt/steam-nfs   nfs   defaults,timeo=900,retrans=5,_netdev   0 0

The following config works but I would like to figure out why it fails during boot specifially;

servername:/home   /mountpoint/on/client  nfs  _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0

.

I have also ensured to enable NetworkManager-wait-online.service as per Arch Wiki NFS documentation:

systemctl status NetworkManager-wait-online.service
● NetworkManager-wait-online.service - Network Manager Wait Online
     Loaded: loaded (/usr/lib/systemd/system/NetworkManager-wait-online.service; enabled; preset: disabled)
     Active: active (exited) since Wed 2025-02-19 01:16:50 EST; 13min ago
 Invocation: 73591db20a164bfbab7861e162a1e102
       Docs: man:NetworkManager-wait-online.service(8)
    Process: 709 ExecStart=/usr/bin/nm-online -s -q (code=exited, status=0/SUCCESS)
   Main PID: 709 (code=exited, status=0/SUCCESS)
   Mem peak: 2.8M
        CPU: 8ms

Feb 19 01:16:44 arch-rig systemd[1]: Starting Network Manager Wait Online...
Feb 19 01:16:50 arch-rig systemd[1]: Finished Network Manager Wait Online.

Any help would be greatly appreciated as I don't know what to do to mitigate or have my NFS wait for my network to be ready as I do have _netdev option configured.

Last edited by Kmartinez501 (2025-03-31 12:40:18)

Offline

#2 2025-02-19 15:58:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 75,317

Re: [SOLVED] NFS fails to mount during boot

https://bbs.archlinux.org/viewtopic.php … 2#p2140602

NetworkManager-wait-online unfortunately does not at all mean that you've a functional network, it's set the moment the service started (and this is not better for any other network daemon, because otherwise they could stll the boot :rolleys: )

If you want to automount some network filesystem during boot, the (custom) mount service will have to ping-wait for the server to show up before establishing the mount, see eg. https://bbs.archlinux.org/viewtopic.php … 7#p2090547

Offline

#3 2025-03-31 12:39:33

Kmartinez501
Member
Registered: 2025-02-18
Posts: 15

Re: [SOLVED] NFS fails to mount during boot

Fixed with the following NFS options:

192.168.70.148:/mnt/Steam/games   /mnt/steam-nfs   nfs  _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0

Offline

Board footer

Powered by FluxBB