0

I'm reading What is a bind mount?

I tried mount --bind -o ro / /mnt, then I get the folowing two lines in /proc/self/mountinfo:

23 0 0:21 /ARCHLINUX / rw,relatime shared:1 - btrfs /dev/sda rw,space_cache,subvolid=257,subvol=/ARCHLINUX
268 23 0:21 /ARCHLINUX /mnt ro,relatime shared:1 - btrfs /dev/sda rw,space_cache,subvolid=257,subvol=/ARCHLINUX

I can't see anything indicating it's a bind mount, it seems that kernel only treat the mount_id=268 as an individual mount of the device 0:21, it even supports different per-mount options(one is rw and another is ro)!

So is it true that a bind mount is exactly the same as mount the filesystem device twice? I'm using Linux 5.0.

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.