Bug 1080296 - The child directory created within parent directory ( on which the quota is set ) shows the entire volume size, when checked with "df" command.
Summary: The child directory created within parent directory ( on which the quota is s...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: quota
Version: mainline
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Nagaprasad Sathyanarayana
QA Contact:
URL:
Whiteboard:
Depends On: 1080245 1171896
Blocks: 1115197
TreeView+ depends on / blocked
 
Reported: 2014-03-25 06:09 UTC by vpshastry
Modified: 2016-02-18 00:20 UTC (History)
8 users (show)

Fixed In Version: glusterfs-3.6.0beta1
Clone Of: 1080245
Environment:
Last Closed: 2014-11-11 08:29:10 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description vpshastry 2014-03-25 06:09:05 UTC
+++ This bug was initially created as a clone of Bug #1080245 +++

Description of problem:
The child directory created within parent directory ( on which the quota is set ) shows the entire volume size, when checked with "df" command.

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


How reproducible:Always


Steps to Reproduce:
1.Configure 2x2 volume
2.Enable quota and set deem-statfs to on
3.Set Limit usage to 200MB and soft limit to 80 or 90% on say /test directory
4.Mount the volume on a client, Create subdirectory under /test and run df command to the subdirectory

Actual results:

# gluster volume quota test_data list
                  Path                   Hard-limit Soft-limit Used  Available
--------------------------------------------------------------------------------
/test                                    200.0MB       90% 0Bytes 200.0MB      <----------------quota set on /test 200MB

# df -h /quota_test/test/
Filesystem                Size  Used Avail Use% Mounted on
10.65.211.178:/test_data  200M     0  200M   0% /quota_test      <---------------correct info for /test , 200MB

[root@dhcp210-101 /]# df -h /quota_test/test/test123
Filesystem                Size  Used Avail Use% Mounted on
10.65.211.178:/test_data  896M   33M  863M   4% /quota_test  <-------------------- Incorrect information for a child directory inside /test/test123 , it is showing 863M , that is the size of entire volume. 



Expected results:

df -h /quota_test/test/
Filesystem                Size  Used Avail Use% Mounted on
10.65.211.178:/test_data  200M     0  200M   0% /quota_test 

# df -h /quota_test/test/test123
Filesystem                Size  Used Avail Use% Mounted on
10.65.211.178:/test_data  200M     0  200M   0% /quota_test 

Additional info:
In the commit message of the quota patch. (Commit ID on upstream master ab3ab1978a4768e9eed8e23b47e72b25046e607a)

"If limit is set on the directory passed, use size/limits on that directory to populate statvfs. Otherwise, use size/limits configured on root."

But customer needs this logic to be changed, where anything under the directory where quota is set also returns quota limit via statvfs.

--- Additional comment from Riyas Abdulrasak on 2014-03-24 22:56:49 EDT ---

I am in touch with Varun Shastry, It seems he has the patch ready.

Comment 1 Anand Avati 2014-03-25 06:11:17 UTC
REVIEW: http://review.gluster.org/7330 (features/quota: Send the immediate parent with limit in quota statfs adjustment) posted (#1) for review on master by Varun Shastry (vshastry)

Comment 2 Anand Avati 2014-05-20 11:38:45 UTC
REVIEW: http://review.gluster.org/7330 (features/quota: Send the immediate parent with limit in quota statfs adjustment) posted (#2) for review on master by Varun Shastry (vshastry)

Comment 3 Anand Avati 2014-05-22 11:45:45 UTC
REVIEW: http://review.gluster.org/7330 (features/quota: Send the immediate parent with limit in quota statfs adjustment) posted (#3) for review on master by Varun Shastry (vshastry)

Comment 4 Anand Avati 2014-05-22 15:50:54 UTC
COMMIT: http://review.gluster.org/7330 committed in master by Raghavendra G (rgowdapp) 
------
commit e9a1a7135b9927fbdefd2921b38e10bdbb694b97
Author: Varun Shastry <vshastry>
Date:   Sun Mar 23 13:28:36 2014 +0530

    features/quota: Send the immediate parent with limit in quota statfs adjustment
    
    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>

Comment 8 Niels de Vos 2014-09-22 12:37:12 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 9 Niels de Vos 2014-11-11 08:29:10 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.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [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://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users


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