Bug 126657

Summary: df wrong output terabyte
Product: Red Hat Enterprise Linux 3 Reporter: Helmut Pedit <helmut.pedit>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED ERRATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: craig, fabud, macfisherman, petrides, secroft, tao, tony.davalos, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-09-02 04:31:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Description Flags
Output of 'strace df'
strace output
strace output none

Description Helmut Pedit 2004-06-24 12:41:16 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6)
Gecko/20040403 Firefox/0.8

Description of problem:
Using df for a 2700 MB filesystem mounted via nfs from an Origin 3800
produces the following output:

'df /mnt/o3800'

Filesystem               1K-blocks   Used                 Available 
xxx.yyy.zzz:/abc/scratch 688521216   -9223372035711720784 1831576240

Use%  Mounted on
101% /mnt/o3800

The correct values should be

xxx.yyy.zzz:/abc/scratch 2836004864  1004428624           1831576240  

36%  /mnt/o3800

You see only the "available" value is correct but the others are not.
This result is observed on 12 RHEL WS 3U2 ...

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.typing df
2.typing df

Additional info:

Comment 1 Tim Waugh 2004-06-28 10:03:59 UTC
What does 'strace df' show?

Comment 2 Helmut Pedit 2004-06-28 10:12:46 UTC
Created attachment 101462 [details]
Output of 'strace df'

Comment 3 Tim Waugh 2004-06-28 10:20:17 UTC
statfs("/mnt/o3800", {f_type="NFS_SUPER_MAGIC", f_bsize=512,
f_blocks=1377042432, f_bfree=3593933544, f_bavail=3593933544,
f_files=2836135936, f_ffree=2835991803, f_fsid={0, 0}, f_namelen=255,
f_frsize=0}) = 0

Converting 1377042432x(512-byte blocks) to 1024-byte blocks gives the
number that df shows.

The f_bfree and f_bavail numbers don't make sense in the context of
this size -- they are coming from the kernel, so I'm changing the

Comment 4 Tim Waugh 2004-07-26 12:28:46 UTC
*** Bug 128418 has been marked as a duplicate of this bug. ***

Comment 5 Franklin Abud 2004-07-28 04:38:58 UTC
I got a customer who's having the same issue. 

NFS server = Solaris
client = RHEL 3 WS
NFS server size is approx.= 2TB.

Output of df -k:
Filesystem           Size           Used Avail      Use% Mounted on
sgi:/bigbugger       137617408      8736 137608672   1% /large

Comment 6 craig cooksey 2004-07-28 18:06:42 UTC
Created attachment 102257 [details]
strace output

Comment 7 craig cooksey 2004-07-28 18:06:53 UTC
Created attachment 102258 [details]
strace output

Comment 8 craig cooksey 2004-07-28 20:18:52 UTC
Note that this works Ok with RH 9.0 and Fedora 2.

Comment 9 Chris 2004-07-29 14:49:22 UTC
I also have a customer with what appears to be the same issue.  

Comment 10 Neil Horman 2004-08-04 13:03:24 UTC
I think this is fixed with the current RHEL3 U3 beta

*** This bug has been marked as a duplicate of 121475 ***

Comment 11 John Flanagan 2004-09-02 04:31:50 UTC
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.


Comment 12 Jeff Macdonald 2004-12-15 16:00:44 UTC
This seems to have come back, as I see this with 2.4.21-20.0.1.ELsmp:

$ df -h /mm
Filesystem            Size  Used Avail Use% Mounted on
ip4700-spa:/A0           1     1     1   0% /mm

I should see
$ df -h /mm
Filesystem            Size  Used Avail Use% Mounted on
ip4700-spa:/A0        1.2T  251G 1007G  20% /mm

How do I reopen this bug?

Comment 13 Ernie Petrides 2004-12-15 23:27:40 UTC
Hi, Jeff.  In U3, the kernel was fixed to return an overflow indicator
(I thought it was -1) in statfs() data.  In U4, we added support for
64-bit statfs64() functionality.  This bug tracks the former issue, and
bug 116428 (which is actually a FeatureZilla) tracks the latter issue.

Please wait until U4 is released (next week) to verify that things are
now adequately addressed.  Note that the U4 version of "df" and "glibc"
will also need to be upgraded (along with the kernel) in order for
everything to work.

If U4 doesn't address your issue, please open a new bugzilla against U4.

Thanks in advance.  -ernie