this issue is found on 3.2.3qa1 root@Centos1 dir2]# gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- /dir1 10MB 11.1MB /dir2 10MB 15.1MB [root@Centos1 dir2]# pwd /mnt/glusterfs-test/dir2 [root@Centos1 dir2]# mount | grep glusterfs glusterfs#10.1.12.135:/dist-rep on /mnt/glusterfs-test type fuse (rw,allow_other,default_permissions,max_read=131072) [root@Centos1 dir2]# gluster volume info dist-rep Volume Name: dist-rep Type: Distributed-Replicate Status: Started Number of Bricks: 2 x 2 = 4 Transport-type: tcp Bricks: Brick1: 10.1.12.134:/export/d1 Brick2: 10.1.12.135:/export/r1 Brick3: 10.1.12.134:/export/d2 Brick4: 10.1.12.135:/export/r2 Options Reconfigured: features.limit-usage: /dir1:10MB,/dir2:10MB features.quota: on [root@Centos1 dir2]# glusterfs -V glusterfs 3.2.3qa1 built on Aug 8 2011 08:33:31 Repository revision: git://git.gluster.com/glusterfs.git Copyright (c) 2006-2010 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.
CHANGE: http://review.gluster.com/304 (without which, quota would get confused about the total size) merged in master by Vijay Bellur (vijay)
*** Bug 3165 has been marked as a duplicate of this bug. ***
[root@Centos3 dir1]# ls f.1 f.10 f.2 f.3 f.4 f.5 f.6 f.7 f.8 f.9 [root@Centos3 dir1]# [root@Centos3 dir1]# [root@Centos3 dir1]# gluster volume quota test list path limit_set size ---------------------------------------------------------------------------------- / 1GB 10.1MB /dir1 10MB 10.0MB /dir2 10MB 0Bytes [root@Centos3 dir1]# gluster volume quota test remove / Removed quota limit on / [root@Centos3 dir1]# gluster volume quota test list path limit_set size ---------------------------------------------------------------------------------- /dir1 10MB 10.0MB /dir2 10MB 0Bytes [root@Centos3 dir2]# gluster volume quota test list path limit_set size ---------------------------------------------------------------------------------- /dir1 10MB 10.0MB /dir2 10MB 10.0MB [root@Centos3 dir2]# glusterfs -V glusterfs 3.3.0qa12 built on Sep 28 2011 02:58: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. [root@Centos3 dir2]#
finding similar kind of problem on 3.2.5qa2, concern is that the data is moved from one directory to other directory over nfs mount. Note:- just before this test I had tried replace-brick test, though quota calculation was correct after that test. [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 960.0KB [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 1.0MB [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 1.0MB [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 832.0KB [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 832.0KB [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep limit-usage /d1/d3 1MB limit set on /d1/d3 [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep limit-usage /d1/d4 1MB limit set on /d1/d4 root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 832.0KB /d1/d3 1MB 192.0KB /d1/d4 1MB 0Bytes [root@RHEL6 ~]# /opt/glusterfs/3.2.5qa2//sbin/gluster volume quota dist-rep list path limit_set size ---------------------------------------------------------------------------------- / 2MB 1.2MB /d1/d3 1MB 192.0KB /d1/d4 1MB 384.0KB
This seems to work for me in 3.3.1-8.fc18
as per comment #5, and also, please test quota in scale of GBs and keep ~1-3% offset for errors considering its distributed quota implementation, and is hard to achieve.