[Gluster-devel] Object Quota feature proposal for GlusterFS-3.7

Vijaikumar M vmallika at redhat.com
Wed Feb 18 04:20:52 UTC 2015

On Wednesday 18 February 2015 08:17 AM, Prashanth Pai wrote:
> This might be helpful for  better integration with Swift. Swift maintains accounting metadata per account and per container. From glusterfs perspective, accounts are (represented as) first level directories in root and containers are second level directories. So accounts contain containers.
> Each account has following metadata:
> X-Account-Object-Count
> X-Account-Bytes-Used
> X-Account-Container-Count
> Each container has following metadata:
> X-Container-Object-Count
> X-Container-Bytes-Used
> I've got a few questions:
> Will there be separate count stored for files vs directories ?
There will be xattr set for all files and directories.
For files, count is '1'.
For directories, count is sum of all the files and directories of entire 
sub-tree + 1 (counts itself)
> Does the count represent entire sub tree or just the immediate directory contents ?
Count for any directory represents the entire sub tree.

> Would a getxattr on a dir for count aggregate counts from all distributed bricks ?
Individual bricks will account for files residing only within itself.
We need to send a RPC call to quotad to get the aggregated value. we can 
provide a interface from gluster CLI to query the values from quotad.


> Thanks.
> Regards,
>   -Prashanth Pai
> ----- Original Message -----
> From: "Vijaikumar M" <vmallika at redhat.com>
> To: "gluster-devel at gluster.org >> Gluster Devel" <gluster-devel at gluster.org>
> Sent: Tuesday, February 17, 2015 5:22:34 PM
> Subject: [Gluster-devel] Object Quota feature proposal for GlusterFS-3.7
> Hi All,
> We are proposing files/objects quota feature for GlusterFS-3.7.
> Here is the feature page: http://www.gluster.org/community/documentation/index.php/Features/Object_Count
> 'Object Quotas' is an enhancement to the existing 'File Usage Quotas' and has the following benefits:
>      * Easy to query number of objects present in a volume.
>      * Can serve as an accounting mechanism for quota enforcement based on number of Inodes.
>      * This interface will be useful for integration with OpenStack Swift and Ceilometer.
> We can set the following Quota object limits, similar to file usage:
>      * 1) Directory level - limit the number of files at the directory level
>      * 2) Volume level - limit the number of files at the volume level
> Looking forward for Question/Feedback.
> Thanks,
> Vijay
> _______________________________________________
> Gluster-devel mailing list
> Gluster-devel at gluster.org
> http://www.gluster.org/mailman/listinfo/gluster-devel

More information about the Gluster-devel mailing list