From: Karel Zak <kzak@redhat.com>
To: Ruediger Meier <ruediger.meier@ga-group.nl>
Cc: Phillip Susi <psusi@ubuntu.com>, util-linux <util-linux@vger.kernel.org>
Subject: Re: mount existing tmpfs mounts a new tmpfs
Date: Mon, 22 Jun 2015 16:15:51 +0200 [thread overview]
Message-ID: <20150622141551.GK1992@ws.net.home> (raw)
In-Reply-To: <201506221455.46930.ruediger.meier@ga-group.nl>
On Mon, Jun 22, 2015 at 02:55:37PM +0200, Ruediger Meier wrote:
> On Monday 22 June 2015, Karel Zak wrote:
> > On Sun, Jun 21, 2015 at 10:00:51PM -0400, Phillip Susi wrote:
> > > Forwarding this from debian bug #772419: Run mount /run, and it
> > > mounts a new tmpfs over top of the existing one in /run ( even if
> > > /run isn't listed in /etc/fstab ), hiding the existing files. It
> > > should say that it is already mounted.
> >
> > We usually don't play any policy games in userspace (exception is
> > mount -a). If it's supported by kernel then it's correct behaviour.
> > And IMHO it's really correct behaviour because it creates a *new*
> > filesystem.
>
> Is it really the kernel who does not mount again other filesystems?
Sure, use strace to see more:
> For me tmpfs behavior looks different for no reason:
>
> $ cat /etc/fstab
> /dev/sda1 /boot ext2 defaults 0 0
> glaukos:/exports/opt/intel /opt/intel nfs defaults 0 0
> proc /tmp/proc proc defaults 0 0
> none /tmp/tmpfs tmpfs defaults 0 0
>
> When everything is mounted already I get:
>
> $ mount /boot
> mount: /dev/sda1 is already mounted or /boot busy
> /dev/sda1 is already mounted on /boot
# strace -e mount mount /boot
mount("/dev/sda2", "/boot", "ext4", MS_MGC_VAL, NULL) = -1 EBUSY
(Device or resource busy)
> $ mount /opt/intel/
> mount.nfs: /opt/intel is busy or already mounted
# strace -fe mount mount /mnt/backup
Process 27674 attached
[pid 27674] mount("sr.net.home:/mnt/store/backup", "/mnt/backup",
"nfs", 0, "vers=4.2,addr=192.168.111.1,clie"...) = -1 EPROTONOSUPPORT
(Protocol not supported)
[pid 27674] mount("sr.net.home:/mnt/store/backup", "/mnt/backup",
"nfs", 0, "vers=4.1,addr=192.168.111.1,clie"...) = -1 EPROTONOSUPPORT
(Protocol not supported)
[pid 27674] mount("sr.net.home:/mnt/store/backup", "/mnt/backup",
"nfs", 0, "vers=4.0,addr=192.168.111.1,clie"...) = -1 EBUSY (Device or
resource busy)
> $ mount /tmp/proc/
> mount: proc is already mounted or /tmp/proc busy
> proc is already mounted on /proc
> proc is already mounted on /tmp/proc
strace -e mount mount -t proc none /proc
mount("none", "/proc", "proc", MS_MGC_VAL, NULL) = -1 EBUSY (Device or
resource busy)
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
next prev parent reply other threads:[~2015-06-22 14:15 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 2:00 mount existing tmpfs mounts a new tmpfs Phillip Susi
2015-06-22 7:09 ` Tom Yan
2015-06-22 8:20 ` Karel Zak
2015-06-22 12:55 ` Ruediger Meier
2015-06-22 14:15 ` Karel Zak [this message]
2015-06-22 18:45 ` Phil Susi
2015-06-23 9:44 ` Tom Yan
2015-06-22 13:31 ` Phil Susi
2015-06-22 14:49 ` Isaac Dunham
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=20150622141551.GK1992@ws.net.home \
--to=kzak@redhat.com \
--cc=psusi@ubuntu.com \
--cc=ruediger.meier@ga-group.nl \
--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