util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Karel Zak <kzak@redhat.com>
To: Kay Sievers <kay@vrfy.org>
Cc: Matt Burgess <matthew@linuxfromscratch.org>, util-linux@vger.kernel.org
Subject: Re: Discrepancies between real and symlinked mtab
Date: Wed, 31 Oct 2012 15:33:32 +0100	[thread overview]
Message-ID: <20121031143332.GA24992@x2.net.home> (raw)
In-Reply-To: <CAPXgP1092MT36BonZtqMpxR0dFWPeYwPFH4oCHDEgy3X2r9ozA@mail.gmail.com>

On Wed, Oct 31, 2012 at 01:46:43PM +0100, Kay Sievers wrote:
> On Wed, Oct 31, 2012 at 1:24 PM, Karel Zak <kzak@redhat.com> wrote:
> > On Tue, Oct 30, 2012 at 11:03:59PM +0000, Matt Burgess wrote:
> 
> >> 1) mount(8)
> >>
> >> /dev/root on / type ext3 (rw,relatime,data=ordered)
> >
> >  I see (Fedora 17, util-linux 2.21.2)
> 
> >    /dev/sda4 on / type ext4 (rw,relatime,data=ordered)
> 
> We see that only if we use an initramfs. In case the kernel mounts the
> fs directly and internally, there is /dev/root showing up.

 Ah, good point.

> >> Nope, that's not /dev/sda3.  And what is /dev/root anyway? There's no
> >> such node under /dev here.
> 
> The kernel creates that node in its own 'rootfs' names filesystem, the
> parent of the entire filesystem mount tree; but this is never visible
> anywhere in the real system, and never was.
> 
> Ideally, the kernel would be fixed to use the root= string, and not
> invent a name that does never exist.

 Yes, hmm... I'll try to improve libmount to convert /dev/root to
 something usable.

> > if I good remember there was symlink in some distributions
> 
> Some distributions created /dev/root with udev rules which have been
> composed at bootup. We dropped all that, because it is logic backwards
> and nothing on the system should rely on /dev/root being available.
> Modern filesystems like btrfs do not follow the "there is a single
> device below that mountpoint logic".

 I guess it's still necessary to use some magic btrfs ioctls to get
 info about the filesystem, right? It would be nice to have something
 in /sys/fs/btrfs.

-- 
 Karel Zak  <kzak@redhat.com>
 http://karelzak.blogspot.com

  reply	other threads:[~2012-10-31 14:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-30 23:03 Discrepancies between real and symlinked mtab Matt Burgess
2012-10-31  7:59 ` Bernhard Voelker
2012-10-31 12:24 ` Karel Zak
2012-10-31 12:46   ` Kay Sievers
2012-10-31 14:33     ` Karel Zak [this message]
2012-11-08 13:48 ` Karel Zak
2012-11-08 13:54   ` Matthew Burgess

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=20121031143332.GA24992@x2.net.home \
    --to=kzak@redhat.com \
    --cc=kay@vrfy.org \
    --cc=matthew@linuxfromscratch.org \
    --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;
as well as URLs for NNTP newsgroup(s).