2

I found in one of the machines I work with a little extrange thing.

I have some mount --bind done it on my machine that are not listed when I type mount.

Is there any idea to how to list all mounted directories that are not listed in mount?

Thank you

1

The quick answer is that neither mount nor /etc/mtab nor /proc/mounts contain information on whether a particular mount operation has been done using the "bind" option.

If you can see the mountpoint (/mnt/tmp2 in the example of your comment) in the output of mount, then it has been mounted succesfully. You should not expect to see "bind" in the output of mount.

For the long answer, check out Gilles's very interesting answer (and the comments below it) here.

0

mount don't display all the mounting points in case of error, or if /etc is in read-only mode (the file cache is /etc/mtab).

To see the mount points do a cat /proc/mounts

It is stange that you didn't see the --bind in mtab...

  • I think someone has copied the directory which has --bind inside them, for this reason I think I didn't showed when I try mount. Could be possible? – enedebe Aug 21 '12 at 7:54
  • I just try to mount, and it is not written in /proc/mounts : mkdir /mnt/tmp; mkdir /mnt/tmp2; mount -B /mnt/tmp /mnt/tmp2; grep /tmp /proc/mounts: /dev/disk/by-uuid/418151af-d0bd-478e-ab65-ef6319c94944 /mnt/tmp2 ext4 rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered 0 0 You don't see bind (as mount do), but you see it is mounted – Dom Aug 21 '12 at 15:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.