NFS mount failure until DHCP renewal

Discussion about using NAS on Linux and Unix OS.
aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

NFS mount failure until DHCP renewal

Post by aboaboit » Sun Oct 02, 2016 6:48 pm

Hi.

My TS-251 is set up so that a specific "backup" directory is NFS-accessible by a single host on the LAN. After initial setup I could connect just fine, from that single authorized client as expected.

After a while, I started getting "mount errrors" and discovered that they would go away if I manually renewed the DHCP lease on the NAS; this is puzzling because:
1) the lease is static, with a reservation, for all hosts in my LAN
2) the leasetime is 30m so it is normally renewed multiple times during the day (verified in the router logs)

Additional information:
-router (running OpenWRT 15.05.1) is normally rebooted during the night via cronjob
-NAS sleeps from 9am weekdays until I come home and wake it up
-desktop NFS client (Debian Stable, fully up to date) is mosly off except when I need it
-NAS runs 4.2.2 20160901

What gives?

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS mount failure until DHCP renewal

Post by schumaku » Wed Oct 12, 2016 9:09 pm

Does the router reboot also bring the Ethernet link to the NAS down ... and keeping it there for a while?

I'd suggest to use a static IP config here anyway.

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Sun Oct 16, 2016 7:26 pm

According to the logs, the NAS detects link down events and 4 to 6 seconds later link up events.
How long is "a while"? :) I wanted to avoid hardcoding addresses but I'll give it a try, thanks.
EDIT:
switched to static IP / DNS on the NAS, rebooted router, still same issue.
now rebooting the NAS as well, we'll see.

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS mount failure until DHCP renewal

Post by schumaku » Mon Oct 17, 2016 4:57 am

aboaboit wrote:According to the logs, the NAS detects link down events and 4 to 6 seconds later link up events.
...during the router reboot? Well, this is more a router/embedded switch issue than a NAS problem then...

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Mon Oct 17, 2016 10:14 pm

schumaku wrote:...during the router reboot? Well, this is more a router/embedded switch issue than a NAS problem then...


Of course it's during router reboot, that's what you asked, right? Anyhow, if it's really a router issue why is just the NAS affected and no other device?
Most importantly, why does manually renewing the lease fix the issue, while the periodic renewal (30min) does nothing? My feeling is that the NAS is caching some negative reply from the router and only clears it when forced. For the time being I'm leaving it static: not what I wished for but if it works I'm good :)
Fingers crossed!

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS mount failure until DHCP renewal

Post by schumaku » Tue Oct 18, 2016 2:57 am

When somebody want to investigate, the key is what happens with the Kernel in the time the network interface is down, the interface is coming back up, the time until the DHCP server would assign the IP address, ...

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Sat Oct 29, 2016 5:27 pm

schumaku wrote:When somebody want to investigate, the key is what happens with the Kernel in the time the network interface is down, the interface is coming back up, the time until the DHCP server would assign the IP address, ...


Switched to static address but the issue is still here. Rebooting to apply new firmware, will followup if I have more information.
EDIT: one day of observation with latest firmware, always with static IP on the NAS, still no go.
Additionally, whereas with the dynamic setting I could just force the NAS to renew the lease to fix this issue, now I need to stop and restart the NFS service.

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS mount failure until DHCP renewal

Post by schumaku » Thu Nov 03, 2016 7:06 am

Almost convinced the new Network & Virtual Switch App does play games with us (resp. the Kernel handling NFS).

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Sat Nov 05, 2016 4:31 pm

schumaku wrote:Almost convinced the new Network & Virtual Switch App does play games with us (resp. the Kernel handling NFS).


I disabled the daytime standby for the NAS, IP is static, but still no go. I am going to disable the nighttime reboot for the router to check if that makes a difference.

EDIT: ok, I think I am making progress but first some additional background: desktop and NAS are on the same switch of a wifi router which is not serving DHCP but simply WDS-bridging to the main router, that serving DHCP and handling the DSL connection. If I reboot the main router, nothing bad happens: mount succeeds. If I reboot the local router / switch, then subsequent mount attempts fail until I renew the NAS IP (if DHCP) or toggle the NFS service.

Now the question is: what's the best way to bring this to the attention of QNAP?

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS mount failure until DHCP renewal

Post by schumaku » Wed Nov 09, 2016 5:26 pm

Temporarily replace the wireless bridge by a network cable, use the same routers / WLAN bridge LAN ports. Chime back if the issue remains.

Doubt NAP can fix all these comparably weak wireless bridges, WDS systems, ...

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Mon Nov 28, 2016 4:31 pm

schumaku wrote:Temporarily replace the wireless bridge by a network cable, use the same routers / WLAN bridge LAN ports. Chime back if the issue remains.
Doubt NAP can fix all these comparably weak wireless bridges, WDS systems, ...


I'll try that when I have a chance, it would be just for curiosity since I cannot use that solution daily.

As a workaround, I thought of toggling the NFS shortly after the routers are rebooted. Is there a way to do that from cmdline?

User avatar
schumaku
Guru
Posts: 43664
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: NFS mount failure until DHCP renewal

Post by schumaku » Mon Nov 28, 2016 4:50 pm

aboaboit wrote:As a workaround, I thought of toggling the NFS shortly after the routers are rebooted. Is there a way to do that from cmdline?


[~] # /etc/init.d/nfs restart
Shutting down NFS services: OK
Starting NFS services: re-export.
Shutting down NFS mountd:
Starting NFS mountd. Mountd port number = 30000.
OK
[~] #

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Mon Nov 28, 2016 5:09 pm

schumaku wrote:
aboaboit wrote:As a workaround, I thought of toggling the NFS shortly after the routers are rebooted. Is there a way to do that from cmdline?


[~] # /etc/init.d/nfs restart
Shutting down NFS services: OK
Starting NFS services: re-export.
Shutting down NFS mountd:
Starting NFS mountd. Mountd port number = 30000.
OK
[~] #


That simple, uh? :D
I'm still asking myself why I expected something more complicated than that :)

Thanks :)

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Fri Dec 09, 2016 3:01 am

schumaku wrote:# /etc/init.d/nfs restart


Hmm, nope: NFS restart (or even separate stop / start) is not equivalent to disable / enable NFS in the GUI: the former is not a valid workaround, only the latter is.
I guess I'll try to force a network restart after (WDS) router reboot.

aboaboit
Starting out
Posts: 18
Joined: Sun Aug 07, 2016 8:10 pm

Re: NFS mount failure until DHCP renewal

Post by aboaboit » Mon Dec 12, 2016 2:10 am

schumaku wrote:
aboaboit wrote:As a workaround, I thought of toggling the NFS shortly after the routers are rebooted. Is there a way to do that from cmdline?

[~] # /etc/init.d/nfs restart


Nope, total failure: NFS restart, NFS stop + NFS start, network restart, network stop + network start, nothing fixes the NFS issue I have like disabling the service from the admin GUI and re-enabling it.
Either I do not reboot the router or I figure out what the GUI does differently from the cmdline scripts :)

Post Reply

Return to “Linux & Unix (NFS)”