I have worked around the problem by running a script during reboot which
sleeps for 30 seconds, then mounts any unmounted nsf file systems.

Add to /etc/rc.local :

nohup /usr/local/bin/nfs_fix >/tmp/nfs_fix.out 2>&1 &

/usr/local/bin/nfs_fix :

#!/bin/ksh

# /usr/local/bin/nfs_fix

# Do to timing problem causing some nfs mounts to fail during reboot,
#  this script is initiated from /etc/rc.local.

do_fix_nfs()
{
        echo Checking $1
        if df | grep $1 >/dev/null ; then
                echo $1 is already mounted
        else
                echo Mounting $1
                mount $1
        fi
}

sleep 30        # wait for networking to start

awk '($3=="nfs") {print $2;}' /etc/fstab |
grep -v '^#' > /tmp/nfs_fix.fs

while read fs ; do
        do_fix_nfs $fs
done < /tmp/nfs_fix.fs

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1095917

Title:
  nfs mounts failing during reboot 12.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/nfs-utils/+bug/1095917/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to