<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On 8 June 2017 at 09:35, Raghavendra Gowdappa <span dir="ltr"><<a href="mailto:rgowdapp@redhat.com" target="_blank">rgowdapp@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: "Tahereh Fattahi" <<a href="mailto:t28.fattahi@gmail.com">t28.fattahi@gmail.com</a>><br>
> To: "Nithya Balachandran" <<a href="mailto:nbalacha@redhat.com">nbalacha@redhat.com</a>>, "Susant Palai" <<a href="mailto:spalai@redhat.com">spalai@redhat.com</a>>, "Gluster Devel"<br>
> <<a href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a>><br>
> Sent: Wednesday, June 7, 2017 8:05:35 PM<br>
> Subject: Re: [Gluster-devel] Rebalance source code<br>
><br>
> I had seen this function before but when dht xlator is not loaded in server<br>
> side, how this function will be called?<br>
<br>
</span>rebalance process is not a server process.</blockquote><div><br></div><div>Well, it runs on the server nodes but it is, as Raghavendra said, a clustering/client process. I think you probably meant the brick processes when you referred to the server process.</div><div><br></div><div>Other processes which run on the server nodes but load client translators include the selfheal daemon(AFR/EC) or the tier process (DHT) or even the NFS server which loads the cluster translators.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> Instead its a client (albeit a special one - doesn't have an interface layer like fuse/gfapi, xlator graph is rooted at dht , dht xlator itself has the option "rebalance-cmd" set which won't be on normal clients, once crawling starts it continues in same graph even if there are graph changes during course of rebalance). You can check logs of rebalance process (*rebalance*.log in gluster log directory) for the exact set of translators loaded.<br>
<br>
As to when the crawling starts, it is done when dht gets at least one of CHILD_UP/CHILD_DOWN/CHILD_<wbr>CONNECTING from _all_ of its subvols. You can check dht_notify for more details where we create a thread with gf_defrag_start as entry function.<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> On Wed, Jun 7, 2017 at 4:58 PM, Nithya Balachandran < <a href="mailto:nbalacha@redhat.com">nbalacha@redhat.com</a> ><br>
> wrote:<br>
><br>
><br>
><br>
><br>
><br>
> On 7 June 2017 at 17:31, Tahereh Fattahi < <a href="mailto:t28.fattahi@gmail.com">t28.fattahi@gmail.com</a> > wrote:<br>
><br>
><br>
><br>
> Hi<br>
> I want to follow the process when rebalance command is done.<br>
> Which files should I read?<br>
> I see something in cli directory that sends request to another abject. But I<br>
> need to find function that do core operation of rebalance.<br>
> I expect to see something like this in one function:<br>
> function rebalance<br>
> {<br>
> check all bricks<br>
> fix_layout for all directories<br>
> start files migration<br>
> }<br>
> Where can I find the core functions of rebalance in server side?<br>
><br>
> You can start with gf_defrag_start_crawl in dht-rebalance.c<br>
><br>
> Regards,<br>
> Nithya<br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-devel mailing list<br>
> <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
> <a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br>
><br>
><br>
><br>
> ______________________________<wbr>_________________<br>
> Gluster-devel mailing list<br>
> <a href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
> <a href="http://lists.gluster.org/mailman/listinfo/gluster-devel" rel="noreferrer" target="_blank">http://lists.gluster.org/<wbr>mailman/listinfo/gluster-devel</a><br>
</div></div></blockquote></div><br></div></div>