Phew! Makin' me do my homework on this one!
The short answer: try adding the _netdev mount option. Long answer, see below.
I also have an NFS server running, although I was just manually mounting it when I needed to, I decided to try and have it mount on boot to see if I came across the same problem. I also have a similar message to what you have, but look one line above the message you can see where something went wrong:
- Code: Select all
[ 16.367602] ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 16.503954] init: statd-mounting main process (496) killed by TERM signal
In other words, the system attempted to mount the network drive before it had a network.
Clint O wrote:I tried reading elsewhere on this forum about people complaining that their NFS mounts were not working on boot and never saw anything definitive on this topic. NFS mounts used to be done way back when in /etc/rc.local, but this practice has apparently long since been deprecated on most UNIX variants.
Ubuntu has moved on from the old systemV init to Upstart init. Essentially the biggest change is a move from a procedure-driven startup (init a runlevel, execute the scripts in /etc/rc#.d in order) to an event-driven startup (each startup job has a trigger condition, and then itself triggers an event that it has started). Upstart is supposed to maintain some compatibility with systemV startup procedures, but the runlevels are less significant (2-5 are essentially the same). The config files for the events are located under /etc/init.
Of special interest in our case are the files /etc/init/mountall.conf
. In mountall.conf, the a mountall daemon is started in response to the init event "startup", which then (I assume) tries to mount everything in /etc/fstab that isn't marked noauto. Why Ubuntu uses a daemon (one specifically written by Canonical, no less) for this instead of just issuing "mount -a" is a mystery to me.
Later on, when networking is established the init event "net-device-up" is triggered, setting the mountall-net job to work. Essentially all mountall-net does is send the signal -USR1 to the running mountall daemon. The only
documentation for what this is supposed to do is in the mountall-net.conf file itself, which states:
- Code: Select all
# Send mountall the USR1 signal to inform it to try network filesystems
I can only make assumptions as to what mountall considers network filesystems, so I'm taking a guess that it could be filesystems marked with the _netdev option. There is no documentation that I can find for this feature of mountall, so I guess if you really wanted to know you'd have to go through the source code. In fact, I think the entire procedure feels rather hacked together. There doesn't seem to be a way to stop mountall from trying to mount things like network file systems at startup and throwing out error messages. Very sloppy.
Anyways, hope this helps, let me know.
Edit: It just occurred to me you *could* perhaps make your NFS entry "noauto", and then edit the script in mountall-net.conf to manually
mount the drive, to get rid of the startup error with mountall. This is probably considered really bad form