You are not logged in.

#1 2011-02-13 17:08:54

Llama
Banned
From: St.-Petersburg, Russia
Registered: 2008-03-03
Posts: 1,379

Mounting NFS share on startup: race condition?

Hi,

I did everything according to ArchWiki:

/etc/fstab:

stovepipebox:/ /mnt/stovepipe nfs4 _netdev,auto 0 0

/etc/rc.conf:

DAEMONS=(syslog-ng !network dbus !hal networkmanager !net-profiles rpcbind nfs-common @netfs crond !webmin alsa sensors hddtemp !fam !wicd !openntpd !lisa mysqld !cups @acpid kdm)

The share does get mounted on startup once in a while; otherwise I have to mount it manually:

$ sudo mount -t nfs4 stovepipebox:/ /mnt/stovepipe

Is it a race condition somewhere? If it is, what is the best way to deal with it?

Offline

#2 2011-02-13 17:13:01

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Mounting NFS share on startup: race condition?

I'm also running into this from time to time. No solution so far.

Offline

#3 2011-02-13 17:26:39

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: Mounting NFS share on startup: race condition?

i think is because of networkmanager and  the system doesn't have connectivity when starting nfs-common.

you would need to create some dispatcher to start nfs-common when connection goes up and stop when it goes down.

example:
http://www.archlinux.org/packages/commu … her-netfs/


Give what you have. To someone, it may be better than you dare to think.

Offline

#4 2011-02-13 18:23:00

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Mounting NFS share on startup: race condition?

I don't use any network manager. Plain rc.conf network setting for wired connections and netcfg for wlan here. So I assume the kernel not ready with loading the modules or network hook in rc.conf array not yet finished though it's not back-grounded.

Offline

#5 2011-04-10 14:10:51

AndyRTR
Developer
From: Magdeburg/Germany
Registered: 2005-10-07
Posts: 1,641

Re: Mounting NFS share on startup: race condition?

I'm still having this issue. The boot screen says "no route to hosts" when it tries to mount the NFSv4 drive. I also tried to place the netfs option in rc.conf to be the last one to give it more time but it is still failing. Any idea?

Offline

#6 2012-05-20 23:16:17

msx
Member
From: solar.system/earth/ar/bue/mdp
Registered: 2010-08-08
Posts: 184
Website

Re: Mounting NFS share on startup: race condition?

AndyRTR wrote:

I'm also running into this from time to time. No solution so far.

+1

Hi guys, I'm having the same issue:
/etc/rc.conf
DAEMONS=(hwclock syslog-ng dbus !wicd !ufw !network networkmanager !verynice irqbalance @crond ulatencyd acpid cpufreq @colord dnscrypt-proxy laptop-mode !sensors !sensord !avahi-daemon !avahi-dnsconfd @ntpd rpcbind nfs-common netfs !kdm)

and /etc/fstab:
192.168.0.103:/ /home/msx/mnt/olivetti nfs4 rw,hard,async,intr,rsize=49152,wsize=49152,proto=tcp,timeo=14 0 0

While this fstab setup -with appropiate path change- works without problem on my sister's notebook running Linux Mint 13 RC I can't make it work here,  all I got is Arch trying to mount the resource at boot and giving up after some time with an error message; it's worth noting both machines (my sister's and mine) connect to the same home wireless network that I set up.

BTW, I can manually mount nfs4 shares after login without problem so I think I have a race condition here.

Last edited by msx (2012-05-20 23:20:37)


Enjoying i3wm w/ lifebar + j4-dmenu-desktop + tab_windows / fish shell / Emacs / tmux / Konsole / KDE apps
Arch + Linux-libre kernel: ParabolaGNULinux.org

Offline

Board footer

Powered by FluxBB