From: Michael Tokarev <mjt@tls.msk.ru>
To: Tom Horsley <tom.horsley@ccur.com>
Cc: Al Viro <viro@ftp.linux.org.uk>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
bugsy <bugsy@ccur.com>
Subject: Re: CLONE_NEWNS and mount command?
Date: Thu, 27 Apr 2006 18:49:29 +0400 [thread overview]
Message-ID: <4450D9F9.3080904@tls.msk.ru> (raw)
In-Reply-To: <1146143102.23667.11.camel@tweety>
Tom Horsley wrote:
[]
> If there is a bug, maybe it is that a /etc/mtab file exists
> at all :-).
This topic has been discussed before (without any real conclusion
if memory serves me right). The thing is: /etc/mtab IS useful,
as it contains different information compared with /proc/mounts
(irrelevant to CLONE_NEWNS/namespaces). For example, if I'll
mount -o loop file /mount/point
mtab will contain
-oloop=X /path/to/file /mount/point
while /proc/mounts will only have
file /mount/point
Note the two differences: omission of loop device number (used
by umount to automatically deconfigure loop device) and relative
(to what??) path to `file'.
On the other hand, /proc/mounts often contains more options
than mtab: mtab only lists those options which has been specified
on the command line, omitting defaults, but /proc/mounts lists
them all (like data=ordered for ext3fs).
And on another note, there are cases when you do NOT want to
expose some "internal" mounts to users. "Classical" example
which bothered me for quite some time is the way udev is set
up on Debian (dunno for other distros): they move-mount /dev
to /dev/.static/dev, but /dev/.static is drwx------, ie ordinary
users can't access it. Hence, when you run any command which
tries to access mounted filesystems (like df for example), it
complains that it can't stat /dev/.static/dev, which is plain
ugly. Omitting that entry from /etc/mtab fixes the problem.
That all to say: /proc/mounts and /etc/mtab both has their
good and usages... And *this*, IMHO, is where the bug is:
neither of the two gives complete information.
/mjt
prev parent reply other threads:[~2006-04-27 14:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-27 12:57 Tom Horsley
2006-04-27 13:01 ` Al Viro
2006-04-27 13:05 ` Tom Horsley
2006-04-27 14:49 ` Michael Tokarev [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=4450D9F9.3080904@tls.msk.ru \
--to=mjt@tls.msk.ru \
--cc=bugsy@ccur.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.horsley@ccur.com \
--cc=viro@ftp.linux.org.uk \
/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
Powered by JetHome