emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#17833: closed (coreutils 8.22 df)


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#17833: closed (coreutils 8.22 df)
Date: Thu, 10 Jul 2014 23:29:01 +0000

Your message dated Fri, 11 Jul 2014 00:28:34 +0100
with message-id <address@hidden>
and subject line Re: bug#17833: coreutils 8.22 df
has caused the debbugs.gnu.org bug report #17833,
regarding coreutils 8.22 df
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
17833: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17833
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: coreutils 8.22 df Date: Sun, 22 Jun 2014 10:41:29 +0200 User-agent: Gnus/5.130007 (Ma Gnus v0.7)
lo lo,

seems like I discovered a problem in 8.22's df util:

$ cat /etc/fstab 
/dev/md0 / ext3 defaults,errors=remount-ro 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sdb2 swap swap defaults 0 0
/dev/md1 /var/archive ext3 defaults,errors=remount-ro 0 1
/dev/sr0 /mnt/cdrom iso9660 defaults,noauto 0 0

proc /proc proc defaults 0 0
none /proc/bus/usb usbfs defaults 0 0

$ cat /etc/mtab 
/dev/md0 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
tmpfs /dev tmpfs rw,relatime,size=4k,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=620 0 0
/dev/md1 /var/archive ext3 rw,errors=remount-ro 0 1
/var/archive/home /home none rw,bind 0 0
/var/archive/spool /var/spool none rw,bind 0 0
/var/archive/www /var/lib/www none rw,bind 0 0

$ df-8.22 -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md0         21G  8.8G   11G  46% /
tmpfs           4.0K     0  4.0K   0% /dev

And where is /dev/md1 ?

running df from coreutils 8.21 shows different result:

$ df-8.21 -h
Filesystem         Size  Used Avail Use% Mounted on
/dev/md0            21G  8.8G   11G  46% /
tmpfs              4.0K     0  4.0K   0% /dev
/var/archive/home  273G  244G   29G  90% /home

Still weird.

Trying with 8.20:

$ df-8.20 -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/md0         21G  8.8G   11G  46% /
tmpfs           4.0K     0  4.0K   0% /dev
/dev/md1        273G  244G   29G  90% /var/archive

Now ok.



--- End Message ---
--- Begin Message --- Subject: Re: bug#17833: coreutils 8.22 df Date: Fri, 11 Jul 2014 00:28:34 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2
On 07/08/2014 06:28 PM, Pádraig Brady wrote:
> On 06/25/2014 01:24 PM, Gabor Z. Papp wrote:
>> * Pádraig Brady <address@hidden>:
>>
>> | > $ cat /etc/mtab 
>> | > /dev/md0 / ext3 rw,errors=remount-ro 0 0
>> | > proc /proc proc rw,relatime 0 0
>> | > sysfs /sys sysfs rw,relatime 0 0
>> | > tmpfs /dev tmpfs rw,relatime,size=4k,mode=755 0 0
>> | > devpts /dev/pts devpts rw,relatime,mode=620 0 0
>> | > /dev/md1 /var/archive ext3 rw,errors=remount-ro 0 1
>> | > /var/archive/home /home none rw,bind 0 0
>> | > /var/archive/spool /var/spool none rw,bind 0 0
>> | > /var/archive/www /var/lib/www none rw,bind 0 0
>>
>> | Is this mtab really a link to /proc/mounts?
>>
>> No, its a standalone file.
>>
>> | That's the normal case on modern Linux distros.
>>
>> Its not a modern linux. :-)
>>
>> | > $ df-8.22 -h
>> | > Filesystem      Size  Used Avail Use% Mounted on
>> | > /dev/md0         21G  8.8G   11G  46% /
>> | > tmpfs           4.0K     0  4.0K   0% /dev
>> | > 
>> | > And where is /dev/md1 ?
>>
>> | Not sure what's going on here.
>> | Since you've compiled various versions,
>> | could you replace src/df.c in your 8.22 build dir with:
>> | 
>> http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=blob_plain;f=src/df.c;hb=HEAD
>> | There have been many df changes since 8.22, so it would
>> | be good to check with the latest.
>>
>> $ /tmp/df-git -h
>> Filesystem      Size  Used Avail Use% Mounted on
>> /dev/md0         21G  9.0G   11G  47% /
>> tmpfs           4.0K     0  4.0K   0% /dev
>>
>> Same problem, /dev/md1 missing.
> 
> The missing entry is due to the bind mounts being classified as "dummy" 
> devices.
> There is code in gnulib to explicitly avoid that for bind mounts,
> however that was negated with this change:
> http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=62bb7a8b
> Now that change is correct in isolation, but when combined
> with the incomplete original change, it triggered the issue.
> The attached patch should fix this up.
> 
>>
>> | > running df from coreutils 8.21 shows different result:
>> | > 
>> | > $ df-8.21 -h
>> | > Filesystem         Size  Used Avail Use% Mounted on
>> | > /dev/md0            21G  8.8G   11G  46% /
>> | > tmpfs              4.0K     0  4.0K   0% /dev
>> | > /var/archive/home  273G  244G   29G  90% /home
>> | > 
>> | > Still weird.
>>
>> | As part of the device de-duplication logic we used in 8.21
>> | we're favoring '/home' since it's shorter than '/var/archive'
>> | and thus we're using the '/var/archive/home' "device".
>>
>> | > Trying with 8.20:
>> | > 
>> | > $ df-8.20 -h
>> | > Filesystem      Size  Used Avail Use% Mounted on
>> | > /dev/md0         21G  8.8G   11G  46% /
>> | > tmpfs           4.0K     0  4.0K   0% /dev
>> | > /dev/md1        273G  244G   29G  90% /var/archive
>>
>> | I agree that this is the best output for your case.
>>
>> Right.
>>
>> | I suppose we could stat the sources in the de-duplication logic
>> | to favor real devices. I.E. stat '/var/archive/home' and '/dev/md1'
>> | in your case to favor the latter.
> 
> That's something we could still do in addition in coreutils.

The attached should handle this by giving precedence
to displaying real device nodes.

thanks,
Pádraig.

Attachment: df-real-devices.patch
Description: Text Data


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]