You are not logged in.

#1 2012-03-20 00:14:12

bnb2235
Member
Registered: 2011-02-13
Posts: 119

NFS4 fstab mounting

Hello,
Is there a way to have nfs4 shares mount at boot, but also have a timout? At the moment I have nfs4 shares mounting in fstab and that works fine except if there is a network problem or if the nfs server is down. Is there a setting to have the nfs mount timout if unsuccesful so the client at least gets to a place to make changes if needed? I have tried "retry=1" and "bg" as options. I have also tried putting the mount in rc.local hoping that would allow a faster failure, but it didn't. So far, if the network or the nfs server is down, the client will not boot. Is autofs a solution?
I am mounting the equivalent of "my documents" to home, and pacman "sync" and "pkg" directories.

192.168.1.202:/pkg /var/cache/pacman/pkg nfs4 async 0 0
192.168.1.202:/sync /var/lib/pacman/sync nfs4 async 0 0
192.168.1.202:/bryan /home/bryan/Data nfs4 async 0 0

Offline

#2 2012-03-20 01:09:49

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: NFS4 fstab mounting

I use netfs, and that works just fine - boot is not halted (maybe a bit delayed, never checked) if the NFS server is broken. NFS v4 as well.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#3 2012-03-20 09:44:33

bnb2235
Member
Registered: 2011-02-13
Posts: 119

Re: NFS4 fstab mounting

Maybe my rc.conf is wrong?
MODULES=(nfs vboxdrv vboxnetflt)
DAEMONS=(syslog-ng network ntpd netfs rpcbind nfs-common @crond @alsa @cupsd dbus)

Should netfs come after rpcbind? Should rpcbind and nfs-common be there at all?

For me, if I pull the network cable from the client, boot freezes.

Offline

#4 2012-03-20 16:53:15

lowph
Member
From: NL
Registered: 2011-10-14
Posts: 24

Re: NFS4 fstab mounting

I don't have have nfs in MODULES.
DAEMONS=(... rpcbind nfs-common netfs ...)

I mount both a NFS3 and NFS4 share in fstab. When the server/network is down I do get a delay while booting/logging in, but it still boots.

Offline

#5 2012-03-20 17:32:16

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: NFS4 fstab mounting

bnb2235 wrote:

Should netfs come after rpcbind? Should rpcbind and nfs-common be there at all?

It makes little sense to put netfs before the NFS services, I'm afraid wink


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#6 2012-03-20 22:01:27

bnb2235
Member
Registered: 2011-02-13
Posts: 119

Re: NFS4 fstab mounting

Thank you both.
I have removed nfs from the modules. I moved netfs after the nfs services. I can boot now with only a delay.  I guess I should have been referencing the NFS wiki as well as NFS4. I am not familiar enough with each daemon to recognize the order requirement (especially netfs as I can't find much documentation on what all it does)

The delay is three minutes per share. Again I tried retry=1, but it has no effect. I read on another post, that they also did not have success with retry=n. For me I get three minutes instead of the "default" two.

Offline

Board footer

Powered by FluxBB