Bug 1138728

Summary: quota: quota-deem-statfs on and the subdirectory stats displayed for "df -h" that are of parent directory, even though subdir has its own limit set
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Saurabh <saujain>
Component: quotaAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED NOTABUG QA Contact: Saurabh <saujain>
Severity: urgent Docs Contact:
Priority: high    
Version: rhgs-3.0CC: kparthas, mzywusko, nsathyan, rhs-bugs, saujain, smohan, ssamanta, storage-qa-internal, vbellur, vmallika
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-13 09:16:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Saurabh 2014-09-05 13:56:14 UTC
Description of problem:
If a subdirectory is having quota limit set as well as it's parent directory has quota limit set and given the condition that quota-deem-statfs is on then "df -h <path to dir/subdir>"
displays the result as per limits set for that dir/subdir.

Whereas this time stats displayed are only for the parent even if one executes "df -h <path to subdir>"



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

How reproducible:
happen to be seen on build

Steps to Reproduce:
1. create a volume of 6x2 type, start it
2. enable quota limit on the volume
3. mount the volume over nfs
4. create a directory inside the mount-point, namely "dir1"
5. set different quota limit for "/" and "dir1"
6. df -h <mount-point> --- works as expected
7. df -h <mount-point/dir1> --- does not work as expected

Actual results:
[root@nfs1 ~]# gluster volume quota dist-rep list
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/                                         20.0GB       80%      18.7GB   1.3GB             Yes                   No
/dir1                                      5.0GB       80%       5.0GB  0Bytes             Yes                  Yes

step6 result,
[root@rhsauto002 dir3]# df -h /mnt/nfs-test
Filesystem             Size  Used Avail Use% Mounted on
10.70.37.156:dist-rep   20G   19G  1.3G  94% /mnt/nfs-test

step7, result

[root@rhsauto002 dir3]# df -h /mnt/nfs-test/dir1
Filesystem             Size  Used Avail Use% Mounted on
10.70.37.156:dist-rep   20G   19G  1.3G  94% /mnt/nfs-test


Expected results:
step 7 should display "Size" field as 5GB and "Used" field as 5GB

Additional info:


Results from build 27(previous one),

[root@rhsauto032 ~]# gluster volume quota dist-rep list 
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/dir1                                     41.0GB       80%      41.0GB  0Bytes             Yes                  Yes
/dir1/dir2/dir3                           45.0GB       80%    1018.3MB  44.0GB              No                   No
/                                        100.0GB       80%      41.0GB  59.0GB              No                   No


[root@rhsauto032 ~]# gluster volume quota dist-rep list 
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/dir1                                     41.0GB       80%      41.0GB  0Bytes             Yes                  Yes
/dir1/dir2/dir3                           45.0GB       80%    1018.3MB  44.0GB              No                   No
/                                        100.0GB       80%      41.0GB  59.0GB              No                   No
[root@rhsauto032 ~]# df -h /var/run/gluster/dist-rep/
Filesystem          Size  Used Avail Use% Mounted on
localhost:dist-rep  100G   42G   59G  42% /var/run/gluster/dist-rep
[root@rhsauto032 ~]# df -h /var/run/gluster/dist-rep/dir1
Filesystem          Size  Used Avail Use% Mounted on
localhost:dist-rep   41G   41G     0 100% /var/run/gluster/dist-rep
[root@rhsauto032 ~]# df -h /var/run/gluster/dist-rep/dir1/dir2/dir3
Filesystem          Size  Used Avail Use% Mounted on
localhost:dist-rep   45G 1019M   45G   3% /var/run/gluster/dist-rep

Hence, things don't match from build 27 to build 28 itself.

Comment 3 krishnan parthasarathi 2014-09-15 07:14:45 UTC
Saurabh,

Could you attach the brick and mount process log files when you faced this issue?

Comment 4 Saurabh 2014-09-15 11:03:55 UTC
Since, this issue was straightforward to reproduce, hence I didn't collect these logs and now I have created new VMs using the new iso.

Comment 10 Red Hat Bugzilla 2023-09-14 02:47:03 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days