util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Discrepancies between real and symlinked mtab
@ 2012-10-30 23:03 Matt Burgess
  2012-10-31  7:59 ` Bernhard Voelker
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Matt Burgess @ 2012-10-30 23:03 UTC (permalink / raw)
  To: util-linux

Hi,

Consider trying to answer the question "What partition is mounted
on /" (it happens to be /dev/sda3 in this example), when /etc/mtab is a
symlink pointing to /proc/mounts:

1) mount(8)

/dev/root on / type ext3 (rw,relatime,data=ordered)

Nope, that's not /dev/sda3.  And what is /dev/root anyway? There's no
such node under /dev here.

2) df(1)

Filesystem     1K-blocks    Used Available Use% Mounted on
rootfs          20642428 1576788  18017064   9% /
/dev/root       20642428 1576788  18017064   9% /

Uh-oh - now I appear to have 2 filesystems mounted at '/' (yes, I know
you can tell by the same stats that it is in fact the same FS).  What is
this rootfs entry?

3) lsblk(8)

NAME FSTYPE LABEL UUID                                 MOUNTPOINT
sda3 ext3   /lfs  aaf09e8b-d50e-429e-ba8e-11fa07ab5b75 

Well, that's odd.  I know that /dev/sda3 is mounted at /, but apparently
lsblk(8) doesn't!

If /etc/mtab is a real file, then the output of all 3 commands is
correct (and by that I mean it shows /dev/sda3).

As all 3 utils show the same issue, I assume this is something to do
with libblkid?

Thanks,

Matt.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2012-11-08 13:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2012-11-08 13:48 ` Karel Zak
2012-11-08 13:54   ` Matthew Burgess

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).