Bug 876461 - quota: max limits getting crossed for directories
Summary: quota: max limits getting crossed for directories
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterd
Version: 2.0
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: ---
: ---
Assignee: vpshastry
QA Contact: Saurabh
URL:
Whiteboard:
Depends On:
Blocks: 956494 969461
TreeView+ depends on / blocked
 
Reported: 2012-11-14 08:25 UTC by Saurabh
Modified: 2016-01-19 06:11 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.4.0.34rhs
Doc Type: Bug Fix
Doc Text:
Previously, we were unable to map the path to the inode when the operations were done through NFS protocol. Now, an enhacement has been added to Quota and we are able to get the correct mapping between inode and the path which solves the problem of quota limit enforcement on top of an NFS mount.
Clone Of:
Environment:
Last Closed: 2013-11-27 15:22:58 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1769 0 normal SHIPPED_LIVE Red Hat Storage 2.1 enhancement and bug fix update #1 2013-11-27 20:17:39 UTC

Description Saurabh 2012-11-14 08:25:27 UTC
Description of problem:

root of the volume does not have any quota limit set.
the limit is set on the directories,
the volume is mounted over nfs to different client
the quota limits gets crossed easily, this problem was not seen in the recent times.

Version-Release number of selected component (if applicable):
[root@172 ~]# glusterfs -V
glusterfs 3.3.0.5rhs built on Nov  8 2012 22:30:35
Repository revision: git://git.gluster.com/glusterfs.git
Copyright (c) 2006-2011 Gluster Inc. <http://www.gluster.com>
GlusterFS comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of GlusterFS under the terms of the GNU General Public License.


How reproducible:
always

Steps to Reproduce:
1. create a volume of type distribute-replicate volume 2x2 type
2. mount over nfs
3. quota enable
4. create dirs mkdir /dir/dir1/dir2
5. set quota limits as /dir=10GB /dir/dir1=5GB /dir/dir1/dir2=5GB
6. start creating data inside dir2.
  
Actual results:
the data creation is even going beyond 10GB.

Expected results:
the policy limits of dir2 should be followed.

Additional info:



[root@172 ~]# gluster volume info vol
 
Volume Name: vol
Type: Distributed-Replicate
Volume ID: 7b390d02-9b79-400f-a7b7-bc52413955c5
Status: Started
Number of Bricks: 2 x 2 = 4
Transport-type: tcp
Bricks:
Brick1: 172.17.251.90:/export/vol-dr
Brick2: 172.17.251.91:/export/vol-drr
Brick3: 172.17.251.92:/export/vol-ddr
Brick4: 172.17.251.93:/export/vol-ddrr
[root@172 ~]# gluster volume quota vol enable
Enabling quota has been successful
[root@172 ~]# gluster volume quota vol limit-usage /dir 10GB
limit set on /dir
[root@172 ~]# gluster volume quota vol limit-usage /dir/dir1 5GB
limit set on /dir/dir1
[root@172 ~]# gluster volume quota vol limit-usage /dir/dir1/dir2 5GB
limit set on /dir/dir1/dir2
[root@172 ~]# gluster volume quota vol list
	path		  limit_set	     size
----------------------------------------------------------------------------------
/dir                       10GB                9.7GB
/dir/dir1                   5GB                9.7GB
/dir/dir1/dir2              5GB                9.7GB
[root@172 ~]# gluster volume quota vol list
	path		  limit_set	     size
----------------------------------------------------------------------------------
/dir                       10GB               10.0GB
/dir/dir1                   5GB               10.0GB
/dir/dir1/dir2              5GB               10.0GB

Comment 2 Amar Tumballi 2012-11-14 08:57:26 UTC
Varun, check if its the same issue i mentioned about handling 'readdirp_cbk' in quota similar to lookup_cbk. also i suspect this bug to be more like not handling mkdir_cbk. Anyways, have a look.

Comment 6 errata-xmlrpc 2013-11-27 15:22:58 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1769.html


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