Bug 1139104

Summary: quota: rename of "dir" fails in case of quota space availability is around 1GB
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Saurabh <saujain>
Component: quotaAssignee: Vijaikumar Mallikarjuna <vmallika>
Status: CLOSED ERRATA QA Contact: storage-qa-internal <storage-qa-internal>
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.0CC: asriram, mzywusko, rgowdapp, rhs-bugs, smohan, storage-qa-internal, surs, vagarwal, vmallika
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.0.4   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.6.0.45-1 Doc Type: Bug Fix
Doc Text:
Previously when a quota limit is reached more than 50%, rename of a file/dir failed with 'Disk Quota Exceeded' even within the same directory. Now the rename works fine when the file is renamed under the same branch where quota limit is set.
Story Points: ---
Clone Of:
: 1153964 1177592 (view as bug list) Environment:
Last Closed: 2015-03-26 06:34:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1029866, 1153964, 1177592, 1182947, 1183944    

Description Saurabh 2014-09-08 05:13:24 UTC
Description of problem:
Tried to rename a directory and it failed. 
issue is basically seen when quota related available space is 1GB or less. 


Version-Release number of selected component (if applicable):
glusterfs-3.6.0.28-1.el6rhs.x86_64

How reproducible:
always

Steps to Reproduce:
1. create a volume of 6x2 type, start it
2. enable quota
3. set limit of 20GB on "/"
4. create data upto 19GB (approx) after mounting volume over nfs. include some dir creation also.
5. rename some directory.

Actual results:
[root@rhsauto002 nfs-test]# mv dir3 dir3-rename
mv: cannot move ‘dir3’ to ‘dir3-rename’: Disk quota exceeded
[root@rhsauto002 nfs-test]# 
[root@rhsauto002 nfs-test]# 
[root@rhsauto002 nfs-test]# ls
dir1  dir2  dir3  dir4  run16165  run27343  run32188  tests.init
[root@rhsauto002 nfs-test]# 
[root@rhsauto002 nfs-test]# 
[root@rhsauto002 nfs-test]# df -h /mnt/nfs-test
Filesystem             Size  Used Avail Use% Mounted on
10.70.37.156:dist-rep   20G   19G  1.3G  94% /mnt/nfs-test



Expected results:

rename should work.

Additional info:
works in case if I delete around 5GB of data.
[root@rhsauto002 dir3]# rm -rf *
[root@rhsauto002 dir3]# ls
[root@rhsauto002 dir3]# 
[root@rhsauto002 dir3]# 
[root@rhsauto002 dir3]# df -h /mnt/nfs-test
Filesystem             Size  Used Avail Use% Mounted on
10.70.37.156:dist-rep   20G   14G  6.3G  69% /mnt/nfs-test
[root@rhsauto002 dir3]# 
[root@rhsauto002 dir3]# 
[root@rhsauto002 dir3]# 
[root@rhsauto002 dir3]# cd ..
[root@rhsauto002 nfs-test]# ls
dir1  dir2  dir3  dir4  run16165  run27343  run32188  tests.init
[root@rhsauto002 nfs-test]# mv dir3 dir3-rename

Comment 2 Vijaikumar Mallikarjuna 2014-12-29 12:22:42 UTC
Patch submitted: https://code.engineering.redhat.com/gerrit/39208

Comment 4 Saurabh 2015-03-03 11:49:17 UTC
gluster  volume quota vol0 list /qa1dir
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded?  Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/qa1dir                                    6.0GB       80%       5.1GB 913.8MB             Yes                   No


# mv /export2/qa1dir /export2/qa1dir-rename
# mv /export2/qa1dir-rename /export2/qa1dir

Hence moving to verified

Comment 6 errata-xmlrpc 2015-03-26 06:34:34 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.

https://rhn.redhat.com/errata/RHBA-2015-0682.html