Description of problem: Disabling and enabling quota enforces stale limits Version-Release number of selected component (if applicable): [root@gqac023 mnt]# rpm -qa| grep gluste glusterfs-fuse-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-server-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-geo-replication-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-api-devel-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-rdma-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-debuginfo-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-libs-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-api-3.4.0.20rhsquota5-1.el6rhs.x86_64 glusterfs-devel-3.4.0.20rhsquota5-1.el6rhs.x86_64 How reproducible: Always Steps to Reproduce: 1.created a 2x2 distributed-replicate volume 2.enabled the quota and enforced it to 1GB limit 3.mounted the volume and created a 1GB file 4.Since we reached the quota limit further file creation failed which is expected 5. Now remove the quota limit and disable the quota on the volume 6. delete all the files from the mount point 7. Enable quota again and set the limit of 1GB 8. Now try to create a file Actual results: "Disk quota exceeded message" will be thrown though it isn't. Additional info: [root@gqac022 mnt2]# gluster v quota test list / Path Hard-limit Soft-limit Used Available -------------------------------------------------------------------------------- / 1.0GB 8977070246986897596 1.0GB 0Bytes You have new mail in /var/spool/mail/root [root@gqac022 mnt2]# ls [root@gqac022 mnt2]# du -sh . 0 . [root@gqac022 mnt2]# dd if=/dev/urandom of=file30 bs=1GB count=1 dd: opening `file30': Disk quota exceeded Volume Name: test Type: Distributed-Replicate Volume ID: 5a7b8bda-dbfb-40f1-949b-82fbe38ff39b Status: Started Number of Bricks: 2 x 2 = 4 Transport-type: tcp Bricks: Brick1: gqac022.sbu.lab.eng.bos.redhat.com:/home/t0 Brick2: gqac023.sbu.lab.eng.bos.redhat.com:/home/t0 Brick3: gqac024.sbu.lab.eng.bos.redhat.com:/home/t1 Brick4: gqac025.sbu.lab.eng.bos.redhat.com:/home/t1 Options Reconfigured: features.quota: on cluster info =========== gqac022.sbu.lab.eng.bos.redhat.com gqac023.sbu.lab.eng.bos.redhat.com gqac024.sbu.lab.eng.bos.redhat.com gqac025.sbu.lab.eng.bos.redhat.com Mounted on ========== gqac022.sbu.lab.eng.bos.redhat.com:/mnt2 ---> nfs mount xattrs from the bricks ========================= pair1 ====== [root@gqac022 mnt2]# getfattr -d -e hex -m . /home/t0 getfattr: Removing leading '/' from absolute path names # file: home/t0 security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000000000007ffffffe trusted.glusterfs.quota.dirty=0x3000 trusted.glusterfs.quota.limit-set=0x00000000400000007c94f5d3bb61d8bc trusted.glusterfs.quota.size=0x000000003b9aca00 trusted.glusterfs.volume-id=0x5a7b8bdadbfb40f1949b82fbe38ff39b [root@gqac023 mnt]# getfattr -d -m . -e hex /home/t0 getfattr: Removing leading '/' from absolute path names # file: home/t0 security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x0000000100000000000000007ffffffe trusted.glusterfs.quota.dirty=0x3000 trusted.glusterfs.quota.limit-set=0x00000000400000007c94f5d3bb61d8bc trusted.glusterfs.quota.size=0x000000003b9aca00 trusted.glusterfs.volume-id=0x5a7b8bdadbfb40f1949b82fbe38ff39b pair2 ======= [root@gqac024 ~]# getfattr -d -m . -e hex /home/t1 getfattr: Removing leading '/' from absolute path names # file: home/t1 security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x00000001000000007fffffffffffffff trusted.glusterfs.quota.dirty=0x3000 trusted.glusterfs.quota.limit-set=0x00000000400000007c94f5d3bb61d8bc trusted.glusterfs.quota.size=0x00000000046a0000 trusted.glusterfs.volume-id=0x5a7b8bdadbfb40f1949b82fbe38ff39b [root@gqac025 home]# getfattr -d -m . -e hex /home/t1 getfattr: Removing leading '/' from absolute path names # file: home/t1 security.selinux=0x756e636f6e66696e65645f753a6f626a6563745f723a66696c655f743a733000 trusted.gfid=0x00000000000000000000000000000001 trusted.glusterfs.dht=0x00000001000000007fffffffffffffff trusted.glusterfs.quota.dirty=0x3000 trusted.glusterfs.quota.limit-set=0x00000000400000007c94f5d3bb61d8bc trusted.glusterfs.quota.size=0x00000000046a0000 trusted.glusterfs.volume-id=0x5a7b8bdadbfb40f1949b82fbe38ff39b sosreports attached
Per bug triage 10/17.
Reason: This is because the quota xattrs kept for accounting the sizes are not cleared/cleaned (stale xattrs) after the quota disable. Since there is a bug filed on the same root cause closing this bug with duplicate flag. *** This bug has been marked as a duplicate of bug 1016019 ***