nfs shares are not automounted anymore in intrepid

Bug #285013 reported by Jonathan Ernst on 2008-10-17
58
This bug affects 9 people
Affects Status Importance Assigned to Milestone
sysvinit (Ubuntu)
Undecided
Unassigned
Declined for Intrepid by Clint Byrum

Bug Description

Here is a new Intrepid regression.

After updating from hardy to intrepid, nfs shares are not mounted automatically because (I think) the network is not up before Network Manager kicks in.

I have fixed this issue with this ugly hack in /etc/rcS.d/S99mountall.sh :

dhclient eth0
mount -a

Lennart Karssen (l.c.karssen) wrote :

Same here. Upgraded from 8.4 to 8.10, after which NFS shares aren't mounted anymore at boot (I don't remember any questions about conflicting configuration files while upgrading). The boot sequence hangs for a while when mounting the first shares. After several seconds it fails and the other NFS mounts fail immediately as well. Subsequent starting of NIS works OK, so by that time the network is up.
Switching to console after booting has finished and running mount -a as root mounts the shares correctly.

I'll give the aforementioned hack a try now.

Lennart Karssen (l.c.karssen) wrote :

The aforementioned hack works, although I have removed the dhclient line, since I know my network is up a little bit later.
Of course this solution does not solve the problem that booting takes a long time since it still waits for the initial nfs mounts to fail.

wensveen (wensveen) wrote :

I commented out the eth0 lines in /etc/network/interfaces and now it works.

Lennart Karssen (l.c.karssen) wrote :

I tried wensveen's solution, but it doesn't work for me (I removed the S99mountall.sh script).
I must note that originally I didn't have NetworkManager installed (since the machine is always in the same location I thought NetworkManager was overkill). Reinstalling it didn't solve the problem, however. So I'm back with my mount -a in S99mountall.sh.

Changed in sysvinit:
status: New → Confirmed
Marcus Comstedt (marcus-mc) wrote :

I did this:

1) Added the line "ASYNCMOUNTNFS=no" to the end of /etc/default/rcS
2) Commented out the line in /etc/network/if-up.d/nis

and now my system is booting normally again.

I'm not sure how necessary 2) is, but I noticed the system appeared to try to start
NIS too early, and figured it was because of this file.

Lennart Karssen (l.c.karssen) wrote :

Marcus' solution works for me, without the necessity of step 2.

bb46 (benbostw) wrote :

Neither the S99mountall script or adding the ASYNCMOUNTNFS option to rcS works for me, I get an nfs mount timeout on boot in both cases. I'm trying to do this with a wireless connection managed by the NetworkManager, so I think those workarounds are still calling mount too early.

Alvin (alvind) wrote :

Confirmed on Jaunty.
There are two workarounds here (I didn't try more):
- removing the eth0 entry from /etc/network/interfaces (still using DHCP)
- setting a static configuration in /etc/network/interfaces

Modifying /etc/network/interfaces doesn't work for me.

If _netdev was supported by nfs4 this probably wouldn't be an issue.

A manual work around with the rc script helps.

Clint Byrum (clint-fewbar) wrote :

I'm not sure this is still an issue in releases with mountall, which I think is everything 9.10 and higher. With mountall every time an interface comes up it tries to mount all the NFS filesystems.

So, I'm closing this as Fix Released. Please re-open if it affects a supported release.

Changed in sysvinit (Ubuntu):
status: Confirmed → Fix Released
Alvin (alvind) wrote :

Looks like this bug is back in Saucy Salamander (13.10). Needs confirmation.

Ruairi Hickey (ruairi-hickey) wrote :

A work-around which works well is to have a script mount the nfsv4 shares

#!/bin/sh
IF=$1
STATUS=$2

if [ "$IF" = "eth0" ] && [ "$STATUS" = "down" ] ; then
# if [ `/usr/bin/stat -fc%t:%T /shared` != `/usr/bin/stat -fc%t:%T /` ]; then
     /bin/umount /shared
# fi
fi
if [ "$IF" = "eth0" ] && [ "$STATUS" = "up" ] ; then
     /bin/mount /home
fi

exit

============================================================

and also modify the lightdm start script to wait on mounted /home

start on ((filesystem
           and runlevel [!06]
           and started dbus
           and plymouth-ready)
           and mounted MOUNTPOINT=/home
          or runlevel PREVLEVEL=S)

R.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers