GNU bug report logs -
#10363
/etc/mtab -> /proc/mounts symlink affects df(1) output for /
Previous Next
Reported by: jidanni <at> jidanni.org
Date: Sun, 25 Dec 2011 00:44:02 UTC
Severity: normal
Tags: fixed
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Pádraig Brady wrote:
> On 12/29/2011 02:09 PM, Jim Meyering wrote:
>> On systems with recent kernel/tools, a symlink from /etc/mtab to
>> /proc/mounts, and a by-UUID mount (i.e., soon, nearly everyone),
>> you will see something like the following when running "df -hT":
>>
>> Filesystem Type Size Used Avail Use% Mounted on
>> rootfs rootfs 11G 1.9G 8.0G 19% /
>> /dev/disk/by-uuid/828fc648-9f30-43d8-a0b1-f7096a2edb66 ext4 11G
>> 1.9G 8.0G 19% /
>
> Ouch.
>
> BTW, this is the first mail I've gotten about 10363?
The first message I received had these headers:
X-Debbugs-Original-Cc: 653073 <at> bugs.debian.org, bug-coreutils <at> gnu.org
From: jidanni <at> jidanni.org
References: <20111224164832.GT5437 <at> codelibre.net>
Date: Sun, 25 Dec 2011 08:40:42 +0800
Message-ID: <874nwpzdo5.fsf_-_ <at> jidanni.org>
Cc: 653073 <at> bugs.debian.org, 10363 <at> debbugs.gnu.org
X-BeenThere: bug-coreutils <at> gnu.org
> I guess this is the right thing to do.
> I.E. have higher level paths in /proc/mounts, allowing
> tools that require lower level paths to traverse the links
> and pick the appropriate one.
>
> The highest level path needs to be available to do this,
> so I suppose this is appropriate in /proc/mounts,
> even though it might not be the most appropriate for
> human consumption, as can be seen above.
>
> The patch looks good.
> I guess "9" is the only questionable bit.
> On my Fedora 16 system I have in /proc/mounts:
>
> /dev/mapper/vg_tp1-lv_root ...... /
>
> That's a fairly informative name, whereas the links further
Good point.
I've just posted a revision that replaces only /dev/disk/by-uuid/... symlinks.
> resolve to a fairly generic:
>
> /dev/dm-2
>
> Hmm, I was contemplating using the old wrap limit of 19,
> but apart from not handling the above, using a width
> is inconsistent. Perhaps it's better to always resolve?
I'd rather keep this minimal, since it changes the default.
Dereferencing all device symlinks seems like a job for a new option,
assuming there's sufficient justification.
> I.E. always print the base device. It seems that one
> can work back from this anyway:
>
> $ findmnt --source /dev/dm-2
> TARGET SOURCE FSTYPE OPTIONS
> / /dev/mapper/vg_tp1-lv_root ext4 rw,relatime,...
This bug report was last modified 6 years and 223 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.