fstab entry for nfs /home fails to mount on boot

Bug #1384502 reported by andrew bezella
54
This bug affects 11 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Triaged
Undecided
Unassigned

Bug Description

i'm uncertain exactly when this issue started as we use cfengine (verifies all expected mounts in place, manually mounts those that are not). from a note i have i believe it goes back as far as lucid.

the symptom is that an /etc/fstab entry for an nfs-mounted /home is not mounted during the system boot. once the system is network-accessible, manually running `mount -tnfs -av` as root (or using cfengine or any number of other solutions) is sufficient.

per lp#836533 i added "--verbose" to /etc/init/mountall.conf and will attach the resulting /var/log/upstart/mountall.log and /etc/network/interfaces. the smoking gun appears to be:
mount.nfs: Failed to resolve server nfs-home: Temporary failure in name resolution

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: mountall 2.53
ProcVersionSignature: Ubuntu 3.13.0-38.65.lp1383921-generic 3.13.11.8
Uname: Linux 3.13.0-38.65-generic x86_64
.run.mount.utab:

ApportVersion: 2.14.1-0ubuntu3.5
Architecture: amd64
Date: Wed Oct 22 16:35:47 2014
ProcEnviron:
 TERM=rxvt-unicode-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/usr/bin/zsh
ProcKernelCmdline: BOOT_IMAGE=/boot/vmlinuz-3.13.0-38.65-generic root=/dev/md0 ro consoleblank=0 console=tty0 console=ttyS2,115200n8 nomdmonddf nomdmonisw bootdegraded=true
SourcePackage: mountall
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
andrew bezella (abezella) wrote :
Revision history for this message
andrew bezella (abezella) wrote :
Revision history for this message
andrew bezella (abezella) wrote :
Revision history for this message
andrew bezella (abezella) wrote :

i also attempted a boot w/the nfs server's ip address instead of hostname (although technically i guess "nfs-home" is an alias). no change, /home was still not mounted automatically on boot by mountall.

Revision history for this message
andrew bezella (abezella) wrote :

`mountall --verbose` log w/ip addr in fstab

Revision history for this message
Steve Langasek (vorlon) wrote :

Confirmed. The issue here is that as an NFS mount not mounted under /usr or /var, mountall implicitly treats this as 'nobootwait'. It's debatable whether this should be done, but the other issue is that filesystems being marked 'nobootwait' doesn't just prevent them from blocking the boot, it also prevents them from being waited for at all - if they become available while mountall is running it will mount them, but otherwise mountall will exit without caring that there are still filesystems that could possibly come online later and need mounted.

This is definitely a bug in mountall.

Changed in mountall (Ubuntu):
status: New → Triaged
Revision history for this message
Arne Bockholdt (u-launchpad-net-bockholdt-com) wrote :

Same here with an 14.10 AMD64 installation on a KVM machine.

The workaround with "mount -a" in rc.local doesn't help much for daemons that need the mounted NFS share at startup. They're failing when the mount isn't present at boot time.

I've stopped further deployment of Utopic until this bug has been fixed. It is really a showstopper and needs a fix very soon.

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Ok, I've investigated this, and it turn out:

statd-mounting.conf intercepts nfs mounts and waits for the statd daemon to be run
statd.conf starts on (virtual-filesystems and started portmap ON_BOOT=y)
rpcbind.conf is what emits the started portmap event:

# For compatibility with older upstart jobs in Ubuntu
post-start exec initctl emit --no-wait started JOB=portmap ON_BOOT=$ON_BOOT
pre-stop exec initctl emit --no-wait stopping JOB=portmap

But, to actually work with upstart in 14.10, the INSTANCE variable has to be added, like so:
# For compatibility with older upstart jobs in Ubuntu
post-start exec initctl emit --no-wait started JOB=portmap INSTANCE='' ON_BOOT=$ON_BOOT
pre-stop exec initctl emit --no-wait stopping JOB=portmap INSTANCE=''

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Please disregard the last comment, that was unfortunately for a different bug that affects 14.10 only.

Revision history for this message
radiovirusgenerator (radiovirusgenerator) wrote :

I am experiencing the same problem in UbuntuStudio 15.10.

I have the following line in /etc/fstab:

dwf:/volume1/dwf_data /media/nfs_dwf nfs auto 0 0

the error at boot is the follwing:

mount.nfs: Failed to resolve server dwf: Temporary failure in name resolution

I do not get errors when I try to mount manually.

Revision history for this message
Tjd (tjd) wrote :

Workaround: add the 'bootwait' option to the /home fstab entry.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.