Bug 1024355 - quota: addition of all the quota consumption in directories does not aggregate the correct value upto the root of the volume
quota: addition of all the quota consumption in directories does not aggregat...
Status: CLOSED NOTABUG
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterd (Show other bugs)
2.1
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Bug Updates Notification Mailing List
Sudhir D
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-29 09:52 EDT by Saurabh
Modified: 2016-01-19 01:13 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-06 06:50:17 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)
xattrsOfDir (14.54 KB, text/plain)
2013-10-29 10:25 EDT, Saurabh
no flags Details

  None (edit)
Description Saurabh 2013-10-29 09:52:49 EDT
Description of problem:

Volume quota consumption information does not match the addition of the quota consumption of the underlying directories.

Here I mean to if a volume set with some quota limits and directories underneath also having quota limit set. After creating data in these directories the "gluster volume quota $volname list" command displays the quota space "used" by the root of the volume is less than the addition of the quota space "used" by the all the directories.

as can be seen over here,

[root@quota3 ~]# gluster volume quota dist-rep3 list
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                         40.0GB       80%      14.4GB  25.6GB
/qa1                                      12.0GB       80%       9.0GB   3.0GB
/qa1/dir1-renm                             2.0GB       80%       2.0GB  0Bytes
/qa1/dir2-data                             2.0GB       80%       1.5GB 524.1MB
/qa1/dir3-data                             1.0GB       80%       1.5GB  0Bytes
/block-char-dir                            1.0GB       80%      0Bytes   1.0GB
/sparse-file-dir                           1.0GB       80%     264.0KB 1023.7MB
/qa1/dir4-data                             2.0GB       80%    512Bytes   2.0GB
/qa2                                       9.0GB       80%      0Bytes   9.0GB
/qa3                                       1.0GB       80%      0Bytes   1.0GB
/qa7                                       1.0GB       80%       2.4GB  0Bytes


Here in this, directory quota space used is, 9+2+1.5*2+2.4=16.4GB (add 264KB+512bytes) also to it, 
where as the root of the volume displays 14.4GB

Similar kind of behaviour is seen on an other cluster,

[root@quota5 ~]# gluster volume quota dist-rep list
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                          2.9TB       80%       1.6TB   1.3TB
/qa1                                     512.0GB       80%     512.0GB  29.0MB
/qa2                                     512.0GB       80%     512.0GB  0Bytes
/qa3                                     100.0GB       80%     100.0GB  0Bytes
/qa4                                     100.0GB       80%     100.0GB  0Bytes
/qa1/dir1                                500.0GB       80%     412.0GB  88.0GB
/qa2/dir1                                500.0GB       80%     412.0GB  88.0GB
/qa5                                     500.0GB       80%     412.7GB  87.3GB

here directory quota space used:- 512*2+100*2+412*3 = 2465GB(or roundabout 2.4TB)

whereas the root of the volume shows 1.6TB

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

How reproducible:
already seen on two different clusters 


Actual results:
as mentioned in the descrition section

Expected results:
the aggregation of the directory space used and root of volume quota space used should be same.

Additional info:
Comment 2 Saurabh 2013-10-29 10:25:26 EDT
Created attachment 817102 [details]
xattrsOfDir
Comment 3 Saurabh 2013-11-01 01:18:32 EDT
Present result is this
[root@quota7 ~]# gluster volume quota dist-rep list
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                          2.9TB       80%       2.4TB 558.8GB
/qa1                                     512.0GB       80%     512.0GB  23.1MB
/qa2                                     512.0GB       80%     512.0GB  0Bytes
/qa3                                     100.0GB       80%     100.0GB  0Bytes
/qa4                                     100.0GB       80%     100.0GB  0Bytes
/qa1/dir1                                500.0GB       80%     412.0GB  88.0GB
/qa2/dir1                                500.0GB       80%     412.0GB  88.0GB
/qa5                                     500.0GB       80%     500.0GB  0Bytes
/qa6                                     500.0GB       80%     500.0GB  0Bytes
/qa7                                     500.0GB       80%     109.5GB 390.5GB
/qa8                                     800.0GB       80%      77.4GB 722.6GB

And the addition of Used field values of directories can be seen here,
(512*2) + (412*2) + (100*2) + (500*2) + 109.5 + 77.4 = 3234.9

whereas, the root of the volume still shows, 2.4TB

This, clearly shows we are crossing the limit, but not displaying it. Also, to add the I/O is still successfully going on.
Comment 4 Saurabh 2013-11-06 06:50:17 EST
closing this BZ, as I added subdirs and their separately.

[root@quota5 ~]# gluster volume quota dist-rep list
                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                          2.9TB       80%       2.7TB 215.6GB
/qa1                                     512.0GB       80%     512.0GB  26.5MB
/qa2                                     512.0GB       80%     512.0GB  0Bytes
/qa3                                     100.0GB       80%     100.0GB  0Bytes
/qa4                                     100.0GB       80%     100.0GB  0Bytes
/qa1/dir1                                500.0GB       80%     412.0GB  88.0GB
/qa2/dir1                                500.0GB       80%     412.0GB  88.0GB
/qa5                                     500.0GB       80%     500.0GB  0Bytes
/qa6                                     500.0GB       80%     500.0GB  0Bytes
/qa7                                     500.0GB       80%     295.8GB 204.2GB
/qa8                                     800.0GB       80%     234.1GB 565.9GB

as presently also the status of addition goes like this,
(512*2)+(100*2)+(500*2)+(295.8+234.1)=2753.9

and same is been displayed by the quota list command for root of the volume as value for "Used" field

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