Bug 1167593 - quota: EDQUOT when trying to rename a file back to original name
Summary: quota: EDQUOT when trying to rename a file back to original name
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: quota
Version: rhgs-3.0
Hardware: x86_64
OS: Linux
high
medium
Target Milestone: ---
: RHGS 3.0.4
Assignee: Vijaikumar Mallikarjuna
QA Contact: storage-qa-internal@redhat.com
URL:
Whiteboard:
Depends On: 1029866 1183944
Blocks: 1182947
TreeView+ depends on / blocked
 
Reported: 2014-11-25 06:25 UTC by Saurabh
Modified: 2016-09-17 12:39 UTC (History)
8 users (show)

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.
Clone Of:
Environment:
Last Closed: 2015-03-26 06:35:00 UTC
Embargoed:


Attachments (Terms of Use)
sosreport of node1 (9.70 MB, application/x-xz)
2014-11-25 06:28 UTC, Saurabh
no flags Details
sosreport of node3 (9.49 MB, application/x-xz)
2014-11-25 06:33 UTC, Saurabh
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0682 0 normal SHIPPED_LIVE Red Hat Storage 3.0 enhancement and bug fix update #4 2015-03-26 10:32:55 UTC

Description Saurabh 2014-11-25 06:25:39 UTC
Description of problem:
Finding this issue of "Disk quota exceeded" for rename while trying to rename a file back to it's original name.
Eg:-
Say the quota is enabled and limits set on "/", say quota limit is set to some arbitrary number "100GB"
create a file of size 5GB with the name of "5GB". Now, try to fill the "/" with data say upto 96 or 98GB. 
Try to rename the file from "5GB" to say "5GB-rename"
again try to rename back to original name "5GB-rename" to "5GB"
The second trial fails with "Disk quota exceeded"

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

How reproducible:
sometimes

Steps to Reproduce:
1. create a volume of 6x2 type, start it
2. enable quota
3. set a limit of 108GB on "/"
4. create a file of 5GB with name "5GB" afer mounting the volume over nfs
5. fill the volume till say 106 or 107 GB
6. try to rename the file "5GB" to "5GB-rename"
7. try to rename the file "5GB-rename" back to original name "5GB"

Actual results:
step6 rename is successful
step7 rename is not successful,
[root@rhsauto015 nfs-test]# mv 5GB-rename 5GB
mv: cannot move `5GB-rename' to `5GB': Disk quota exceeded

quota list,
[root@nfs1 ~]# gluster volume quota vol0 list
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/                                        108.0GB       80%     107.0GB   1.0GB             Yes                   No
/dir1/dir5                                25.0GB       80%      24.8GB 203.9MB             Yes                   No

brick logs reports this,
[2014-11-25 05:15:57.889674] I [server-handshake.c:578:server_setvolume] 0-vol0-server: accepted client from nfs1-16813-2014/11/25-05:15:57:743662-vol0-client-10-0-0 (version: 3.6.0.33)
[2014-11-25 05:57:13.579674] I [server-rpc-fops.c:964:server_rename_cbk] 0-vol0-server: 5507: RENAME /5GB-rename (00000000-0000-0000-0000-000000000000/5GB-rename) -> /5GB (00000000-0000-0000-0000-000000000000/5GB) ==> (Disk quota exceeded)
[2014-11-25 05:57:56.295356] I [server-rpc-fops.c:964:server_rename_cbk] 0-vol0-server: 5552: RENAME /5GB-rename (00000000-0000-0000-0000-000000000000/5GB-rename) -> /5GB (00000000-0000-0000-0000-000000000000/5GB) ==> (Disk quota exceeded)
[2014-11-25 06:04:39.233681] I [server-rpc-fops.c:964:server_rename_cbk] 0-vol0-server: 5566: RENAME /5GB-rename (00000000-0000-0000-0000-000000000000/5GB-rename) -> /5GB1 (00000000-0000-0000-0000-000000000000/5GB1) ==> (Disk quota exceeded)
[2014-11-25 06:10:40.635836] I [server-rpc-fops.c:964:server_rename_cbk] 0-vol0-server: 5687: RENAME /5GB11111 (00000000-0000-0000-0000-000000000000/5GB11111) -> /5GB (00000000-0000-0000-0000-000000000000/5GB) ==> (Disk quota exceeded)
[2014-11-25 06:11:12.831454] I [server-rpc-fops.c:964:server_rename_cbk] 0-vol0-server: 5706: RENAME /5GB11111 (00000000-0000-0000-0000-000000000000/5GB11111) -> /5GB (00000000-0000-0000-0000-000000000000/5GB) ==> (Disk quota exceeded)



Expected results:
rename to original name also should happen

Additional info:

Comment 1 Saurabh 2014-11-25 06:28:30 UTC
Created attachment 961009 [details]
sosreport of node1

Comment 3 Saurabh 2014-11-25 06:33:39 UTC
Created attachment 961010 [details]
sosreport of node3

Comment 5 Vijaikumar Mallikarjuna 2015-01-20 09:20:17 UTC
Patch https://code.engineering.redhat.com/gerrit/#/c/39200/ fixes the issue

Comment 6 Saurabh 2015-03-03 07:03:08 UTC
on server,
[root@vm1 ~]# gluster  volume quota vol0 list
                  Path                   Hard-limit Soft-limit   Used  Available  Soft-limit exceeded? Hard-limit exceeded?
---------------------------------------------------------------------------------------------------------------------------
/                                        100.0GB       80%      47.9GB  52.1GB              No                   No
/dir1                                     18.0GB       80%      17.0GB   1.0GB             Yes                   No
/dir2                                     22.9GB       80%      22.9GB  0Bytes             Yes                  Yes


on client,
Change the filename
mv 5GBfile 5GBfile-rename

rename it back to original
 mv dirn1-rename/5GBfile-rename dirn1-rename/5GBfile

ls -l dirn1-rename/5GBfile
-rw-r--r--. 1 root root 5368709120 Mar  3 05:22 dirn1-rename/5GBfile

Verified on glusterfs-3.6.0.48-1.el6rhs.x86_64

Comment 8 errata-xmlrpc 2015-03-26 06:35:00 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


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