The officially official Devuan Forum!

You are not logged in.

#1 2023-05-22 15:49:51

mclien
Member
Registered: 2020-02-29
Posts: 102  

nfs setup server and client (nit permanently in the network)

It has been a while since I set up nfs.
So:
I install nfs-kernel-server on the server and nfs-common on the server and client.
Normally I would put the nfs-mount in the clients /etc/fstab, but IIRC that will make the startup of the client very slow (waiting for the timeout), when not in that network (like a notebook on the road).

Or did I get that wrong all together?

Offline

#2 2023-05-22 17:13:16

fsmithred
Administrator
Registered: 2016-11-25
Posts: 2,486  

Re: nfs setup server and client (nit permanently in the network)

Yeah, I'm pretty sure you're right about the delay. You can also run into problems if the server goes down while the client still has the share mounted. (I just did that to myself about an hour ago.)

I find it better to use autofs, which will mount the share when you try to use it.

Offline

#3 2023-05-22 19:31:06

rolfie
Member
Registered: 2017-11-25
Posts: 1,173  

Re: nfs setup server and client (nit permanently in the network)

I have a file server in the basement supporting nfs. The clients mount the nfs shares via a cron job @reboot. If the server is unavailable the cron job never finishes, but the clients do boot up without delay. This setup works for more than 15 years now.

Online

#4 2023-05-23 00:10:17

nixer
Member
From: North Carolina, USA
Registered: 2016-11-30
Posts: 211  

Re: nfs setup server and client (nit permanently in the network)

You can also run into problems if the server goes down while the client still has the share mounted.
...
I find it better to use autofs, which will mount the share when you try to use it.

And autofs will unmount the nfs share at a preferred and configured timeout period.

Offline

#5 2023-06-06 18:38:42

bigcat
Member
Registered: 2023-05-10
Posts: 30  

Re: nfs setup server and client (nit permanently in the network)

autofs does not play well if a user tries to access a directory under its control.

Another way is to put "noauto" in /etc/fstab and have a script in /etc/rc.local that would ping a known IP and then do a "mount -a" on success.

Offline

Board footer