How to fix NFS (v4) not mounting /etc/fstab entries on boot
Last Modified: Wed, 02 Mar 2011 19:18:38 +0000 ; Created: Tue, 01 Mar 2011 22:22:14 +0000
|You want to auto-mount on boot an NFS (I was using nfs4), but for some reason when you place it in /etc/fstab it just won't.
I modified some network settings on a machine, and it stopped working. Ubuntu Server 10.10 64-bit with nfs-common 1.2.2 installed. It worked fine for a while.
# non-nfs stuff removed
192.168.0.1:/users /home nfs4 _netdev,auto 0 0
- Use the _netdev option in the /etc/fstab even though during boot the system doesn't really wait for the network to be configured with an IP, it just skips that mount and goes on hence the problem. See Ubuntu's Fstab documentation for details on why _netdev doesn't work with nfs4
- Create a file called /etc/init.d/mount_netdev.sh with the following
- chmod 755 /etc/init.d/mount_netdev.bash
- ln -s /etc/init.d/mount_netdev.bash /etc/rcS.d/S99mountall.sh