# "df -h" missing a file system

## lyallp

I have 2 USB drives plugged into my Fritz!Box 7390 running firmware 5.51.

I have two directories, /mnt/fritz.box/1 and /mnt/fritz.box/2 on my Gentoo system.

I am using kernel gentoo-sources-3.12.21-r1 with sys-apps/coreutils-8.21 (the package that contains /bin/df)

I have two /etc/fstab entries 

```
//fritz.box/FRITZ.NAS/WDCWD20-EARS-00MVWB0-01     /mnt/fritz.box/1  cifs    defaults,user=anonymous,password=password,rw,file_mode=0770,dir_mode=0770,iocharset=iso8859-1,auto,gid=smb,noserverino         0 0

//fritz.box/FRITZ.NAS/WDCWD20-EZRX-00D8PB0-01     /mnt/fritz.box/2  cifs    defaults,user=anonymous,password=password,rw,file_mode=0770,dir_mode=0770,iocharset=iso8859-1,auto,gid=smb,noserverino         0 0

```

The filesystem is actually mounted, there are files in both 1 and 2 directories, yet my 'df -h' does not show the second mount.

```
# df -h

Filesystem                                     Size  Used Avail Use% Mounted on

/dev/md126                                     508M  254M  254M  50% /

udev                                            10M  8.0K   10M   1% /dev

/dev/mapper/vg-usr                              26G  8.2G   18G  32% /usr

/dev/mapper/vg-var                              21G  5.0G   17G  24% /var

tmpfs                                          799M  1.2M  798M   1% /run

shm                                            4.0G     0  4.0G   0% /dev/shm

cgroup_root                                     10M     0   10M   0% /sys/fs/cgroup

/dev/md120                                     124M   52M   73M  42% /boot

/dev/mapper/vg-tmp                              25G  3.0G   22G  12% /tmp

/dev/mapper/vg-home                             60G   57G  3.7G  94% /home

/dev/mapper/vg-usr_local                       5.0G  1.2G  3.8G  24% /usr/local

/dev/mapper/vg-opt                             5.0G  684M  4.4G  14% /opt

/dev/mapper/vg-portage                          10G  5.9G  4.2G  59% /portage

/dev/mapper/vg-downloads                       500G  480G   20G  97% /downloads

/dev/mapper/vg-vms                             182G  127G   56G  70% /vms

/dev/mapper/vg-usr_lib_debug                    19G   15G  4.5G  77% /usr/lib64/debug

/dev/sda1                                      932G  460G  473G  50% /mnt/c_drive

/dev/sdb1                                      932G  819G  113G  88% /mnt/d_drive

//fritz.box/FRITZ.NAS/WDCWD20-EARS-00MVWB0-01  3.7T  2.4T  1.3T  65% /mnt/fritz.box/1

root@lyalls-pc /Fritz.Box 

# 
```

The second directory (2) actually appears in /etc/mtab.

```
rootfs / rootfs rw 0 0

proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

udev /dev devtmpfs rw,nosuid,relatime,size=10240k,nr_inodes=1021776,mode=755 0 0

devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0

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

/dev/md126 / xfs rw,noatime,attr2,inode64,noquota 0 0

/dev/mapper/vg-usr /usr xfs rw,noatime,attr2,inode64,noquota 0 0

/dev/mapper/vg-var /var xfs rw,noatime,attr2,inode64,noquota 0 0

tmpfs /run tmpfs rw,nosuid,nodev,relatime,size=817972k,mode=755 0 0

mqueue /dev/mqueue mqueue rw,nosuid,nodev,noexec,relatime 0 0

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

debugfs /sys/kernel/debug debugfs rw,nosuid,nodev,noexec,relatime 0 0

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

cgroup_root /sys/fs/cgroup tmpfs rw,nosuid,nodev,noexec,relatime,size=10240k,mode=755 0 0

fusectl /sys/fs/fuse/connections fusectl rw,nosuid,nodev,noexec,relatime 0 0

openrc /sys/fs/cgroup/openrc cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/lib64/rc/sh/cgroup-release-agent.sh,name=openrc 0 0

cpuset /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0

cpu /sys/fs/cgroup/cpu cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0

cpuacct /sys/fs/cgroup/cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0

freezer /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0

net_prio /sys/fs/cgroup/net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_prio 0 0

/dev/md120 /boot xfs rw,noatime 1 2

/dev/mapper/vg-tmp /tmp xfs rw,noatime,logbsize=256k,barrier=0 0 5

/dev/mapper/vg-home /home xfs rw,noatime 1 6

/dev/mapper/vg-usr_local /usr/local xfs rw,noatime 1 7

/dev/mapper/vg-opt /opt xfs rw,noatime 1 8

/dev/mapper/vg-portage /portage xfs rw,noatime 1 9

/dev/mapper/vg-downloads /downloads xfs rw,noatime 1 10

/dev/mapper/vg-vms /vms xfs rw,noatime 1 11

/dev/mapper/vg-usr_lib_debug /usr/lib64/debug xfs rw,noatime 0 12

/dev/sda1 /mnt/c_drive fuseblk rw,nosuid,nodev,allow_other,default_permissions,blksize=4096 0 0

/dev/sdb1 /mnt/d_drive fuseblk rw,nosuid,nodev,allow_other,default_permissions,blksize=4096 0 0

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

//fritz.box/FRITZ.NAS/WDCWD20-EARS-00MVWB0-01 /mnt/fritz.box/1 cifs rw 0 0

//fritz.box/FRITZ.NAS/WDCWD20-EZRX-00D8PB0-01 /mnt/fritz.box/2 cifs rw 0 0

```

Am I missing something obvious?

----------

## saivinoba

May sound stupid but is there anything like limit on number of lines displayed for df i.e., does it prune the output? There are 20 lines. How about unmounting one or two mount points and check?   :Embarassed: 

----------

## saivinoba

I did a small experiment. I created directories 1-to-9 under /tmp and mounted my /dev/sda4 on each of them. You know what my 'df -h' says?

```

a4741 ~ # df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda7        40G   14G   24G  37% /

devtmpfs        1.8G     0  1.8G   0% /dev

tmpfs           1.8G  188K  1.8G   1% /dev/shm

tmpfs           1.8G  896K  1.8G   1% /run

tmpfs           1.8G     0  1.8G   0% /sys/fs/cgroup

tmpfs           1.8G 1000K  1.8G   1% /tmp

tmpfs           363M   16K  363M   1% /run/user/1000

/dev/sda4        18G   44M   17G   1% /tmp/1

```

but 'mount' says:

```

a4741 ~ # mount

/dev/sda7 on / type ext4 (rw,noatime,data=ordered)

proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)

sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)

devtmpfs on /dev type devtmpfs (rw,nosuid,size=1854668k,nr_inodes=463667,mode=755)

tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)

devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)

tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)

tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)

cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)

cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)

cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)

cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)

systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=22,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)

debugfs on /sys/kernel/debug type debugfs (rw,relatime)

fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

mqueue on /dev/mqueue type mqueue (rw,relatime)

tmpfs on /tmp type tmpfs (rw)

hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime)

tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=371188k,mode=700,uid=1000,gid=1000)

/dev/sda4 on /tmp/1 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/2 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/3 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/4 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/5 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/6 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/7 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/8 type ext4 (rw,relatime,data=ordered)

/dev/sda4 on /tmp/9 type ext4 (rw,relatime,data=ordered)

```

 :Laughing: 

I then changed names of /tmp/{1-9} to letter, letter+number combination and mounted as above (_single_ partition). It would still show only the first option (i.e, first mount point as per mounting order). I then mounted _different_ partitions under numbered, letter+number combination directories. This time all the mount points are shown. 

```

a4741 tmp # df -h

Filesystem      Size  Used Avail Use% Mounted on

/dev/sda7        40G   14G   24G  37% /

devtmpfs        1.8G     0  1.8G   0% /dev

tmpfs           1.8G  188K  1.8G   1% /dev/shm

tmpfs           1.8G  896K  1.8G   1% /run

tmpfs           1.8G     0  1.8G   0% /sys/fs/cgroup

tmpfs           1.8G 1008K  1.8G   1% /tmp

tmpfs           363M   16K  363M   1% /run/user/1000

/dev/sda4        18G   44M   17G   1% /tmp/1

/dev/sda6       148G   17G  124G  12% /tmp/2

/dev/sda1        50G  9.2G   38G  20% /tmp/3

```

It seems 'df -h' sees your drives //fritz.box/FRITZ.NAS/WDCWD20-EARS-00MVWB0-01 and //fritz.box/FRITZ.NAS/WDCWD20-EZRX-00D8PB0-01 as single partition like sda4 in my above test?

----------

## lyallp

Interestingly enough, if I do 

```
root@lyalls-pc ~ 

# df -ha

Filesystem                                     Size  Used Avail Use% Mounted on

rootfs                                         508M  254M  254M  50% /

proc                                              0     0     0    - /proc

udev                                            10M  8.0K   10M   1% /dev

devpts                                            0     0     0    - /dev/pts

sysfs                                             0     0     0    - /sys

/dev/md126                                     508M  254M  254M  50% /

/dev/mapper/vg-usr                              26G  8.2G   18G  32% /usr

/dev/mapper/vg-var                              21G  5.0G   17G  24% /var

tmpfs                                          799M  1.2M  798M   1% /run

mqueue                                            0     0     0    - /dev/mqueue

shm                                            4.0G     0  4.0G   0% /dev/shm

debugfs                                           0     0     0    - /sys/kernel/debug

configfs                                          0     0     0    - /sys/kernel/config

cgroup_root                                     10M     0   10M   0% /sys/fs/cgroup

fusectl                                           0     0     0    - /sys/fs/fuse/connections

openrc                                            0     0     0    - /sys/fs/cgroup/openrc

cpuset                                            0     0     0    - /sys/fs/cgroup/cpuset

cpu                                               0     0     0    - /sys/fs/cgroup/cpu

cpuacct                                           0     0     0    - /sys/fs/cgroup/cpuacct

freezer                                           0     0     0    - /sys/fs/cgroup/freezer

net_prio                                          0     0     0    - /sys/fs/cgroup/net_prio

/dev/md120                                     124M   52M   73M  42% /boot

/dev/mapper/vg-tmp                              25G  3.1G   22G  13% /tmp

/dev/mapper/vg-home                             60G   57G  3.7G  94% /home

/dev/mapper/vg-usr_local                       5.0G  1.2G  3.8G  24% /usr/local

/dev/mapper/vg-opt                             5.0G  684M  4.4G  14% /opt

/dev/mapper/vg-portage                          10G  5.9G  4.2G  59% /portage

/dev/mapper/vg-downloads                       500G  480G   20G  97% /downloads

/dev/mapper/vg-vms                             182G  127G   56G  70% /vms

/dev/mapper/vg-usr_lib_debug                    19G   15G  4.5G  77% /usr/lib64/debug

/dev/sda1                                      932G  460G  473G  50% /mnt/c_drive

/dev/sdb1                                      932G  820G  113G  88% /mnt/d_drive

binfmt_misc                                       0     0     0    - /proc/sys/fs/binfmt_misc

//fritz.box/FRITZ.NAS/WDCWD20-EARS-00MVWB0-01  3.7T  2.4T  1.3T  65% /mnt/fritz.box/1

//fritz.box/FRITZ.NAS/WDCWD20-EZRX-00D8PB0-01  3.7T  2.4T  1.3T  65% /mnt/fritz.box/2

root@lyalls-pc ~ 

# 
```

df shows the second filesystem BUT shows the wrong free space, so it would appear df is thinking they are both the same.

However, you can see they are different.

```
root@lyalls-pc /mnt/fritz.box 

# ls -la *

1:

total 0

drwxrwxrwx  2 root smb   0 May 29 20:58 $RECYCLE.BIN

drwxrwxrwx  7 root smb   0 Jul  7 17:12 .

drwxr-xr-x  4 root root 22 Jul  5 19:35 ..

drwxrwxrwx  3 root smb   0 Jul 30  2011 FRITZ

drwxrwxrwx  3 root smb   0 Aug 26  2011 System Volume Information

drwxrwxrwx 29 root smb   0 Apr 28  2013 Videos

drwxrwxrwx  2 root smb   0 Apr 28  2013 XFER

2:

total 0

drwxrwxrwx   7 root  smb   0 Jul  7 17:12 .

drwxr-xr-x   4 root  root 22 Jul  5 19:35 ..

drwxrwxrwx   3 root  smb   0 Jul  6 16:48 FRITZ

drwxrwxrwx  33 lyall smb   0 Jul  6 14:12 Music

drwxrwxrwx 242 lyall smb   0 Jul  6 14:13 Pictures

drwxrwxrwx   2  1099 smb   0 Jul  6 16:52 Videos

drwxrwxrwx   2 root  smb   0 Jul  6 09:54 lost+found

root@lyalls-pc /mnt/fritz.box 

# 
```

```
root@lyalls-pc /mnt/fritz.box 

# du -sh *

1.8T   1

42M   2

root@lyalls-pc /mnt/fritz.box 

# 
```

----------

