# "df" output not showing mounted NFS volumes

## ferg

Hi all,

I have a very confusing issue. On two Gentoo systems (both kept reasonably up to date, but only recently rebooted) I am having issues with some mounted NFS volumes (the same ones on both machines).

If I run "mount -l -t nfs" to list all mounted volumes of type "nfs" I see them.

```
scotgate chris # mount -l -t nfs

ulrich:/Distfiles on /mnt/distfiles type nfs (rw,soft,nfsvers=3,tcp,rsize=32768,wsize=32768,addr=192.168.1.12)

ulrich:/media on /mnt/media type nfs (rw,addr=192.168.1.12)

ulrich:/Download on /mnt/download type nfs (rw,soft,addr=192.168.1.12)

[b]ulrich:/motion on /mnt/motion type nfs (rw,addr=192.168.1.12)[/b]

```

However, one of these does not show up at all if I run df.

```

scotgate chris # df -T

Filesystem        Type      1K-blocks       Used  Available Use% Mounted on

rootfs            rootfs     38456212   23475036   13027680  65% /

902               ext3       38456212   23475036   13027680  65% /

devtmpfs          devtmpfs    1956360          0    1956360   0% /dev

tmpfs             tmpfs       1956612        660    1955952   1% /run

shm               tmpfs       1956612          0    1956612   0% /dev/shm

none              tmpfs       3072000          0    3072000   0% /var/tmp/portage

/dev/sdc3         xfs       918939544  871963556   46975988  95% /mnt/mythtv

/dev/sdd1         xfs       419236248  370670240   48566008  89% /mnt/mythtv2

/dev/sdb1         xfs       419236248  370381216   48855032  89% /mnt/mythtv3

/dev/sde1         xfs      1464422164   21925120 1442497044   2% /mnt/mythtv4

ulrich:/Distfiles nfs      7743214848 7030115552  713099296  91% /mnt/distfiles

ulrich:/media     nfs      7743214848 7030115456  713099392  91% /mnt/media

ulrich:/Download  nfs      7743214848 7030115456  713099392  91% /mnt/download

/dev/sda1         xfs       419236248  139142776  280093472  34% /home

scotgate chris #
```

What on earth am I doing wrong?

----------

## ce110ut

Hello ferg,

Is /mnt/motion mounted for sure?  That may be why it's not showing up in df.

----------

## ferg

Thanks for your reply.

I'm sure it's mounted.

I can create a file in the NFS share from one computer and see it turning up on the problem computers (and vica versa!).

----------

## ferg

Sorry to bump this but I've really no idea and cannot get to the bottom of this.  Any ideas more than welcome?

----------

## lexflex

Hi,

Is there any difference in the way they are defined in /etc/exports or mounted in fstab?

(can you post all the options you used?)

Did you try unmounting and remounting manually?

Alex.

----------

## ferg

Thanks for the comments.

I've tried manually unmounting/mounting and it makes no difference.

```
ulrich:/Distfiles    /mnt/distfiles nfs rw,soft,auto,nfsvers=3,tcp,rsize=32768,wsize=32768 0        0

ulrich:/media   /mnt/media      nfs     auto

ulrich:/Download        /mnt/download   nfs     soft 0 1

ulrich:/backup  /mnt/backup     nfs     noauto

ulrich:/motion  /mnt/motion     nfs     auto
```

It's distfiles and motion that are hidden. The others are fine.

The NFS shares are from a Readynas. All options are identical and have not been changed for at least a year. I'm not sure when this started happening but I _think_ they were fine a few weeks back (I rarely look at this machine as it just runs Mythtv for my TV).

----------

## krinn

Try diff -u /etc/mtab /proc/mounts

Could try df -a too

----------

## ferg

Thanks for that. "df -a" does show the missing but mounted NFS shares.

mtab also shows the missing drives (I'd forgotten about that file).

```
scotgate chris # diff -u /etc/mtab /proc/mounts

--- /etc/mtab   2013-03-14 11:24:28.000000000 +0000

+++ /proc/mounts   2013-03-14 14:53:15.487825193 +0000

@@ -7,16 +7,16 @@

 shm /dev/shm tmpfs rw,nosuid,nodev,noexec,relatime 0 0

 sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0

 configfs /sys/kernel/config configfs rw,nosuid,nodev,noexec,relatime 0 0

-none /var/tmp/portage tmpfs rw,size=3000M,nr_inodes=1M 0 0

-/dev/sdc3 /mnt/mythtv xfs rw 0 0

-/dev/sdd1 /mnt/mythtv2 xfs rw 0 0

-/dev/sdb1 /mnt/mythtv3 xfs rw 0 0

-/dev/sde1 /mnt/mythtv4 xfs rw 0 0

-/dev/sda1 /home xfs rw 0 0

-binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nodev,noexec,nosuid 0 0

-rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0

-nfsd /proc/fs/nfsd nfsd rw,nodev,noexec,nosuid 0 0

-ulrich:/Distfiles /mnt/distfiles nfs rw,soft,nfsvers=3,tcp,rsize=32768,wsize=32768,addr=192.168.1.12 0 0

-ulrich:/media /mnt/media nfs rw,addr=192.168.1.12 0 0

-ulrich:/Download /mnt/download nfs rw,soft,addr=192.168.1.12 0 0

-ulrich:/motion /mnt/motion nfs rw,addr=192.168.1.12 0 0

+none /var/tmp/portage tmpfs rw,relatime,size=3072000k,nr_inodes=1048576 0 0

+/dev/sdc3 /mnt/mythtv xfs rw,relatime,attr2,inode64,noquota 0 0

+/dev/sdd1 /mnt/mythtv2 xfs rw,relatime,attr2,inode64,noquota 0 0

+/dev/sdb1 /mnt/mythtv3 xfs rw,relatime,attr2,inode64,noquota 0 0

+/dev/sde1 /mnt/mythtv4 xfs rw,relatime,attr2,inode64,noquota 0 0

+/dev/sda1 /home xfs rw,relatime,attr2,inode64,noquota 0 0

+binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0

+rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw,relatime 0 0

+nfsd /proc/fs/nfsd nfsd rw,nosuid,nodev,noexec,relatime 0 0

+ulrich:/Distfiles /mnt/distfiles nfs rw,relatime,vers=3,rsize=32768,wsize=32768,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.12,mountvers=3,mountport=47708,mountproto=tcp,local_lock=none,addr=192.168.1.12 0 0

+ulrich:/media /mnt/media nfs rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.12,mountvers=3,mountport=43517,mountproto=udp,local_lock=none,addr=192.168.1.12 0 0

+ulrich:/Download /mnt/download nfs rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,soft,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.12,mountvers=3,mountport=43517,mountproto=udp,local_lock=none,addr=192.168.1.12 0 0

+ulrich:/motion /mnt/motion nfs rw,relatime,vers=3,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.1.12,mountvers=3,mountport=43517,mountproto=udp,local_lock=none,addr=192.168.1.12 0 0
```

Any clues from that?

----------

## krinn

no, i was thinking maybe mtab was missing them.

----------

## Hu

/etc/mtab is a regular file and can be stale.  /proc/mounts is a pseudofile that is always correct for the current mount namespace.  If the mount is not in /proc/mounts, then it is not actually mounted.  Many people prefer to replace /etc/mtab with a symlink to /proc/mounts for this reason.  However, doing so can disrupt use of mounts that specify the user mount option.

----------

## ferg

Thanks for that.

/proc/mounts shows the missing volumes are indeed mounted. In fact the only tool that does not is running [b]df[/].

At this point I think I'll just ignore it and hope it goes away! Everything else appears to be working fine!

Thanks for everybody's input.

Cheers

Ferg

----------

## wizzi

After examining the code, I believe the problem/feature (you decide) is that "duplicate" entries are now being removed from the df output (since coreutils 8.21). I too have a ReadyNAS and I believe we are both mounting subdirectories of the unit. Basically because it's just a big disk, the free/used/etc values are going to be the same even though they are different mount points.

The reason the particular entry shows up is that they used an election of "shortest name wins".

Personally I have yet to decide whether it's a problem or feature, but at least now we know. If we stick to the "do one thing and do it well" argument for *nix utilities, it's true we shouldn't be assuming that df will show mounted devices because they are different arenas.

Aaron

----------

