Re: Quota problems with dispersed volumes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/28/2014 04:30 AM, Raghavendra Gowdappa wrote:


----- Original Message -----
From: "Xavier Hernandez" <xhernandez@xxxxxxxxxx>
To: "Gluster Devel" <gluster-devel@xxxxxxxxxxx>, "Krishnan Parthasarathi" <kparthas@xxxxxxxxxx>, "Raghavendra
Gowdappa" <rgowdapp@xxxxxxxxxx>
Cc: "Dan Lambright" <dlambrig@xxxxxxxxxx>
Sent: Monday, October 27, 2014 11:07:40 PM
Subject: Quota problems with dispersed volumes

Hi,

testing quota on a dispersed volume I've found a problem on how the
total used space is calculated.

# gluster volume create test disperse server{0..2}:/bricks/disperse
# gluster volume start test
# gluster volume quota test enable
# gluster volume quota test limit-usage / 1GB
# gluster volume quota test list
Path  H-L    S-L  Used    Available  S-L exceeded?  H-L exceeded?
-----------------------------------------------------------------
/     1.0GB  80%  0Bytes  1.0GB      No             No
# mount -t glusterfs server0:/test /gluster/test
# dd if=/dev/zero of=/gluster/test/file bs=1024k count=512
# ls -lh /gluster/test
total 512M
-rw-r--r-- 1 root root 512M Oct 27 18:29 file
# gluster volume quota test list
Path  H-L    S-L  Used    Available  S-L exceeded? H-L exceeded?
----------------------------------------------------------------
/     1.0GB  80%  256.0MB 768.0MB    No            No

As you can see quota seems to only count the space used by the file in
one of the bricks (each file uses 256MB on each brick).

How would be the best way to solve this problem ? I don't know quota
internals so I'm a bit lost about where to adjust real file sizes...

We use extended attribute with key "trusted.glusterfs.quota.size" to get the size of a directory/file. The value for this key is probed in lookup and getxattr calls. You can implement logic to handle this key appropriately in disperse xlator to give a proper size to higher layers. In your existing implementation you might have been probably passing xattrs from one of the bricks and hence seeing size from only one brick.

I think this patch fixes the problem:

    http://review.gluster.org/8990

Thanks,

Xavi




Thanks,

Xavi

_______________________________________________
Gluster-devel mailing list
Gluster-devel@xxxxxxxxxxx
http://supercolony.gluster.org/mailman/listinfo/gluster-devel




[Index of Archives]     [Gluster Users]     [Ceph Users]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux