On Thu, Feb 12, 2015 at 01:50:32PM +0800, Dave Young wrote:
> The mountpoint created by bind operation is independent on
previous
> mounts,
>
> mount /mnt/sda1 /A
> mount --bind /A /B
> umount /A
>
> is pretty valid situation and /B still points to the filesystem.
Hmm, got it, so they are equal, but for subdirectory mount there will be
dependency?
No, you can still umount, it's just kernel feature that mount can
points to non-root filesystem directory.
# findmnt /dev/sdc1
TARGET SOURCE FSTYPE OPTIONS
/mnt/B /dev/sdc1[/subdir] ext4 rw,relatime,seclabel,stripe=32,data=ordered
/mnt/A /dev/sdc1 ext4 rw,relatime,seclabel,stripe=32,data=ordered
# umount /mnt/A
# findmnt /dev/sdc1
TARGET SOURCE FSTYPE OPTIONS
/mnt/B /dev/sdc1[/subdir] ext4 rw,relatime,seclabel,stripe=32,data=ordered
Karel
--
Karel Zak <kzak(a)redhat.com>
http://karelzak.blogspot.com