All of lore.kernel.org
 help / color / mirror / Atom feed
* Another question on bind mounts without mtab
@ 2014-01-10 14:38 Phillip Susi
  2014-01-13  8:48 ` Karel Zak
  0 siblings, 1 reply; 2+ messages in thread
From: Phillip Susi @ 2014-01-10 14:38 UTC (permalink / raw)
  To: util-linux

-----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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJS0AXcAAoJEI5FoCIzSKrw/H4H/0tHL4gj0O7Ftj/wC02hRnP2
jz5cSaHntsQPyu4qZ7YAda4D0niuF+dRO/OXOak6QkJS1FgmXVWrKvfgfe+diut9
YcxzQkc8P/uDxpC08Hh00JIy7GN0oSGiITQp7VLBd6c96tdT7rQC8AgymaSnBwfT
BDA65x7StqFcWi46l9Te9CG48ZV0XtVGx+IsaV6RR78yO1XLG3cQ/CCV4PNE04zr
DcsfA1fhVfTkiRWEp4AxjrDuciLe8NSXk5mUd1GuL3I9CmrLJIkMZ7DMu1ucAiSQ
Q0u/KSfvfpT211TwDfCfk9Bc+uPfnfxrrLWYwejU0uJI/qJIC/DuX314mIEr6n4=
=d4lU
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Another question on bind mounts without mtab
  2014-01-10 14:38 Another question on bind mounts without mtab Phillip Susi
@ 2014-01-13  8:48 ` Karel Zak
  0 siblings, 0 replies; 2+ messages in thread
From: Karel Zak @ 2014-01-13  8:48 UTC (permalink / raw)
  To: Phillip Susi; +Cc: util-linux

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@redhat.com>
 http://karelzak.blogspot.com

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-01-13  8:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-10 14:38 Another question on bind mounts without mtab Phillip Susi
2014-01-13  8:48 ` Karel Zak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.