This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes

Bug 762753 (GLUSTER-1021)

Summary: NFS: df -h shows incorrect out put
Product: [Community] GlusterFS Reporter: Krishna Srinivas <krishna>
Component: nfsAssignee: Shehjar Tikoo <shehjart>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: low Docs Contact:
Priority: high    
Version: nfs-alphaCC: amarts, gluster-bugs, sgowda, shehjart
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: RTP Mount Type: nfs
Documentation: DNR CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description Krishna Srinivas 2010-06-23 17:19:06 EDT
[root@centosgluster1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       42G  3.2G   36G   9% /
/dev/sda1              99M   21M   74M  22% /boot
tmpfs                  12G     0   12G   0% /dev/shm
localhost:/nfs        9.4T -2.4P  2.4P   -  /mnt/nfs
[root@centosgluster1 ~]#

-ve value is shown for used space

here is the bug:
nfs3-helpers.c:nfs3_fill_fsstat3res()
...
        resok.fbytes = (size3)(fsbuf->f_bsize * fsbuf->f_bfree);
        resok.abytes = (size3)(fsbuf->f_bsize * fsbuf->f_bavail);
...

fsbuf->f_bsize is being used instead of fsbuf->f_frsize

after fixing it:
[root@centosgluster1 ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       42G  3.2G   36G   9% /
/dev/sda1              99M   21M   74M  22% /boot
tmpfs                  12G     0   12G   0% /dev/shm
localhost:/nfs        9.4T  102G  9.3T   2% /mnt/nfs
[root@centosgluster1 ~]#
Comment 1 Shehjar Tikoo 2010-07-04 01:46:19 EDT
PRoblem seen on lInux as nfs server and solaris as the brick.
Comment 2 Shehjar Tikoo 2010-08-10 00:13:41 EDT
*** Bug 1016 has been marked as a duplicate of this bug. ***
Comment 3 Amar Tumballi 2010-08-10 02:20:16 EDT
Is this a problem over fuse mount too? Is fix proposed by kris sufficient?
Comment 4 Shehjar Tikoo 2010-08-10 04:09:53 EDT
(In reply to comment #3)
> Is this a problem over fuse mount too? Is fix proposed by kris sufficient?

Err..wait. why is this assigned to you?

Not sure about the fix proposed by Kris yet. Havent reached the point of running validation tests with Solaris. That will happen next week. This wont occur over fuse, I think.
Comment 5 Amar Tumballi 2010-08-29 04:46:13 EDT
reducing the priority of bug as we are not working on solaris yet, and this is not the case over fuse mount or NFS on Linux..
Comment 6 Amar Tumballi 2010-11-08 22:36:34 EST
Shehjar, Not sure if its still valid. Check and close it..
Comment 7 Shehjar Tikoo 2010-11-08 22:40:21 EST
(In reply to comment #6)
> Shehjar, Not sure if its still valid. Check and close it..

yes. still valid. The info above does not mention but the bricks were solaris. Waiting for a requirement to arise for proper qualification of nfs for solaris.
Comment 8 Anand Avati 2010-11-15 23:45:58 EST
PATCH: http://patches.gluster.com/patch/5705 in master (Solaris: df -h returned invalid size)
Comment 9 Amar Tumballi 2011-02-14 23:54:04 EST
Internal enhancement, User need not be bothered