From: Karel Zak <kzak@redhat.com>
To: Phillip Susi <psusi@ubuntu.com>
Cc: util-linux@vger.kernel.org
Subject: Re: /proc/mounts doesn't store bind flag
Date: Mon, 4 Nov 2013 11:29:32 +0100 [thread overview]
Message-ID: <20131104102932.GF23604@x2.net.home> (raw)
In-Reply-To: <5273DCB6.4020909@ubuntu.com>
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@redhat.com>
http://karelzak.blogspot.com
next prev parent reply other threads:[~2013-11-04 10:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 16:54 /proc/mounts doesn't store bind flag Phillip Susi
2013-11-04 10:29 ` Karel Zak [this message]
2013-11-04 14:02 ` Phillip Susi
2013-11-04 14:32 ` Karel Zak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131104102932.GF23604@x2.net.home \
--to=kzak@redhat.com \
--cc=psusi@ubuntu.com \
--cc=util-linux@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox