Bug 69210 - df shows wrong filesystem size for NFS volume > 2TB
df shows wrong filesystem size for NFS volume > 2TB
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Arjan van de Ven
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2002-07-18 20:27 EDT by Thomas Eriksson
Modified: 2007-04-18 12:44 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-06-07 14:56:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Thomas Eriksson 2002-07-18 20:27:09 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020613

Description of problem:
After upgrading to kernel-2.4.18-5 'df' displays wrong file system size if NFS
volume is larger than 2TB. Using 'strace' on 'df' demonstrates that statfs()
always reports the filesystem size in 512byte blocks, i.e 2TB = 2^32 blocks.
Using kernel-2.4.18-4 statfs() reports filesystem size in the same unit as the
'wsize' parameter in the mount command, most likely shifting the problem upwards
by some multiplier.

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

How reproducible:

Steps to Reproduce:
1.Running kernel 2.4.18-5 
2.mount -o rsize=8192,wsize=8192 server:/data /data
3.df /data


Actual Results:  
Filesystem           1k-blocks      Used Available Use% Mounted on
server:/data           45610944 -9223372036604093392 296293360 101% /data

Expected Results:  
With kernel 2.4.18-4...
Filesystem           1k-blocks      Used Available Use% Mounted on
server:/data          2193094592 1896801232 296293360  87% /data

Additional info:

The NFS server runs IRIX-6.5.16 and the result is the same whether the
filesystem is exported with the '32bitclients' option or not.

This is the full set of mount parameters.
server:/data on /data type nfs \

The following line is cut from the output of 'strace df' and will always 
remain the same regardless of rsize and wsize.

statfs("/data", {f_type="NFS_SUPER_MAGIC", f_bsize=512, f_blocks=91221888,
f_bfree=592586712, f_files=1186394032, f_ffree=1185957119, f_namelen=255}) = 0

Using NFSv2 the f_bsize is 4096 regardless of rsize and wsize.

Under kernel 2.4.18-4 the f_bsize will be the same as the wsize
parameter in the mount command. But trying to set it to 512 will
result in f_bsize=4096. 

Question: How do I know what blocksize really is used?, can I trust the mount
Comment 1 Arjan van de Ven 2003-06-07 14:56:15 EDT
support for > 2Tb filesystems has been added to the 2.5 kernel recently

Note You need to log in before you can comment on or make changes to this bug.