GNU bug report logs - #19956
Solved (Re: df fails to show all mounted file systems)

Previous Next

Package: coreutils;

Reported by: Vesa-Matti J Kari <vmkari <at> cc.helsinki.fi>

Date: Thu, 26 Feb 2015 18:16:01 UTC

Severity: normal

Merged with 19955

Done: Pádraig Brady <P <at> draigBrady.com>

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 19956 in the body.
You can then email your comments to 19956 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#19956; Package coreutils. (Thu, 26 Feb 2015 18:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vesa-Matti J Kari <vmkari <at> cc.helsinki.fi>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Thu, 26 Feb 2015 18:16:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vesa-Matti J Kari <vmkari <at> cc.helsinki.fi>
To: bug-coreutils <at> gnu.org
Subject: Solved (Re: df fails to show all mounted file systems)
Date: Thu, 26 Feb 2015 17:41:31 +0200 (EET)
Hello,

On Thu, 26 Feb 2015, Vesa-Matti J Kari wrote:

> [...] starting from coreutils-8.21 (i.e. the bug exist in 8.22 and 8.23
> too), lots of NFS mounts are missing:
>
> vmkari <at> cedi:/var/tmp/vmk$ coreutils-8.21/src/df
> Filesystem                1K-blocks       Used Available Use% Mounted on
> /dev/mapper/rvg-root        5134336    4334584    799752  85% /
> devtmpfs                    8118888          0   8118888   0% /dev
> tmpfs                       8128372          0   8128372   0% /dev/shm
> tmpfs                       8128372      18860   8109512   1% /run
> tmpfs                       8128372          0   8128372   0% /sys/fs/cgroup
> /dev/sda1                    520876     190144    330732  37% /boot
> machine-1:/ua/group      1459291104 1113208544 271954816  81% /h/group
> machine-1:/b/scratch      101721248   75860064  20618816  79% /b/scratch
> machine-1:/h/a           1001028384  746104672 204068672  79% /h/a
> machine-1:/usr/local/yht  113402880   78201856  29433856  73% /usr/local/yht
> machine-1:/q/q            113402528   78201952  29433536  73% /q/q
> machine-2:/var/spool/mail    230608384   83144160 135929888  38% /var/spool/mail
>
> The contents /etc/mtab are correct and "mount" command also works
> correctly. Could you look into this issue please?

Wow. I just spent about three hours investigating and came up with this
little patch for coreutils-8.20:

----------- sample starts -------------------------------

--- coreutils-8.21/src/df.c	2013-02-05 01:40:31.000000000 +0200
+++ coreutils-8.21-patched/src/df.c	2015-02-26 17:02:41.849872767 +0200
@@ -624,8 +624,8 @@ filter_mount_list (void)
         }
       else
         {
-          /* If the device name is a real path name ...  */
-          if (strchr (me->me_devname, '/'))
+          /* If the device name is a real path name and not an NFS-mount ...  */
+          if (strchr (me->me_devname, '/') && !strchr (me->me_devname, ':'))
             {
               /* ... try to find its device number in the devlist.  */
               for (devlist = devlist_head; devlist; devlist = devlist->next)

----------- sample ends ------------------------------

And all in vain because the 'df' utility in the latest coreutils git-repo
already works correctly. :-)

So sorry for the noise.

Do you have plans to release coreutils-8.24 soon? The
coreutils-8.22.11.el7 on Red Hat Enterprise Linux 7 / CentOS 7 is
currently broken.

Regards,
vmk
-- 
************************************************************************
               Tietotekniikkakeskus / Helsingin yliopisto
                 IT department / University of Helsinki
************************************************************************




Merged 19955 19956. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Thu, 26 Feb 2015 21:09:02 GMT) Full text and rfc822 format available.

Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sun, 01 Mar 2015 12:40:01 GMT) Full text and rfc822 format available.

Notification sent to Vesa-Matti J Kari <vmkari <at> cc.helsinki.fi>:
bug acknowledged by developer. (Sun, 01 Mar 2015 12:40:02 GMT) Full text and rfc822 format available.

Message #12 received at 19956-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Vesa-Matti J Kari <vmkari <at> cc.helsinki.fi>, 
 19956-done <at> debbugs.gnu.org
Subject: Re: bug#19956: Solved (Re: df fails to show all mounted file systems)
Date: Sun, 01 Mar 2015 12:39:05 +0000
On 26/02/15 15:41, Vesa-Matti J Kari wrote:
> 
> Hello,
> 
> On Thu, 26 Feb 2015, Vesa-Matti J Kari wrote:
> 
>> [...] starting from coreutils-8.21 (i.e. the bug exist in 8.22 and 8.23
>> too), lots of NFS mounts are missing:
>>
>> vmkari <at> cedi:/var/tmp/vmk$ coreutils-8.21/src/df
>> Filesystem                1K-blocks       Used Available Use% Mounted on
>> /dev/mapper/rvg-root        5134336    4334584    799752  85% /
>> devtmpfs                    8118888          0   8118888   0% /dev
>> tmpfs                       8128372          0   8128372   0% /dev/shm
>> tmpfs                       8128372      18860   8109512   1% /run
>> tmpfs                       8128372          0   8128372   0% /sys/fs/cgroup
>> /dev/sda1                    520876     190144    330732  37% /boot
>> machine-1:/ua/group      1459291104 1113208544 271954816  81% /h/group
>> machine-1:/b/scratch      101721248   75860064  20618816  79% /b/scratch
>> machine-1:/h/a           1001028384  746104672 204068672  79% /h/a
>> machine-1:/usr/local/yht  113402880   78201856  29433856  73% /usr/local/yht
>> machine-1:/q/q            113402528   78201952  29433536  73% /q/q
>> machine-2:/var/spool/mail    230608384   83144160 135929888  38% /var/spool/mail
>>
>> The contents /etc/mtab are correct and "mount" command also works
>> correctly. Could you look into this issue please?
> 
> Wow. I just spent about three hours investigating and came up with this
> little patch for coreutils-8.20:
> 
> ----------- sample starts -------------------------------
> 
> --- coreutils-8.21/src/df.c	2013-02-05 01:40:31.000000000 +0200
> +++ coreutils-8.21-patched/src/df.c	2015-02-26 17:02:41.849872767 +0200
> @@ -624,8 +624,8 @@ filter_mount_list (void)
>          }
>        else
>          {
> -          /* If the device name is a real path name ...  */
> -          if (strchr (me->me_devname, '/'))
> +          /* If the device name is a real path name and not an NFS-mount ...  */
> +          if (strchr (me->me_devname, '/') && !strchr (me->me_devname, ':'))
>              {
>                /* ... try to find its device number in the devlist.  */
>                for (devlist = devlist_head; devlist; devlist = devlist->next)
> 
> ----------- sample ends ------------------------------
> 
> And all in vain because the 'df' utility in the latest coreutils git-repo
> already works correctly. :-)
> 
> So sorry for the noise.
> 
> Do you have plans to release coreutils-8.24 soon? The
> coreutils-8.22.11.el7 on Red Hat Enterprise Linux 7 / CentOS 7 is
> currently broken.

EL7 would get that backport independently of a new release.
That's now tracked at https://bugzilla.redhat.com/1197463

thanks,
Pádraig.





Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sun, 01 Mar 2015 12:40:03 GMT) Full text and rfc822 format available.

Notification sent to Vesa-Matti J Kari <vmkari <at> cc.helsinki.fi>:
bug acknowledged by developer. (Sun, 01 Mar 2015 12:40:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 30 Mar 2015 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 84 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.