Hi all,<div><br></div><div>Let me try to give some clarification on what does a &#39;rebalance&#39; means in terms of gluster CLI.</div><div><br></div><div>&#39;rebalance&#39; key word is tightly coupled with the hashing technique used in distribute translator. That means, If there is any problem with distribute&#39;s hash layout (ie, a mapping table using which clients decide where to create a file), then using rebalance, one can correct it (happens in case a remove-brick is performed). Or even when if everything is fine, but not every brick is part of distribute&#39;s hash layout, then rebalance can be issued (happens in case of &#39;add-brick&#39; for all existing directories).</div>
<div><br></div><div>But this rebalance works only for the available files over gluster mount-point. Hence if a subvolume of distribute is down(can be a single brick in case of distribute setup, can be a pair of bricks in case of replicate), rebalance will not work as it doesn&#39;t see all the files in the file-system. Similarly, after a remove-brick, &#39;rebalance&#39; won&#39;t migrate the data (files) from removed brick. In case of remove-brick, &#39;rebalance&#39; mainly fixes the hash layout of directories.</div>
<div><br></div><div>If one wants to migrate data with remove-brick, currently one needs to do &#39;replace-brick&#39;. If there are no extra bricks, but want to reduce the size of volume using remove-brick  by keeping all the data intact, then below mentioned steps works fine, but one need not hand edit the volume to reduce the brick count, anyways in that case surely need another volume created with removed bricks so they can copy the data out from those bricks to existing mount.</div>
<div><br></div><div>-Amar<br><br><div class="gmail_quote">On Fri, Apr 22, 2011 at 2:36 PM, HU Zhong <span dir="ltr">&lt;<a href="mailto:hz02ruc@gmail.com">hz02ruc@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi<br>
<br>
I succeed to remove a pair of bricks from my dht+afr system, but my system<br>
is not configured by the command line tool &#39;gluster&#39;, instead, I wrote<br>
configuration files and run glusterfs+glusterfsd process to start the system<br>
by hand. so it may  differ with yours,  anyway just for a reference.<br>
<br>
1. Remove the target replica set from the system. Update the configuration<br>
   file of the original system and restart the glusterfs process.<br>
<br>
2. Create a dummy GlusterFS system with the removed replica set and mount it<br>
   on a directory.<br>
<br>
3. Copy the data from the dummy GlusterFS system to the original system.<br>
<br>
<br>
<br>
-----Original Message----- From: Vincent Thomasset<br>
Sent: Friday, April 22, 2011 3:51 PM<br>
To: <a href="mailto:gluster-users@gluster.org" target="_blank">gluster-users@gluster.org</a><br>
Subject: [Gluster-users] rebalancing after remove-brick<div><div></div><div class="h5"><br>
<br>
Hello,<br>
<br>
I&#39;m having trouble migrating data from 1 removed replica set to<br>
another active one in a dist replicated volume.<br>
<br>
My test scenario is the following:<br>
<br>
- create set (A)<br>
- create a bunch of files on it<br>
- add another set (B)<br>
- rebalance (works fine)<br>
- remove-brick A<br>
- rebalance (doesn&#39;t rebalance - ran on one brick in each set)<br>
<br>
The doc seems to imply that it is possible to remove bricks<br>
and rebalance afterwards, is this incorrect ? Or should I maybe<br>
use replace-brick instead for this ?<br>
<br>
Thanks a lot,<br>
Vincent<br>
_______________________________________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://gluster.org/cgi-bin/mailman/listinfo/gluster-users" target="_blank">http://gluster.org/cgi-bin/mailman/listinfo/gluster-users</a> <br>
_______________________________________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
<a href="http://gluster.org/cgi-bin/mailman/listinfo/gluster-users" target="_blank">http://gluster.org/cgi-bin/mailman/listinfo/gluster-users</a><br>
</div></div></blockquote></div><br></div>