From the answer to What is a bind mount?,

It is possible to unmount /some/where, in which case /else/where remains mounted.

I checked the output of mount after performing a bind mount. The relevant lines are:

/dev/sda2 on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
/dev/sda2 on /mnt/bind type ext4 (rw,relatime,errors=remount-ro,data=ordered)

According to Gilles's comments, a bind mount does not only bind the directories, but the kernel additionally remembers "/dev/foo is mounted on /else/where". This agrees with what I saw in the mount info above.

Also, a bind mount is neither exactly "bind the directory" nor exactly "mount the underlying device again", since bind mounting mounts the device, but not the root structure of the device.

I think a bind mount actually "mounts an inode inside a device to a file" (note: directory is a special file), can anyone tell me if I made it right?

  • please copy important bits into the question: Make it self-contained. – ctrl-alt-delor Nov 3 '18 at 18:57

Your Answer

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

Browse other questions tagged or ask your own question.