Re: util-linux: mount -o bind consults /etc/mtab (file, not symlink) during mount?

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

 



On 07/24/2009 06:26 AM, Karel Zak wrote:
> 
>  Sure, /proc/mounts does not provide proper information about bind
>  mounds, so your "mount 2" is interpreted as "mount /dev/sda3 /root/2"
>  -- it's not possible to mount the same device on the same mountpoint
>  two times.  This restriction does not exist for bind mounts.
> 

Sort-of-kind-of.  Bind mounts are like hard links... there is no such
thing as "this is the original one versus this is the bind mount"; the
only difference between the file and the hard link, or between the mount
and the bind, is which was created first.

In that sense, trying to pick out which is the bind mount isn't merely
futile, it is actively wrong.  This is especially so since it is
perfectly legitimate to remove the original mount leaving only the
"bind" mount in place(*).

	-hpa

(*) this is, in fact, the only way under Linux to mount a volume
subdirectory as at a mount point.

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
To unsubscribe from this list: send the line "unsubscribe util-linux-ng" 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