Re: /proc/mounts doesn't store bind flag

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

 



On Fri, Nov 01, 2013 at 12:54:14PM -0400, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> When symlinking /etc/mtab to /proc/mounts, bind mounts no longer have
> the bind option stored.  Is this a bug or working as intended?

 This is expected thing. All utils that expect "bind" flag are broken.

 There is nothing like "bind" mountpoint (and kernel does not maintain
 such information at all), all mountpoints are equal, there is nothing
 like a primary (original) mountpoint. 
 
 You have to think about it as about hardlinks for files. The bind 
 operation creates just another path to the filesystem. That's all.

  mount /dev/sda1 /A
  mount --bind /A /B
  umount /A

 then /B is still valid (BTW, this is impossible to describe in
 the traditional /etc/mtab where was always relation between 
 /A and /B).

    Karel

-- 
 Karel Zak  <kzak@xxxxxxxxxx>
 http://karelzak.blogspot.com
--
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