Bug 1158008 - Quota utilization not correctly reported for dispersed volumes
Summary: Quota utilization not correctly reported for dispersed volumes
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: quota
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Xavi Hernandez
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1158088
TreeView+ depends on / blocked
 
Reported: 2014-10-28 09:27 UTC by Xavi Hernandez
Modified: 2015-05-14 17:44 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.7.0
Clone Of:
: 1158088 (view as bug list)
Environment:
Last Closed: 2015-05-14 17:28:09 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Xavi Hernandez 2014-10-28 09:27:58 UTC
Description of problem:

When quota is enabled on a dispersed volume, the real space usage is not correctly tracked. Quota reports less used space than it's really been used by the files stored on a directory.

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


How reproducible:

Always

Steps to Reproduce:
1. gluster volume create test disperse server{0..2}:/bricks/test
2. gluster volume start test
3. gluster volume quota test enable
4. gluster volume quota test limit-usage / 1GB
5. mount -t glusterfs server0:/test /gluster/test
6. dd if=/dev/zero of=/gluster/test/file bs=1024k count=512
7. gluster volume quota test list

Actual results:

It reports that there are 256MB used in '/'

Expected results:

It should say that there are 512 MB used if '/'

Additional info:

This is caused by an incorrect accounting of brick contents. Disperse volumes store smaller files on each brick, and only one of these files is used to track disk usage.

A workaround until this bug is solved is to assign a quota smaller than desired to compensate for the incorrect computation. The exact value must be computed this way:

N = Number of bricks of a disperse set
R = Redundancy
Q = Desired quota value
Q' = New quota value

Q' = Q / (N - R)

Then, instead of using:

    gluster volume quota <volname> limit-usage <path> Q

you should use:

    gluster volume quota <volname> limit-usage <path> Q'

When this bug is solved, all quota limits will need to be reverted back to the original value (Q).

Comment 1 Niels de Vos 2014-10-28 12:26:19 UTC
Marking this as a bug in quota, this should make it pop-up on the radar of the quota developers too.

The final fix may well be in ec-xlator, that is something Xavi can judge.

Comment 2 Anand Avati 2014-10-28 13:02:41 UTC
REVIEW: http://review.gluster.org/8990 (ec: Correctly handle quota size xattr) posted (#1) for review on master by Xavier Hernandez (xhernandez)

Comment 3 Anand Avati 2014-10-29 11:09:32 UTC
REVIEW: http://review.gluster.org/8990 (ec: Correctly handle quota size xattr) posted (#2) for review on master by Xavier Hernandez (xhernandez)

Comment 4 Anand Avati 2014-10-29 16:50:12 UTC
REVIEW: http://review.gluster.org/8990 (ec: Correctly handle quota xattrs) posted (#3) for review on master by Xavier Hernandez (xhernandez)

Comment 5 Anand Avati 2014-11-12 09:46:42 UTC
COMMIT: http://review.gluster.org/8990 committed in master by Vijay Bellur (vbellur) 
------
commit a5e5813aeec36dbbfaa3b9821618d24972a1bf2f
Author: Xavier Hernandez <xhernandez>
Date:   Tue Oct 28 14:00:29 2014 +0100

    ec: Correctly handle quota xattrs
    
    Change-Id: I35e11d83c318210d44b918e847cf13db35b01510
    BUG: 1158008
    Signed-off-by: Xavier Hernandez <xhernandez>
    Reviewed-on: http://review.gluster.org/8990
    Reviewed-by: Dan Lambright <dlambrig>
    Tested-by: Gluster Build System <jenkins.com>

Comment 6 Niels de Vos 2015-05-14 17:28:09 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 7 Niels de Vos 2015-05-14 17:35:40 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 8 Niels de Vos 2015-05-14 17:38:02 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 9 Niels de Vos 2015-05-14 17:44:20 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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