can't tell bind mounts from normal mounts

Chuck Anderson cra at WPI.EDU
Thu Apr 14 13:17:41 UTC 2011


Part of the fallout from symlinking /etc/mtab to /proc/mounts is that
there is now no way to tell the difference between bind mounts and
normal mounts:

http://utcc.utoronto.ca/~cks/space/blog/linux/BindMounts

"mount" used to maintain the source of a bind mount and the bind
option in /etc/mtab. Now all you see is the underlying device listed
more than once with different mountpoints. This is confusing:

[install at higgs ~]$ cat /proc/mounts|grep lv_root
/dev/mapper/vg_higgs-lv_root / ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0
/dev/mapper/vg_higgs-lv_root /tmp ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0
/dev/mapper/vg_higgs-lv_root /var/tmp ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0

Is there a way to tell here which underlying inodes are being used as
the root inodes of the bind mounts?


More information about the test mailing list