GNU bug report logs -
#15986
df in current coreutils shows the device for loop mounts, not the file
Previous Next
Reported by: Philipp Thomas <pth <at> suse.de>
Date: Thu, 28 Nov 2013 14:35:03 UTC
Severity: normal
Done: Bernhard Voelker <mail <at> bernhard-voelker.de>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15986 in the body.
You can then email your comments to 15986 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#15986
; Package
coreutils
.
(Thu, 28 Nov 2013 14:35:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Philipp Thomas <pth <at> suse.de>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Thu, 28 Nov 2013 14:35:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Df in older coreutils showed the file of a loop mount whereas currently it
shows you the loop device. This is IMHO bogus as what good is that info?
Is this a deliberate change or a side effect of other changes? I searched
ChangeLog but didn't find anything relating to it (at least in my eyes).
Philipp
Reply sent
to
Bernhard Voelker <mail <at> bernhard-voelker.de>
:
You have taken responsibility.
(Thu, 28 Nov 2013 17:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Philipp Thomas <pth <at> suse.de>
:
bug acknowledged by developer.
(Thu, 28 Nov 2013 17:07:03 GMT)
Full text and
rfc822 format available.
Message #10 received at 15986-done <at> debbugs.gnu.org (full text, mbox):
tag 15986 notabug
thanks
On 11/28/2013 03:34 PM, Philipp Thomas wrote:
> Df in older coreutils showed the file of a loop mount whereas currently it
> shows you the loop device. This is IMHO bogus as what good is that info?
>
> Is this a deliberate change or a side effect of other changes? I searched
> ChangeLog but didn't find anything relating to it (at least in my eyes).
Hi Philipp,
on systems where /etc/mtab is a regular file, 'mount' writes the name of
the backing file into /etc/mtab.
Nowadays, as /etc/mtab is a symlink to /proc/self/mounts, this information
is not available to 'df' anymore.
According to util-linux sources [1], such information is available in
/sys/block/loopN/loop/backing_file (kernel >= 2.6.37 is required).
Therefore, 'mount' makes this extra lookup in that file to display the
name of the backing file.
I don't think it's a good idea to add such functionality to 'df',
as this is rather OS-dependent. Furthermore, OS-specific tools - in this
case e.g. 'mount' from util-linux for the Linux platform - already display
the name of the backing file.
As it's therefore not a bug in 'df', I'm hereby marking this bug as done,
but this should not prevent you or anybody else to continue discussion.
[1]
http://git.kernel.org/cgit/utils/util-linux/util-linux.git/tree/lib/loopdev.c#n518
Have a nice day,
Berny
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#15986
; Package
coreutils
.
(Thu, 28 Nov 2013 20:49:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 15986 <at> debbugs.gnu.org (full text, mbox):
On 28/11/2013 09:06, Bernhard Voelker wrote:
> tag 15986 notabug
> thanks
>
> On 11/28/2013 03:34 PM, Philipp Thomas wrote:
>> Df in older coreutils showed the file of a loop mount whereas currently it
>> shows you the loop device. This is IMHO bogus as what good is that info?
>>
>> Is this a deliberate change or a side effect of other changes? I searched
>> ChangeLog but didn't find anything relating to it (at least in my eyes).
>
> Hi Philipp,
>
> on systems where /etc/mtab is a regular file, 'mount' writes the name of
> the backing file into /etc/mtab.
> Nowadays, as /etc/mtab is a symlink to /proc/self/mounts, this information
> is not available to 'df' anymore**.
----
The fact that /etc/mtab is pointing to a wrongly formatted file by
default, these days, rather than being used to store user-specific mount
information, seems to be getting well-used as a reason for dropping
useful information:
(** ex: -showing the user their real "root" instead of /root,
-- -showing the user modified device names instead of
what they passed to mount (i.e. showing
/dev/mapper/Hns-Home-users-- instead of /dev/HnS/Home/users-home
- showing what options they specified rather than all
that applied at the time of mount, like:
/dev/mapper/Backups-Backups on /backups type xfs (rw,nodiratime,relatime,\
swalloc,attr2,largeio,inode64,allocsize=131072k,logbsize=256k,sunit=128,\
swidth=1536,noquota)
instead of:
/dev/Backups/Backups /backups xfs\
defaults,nodiratime,swalloc,largeio,logbsize=256k,\
inode64,allocsize=128m 2 0
Maybe if they want to substitute /etc/mtab for /proc/mounts, they should have
wondered a bit more where to get the correct information to allow for backwards
compat (I know there are other utils and /proc locations to get access to the
device you want, BUT -- they are not standard locations. Should all of the linux
utils have to jump through hoops to provide relevant and accurate information as
specified by the user?
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#15986
; Package
coreutils
.
(Thu, 28 Nov 2013 23:17:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 15986 <at> debbugs.gnu.org (full text, mbox):
On 11/28/2013 09:48 PM, Linda Walsh wrote:
> The fact that /etc/mtab is pointing to a wrongly formatted file by
> default, these days, rather than being used to store user-specific mount
> information, seems to be getting well-used as a reason for dropping
> useful information:
Well, there are many reasons to go away from mount-maintained mtab.
E.g. Kzak in some short words: "Yeah, mtab is evil." [1]
In the end, mtab as symlink to /proc/self/mounts is the right thing,
as it presents the view of the kernel ... which is always the correct
one.
'df' cares about the file system [2], and not too much about the
device behind it. That's the domain of mounting tools which is indeed
OS specific.
[1] http://karelzak.blogspot.de/2011_04_01_archive.html
[2] man 1 df: "df - report file system disk space usage"
Have a nice day,
Berny
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#15986
; Package
coreutils
.
(Fri, 29 Nov 2013 06:41:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 15986 <at> debbugs.gnu.org (full text, mbox):
On 11/28/2013 3:16 PM, Bernhard Voelker wrote:
> In the end, mtab as symlink to /proc/self/mounts is the right thing,
> as it presents the view of the kernel ... which is always the correct
> one.
----
I can think of 2 cases where the kernel displays the wrong information
concerning mounts.
1) rootfs -- I have no such device. I even tell the kernel on the
boot command line root=/dev/sdc1. There is no excuse for displaying
garbage in that field.
2) I specify the standard LVM names /dev/VG/LV -- which the kernel then
mangles. The kernel gets it wrong again -- it loses the information of
what the user mounted there. Device wise, they may be similar or the same,
but conceptually, the kernel can't even get the names of my devices as
I used them, correctly. The lvm people say they /dev/mapper/ names are
not standard form and not to use them. If the kernel actually reflected
the information the user provided, I'd agree that it was right. As it
can't seem to either hold on to or echo that information, I would say it
is defective.
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#15986
; Package
coreutils
.
(Fri, 29 Nov 2013 10:28:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 15986 <at> debbugs.gnu.org (full text, mbox):
* Linda Walsh (coreutils <at> tlinx.org) [20131129 07:40]:
> I can think of 2 cases where the kernel displays the wrong information
> concerning mounts.
The discuss this with the kernel maintainers! Coreutils is the wrong place
for this discussion.
Philipp
Information forwarded
to
bug-coreutils <at> gnu.org
:
bug#15986
; Package
coreutils
.
(Fri, 29 Nov 2013 20:02:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 15986 <at> debbugs.gnu.org (full text, mbox):
Philipp Thomas wrote:
> * Linda Walsh (coreutils <at> tlinx.org) [20131129 07:40]:
> > I can think of 2 cases where the kernel displays the wrong information
> > concerning mounts.
>
> The discuss this with the kernel maintainers! Coreutils is the wrong place
> for this discussion.
For this point I disagree. Because coreutils often has to deal with
kernel (Linux and otherwise) problems. There have been many
workarounds for kernel bugs in the userland code. I might argue that
all of the glib overrides shouldn't exist in a perfect world.
Bob
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sat, 28 Dec 2013 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 11 years and 170 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.