NFS mount stopped working

My previously perfectly working NFS mount for my NAS stopped working since the last bigger update of Manjaro

System:
  Kernel: 5.15.7-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=*** ro quiet splash apparmor=1
    security=apparmor udev.log_priority=3 amdgpu.ppfeaturemask=0xffffffff
  Desktop: GNOME 41.2 tk: GTK 3.24.30 wm: gnome-shell dm: GDM 41.0
    Distro: Manjaro Linux base: Arch Linux

gives me now this error message when trying to mount one of my NAS folders

sudo mount -t nfs -o vers=4 servername:/volume/NAS_PICS /home/***/NAS/Bilder                                                          32 ✘ 
mount.nfs: an incorrect mount option was specified

etc/fstab:

servername:/volume/NAS_PICS	/home/***/NAS/Bilder	nfs	_netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,timeo=14,x-systemd.idle-timeout=1min	0	0

as I did not change anything on the line (using arrow up all the time) I am out of ideas what could potentially have caused this issue.
Any help is much appreciated!

nfsvers= n

The NFS protocol version number used to contact the server’s NFS service. If the server does not support the requested version, the mount request fails. If this option is not specified, the client negotiates a suitable version with the server, trying version 4 first, version 3 second, and version 2 last.

vers= n

This option is an alternative to the nfsvers option. It is included for compatibility with other operating systems.

nfs(5) - Linux man page

So nfs has been updated and vers= must be removed. Use nfsvers=4 instead.

thanks for the quick response, I tried the following with no success:

sudo mount -t nfs -o nfsvers=4 servername:/volume/NAS_PICS /home/***/NAS/Bilder                                                       32 ✘ 
[sudo] Passwort für ***: 
mount.nfs: an incorrect mount option was specified
    ~  sudo mount -t nfs4 -o nfsvers=4 servername:/volume/NAS_PICS /home/***/NAS/Bilder                                               32 ✘  5s  
mount.nfs4: an incorrect mount option was specified

following the posted wiki articel I even tried to leave the version specification out totally, same result though

sudo mount -t nfs -o servername:/volume/NAS_PICS /home/***/NAS/Bilder                                                                 32 ✘ 
mount.nfs: an incorrect mount option was specified

My nfs mount is setup like this (only the automount unit is enabled) - I have no changes in behavior

➜  system uname -a
Linux ts 5.15.9-1-MANJARO #1 SMP PREEMPT Thu Dec 16 20:58:59 UTC 2021 x86_64 GNU/Linux
➜  system cat /etc/systemd/system/data-nfs-data.mount
[Unit]
Description=Data share on nas.net.nix.dk

[Mount]
What=nas.net.nix.dk:/volume1/data
Where=/data/nfs/data
Type=nfs
Options=_netdev,vers=4,rsize=32768,wsize=32768
TimeoutSec=30

[Install]
WantedBy=multi-user.target
➜  system cat /etc/systemd/system/data-nfs-data.automount
[Unit]
Description=Data share on nas.net.nix.dk
ConditionPathExists=/data/nfs/data

[Automount]
Where=/data/nfs/data
TimeoutIdleSec=10

[Install]
WantedBy=multi-user.target

Loose the -o if there is no mount option left…

$ sudo mount -t nfs servername:/volume/NAS_PICS /home/***/NAS/Bilder 
1 Like

won’t work for me - glad that it still works for @linux-aarhus , but my NFS won’t mount at all…
trried every combo of attributes and no attributes, always ending upo in the same error:

mount.nfs: an incorrect mount option was specified

kind of frustrating, to be honest.
(and again, it was working as expected (except foir the automount via fstab, that never worked, for whatever reason, see my fstab file in orignal post) - but at leastz the manual mount was working fine, which is good enough for me.

I have never had much success with network shares in fstab - and I was reliefed when I finally learned how to use the mount units.

It is impossible to suggest anything when there’s no apparent visible flaws in the options or it is the proverbial tree blocking the view of the forest :slight_smile: .

Have you tried reconstructing the file from scratch - no copy paste but regular rewrite?

Have you tried commenting the line in fstab and using mount units like the ones I posted above? They will of course need slight modification in terms of naming - to match your mountpoint and share location - something like this (I assume the *** and servername are placeholders and you modify correspondingly) (username suggests - norwegian origin? )

➜  system cat /etc/systemd/system/home-***-NAS-Bilder.mount
[Unit]
Description=Bilder auf NAS

[Mount]
What=servername:/volume/NAS_PICS
Where=/home/***/NAS/Bilder
Type=nfs
Options=_netdev,vers=4,rsize=32768,wsize=32768
TimeoutSec=30

[Install]
WantedBy=multi-user.target
➜  system cat /etc/systemd/system/home-***-NAS-Bilder.automount
[Unit]
Description=Bilder auf NAS
ConditionPathExists=/home/***/NAS/Bilder

[Automount]
Where=/home/***/NAS/Bilder
TimeoutIdleSec=60

[Install]
WantedBy=multi-user.target

Then

sudo systemctl enable --now home-***-NAS-Bilder.automount
1 Like

@linux-aarhus first of all: Kudos my friend, for going the extra mile here - supremely apprechiated!
Origin is Germany, btw.

I will try what you suggested.
Let me just clarify if I get it right: you suggest to comment the lines from fstab file (to “undo” them) and rewrite the fstab from scratch?

but if I am not mistaken the code blocks from your post are not fstab, but a file in the etc/systemd/system folder, right?

The suggestions are two different approaches as to getting closer to a solution whereas the first is continuing to troubleshoot the fstab entry (by commenting the existing line and type in a new line) - and the second is an adapted version of my working setup.

I have no idea why you are getting the mentionen message - no clue at all. I suggest you try second method - and create the two unit-files in the /etc/systemd/system folder as described - and then start and enable the automount unit.

Don’t merge them - they must be two units .mount and .automount - and only .automount is ever to be enabled. The .automount unit takes care of enabling the .mount unit when required - as in accessing the mountpoint.

Norwegian, Danish and German has a lot in common - language wise - German was the language of the Danish court for centuries. And while I spoke a decent German when I was a teenager - I have not kept it alive - english is used in so much communication - I sometimes have difficulties finding the right danish expressions.