On 07/20/2014 08:04 PM, Chris Clayton wrote: > On 07/20/14 16:18, Bernhard Voelker wrote: >> So I'm wondering why neither /dev/sda3 (as source) nor / (as target) >> show up in a regular "df --local".
> /etc/mtab is a regular file: > > $ ls -l /etc/mtab > -rw-r--r-- 1 root root 855 Jul 20 18:54 /etc/mtab hmm, that explains a lot. > $ cat /etc/mtab > /dev/sda3 / ext4 rw 0 0 > [...] > /lib/modules /boot/modules none rw,bind 0 0 If mtab was a symlink to /proc/mounts - as it is in virtually all newer systems since a few years - , then the latter line for the bind mount would read like this: /dev/sda3 /boot/modules ext4 rw 0 0 With this, "/" would show up in a plain "df" call again. In recent discussions about and modifications in df(1), we tried to cater for situations like bind mounts, other duplicate mounts and over-mounted devices or mount points. This relies on the content in mtab as it is when mtab is a symlink to /proc/mounts. With all the above changes needed for the now very common uses of bind mounts in the distros, it seems that coreutils' df(1) now finally has become incompatible to traditional mtab (regular) file regarding bind mounts ... like the mount utilities in util-linux already some time ago. Karel - the maintainer of util-linux - postulates already 3 years ago [0]: "Yeah, mtab is evil!": [0] http://karelzak.blogspot.de/2011_04_01_archive.html That said, I think the test failure is 70:30 a test failure and a problem in df(1), but I'm afraid we cannot do much about supporting old regular-file mtab. Instead, the test should be skipped in this case. I'll have to think about it. Regarding your system: what OS/version is this? Would you mind switching mtab to be a symlink? Have a nice day, Berny
