Just thought I'd make people aware of this one in case you hit it and wonder what the hell is going on (like I did)
Quote:
df now properly outputs file system information with bind mounts present on
the system by skipping duplicate entries (identified by the device number).
Consequently, df also elides the early-boot pseudo file system type "rootfs".
|
Now, I can understand the idea of hiding the duplicates, but it seems that they haven't quite figured out how to suppress the bind mount rather than the original filesystem.
Code:
root@ws1:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-lvroot 16382888 5847268 9696760 38% /
/dev/mapper/rootvg-lvlocal 83585712 75545448 8040264 91% /local
root@ws1:~# mount -o bind /local/music /mnt
root@ws1:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/rootvg-lvroot 16382888 5847268 9696760 38% /
/local/music 83585712 75545448 8040264 91% /mnt
As you can see, the wrong mount is removed from the output.
So, if you do anything fancy with bind mounts then you might want to be wary of this as your filesystems may very well disappear from the output of 'df'.
As a work-around I've found that "
df -a -x none -x proc -x sysfs" or "
df -a -t ext4 -t tmpfs" seems to provide sensible output.
"
df -a -x proc -x sysfs" seems the closest match to the previous default behaviour as far as I can tell.
I can feel an alias coming on!