Bug 1032292 - Quota: Used field does not properly reflect how much space is being used.
Quota: Used field does not properly reflect how much space is being used.
Status: CLOSED NOTABUG
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: glusterfs (Show other bugs)
2.1
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Susant Kumar Palai
Sudhir D
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-19 17:51 EST by Ben Turner
Modified: 2013-12-30 08:25 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-30 08:25:22 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 Ben Turner 2013-11-19 17:51:11 EST
Description of problem:

If I set a quota on a subdirectory of a directory with a quota it is not being accounted for in the used field:

                  Path                   Hard-limit Soft-limit   Used  Available
--------------------------------------------------------------------------------
/                                         19.5GB       80%    1000.6MB  18.6GB
/1                                       200.0MB       80%     200.0MB  0Bytes
/1/11                                    100.0MB       80%     100.0MB  0Bytes
/2                                       200.0MB       80%     200.0MB  0Bytes
/2/22                                    100.0MB       80%     100.0MB  0Bytes
/3                                       200.0MB       80%     200.6MB  0Bytes
/3/33                                    100.0MB       80%     100.0MB  0Bytes
/4                                       200.0MB       80%     200.0MB  0Bytes
/4/44                                    100.0MB       80%     100.0MB  0Bytes
/5                                       200.0MB       80%     200.0MB  0Bytes
/5/55                                    100.0MB       80%     100.0MB  0Bytes

Based off the above I would expect to see ~1500MB in the used field, it is only showing 1000MB.  It looks like the 500MB from /$x/$x$x is not getting accounted for in the used calculation, but the limit is still being honored when the client tries to write to it.  The Available field looks to be correct though.

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

glusterfs-3.4.0.44-1.rhs

How reproducible:

I have only ran this test once, but I suspect it is reproducible.

Steps to Reproduce:
1.  Set a quota on a dir, for example /1
2.  Set a quota on a subdir of the dir from #1, for example /1/11
3.  Create data until the hard limit is hit in /1 and /11
4.  Run gluster volume quota list and compare the output from the used field to the amount of data written.

Actual results:

Used does not reflect the data in /$x/$x$x.

Expected results:

The used field should display the correct amount.

Additional info:
Comment 2 Susant Kumar Palai 2013-12-30 08:25:22 EST
Hi Ben,

The used value shown for a directory is sum of used of all subdirectories and files direct under it.

The data created under /1 dir can be max 200MB which is  (data of /1/11 + data of files directly under /1).

As there are directories 1 to 5 with each having a hard limit of 200MB the total disk consumption seen from root is 1000MB. The disk consumption of /$x/$x$x can not exceed the hardlimit of /$x. 

Hence, Closing this bug as it is the expected behaviour.

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