Re: Discrepancies between real and symlinked mtab

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Matt,

On 10/31/2012 12:03 AM, Matt Burgess wrote:
> 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:

I'll only answer for df here because it is not part of util-linux,
but rather in the coreutils package.

> 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?

That rootfs entry comes from early boot time when '/' is mounted on
itself.

BTW there is already a discussion on the coreutils ML about this:

http://www.mail-archive.com/coreutils@xxxxxxx/msg03582.html

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

No, df doesn't use libblkid. It uses gnulib's function
  read_file_system_list ()
to read the mount list.

Have a nice day,
Berny
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux