NFS not mounting on login

I’ve already tried various things like _netdev and enabling NetworkManager-wait-online.service but the problem is always that it tries to mount the export before the network is ready and after the login i need to do a sudo mount -a to mount it.

Does someone know a way to make it work?

is best to put more info , as fstab :wink:

https://wiki.archlinux.org/title/NFS#Mount_using_/etc/fstab_with_systemd

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=1721-406F                            /boot/efi      vfat    umask=0077 0 2
UUID=e2842b5a-32ca-4d4b-999a-264e18730d19 /              ext4    defaults,noatime 0 1
UUID=edf20589-27ca-495c-a8a4-afbfa4c7fba9 swap           swap    defaults,noatime 0 0
UUID=92c2a069-2323-43a9-a714-8ea8f4934a30 /home          ext4    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
192.168.1.98:/mnt/RAID/Torrent /home/john/NAS/Torrent/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Archivos /home/john/NAS/Archivos/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Music /home/john/NAS/Music/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Movies /home/john/NAS/Movies/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Series /home/john/NAS/Series/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Pictures /home/john/NAS/Pictures/ nfs      defaults    0       0
192.168.1.98:/mnt/SSD/Torrent /home/john/NAS/Torrent2/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Backup /home/john/NAS/Backup/ nfs      defaults    0       0
192.168.1.98:/mnt/RAID/Archivos /home/john/NAS/Archivos/ nfs      defaults    0       0

It used to work until today update of Manjaro OS.

un 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Archivos...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Backup...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Movies...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Music...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Pictures...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Series...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Torrent...
jun 15 12:20:40 johnPC systemd[1]: Mounting /home/john/NAS/Torrent2...
jun 15 12:20:40 johnPC systemd[1]: Started NoMachine Server daemon.
jun 15 12:20:40 johnPC audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=nxserver comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
jun 15 12:20:40 johnPC systemd[1]: Starting TeamViewer remote control daemon...
jun 15 12:20:40 johnPC kernel: audit: type=1130 audit(1623770440.365:83): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=nxserver comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
jun 15 12:20:40 johnPC kernel: RTW: nolinked power save enter
jun 15 12:20:40 johnPC kernel: FS-Cache: Loaded
jun 15 12:20:40 johnPC kernel: RPC: Registered named UNIX socket transport module.
jun 15 12:20:40 johnPC kernel: RPC: Registered udp transport module.
jun 15 12:20:40 johnPC kernel: RPC: Registered tcp transport module.
jun 15 12:20:40 johnPC kernel: RPC: Registered tcp NFSv4.1 backchannel transport module.
jun 15 12:20:40 johnPC kernel: FS-Cache: Netfs 'nfs' registered for caching
jun 15 12:20:40 johnPC kernel: Key type dns_resolver registered
jun 15 12:20:40 johnPC systemd[1]: teamviewerd.service: Can't open PID file /run/teamviewerd.pid (yet?) after start: Operation not permitted
jun 15 12:20:40 johnPC systemd[1]: Started TeamViewer remote control daemon.
jun 15 12:20:40 johnPC audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=teamviewerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
jun 15 12:20:40 johnPC kernel: audit: type=1130 audit(1623770440.525:84): pid=1 uid=0 auid=4294967295 ses=4294967295 subj==unconfined msg='unit=teamviewerd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
jun 15 12:20:40 johnPC kernel: RTW: [HALMAC][ALWAYS]shall R reg twice!!
jun 15 12:20:40 johnPC kernel: NFS: Registering the id_resolver key type
jun 15 12:20:40 johnPC kernel: Key type id_resolver registered
jun 15 12:20:40 johnPC kernel: Key type id_legacy registered
jun 15 12:20:40 johnPC mount[1029]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1008]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1023]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1007]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1017]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1015]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1021]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC mount[1010]: mount.nfs: Network is unreachable
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Backup.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Backup.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Backup.
jun 15 12:20:40 johnPC systemd[1]: Dependency failed for Remote File Systems.
jun 15 12:20:40 johnPC systemd[1]: remote-fs.target: Job remote-fs.target/start failed with result 'dependency'.
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Archivos.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Archivos.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Archivos.
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Movies.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Movies.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Movies.
jun 15 12:20:40 johnPC kernel: FS-Cache: Duplicate cookie detected
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie c=0000000030fa4fb6 [p=000000007c49c11f fl=222 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie d=00000000081fcfd5 n=0000000021568ddc
jun 15 12:20:40 johnPC kernel: FS-Cache: O-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie c=000000003341696f [p=000000007c49c11f fl=2 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie d=00000000081fcfd5 n=0000000061385163
jun 15 12:20:40 johnPC kernel: FS-Cache: N-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: Duplicate cookie detected
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie c=0000000030fa4fb6 [p=000000007c49c11f fl=222 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie d=00000000081fcfd5 n=0000000021568ddc
jun 15 12:20:40 johnPC kernel: FS-Cache: O-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie c=0000000019925167 [p=000000007c49c11f fl=2 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie d=00000000081fcfd5 n=0000000096e2aad9
jun 15 12:20:40 johnPC kernel: FS-Cache: N-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: Duplicate cookie detected
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie c=0000000030fa4fb6 [p=000000007c49c11f fl=222 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie d=00000000081fcfd5 n=0000000021568ddc
jun 15 12:20:40 johnPC kernel: FS-Cache: O-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie c=000000007014fb3f [p=000000007c49c11f fl=2 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie d=00000000081fcfd5 n=00000000308c1983
jun 15 12:20:40 johnPC kernel: FS-Cache: N-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: Duplicate cookie detected
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie c=0000000030fa4fb6 [p=000000007c49c11f fl=222 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie d=00000000081fcfd5 n=0000000021568ddc
jun 15 12:20:40 johnPC kernel: FS-Cache: O-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie c=00000000359b0f09 [p=000000007c49c11f fl=2 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie d=00000000081fcfd5 n=00000000275a77c3
jun 15 12:20:40 johnPC kernel: FS-Cache: N-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: Duplicate cookie detected
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie c=0000000030fa4fb6 [p=000000007c49c11f fl=222 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: O-cookie d=00000000081fcfd5 n=0000000021568ddc
jun 15 12:20:40 johnPC kernel: FS-Cache: O-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie c=0000000047636f67 [p=000000007c49c11f fl=2 nc=0 na=1]
jun 15 12:20:40 johnPC kernel: FS-Cache: N-cookie d=00000000081fcfd5 n=00000000c57e654d
jun 15 12:20:40 johnPC kernel: FS-Cache: N-key=[16] '040000000200000002000801c0a80162'
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Music.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Music.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Music.
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Pictures.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Pictures.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Pictures.
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Series.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Series.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Series.
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Torrent.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Torrent.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Torrent.
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Torrent2.mount: Mount process exited, code=exited, status=32/n/a
jun 15 12:20:40 johnPC systemd[1]: home-john-NAS-Torrent2.mount: Failed with result 'exit-code'.
jun 15 12:20:40 johnPC systemd[1]: Failed to mount /home/john/NAS/Torrent2.
jun 15 12:20:40 johnPC systemd[1]: Starting Permit User Sessions...
jun 15 12:20:40 johnPC systemd[1]: Finished Permit User Sessions.

please use btn </> for format terminal text :wink: make for you

:thinking: here, you have nothing in options in fsat, at you to read wiki (in my first post) et use it

Hello, thanks for your help, but I do not understand what the error is and how to solve it as it worked fine until today since I updated Manjaro.

systemd units are loaded in parallel, so, with your “no” config, it is random if you have network before or not
why not use wiki config ??

I have copied and pasted from a site. I do not have much idea of the subject. Could you give me a valid fstab?
Thanks in advance!

Your fstab needs more options.

using a line from your fstab and using the options in the wiki that @papajoke mentioned the following should work:

192.168.1.98:/mnt/RAID/Torrent /home/john/NAS/Torrent/ nfs _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min 0 0

the wiki link explains what these options do.
I was having a similar problem with a NFS mount and can confirm that these options work.
You might want to change the timeout times and remove the x-systemd.idle-timeout option.