NFS Mount-on-Boot Failing - LM21.1

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
baconneggs
Level 1
Level 1
Posts: 15
Joined: Sun Dec 27, 2020 7:41 pm

NFS Mount-on-Boot Failing - LM21.1

Post by baconneggs »

Upgraded to LM21.1 and immediately lost mount-on-boot functionality and write-access of my QNAP NAS shares. No directories were deleted, no changes to firewall and FSTAB file remains as is.

Fstab format:

Code: Select all

[nas.duckdns.org:/NAS_share /media/NAS_Mount_folder nfs default 0 0
Also tried:

Code: Select all

[nas.duckdns.org:/NAS_share /media/NAS_Mount_folder nfs nfsvers=4 0 0
Successfully manually mounts the shares after boot, but only yields Read-Only access:

Code: Select all

sudo mount -a
Steps taken via QNAP's KB below:
1. Enabled NFS v2/v3 and NFS versions in QNAP NAS settings (rebooted NAS several times throughout this)
2. Ensured correct squash no users and ensured read/write access is permitted for Host IPs in NAS Settings

https://www.qnap.com/en/how-to/faq/arti ... ux-clients

I've had random intermittent trouble with this going down in the past but it typically resolves itself after a couple NAS and/or PC reboots. Thanks for any guidance/advice here.
Last edited by LockBot on Wed Sep 27, 2023 10:00 pm, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by rene »

[nas.duckdns.org is very decidedly weird and undoubtedly the issue, what with its resolving not being available at the time of fstab mounts.

duckdns.org seems to be a general dynamic DNS service; even if I assume that [nas with that [ is a as far as it's concerned valid hostname, why are you mounting a presumably LAN-connected NAS via, again supposedly, its WAN IP? I.e., a dynamic DNS service is/would be for accessing services on your LAN from the internet, not from another LAN system: on your LAN the NAS would simply be e.g. 192.168.123.123, and you'd address it as such (or as <hostname>.local if it supports mDNS).

I.e., please clarify, because this makes no sense...
baconneggs
Level 1
Level 1
Posts: 15
Joined: Sun Dec 27, 2020 7:41 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by baconneggs »

Thanks for the quick reply Rene.

The ddns was previously used to avoid having to update +3 different device IPs for my NAS share access every time those IPs changed. Now it doesn't matter as my router handles the static assignment. Either way, unfortunately still having the same problem with the actual IPs in fstab.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by rene »

I see. I take it you're now all set with router-assigned "steady IPs" -- which is by far best, so good -- but note that with router-assigned dynamic ones you would've normally used that mentioned <hostname>.local mDNS address rather than actual DNS.

But I take it then that "foo.duckdns.org" did for you resolve to a LAN address 192.168.x.x or 10.x.x.x? Just to be sure, can you paste the literal /etc/fstab line(s)? (and note that you do not have to censor a local address of the above form, certainly not those 192.168. or 10. prefixes).

Is the IP of the system you are trying to access from in the same local network? (ip addr).

[EDIT] Google finds there to indeed be issues with Ubuntu 22.04 and (at least) QNAP NFS. I believe you should try changing mentioned nfsvers=4 to mountvers=4 (or mountvers=3 if nfs4 is not wanted at all).
User avatar
AndyMH
Level 21
Level 21
Posts: 13748
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: NFS Mount-on-Boot Failing - LM21.1

Post by AndyMH »

Same issue:
viewtopic.php?t=384836
Solution was to use NFS v4.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
baconneggs
Level 1
Level 1
Posts: 15
Joined: Sun Dec 27, 2020 7:41 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by baconneggs »

Yep, I stumbled on that too with optimism but still no luck. The mount points are in Nemo on boot but when I select them I just get the 'Unable to mount' error alert:

Code: Select all

mount-nfs: failed to prepare mount: Operation not permitted
fstab line as-is:

Code: Select all

192.168.1.14:/Home_NAS /media/Home_NAS	nfs nfsvers=4 0 0
I'll keep re-enabling the NFS version settings on QNAP side for the shares and rebooting. Really at a loss.
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by rene »

baconneggs wrote: Tue Mar 28, 2023 2:16 pm Really at a loss.
Have you tried changing to mountvers=4 from nfsvers=4 as per my edit?
Last edited by rene on Tue Mar 28, 2023 2:48 pm, edited 1 time in total.
baconneggs
Level 1
Level 1
Posts: 15
Joined: Sun Dec 27, 2020 7:41 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by baconneggs »

Finally resolved. Thanks all for the help.

BOTH steps required for me to resolve:
1. adding to fstab file:

Code: Select all

nfsvers=4

2. Disabling NFSv2/NFSv3 with NFSv4 enabled in NAS settings (reboot NAS and PC)
rene
Level 20
Level 20
Posts: 12212
Joined: Sun Mar 27, 2016 6:58 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by rene »

As the manpage documents for mountvers,
This option is useful when multiple NFS services are running on the same remote server host.
I.e., the fact that disabling NFSv2/3 works is one more indication that the mountvers rather than nfsvers thing is the "right" solution. Not sure why you seem to be ignoring it?
baconneggs
Level 1
Level 1
Posts: 15
Joined: Sun Dec 27, 2020 7:41 pm

Re: NFS Mount-on-Boot Failing - LM21.1

Post by baconneggs »

Very good point, Rene. Now that's it's working will leave as-is but I'll keep that in mind. I think mountvers "should" be the only step needed to resolve this for others because the QNAP NFS settings shouldn't matter, as long as NFS is enabled.

https://linux.die.net/man/5/nfs
Locked

Return to “Networking”