Hi,
sorry to revisit this old chestnut, but I can’t see where I am going wrong here, trying to add the NFS share from my ReadyNAS.
I’ve added the line
192.168.1.210:/c/media /mnt/NASFilms nfs noauto,nfsver=3,x-systemd.automount,user,rw 0 0
to /etc/fstab.
sudo mount -a returns no errors, I run the 2 sudo systemctl commands ok, but the
cd /mnt/NASFilms returns No Such Device. I can see that /mnt/NASFilms exists.
Can anyone please see what I have done wrong here?
Many thanks,
J
Typically the authorization for nfs works with IP addresses.
Since “mount -a
” does not bring an error, you know /etc/fstab
is syntactical correct … but it might be that on your ReadyNAS you have to allow the right ip to access the data.
Nonsense, mount -a
only tries to mount entries which DO NOT contain noauto.
Addition:
What is the ouput of
sudo umount /mnt/NASFilms
sudo mount /mnt/NASFilms
Thanks for the quick response Jim, I get the output:
mount.nfs: an incorrect mount option was specified
Also I have previously been using the ReadyNAS via ‘plain’ NFS without issue.
I think the nfsver=3 could be the culprit. I always use the options
192.168.1.210:/c/media /mnt/NASFilms nfs defaults,x-systemd.automount,noauto 0 0
which means that the highest possible nfs protocol should be negotiated between client and server. To force nfs4 you can also try
192.168.1.210:/c/media /mnt/NASFilms nfs4 defaults,x-systemd.automount,noauto 0 0
but depends on your nfs server whether it supports the protocol.
Hmm, thanks, tried both of those but hasn’t made any difference I’m afraid…
You still get
mount.nfs: an incorrect mount option was specified
trying sudo mount /mnt/NASFilms
?
Yes, looking at the logs, the relevant errors appears to be here:
Feb 20 10:16:26 osmc systemd[1]: mnt-NASFilms.automount: Got automount request for /mnt/NASFilms, triggered by 20591 (bash)
Feb 20 10:16:26 osmc systemd[1]: Mounting /mnt/NASFilms…
Feb 20 10:16:26 osmc kernel: NFS: nfs4_discover_server_trunking unhandled error -22. Exiting with error EIO
Feb 20 10:16:26 osmc systemd[1]: mnt-NASFilms.mount: Mount process exited, code=exited status=32
Feb 20 10:16:26 osmc systemd[1]: Failed to mount /mnt/NASFilms.
Feb 20 10:16:26 osmc systemd[1]: mnt-NASFilms.mount: Unit entered failed state.
Feb 20 10:16:38 osmc sudo[22240]: osmc : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/nano /etc/fstab
Output of
sudo umount /mnt/NASFilms
sudo mount -v /mnt/NASFilms
mount.nfs: timeout set for Tue Feb 20 10:32:33 2018
mount.nfs: trying text-based options ‘nfsver=3,vers=4.2,addr=192.168.1.210,clientaddr=192.168.1.134’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options ‘nfsver=3,vers=4.1,addr=192.168.1.210,clientaddr=192.168.1.134’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options ‘nfsver=3,vers=4.0,addr=192.168.1.210,clientaddr=192.168.1.134’
mount.nfs: mount(2): Invalid argument
mount.nfs: trying text-based options ‘nfsver=3,addr=192.168.1.210’
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.1.210 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.1.210 prog 100005 vers 3 prot UDP port 51566
mount.nfs: mount(2): Invalid argument
mount.nfs: an incorrect mount option was specified
Above was with nfsver=3.
With your version defaults,etc…
mount.nfs: timeout set for Tue Feb 20 10:36:37 2018
mount.nfs: trying text-based options ‘vers=4.2,addr=192.168.1.210,clientaddr=192.168.1.134’
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options ‘vers=4.1,addr=192.168.1.210,clientaddr=192.168.1.134’
mount.nfs: mount(2): Input/output error
mount.nfs: mount system call failed
Hi,
Whats the output of:
showmount -e 192.168.1.210
Thanks Tom.
that means for me they agreed in protocol 4.1 which caused some problems.
Now I understand your try of nfsvers=3 (with an s at the end), try nfsvers=3
again look at the mount -v
output.
Ups, sorry, Tom has taken over.
Bingo Jim, should be nfsvers=3, not nfsver=3, all looks good now.
Thanks Tom for wading in as well
2 Likes
Probably there is a an issue with protcol 4.1 either of both sides. My Synology even does not support it right now.
Have fun with OSMC and mark the topic as solved.
1 Like
JimKnopf:
To force nfs4 you can also try
192.168.1.210:/c/media /mnt/NASFilms nfs4 defaults,x-systemd.automount,noauto 0 0
Note that this is deprecated, and the “nfs4” mount helper will likely be removed someday.
The modern way to force connection as version 4 is:
192.168.1.210:/c/media /mnt/NASFilms nfs nfsvers=4,defaults,x-systemd.automount,noauto 0 0
If you just want to try version 4 and fall back to version 3, then you would use:
192.168.1.210:/c/media /mnt/NASFilms nfs version=4,defaults,x-systemd.automount,noauto 0 0
2 Likes