From: Karel Zak <kzak@redhat.com>
To: Bernhard Voelker <mail@bernhard-voelker.de>
Cc: "util-linux@vger.kernel.org" <util-linux@vger.kernel.org>
Subject: Re: mount --bind /A /A multiplies mount entries
Date: Mon, 4 Nov 2013 14:58:08 +0100 [thread overview]
Message-ID: <20131104135808.GA21311@x2.net.home> (raw)
In-Reply-To: <749356890.38567.1383563352930.open-xchange@email.1und1.de>
On Mon, Nov 04, 2013 at 12:09:12PM +0100, Bernhard Voelker wrote:
> $ ./mount | grep sdb
> /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
> /dev/sdb on /home type ext4 (rw,relatime,data=ordered)
Yes, it seems correct, use findmnt(8) to see what happen. It's more
tricky :-) (or see /proc/self/mountinfo where is Id<->Parent
relationship described by two first columns).
... and don't forget that mounts are propagated in shared trees, so
try to compare:
mkdir /mnt/test
mount --bind /mnt/test /mnt/test
mount --make-private /mnt/test
mount --bind /mnt/test /mnt/test
mount --bind /mnt/test /mnt/test
and:
mount --bind /mnt/test /mnt/test
mount --make-shared /mnt/test
mount --bind /mnt/test /mnt/test
mount --bind /mnt/test /mnt/test
you can also try to mount something else to /mnt/test/A to see what
happen.
> This is probably a kernel bug
I don't think it's bug :-)
>, but as bind mounts to self
> are not that much of use, wouldn't it be worthwhile to
> prohibit it at all in mount(8)?
mount --bind /A /A
is pretty common operation if you want to create a mountpoint
from non-mountpoint directory.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2013-11-04 13:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-04 11:09 mount --bind /A /A multiplies mount entries Bernhard Voelker
2013-11-04 13:58 ` Karel Zak [this message]
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=20131104135808.GA21311@x2.net.home \
--to=kzak@redhat.com \
--cc=mail@bernhard-voelker.de \
--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