Bug 1115197 - Directory quota does not apply on it's sub-directories
Summary: Directory quota does not apply on it's sub-directories
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: quota
Version: 3.5.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Vijaikumar Mallikarjuna
QA Contact:
URL:
Whiteboard:
Depends On: 1080296
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-01 20:41 UTC by Peter Auyeung
Modified: 2016-05-11 22:47 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.5.4
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-06-03 21:08:09 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Peter Auyeung 2014-07-01 20:41:49 UTC
Description of problem:

On gluster 3.5.1:
gluster volume quota vol1 limit-usage /dir1 10GB
vol1 has 15TB
On NFS Client:
mount gluster:/dir1 /dir1
df -h /dir1 10GB
df -h /dir1/subdir 15TB

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

How reproducible:


Steps to Reproduce:
1. create volume
2. create directory
3. apply quota on directory

4. mount NFS export on a client

Actual results:

df -h /dir1/subdir 15TB

Expected results:

df -h /dir1/subdir 10GB

Additional info:

Comment 1 Vijaikumar Mallikarjuna 2015-01-22 08:40:26 UTC
Hi Peter,

This issue is fixed in glusterfs-3.6.1. Can you please try your test-case in 3.6.1 or above?

Comment 2 Peter Auyeung 2015-01-22 20:47:29 UTC
Thanks!

I will try it out on our QA gluster once it's ready.

But meanwhile we are not prepared to upgrade our prod to 3.6.1....

Would that be possible to patch 3.5 ?

Thanks
Peter

Comment 3 Anand Avati 2015-01-30 06:43:17 UTC
REVIEW: http://review.gluster.org/9510 (features/quota: Send the immediate parent with limit in quota statfs adjustment) posted (#1) for review on release-3.5 by Vijaikumar Mallikarjuna (vmallika)

Comment 4 Anand Avati 2015-02-23 12:56:56 UTC
COMMIT: http://review.gluster.org/9510 committed in release-3.5 by Niels de Vos (ndevos) 
------
commit 6518a79634ba505ed06e930907ebf956f8784b7d
Author: vmallika <vmallika>
Date:   Fri Jan 30 12:10:38 2015 +0530

    features/quota: Send the immediate parent with limit in quota statfs
    adjustment
    
    This is a backport of http://review.gluster.org/#/c/7330
    
    > Problem:
    > Assume the directory structure /quota_limit_dir/subdir and
    > quota_limit_dir is
    > set with some limit. When quota-deem-statfs is enabled the output of
    > 'df /quota_limit_dir' would display quota modified values wrt to
    > quota_limit_dir where as 'df /quota_limit_subdir/subdir' would display
    > the quota modified values wrt volume root (/).
    >
    > This behaviour is not expected since, when mounted with subdirectory
    > admin doesn't want users to know information above the subdirectory mounted.
    >
    > Solution:
    > Any subdirectory within a quota_limit_dir would show the modified values
    > as in the /quota_limit_dir. It searches for the nearest parent that has quota
    > limit set and modifies the statvfs wrt that.
    >
    > Change-Id: Ie10fae8999bddbb766b1dbeb881723ed80dce688
    > BUG: 1080296
    > Signed-off-by: Varun Shastry <vshastry>
    > Reviewed-on: http://review.gluster.org/7330
    > Reviewed-by: Raghavendra G <rgowdapp>
    > Tested-by: Raghavendra G <rgowdapp>
    
    Change-Id: I5232a82da20d3dfd48303ba2748b86cfc96ff864
    BUG: 1115197
    Signed-off-by: vmallika <vmallika>
    Reviewed-on: http://review.gluster.org/9510
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Niels de Vos <ndevos>

Comment 5 Niels de Vos 2015-06-03 21:08: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.5.4, please reopen this bug report.

glusterfs-3.5.4 has been announced on the Gluster Packaging mailinglist [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.packaging/2
[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.