Bug 1163623 - Erasure Volume quota error
Summary: Erasure Volume quota error
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: disperse
Version: 3.6.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Xavi Hernandez
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-13 07:06 UTC by liangzhicheng
Modified: 2016-08-23 12:39 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-23 12:39:12 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Attachment contains some information of errors at client (3.62 KB, text/plain)
2014-11-13 07:06 UTC, liangzhicheng
no flags Details
3.6.1+patch;client steps (3.27 KB, text/plain)
2014-11-19 03:05 UTC, liangzhicheng
no flags Details

Description liangzhicheng 2014-11-13 07:06:26 UTC
Created attachment 956979 [details]
Attachment contains some information of errors at client

Description of problem:
I test the quota of disperse volume,that generate some exceptions;


Version-Release number of selected component (if applicable):
glusterfs-3.6.0

How reproducible:

Steps to Reproduce:
1.create disperse volume use three gluster nodes(2+1 mode);
2.mount glusterfs on a new client node, create one directory;
3.gluster nodes configure quota for that client directory;
4.copy two files into client directory, the size of two files is not more than 
  the quota of directory; prepare a new file in root directory that size is 
  more than the quota of directory; copy new file into client directory, then  
  copy is terminated;
5. disable quota on gluster nodes,;
6. client umount glusterfs, then remount; check the infomation of three files 
   by ls,

Actual results:
1. the size of three file is not correct, some times the last file 
   display exception;
2. when I repeat 1-6 operations, the contents of two files is damaged 
   sometimes; 

Expected results:
1. client directory container data is more than the quota, new writes is 
   abort or hang, it should is not damage the data, that has been written or 
   exist; 

Additional info:
Attachment contains some information of errors at client

Comment 1 liangzhicheng 2014-11-14 07:10:44 UTC
the problem is also exist in 3.6.1;

Comment 2 Xavi Hernandez 2014-11-18 16:27:50 UTC
Can you try this patch: http://review.gluster.org/9107/ ?

I think it should avoid the Input/Output errors.

What do you mean by damaged files ?

When a file copy is aborted because quota has been reached, it gets truncated at some size. This size can be different in each test because quota enforcement is not 100% strict.

Comment 3 liangzhicheng 2014-11-19 02:55:06 UTC
3.6.1+patch(http://review.gluster.org/9107/) is also fail;
steps:
1、set quota in server node for client dir;
2、client copy three files, the last is more than the quota, then is aborted;
3、server node stop quota, client remount glusterfs;
4、at client use the command of "ls" is report diffrent result, and "cat" the 
   last file is also error; 

the last result in client:
[root@localhost test]# ls -alh *
total 2.3G
drwxr-xr-x 2 root root   14 Nov 19  2014 .
drwxr-xr-x 4 root root   36 Nov 19 10:29 ..
-rw-r--r-- 1 root root 2.3G Nov 19 10:36 1
[root@localhost test]# ls
222222
[root@localhost test]# cd 222222/
[root@localhost 222222]# ls
1
[root@localhost 222222]# ls -alh 1
ls: cannot access 1: Input/output error
[root@localhost 222222]# ls  1
ls: cannot access 1: Input/output error
[root@localhost 222222]# cat 1
cat: 1: Input/output error
[root@localhost 222222]# cd ~
[root@localhost ~]# cat /test/222222/1
cat: /test/222222/1: Input/output error
[root@localhost ~]# md5sum /test/222222/1
md5sum: /test/222222/1: Input/output error
[root@localhost ~]# ls -alh /test/222222/1
ls: cannot access /test/222222/1: Input/output error
[root@localhost ~]# ls -alh /test/222222/
total 2.3G
drwxr-xr-x 2 root root   14 Nov 19 10:40 .
drwxr-xr-x 4 root root   36 Nov 19 10:29 ..
-rw-r--r-- 1 root root 2.3G Nov 19 10:36 1
[root@localhost ~]#

Comment 4 liangzhicheng 2014-11-19 03:05:20 UTC
Created attachment 958861 [details]
3.6.1+patch;client steps

the last result in client, i remove others file but the last file;
the attachment of last is contain all steps and result;

Comment 5 liangzhicheng 2014-11-19 09:00:50 UTC
another problem is appear, that is not set quota, but the problem is similar with quota:
1、client write data in file, when that is more than avaible space, write is abort;
2、server node extend space of the disperse volume;
3、client remount glusterfs; at client exist data is not accessed(cat、ls...);

Comment 6 liangzhicheng 2014-12-04 01:39:15 UTC
1> I make a patch for quota, that verify is pass; but no set quota, the problem is still exist;

2>the key of the patch is:
 2.1> add a field in "quota_inode_ctx_t", when the quota is above, set the 
      field is true, others is false; 
 2.2> when write data into files, the call chain is
      "ec_manager_writev-->xxxx-->quota_lookup-->quota_lookup_cbk-->xxxx-->ec_lo
      okup_cbk";xxxx is represent others function in the call chain; 
      2.2.1> the function of quota_lookup_cbk check the field, if it is true, 
      then return error, that is "EDQUOT";
      2.2.2> the function of ec_lookup_cbk is also check error, if that is 
      EDQUOT,then return EIO for ec_manager_writev, the result is write data is 
      abort; when stop quota, the data of writed can read;
3> that patch still has some problems can not resolve, when the quota is above,
   modify the value of quota, but the data of writed can not read; that must 
   stop quota, the data of writed can read;
4> I modify the patch, when it can resolve the problem of "3>", I upload to the 
   bugzilla of glusterfs;
5> others can upload the best patch for resolve this problems;

Comment 7 Pranith Kumar K 2015-08-05 00:37:09 UTC
liangzhicheng,
      Could you try this test with 3.7.3 release? Lot of bug fixes have gone in for EC and quota in this release.

Pranith

Comment 8 Niels de Vos 2016-08-23 12:39:12 UTC
This bug is being closed as GlusterFS-3.6 is nearing its End-Of-Life and only important security bugs will be fixed. This bug has been fixed in more recent GlusterFS releases. If you still face this bug with the newer GlusterFS versions, please open a new bug.

Based on comment #7, we expect that this has been fixed in current versions.


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