Bug 1017728 - quota: decimal digits not shown properly for "df -h"
quota: decimal digits not shown properly for "df -h"
Status: CLOSED NOTABUG
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: quota (Show other bugs)
2.1
x86_64 Linux
medium Severity high
: ---
: ---
Assigned To: Susant Kumar Palai
storage-qa-internal@redhat.com
:
Depends On:
Blocks: 1020127
  Show dependency treegraph
 
Reported: 2013-10-10 07:59 EDT by Saurabh
Modified: 2016-09-17 08:37 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Known Issue
Doc Text:
On setting the quota limit as a decimal digit and setting the deem-statfs on, a difference is noticed in the values displayed by the df -h command and gluster volume quota <volname> list command. In case of the gluster volume quota <volname> list command, the values do not get rounded off to the next integer.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-12 04:05:32 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Saurabh 2013-10-10 07:59:58 EDT
Description of problem:
I have set limit as a decimal digit, and deem-statfs is set to on.
now on "df -h" the result of limit set id rounded off and displayed.

where as this should not be the case

Version-Release number of selected component (if applicable):
glusterfs-3.4.0.34rhs-1.el6rhs.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a volume, start it
2. enable quota, set quota for 10.5 GB on "/"
gluster volume quota dist-rep1 list 
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                         10.5GB       80%       3.1GB   7.4GB
3. mount it over nfs on client.
4. df -h

Actual results:
df -h
======
10.70.42.186:/dist-rep1
                       11G  3.1G  7.5G  30% /mnt/nfs-test

similarly with other values,

[root@quota1 ~]# gluster volume quota dist-rep1 list 
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                         10.1GB       80%       3.1GB   7.0GB

df -h
======
10.70.42.186:/dist-rep1
                       11G  3.1G  7.1G  31% /mnt/nfs-test

Expected results:
the "Size" field of "df -h" should show values as set.

As in case of kernel nfs mount,
rhsqe-repo.lab.eng.blr.redhat.com:/opt
                      1.9T  105G  1.7T   6% /opt

it still displayes "1.9T" not a rounded off figure

Additional info:
Comment 2 Gowrishankar Rajaiyan 2013-10-17 06:25:13 EDT
Per bug triage 10/17.
Comment 3 Vivek Agarwal 2013-10-28 04:47:38 EDT
The quota command shows values which are more precise then df does and hence this should not be considered a bug. Yes it is different, but as far as it is not wrong (more correct in this case), we should be fine. 

Unless I have missed something, this should not be called a  bug at all, or I must be missing something
Comment 4 Saurabh 2013-10-28 07:38:59 EDT
This is an important bug, not sure whether we want to take it for "U1" or not.

The importance of this can be understood by the use case I mention below,

" A combination of quota-deem-statfs, quota is used for standard tools like df to represent the actual size allocated to a directory."

Now, a directory can be decimal digits as well, lets "1.5TB" or "2.5TB" 
Now, a non-root user(on some other node) will not be having access to a server to check the quota limit using "gluster volume quota $volname list" command.
He can only use df -h. 
Now with this bug, a non-root user(on some other node) will be having impression of having "3TB" in case of 2.5TB, which literally can mess up the things. 

In fact, "df -h" to show quota limits set is required is because of one of the reasons that I have mentioned above, i.e. nodes other then RHSS can check the quota limits. 

So giving a wrong information will not be a good idea.
Comment 5 Pavithra 2013-11-25 01:54:57 EST
I've documented this as a known issue in the Big Bend Update 1 Release Notes.
Here is the link:

http://documentation-devel.engineering.redhat.com/docs/en-US/Red_Hat_Storage/2.1/html/2.1_Update_1_Release_Notes/chap-Documentation-2.1_Update_1_Release_Notes-Known_Issues.html
Comment 6 Vijaikumar Mallikarjuna 2015-01-12 04:05:32 EST
The issue is not with the quota. This is with 'df application'.
To get the accurate value, run df command without '-h' option.

Closing as 'NOTABUG'

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