[Gluster-users] Features - Object Count

aasenov1989 aasenov1989 at gmail.com
Mon Jun 1 09:22:56 UTC 2015


Hi,
Thanks for the reply. I understand what you're saying, but then can you
give me an idea how to solve my problem. My setup is as follows:
I have 1 volume comprised of 2 nodes, each node having 2 bricks(total 4
bricks). The volume is replicated in such a way that each brick from node1
replicate files to corresponding brick in node2. When I upload, lets say 1
million files to node1, I want to find out when those files are replicated
to the second node. My idea was to set inode quota on a volume (to check
number of files in the volume) and on a brick(to check number of files in a
brick) and to verify that total number of files in bricks in each node is
equal to number of files in entire volume. This way I can be sure that the
files are replicated correctly.
But, as far as I understand, what I can do is to set quota on entire volume
to keep track of total number of files. Then to check each brick and count
number of files in that brick. But I have to perform this operation on both
nodes, as I can't check number of files in brick that is not in local node.
Also it's not really efficient every time to count millions of files
So is there a way to perform such a check?
Thanks in advance.

Regards,
Asen Asenov

On Mon, Jun 1, 2015 at 7:31 AM, Sachin Pandit <spandit at redhat.com> wrote:

>
>
> ----- Original Message -----
> > From: "aasenov1989" <aasenov1989 at gmail.com>
> > To: "Atin Mukherjee" <atin.mukherjee83 at gmail.com>
> > Cc: "Gluster-users at gluster.org List" <gluster-users at gluster.org>,
> "Sachin Pandit" <spandit at redhat.com>
> > Sent: Friday, May 29, 2015 6:11:36 PM
> > Subject: Re: [Gluster-users] Features - Object Count
> >
> > Hi,
> > So is there a way to find how many files I have on each brick of the
> volume?
> >
>
> Hi,
>
> Quota limit can only be set on the volume level and directories
> which is present in it. We don't have a gluster command which
> lists out the number of files present in a brick, as linux
> commands can take care of that very well.
>
> Thanks,
> Sachin Pandit.
>
>
> > Regards,
> > Asen Asenov
> >
> > On Fri, May 29, 2015 at 3:33 PM, Atin Mukherjee <
> atin.mukherjee83 at gmail.com>
> > wrote:
> >
> > > Sent from Samsung Galaxy S4
> > > On 29 May 2015 17:59, "aasenov1989" <aasenov1989 at gmail.com> wrote:
> > > >
> > > > Hi,
> > > > Thnaks for the help. I was able to retrieve number of objects for
> entire
> > > volume. But I didn't figure out how to set quota for particular brick.
> I
> > > have replicated volume with 2 bricks on 2 nodes:
> > > > Bricks:
> > > > Brick1: host1:/dataDir
> > > > Brick2: host2:/dataDir
> > > > Both bricks are up and files are replicated. But when I try to set
> quota
> > > on a particular brick:
> > > IIUC, You won't be able to set quota at brick level as multiple bricks
> > > comprise a volume which is exposed to the user. Quota team can correct
> me
> > > if I am wrong.
> > >
> > > >
> > > > gluster volume quota TestVolume limit-objects /dataDir/
> > > 9223372036854775807
> > > > quota command failed : Failed to get trusted.gfid attribute on path
> > > /dataDir/. Reason : No such file or directory
> > > > please enter the path relative to the volume
> > > >
> > > > What should be the path to brick directories relative to the volume?
> > > >
> > > > Regards,
> > > > Asen Asenov
> > > >
> > > >
> > > > On Fri, May 29, 2015 at 12:35 PM, Sachin Pandit <spandit at redhat.com>
> > > wrote:
> > > >>
> > > >> ----- Original Message -----
> > > >> > From: "aasenov1989" <aasenov1989 at gmail.com>
> > > >> > To: "Humble Devassy Chirammal" <humble.devassy at gmail.com>
> > > >> > Cc: "Gluster-users at gluster.org List" <gluster-users at gluster.org>
> > > >> > Sent: Friday, May 29, 2015 12:22:43 AM
> > > >> > Subject: Re: [Gluster-users] Features - Object Count
> > > >> >
> > > >> > Thanks Humble,
> > > >> > But as far as I understand the object count is connected with the
> > > quotas set
> > > >> > per folders. What I want is to get number of files I have in
> entire
> > > volume -
> > > >> > even when volume is distributed across multiple computers. I
> think the
> > > >> > purpose of this feature:
> > > >> >
> > >
> http://gluster.readthedocs.org/en/latest/Feature%20Planning/GlusterFS%203.7/Object%20Count/
> > > >>
> > > >> Hi,
> > > >>
> > > >> You are absolutely correct. You can retrieve number of files in the
> > > entire
> > > >> volume if you have the "limit-objects" set on the root. If
> > > "limit-objects"
> > > >> is set on the directory present in a mount point then it will only
> show
> > > >> the number of files and directories of that particular directory.
> > > >>
> > > >> In your case, if you want to retrieve number of files and
> directories
> > > >> present in the entire volume then you might have to set the object
> limit
> > > >> on the root.
> > > >>
> > > >>
> > > >> Thanks,
> > > >> Sachin Pandit.
> > > >>
> > > >>
> > > >> > is to provide such functionality. Am I right or there is no way to
> > > retrieve
> > > >> > number of files for entire volume?
> > > >> >
> > > >> > Regards,
> > > >> > Asen Asenov
> > > >> >
> > > >> > On Thu, May 28, 2015 at 8:09 PM, Humble Devassy Chirammal <
> > > >> > humble.devassy at gmail.com > wrote:
> > > >> >
> > > >> >
> > > >> >
> > > >> > Hi Asen,
> > > >> >
> > > >> >
> > > https://gluster.readthedocs.org/en/latest/Features/quota-object-count/
> ,
> > > hope
> > > >> > this helps.
> > > >> >
> > > >> > --Humble
> > > >> >
> > > >> >
> > > >> > On Thu, May 28, 2015 at 8:38 PM, aasenov1989 <
> aasenov1989 at gmail.com
> > > > wrote:
> > > >> >
> > > >> >
> > > >> >
> > > >> > Hi,
> > > >> > I wanted to ask how to use this feature in gluster 3.7.0, as I was
> > > unable to
> > > >> > find anything. How can I retrieve number of objects in volume and
> > > number of
> > > >> > objects in particular brick?
> > > >> >
> > > >> > Thanks in advance.
> > > >> >
> > > >> > Regards,
> > > >> > Asen Asenov
> > > >> >
> > > >> > _______________________________________________
> > > >> > Gluster-users mailing list
> > > >> > Gluster-users at gluster.org
> > > >> > http://www.gluster.org/mailman/listinfo/gluster-users
> > > >> >
> > > >> >
> > > >> >
> > > >> > _______________________________________________
> > > >> > Gluster-users mailing list
> > > >> > Gluster-users at gluster.org
> > > >> > http://www.gluster.org/mailman/listinfo/gluster-users
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > Gluster-users mailing list
> > > > Gluster-users at gluster.org
> > > > http://www.gluster.org/mailman/listinfo/gluster-users
> > >
> > >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-users/attachments/20150601/8bceb6be/attachment.html>


More information about the Gluster-users mailing list