Re: Expected behavior of "mount /mnt/root /mnt/root --bind"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 29, 2015 at 03:32:30AM +0000, james harvey wrote:
> If /dev/vda is a btrfs volume (not using partitioning) and is mounted to /mnt
> 
> And if /mnt/root is made as a normal directory (not a subdirectory)
> 
> And if an nfs share is mounted to /mnt/root/mnt
> 
> And for some reason "mount /mnt/root /mnt/root --bind" is ran
> 
> ... Should /mnt/root/mnt now be viewable as an empty mountpoint,
> hiding the nfs share?

Yes, since you used --bind not --rbind.

> Right now it does that.  Not sure what the expected behavior would be.
> Not sure if "mount x x" is ever desired to be allowed, or if it should
> refuse to do that.

It's a documented and used feature that you can bind mount a directory
over itself.

HTH,
Isaac Dunham
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux