<div dir="ltr"><div><div><div>Hi,<br></div>That is exactly what I was looking for. Thanks a lot.<br><br></div>Regards,<br></div>Asen Asenov<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jun 1, 2015 at 2:51 PM, Sachin Pandit <span dir="ltr"><<a href="mailto:spandit@redhat.com" target="_blank">spandit@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
----- Original Message -----<br>
> From: "M S Vishwanath Bhat" <<a href="mailto:msvbhat@gmail.com">msvbhat@gmail.com</a>><br>
> To: "aasenov1989" <<a href="mailto:aasenov1989@gmail.com">aasenov1989@gmail.com</a>><br>
> Cc: "<a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a> List" <<a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a>><br>
</span><span class="">> Sent: Monday, June 1, 2015 3:02:08 PM<br>
> Subject: Re: [Gluster-users] Features - Object Count<br>
><br>
><br>
><br>
</span><span class="">> On 29 May 2015 at 18:11, aasenov1989 < <a href="mailto:aasenov1989@gmail.com">aasenov1989@gmail.com</a> > wrote:<br>
><br>
><br>
><br>
> Hi,<br>
> So is there a way to find how many files I have on each brick of the volume?<br>
> I don't think gluster provides a way to exactly get the number of files in a<br>
> brick or volume.<br>
><br>
> Sorry if my solution is very obvious. But I generally use find to get the<br>
> number of files in a particular brick.<br>
><br>
> find /brick/path ! -path "/brick/path/.glusterfs*" | wc -l<br>
<br>
</span>Hi,<br>
<br>
You can also do getfattr -d -m . -e hex <brick_path><br>
This command is to get the extended attributes of a directory.<br>
When you issue this command after enabling quota then<br>
you can see an extended attribute with name "trusted.glusterfs.quota.size"<br>
That basically holds the size, file count and directory count.<br>
<br>
The extended attribute consists of 48 hexadecimal numbers. First 16 will give<br>
you the size, next 16 the file count and last 16 the directory count.<br>
<br>
Hope this helps.<br>
<br>
Thanks,<br>
Sachin Pandit.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
><br>
><br>
> Best Regards,<br>
> Vishwanath<br>
><br>
><br>
><br>
><br>
><br>
> Regards,<br>
> Asen Asenov<br>
><br>
> On Fri, May 29, 2015 at 3:33 PM, Atin Mukherjee < <a href="mailto:atin.mukherjee83@gmail.com">atin.mukherjee83@gmail.com</a><br>
> > wrote:<br>
><br>
><br>
><br>
><br>
><br>
><br>
> Sent from Samsung Galaxy S4<br>
> On 29 May 2015 17:59, "aasenov1989" < <a href="mailto:aasenov1989@gmail.com">aasenov1989@gmail.com</a> > wrote:<br>
> ><br>
> > Hi,<br>
> > Thnaks for the help. I was able to retrieve number of objects for entire<br>
> > volume. But I didn't figure out how to set quota for particular brick. I<br>
> > have replicated volume with 2 bricks on 2 nodes:<br>
> > Bricks:<br>
> > Brick1: host1:/dataDir<br>
> > Brick2: host2:/dataDir<br>
> > Both bricks are up and files are replicated. But when I try to set quota on<br>
> > a particular brick:<br>
> IIUC, You won't be able to set quota at brick level as multiple bricks<br>
> comprise a volume which is exposed to the user. Quota team can correct me if<br>
> I am wrong.<br>
><br>
> ><br>
> > gluster volume quota TestVolume limit-objects /dataDir/ 9223372036854775807<br>
> > quota command failed : Failed to get trusted.gfid attribute on path<br>
> > /dataDir/. Reason : No such file or directory<br>
> > please enter the path relative to the volume<br>
> ><br>
> > What should be the path to brick directories relative to the volume?<br>
> ><br>
> > Regards,<br>
> > Asen Asenov<br>
> ><br>
> ><br>
> > On Fri, May 29, 2015 at 12:35 PM, Sachin Pandit < <a href="mailto:spandit@redhat.com">spandit@redhat.com</a> ><br>
> > wrote:<br>
> >><br>
> >> ----- Original Message -----<br>
> >> > From: "aasenov1989" < <a href="mailto:aasenov1989@gmail.com">aasenov1989@gmail.com</a> ><br>
> >> > To: "Humble Devassy Chirammal" < <a href="mailto:humble.devassy@gmail.com">humble.devassy@gmail.com</a> ><br>
> >> > Cc: " <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a> List" < <a href="mailto:gluster-users@gluster.org">gluster-users@gluster.org</a> ><br>
> >> > Sent: Friday, May 29, 2015 12:22:43 AM<br>
> >> > Subject: Re: [Gluster-users] Features - Object Count<br>
> >> ><br>
> >> > Thanks Humble,<br>
> >> > But as far as I understand the object count is connected with the quotas<br>
> >> > set<br>
> >> > per folders. What I want is to get number of files I have in entire<br>
> >> > volume -<br>
> >> > even when volume is distributed across multiple computers. I think the<br>
> >> > purpose of this feature:<br>
> >> > <a href="http://gluster.readthedocs.org/en/latest/Feature%20Planning/GlusterFS%203.7/Object%20Count/" target="_blank">http://gluster.readthedocs.org/en/latest/Feature%20Planning/GlusterFS%203.7/Object%20Count/</a><br>
> >><br>
> >> Hi,<br>
> >><br>
> >> You are absolutely correct. You can retrieve number of files in the entire<br>
> >> volume if you have the "limit-objects" set on the root. If "limit-objects"<br>
> >> is set on the directory present in a mount point then it will only show<br>
> >> the number of files and directories of that particular directory.<br>
> >><br>
> >> In your case, if you want to retrieve number of files and directories<br>
> >> present in the entire volume then you might have to set the object limit<br>
> >> on the root.<br>
> >><br>
> >><br>
> >> Thanks,<br>
> >> Sachin Pandit.<br>
> >><br>
> >><br>
> >> > is to provide such functionality. Am I right or there is no way to<br>
> >> > retrieve<br>
> >> > number of files for entire volume?<br>
> >> ><br>
> >> > Regards,<br>
> >> > Asen Asenov<br>
> >> ><br>
> >> > On Thu, May 28, 2015 at 8:09 PM, Humble Devassy Chirammal <<br>
> >> > <a href="mailto:humble.devassy@gmail.com">humble.devassy@gmail.com</a> > wrote:<br>
> >> ><br>
> >> ><br>
> >> ><br>
> >> > Hi Asen,<br>
> >> ><br>
> >> > <a href="https://gluster.readthedocs.org/en/latest/Features/quota-object-count/" target="_blank">https://gluster.readthedocs.org/en/latest/Features/quota-object-count/</a> ,<br>
> >> > hope<br>
> >> > this helps.<br>
> >> ><br>
> >> > --Humble<br>
> >> ><br>
> >> ><br>
> >> > On Thu, May 28, 2015 at 8:38 PM, aasenov1989 < <a href="mailto:aasenov1989@gmail.com">aasenov1989@gmail.com</a> ><br>
> >> > wrote:<br>
> >> ><br>
> >> ><br>
> >> ><br>
> >> > Hi,<br>
> >> > I wanted to ask how to use this feature in gluster 3.7.0, as I was<br>
> >> > unable to<br>
> >> > find anything. How can I retrieve number of objects in volume and number<br>
> >> > of<br>
> >> > objects in particular brick?<br>
> >> ><br>
> >> > Thanks in advance.<br>
> >> ><br>
> >> > Regards,<br>
> >> > Asen Asenov<br>
> >> ><br>
> >> > _______________________________________________<br>
> >> > Gluster-users mailing list<br>
> >> > <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> >> > <a href="http://www.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
> >> ><br>
> >> ><br>
> >> ><br>
> >> > _______________________________________________<br>
> >> > Gluster-users mailing list<br>
> >> > <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> >> > <a href="http://www.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
> ><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Gluster-users mailing list<br>
> > <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> > <a href="http://www.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Gluster-users mailing list<br>
> <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> <a href="http://www.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
><br>
><br>
> _______________________________________________<br>
> Gluster-users mailing list<br>
> <a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
> <a href="http://www.gluster.org/mailman/listinfo/gluster-users" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
</div></div></blockquote></div><br></div>