NFS mounts on clients don't appear in `mount` or `df` output
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| coreutils (Ubuntu) |
Medium
|
Unassigned | ||
| sysvinit (Ubuntu) |
Low
|
Scott James Remnant (Canonical) |
Bug Description
Binary package hint: coreutils
Hi,
(Could be a bug with either mount, coreutils, the kernel or nfs-common??)
2 computer config, 1 server, 1 desktop.
Server exports /home (and others) via NFS to desktop.
Desktop has in /etc/fstab :
fitz:/home /home nfs defaults 0 0
fitz:/pub /pub nfs defaults 0 0
File systems are mounted (i.e. I can create files within the NFS filesystem) on the client, but when running `df` or `mount`, they do not appear as being mounted - i.e.
root@bonzo:~# mount
/dev/hda1 on / type reiserfs (rw,notail)
proc on /proc type proc (rw)
/sys on /sys type sysfs (rw)
varrun on /var/run type tmpfs (rw)
varlock on /var/lock type tmpfs (rw)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
devshm on /dev/shm type tmpfs (rw)
binfmt_misc on /proc/sys/
root@bonzo:~# mount | grep -i nfs
root@bonzo:~#
root@bonzo:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 9775184 3600680 6174504 37% /
varrun 517336 104 517232 1% /var/run
varlock 517336 4 517332 1% /var/lock
udev 517336 96 517240 1% /dev
devshm 517336 0 517336 0% /dev/shm
root@bonzo:~# uname -a
Linux bonzo 2.6.15-22-k7 #1 SMP PREEMPT Sun May 7 17:27:47 UTC 2006 i686 GNU/Linux
/proc/mounts contains the correct information however :
root@bonzo:~# cat /proc/mounts
rootfs / rootfs rw 0 0
none /sys sysfs rw 0 0
none /proc proc rw,nodiratime 0 0
udev /dev tmpfs rw 0 0
/dev/hda1 / reiserfs rw 0 0
/dev/hda1 /dev/.static/dev reiserfs rw 0 0
tmpfs /var/run tmpfs rw 0 0
tmpfs /var/lock tmpfs rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
devpts /dev/pts devpts rw 0 0
tmpfs /dev/shm tmpfs rw 0 0
tmpfs /var/run tmpfs rw 0 0
tmpfs /var/lock tmpfs rw 0 0
fitz:/home /home nfs rw,v3,rsize=
fitz:/pub /pub nfs rw,v3,rsize=
tmpfs /var/run tmpfs rw 0 0
tmpfs /var/lock tmpfs rw 0 0
binfmt_misc /proc/sys/
I'll hope I'm not doing something really stupid, and it's a bug :)
root@bonzo:~# dpkg -l | grep coreutils
ii coreutils 5.93-5ubuntu4
root@bonzo:~# dpkg -l | grep mount
ii mount 2.12r-4ubuntu5
Related branches
Confirmed as an initscripts problem
Changed in coreutils: | |
status: | Unconfirmed → Rejected |
Confirmed, but relatively minor.
Changed in initscripts: | |
assignee: | nobody → keybuk |
status: | Unconfirmed → Confirmed |
David Goodwin (david-codepoets) wrote : | #4 |
Any chance of a fix before Dapper goes gold?
(problem still exists as of 23/05/2006)
Pieter Nagel (pieter-equinox) wrote : | #5 |
In my case this bug is more than "minor": nfs mounts are not merely missing from mtab, they are often missing from the filesystem as well.
To summarise: after boot, if an NFS mountpoint is missing from mtab, then:
1) In the case of an NFSv3 mount, the mounted files are sometimes visible, sometimes missing
2) In the case of an NFSv4 mount, the mounted files are alwaus missing, too.
I marked Bug #46145 which I just reported as a duplicate of this one.
If NFS mounts are not actually mounted (ie not in /proc/mounts) then you have a combination of two bugs, one new one and this one.
David: absolutely no chance
Pieter Nagel (pieter-equinox) wrote : | #8 |
NFS mounts *are* sometimes not actually mounted. NFSv4 mounts seem to be more often missing than not. After reboot:
pieter@danae:~$ grep : /etc/fstab
# /etc/fstab: static file system information.
repo:/aegis /aegis nfs4 rw,rsize=
pixar:/net/pixar /net/pixar nfs rw,tcp,
pieter@danae:~$ grep : /proc/mounts
pixar:/net/pixar /net/pixar nfs rw,v3,rsize=
pieter@danae:~$ sudo mount -a
pieter@danae:~$ grep : /proc/mounts
pixar:/net/pixar /net/pixar nfs rw,v3,rsize=
repo:/aegis /aegis nfs4 rw,v4,rsize=
But if I re-order the NFSv4 mount after the NFSv3 mount, it *was* mounted 6 reboots in a row.
Pieter Nagel (pieter-equinox) wrote : | #9 |
I submitted new Bug #46516 for the more serious "NFSv4 mounts not made at all" issue, so this bug number can continue to refer to the less serious "NFS mounts made but missing from mtab" problem.
Scott James Remnant (Canonical) (canonical-scott) wrote : Re: [Bug 44836] Re: NFS mounts on clients don't appear in `mount` or `df` output | #10 |
On Thu, 2006-05-25 at 07:47 +0000, Pieter Nagel wrote:
> I submitted new Bug #46516 for the more serious "NFSv4 mounts not made
> at all" issue, so this bug number can continue to refer to the less
> serious "NFS mounts made but missing from mtab" problem.
>
Many Thanks!
Keeping things separate makes our lives soooo much easier :)
Scott
--
Scott James Remnant
<email address hidden>
Andreas Heinz (crash-blab) wrote : | #11 |
since this bug is open a long time now: is there a chance that this will be fixed?
i just tried kde with kde free disk applet which lets you only choose "partitions" mounted into the system. with this bug present, network shares can't be checked.
so after sysvinit will be replaced, will this bug be fixed?
RParr (rparr) wrote : | #12 |
I am seeing this problem in recently installed Feisty (final) amd64.
NFS mounts made during boot do not appear in "mount" or "df" commands but the mounts have occurred and show up in /proc/mounts.
NFS mounts made from command-line after boot do appear in "mount" and "df" command.
Andreas Heinz (crash-blab) wrote : | #13 |
@Scott:
since this bug is now attached to sysvinit and sysvinit has been replaced since edgy: will this bug be fixed anytime or shouldn't this happen, when upstart ist used instead of sysvinit?
thanks
Andreas
Georg C.F. Wolff (boeser-wolff) wrote : | #14 |
An alternate solution - instead of waiting a fixed time - is to modify /etc/network/
# pidof doesnt work if waitnfs is started "sh /etc/..
This will prevent the mountnfs script from being run to early, but also abort if the waitnfs script is running. This prevents collisions between these two scripts.
AlexLG (alex-alexlg) wrote : | #15 |
I have the same problem with The Gutsy Gibbon and the patch works wery well for me, thanks.
David Vincent (dvincent) wrote : | #16 |
I have the same problem on Gutsy Gibbon and the patch worked for me as well.
ski (skibrianski) wrote : | #17 |
This patch works for me on feisty. Haven't tested on gutsy yet.
Jeffery Bond (jeff-clearspeed) wrote : | #18 |
The patch to mountnfs worked for me on ubuntu 7.10, but this bug has another nasty effect:
When updatedb/slocate is running, it will scan NFS mounts, even if the PRUNEFS string contains "nfs" in the /etc/updatedb.conf file. The PRUNEPATHS option does seem to work however. This is pretty bad since it results in lots of NFS traffic, and a general slowdown of the machine, and also updatedb tages AGES to complete!
Moritz Bunkus (m-bunkus) wrote : | #19 |
7.10: I noticed the same issue Jeffery Bond noticed. This also happened with 6.06, probably because the NFS mounts did not show in /etc/mtab (even though they did in /proc/mounts). However, with the patch Georg Wulff supplied the NFS mounts show up in /etc/mtab again, and slocate's updatedb skips them again.
This bug is still present in hardy as of 20080124. I've got a kerberized nfs3 mount in fstab:
thayerfs.
It is accessible after boot, but only shows up in /proc/mounts - not in /etc/mtab or via the mount command.
Adding Goerg's patch from comment 14 fixes the issue.
I think I found another problem related to this bug.
If the missing nfs mount uses quota, the quota command will not know it at all. If I want to know my quota limits on that nfs mount I have no way unless I manually remount it.
I was wondering if there are other programs that would be affected by this.
Dustin Kirkland (kirkland) wrote : | #22 |
I could not reproduce this problem in Hardy as of 2008-02-20.
I did reproduce the problem on Gutsy on 2008-02-02, and solved it by the code suggested in Comment 14.
I'm attaching a unified diff patch.
Dustin Kirkland (kirkland) wrote : | #23 |
Better yet, a debdiff against gutsy's initscripts, with changelog entry and version incrementing.
Dustin Kirkland (kirkland) wrote : | #24 |
Typo in debdiff.... s/Launnchpad/
Dustin Kirkland (kirkland) wrote : | #25 |
I have updated this debdiff with one that solves this problem, as well as Bug #45842. In this version, however, I create a lock file, /var/run/
See:
https:/
Dustin Kirkland (kirkland) wrote : | #26 |
Per request from Kees Cook, explicit steps to reproduce this problem....
* Fresh install of Hardy (VM is fine)
* apt-get install nfs-common
* Have a remote NFS server elsewhere running, and exporting a mount
* Add that mount to your fresh install's /etc/fstab, perhaps something like:
192.168.
* Test your fstab entry with "mount -a", make sure it mounts properly
* Reboot the test system
* After boot, you can see /nfs/foo in /proc/mounts. You can list files and everything in it. However, running the "mount" command or the "df" command will fail to show /nfs/foo in your mtab
Launchpad Janitor (janitor) wrote : | #27 |
This bug was fixed in the package sysvinit - 2.86.ds1-
---------------
sysvinit (2.86.ds1-
* debian/
Explicitly add mtab entries for networked file systems; race condition
exists where mtab can get overwritten *after* networked file systems are
mounted (LP: #46145, #44836).
* debian/
Update inline documentation, as waitnfs ONLY waits on /usr and /var mounted
filesystems.
Before waiting for net file systems, try mounting them (with watershed)
just in case the mount has not been attempted elsewhere.
Added udev as dependency due to use of watershed.
* debian/
Remove the bulk of this script to a common library script
Call the common library script with watershed for locking purposes
(LP: #45842, #46516).
* debian/
Common library script for mounting all network file systems (nfs, cifs,
samba, etc).
Script can be called in various meaningful locations; should be wrapped
with watershed to correctly handle race conditions.
-- Dustin Kirkland <email address hidden> Tue, 26 Feb 2008 16:10:56 -0600
Changed in sysvinit: | |
status: | Confirmed → Fix Released |
Eric Bursley (eric-bursley) wrote : | #28 |
I still have this problem in hardy. I'm running the latest patches. mount -a will mount all missing NFS mounts after I'm logged in. I have a Precision Workstation 690, so the race condition spoken about before may still be happening with faster systems.
History repeating - 3 years later and I'm seeing exactly this problem in a new 12.04 install! I've got a glusterFS volume that mounts via NFS - it shows in /proc/mounts but not df or mount output.
Sam Bromley (sam-sambromley) wrote : | #30 |
Hi All, It would seem that this bug is still popping up.
I noticed this today, running 13.04.
/proc/mounts is fine.
/etc/mtab is missing nfs mounts.
Ian Campbell (d-ian-k) wrote : | #31 |
Note sure if it's the same bug, but running 14.04.
# cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04 LTS"
VERSION_ID="14.04"
HOME_URL="http://
SUPPORT_URL="http://
BUG_REPORT_URL="http://
# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/
# /boot was on /dev/sda1 during installation
UUID=3c4f0566-
/dev/mapper/
# Synology NFS Mounts
w.x.y.z:
w.x.y.z:
w.x.y.z:
w.x.y.z:
w.x.y.z:
w.x.y.z:
//w.x.y.z/video /media/cifs/video cifs user,uid=
//v.w.x.y/pi /media/cifs/pi cifs user,uid=
# cat /etc/mtab
/dev/mapper/
proc /proc proc rw,noexec,
sysfs /sys sysfs rw,noexec,
none /sys/fs/cgroup tmpfs rw 0 0
none /sys/fs/
none /sys/kernel/debug debugfs rw 0 0
none /sys/kernel/
udev /dev devtmpfs rw,mode=0755 0 0
devpts /dev/pts devpts rw,noexec,
tmpfs /run tmpfs rw,noexec,
none /run/lock tmpfs rw,noexec,
none /run/shm tmpfs rw,nosuid,nodev 0 0
none /run/user tmpfs rw,noexec,
none /sys/fs/pstore pstore rw 0 0
/dev/sda1 /boot ext2 rw 0 0
rpc_pipefs /run/rpc_pipefs rpc_pipefs rw 0 0
systemd /sys/fs/
//v.w.x.y/pi /media/cifs/pi cifs rw,noexec,
//w.x.y.z/video /media/cifs/video cifs rw,noexec,
w.x.y.z:
w.x.y.z:
w.x.y.z:
w.x.y.z:
w.x.y.z:
Raff (rbinkow) wrote : | #32 |
I am using 14.04 and looks like the problem is still there. Only one nfs share listed in df, however on mount (what is valid) 8 shares listed.
There seems to be a race condition between the initialization of the mtab file and mounting the nfs file systems by the if-up script.
In addition to that every NFS share mounted on other partitions than root is not mounted at all because these partitions get mounted later.
I worked around the issue by inserting a "sleep 15" in /etc/network/ if-up.d/ mountnfs