F15: ugly behavior of "df"

Tomas Mraz tmraz at redhat.com
Thu Jun 23 21:44:41 UTC 2011


On Thu, 2011-06-23 at 16:21 +0100, Pádraig Brady wrote: 
> On 23/06/11 15:53, Karel Zak wrote:
> >  https://bugzilla.redhat.com/show_bug.cgi?id=709351
> > 
> > The tools (not only df(1)) have to be fixed to de-duplicate the list
> > of fileststems. It's standard behavior that the same filesystem could
> > be mounted on more places. 
> > 
> > The 'bind' flag is another way how to achieve that the filesystem is
> > mounted on another place. Nothing other.
> > 
> >    # mount /dev/sdb1 /mnt/A
> >    # mount --bind /mnt/A /mnt/B
> > 
> > is the same thing as:
> > 
> >    # mount /dev/sdb1 /mnt/A
> >    # mount /dev/sdb1 /mnt/B 
> > 
> > there is nothing like 'bind' state of the filesystem. The 'bind' info in
> > mtab was always broken by design.
> > 
> > http://karelzak.blogspot.com/2011/04/bind-mounts-mtab-and-read-only.html
> 
> Thanks for that info.
> 
> I did a find_bind_mount() function as part of:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=ddf6fb86
> I also adjusted df to handle bind mounts better with:
> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=0380e4c9
> I'll have to revisit these to see if they're still valid.
> 
> I'll have a look at fixing up df (I guess I'll reverse the mount list
> and have some internal hash to detect dupes?).
> 
> I need to see why F15 has started doing this too.
> For example on my system there are 2 _identical_ entries
> for /home in /proc/mounts.

If you have the sandbox package installed, that is the reason.

-- 
Tomas Mraz
No matter how far down the wrong road you've gone, turn back.
                                              Turkish proverb



More information about the devel mailing list