Re: Another question on bind mounts without mtab

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

 



On Fri, Jan 10, 2014 at 09:38:20AM -0500, Phillip Susi wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I've had another question come up about bind mounts and the lack of
> mtab and I'm not sure how to answer it because it does seem a more
> important use case that has been lost than those previously discussed.
> 
> If /dev/sda1 is mounted in /, and you bind mount /home/foo to /mnt,
> then there is no way to tell from the output of mount that it is in
> fact, the /home/foo directory of /dev/sda1 that is in /mnt.  It looks
> like you just bind mounted the whole drive there, and the subdirectory
> path is lost.

 See findmnt output, the /proc/self/mountinfo contains info about the
 mounted filesystem directory (usually '/', but /home/foo in your
 example).

 Note that I'd like to learn people to use findmnt(8) rather mount
 output. The mount(8) output is there mostly for backward
 compatibility.

    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