[Gluster-users] rebalancing after remove-brick

Amar Tumballi amar at gluster.com
Sat Apr 23 10:28:24 UTC 2011


Hi all,

Let me try to give some clarification on what does a 'rebalance' means in
terms of gluster CLI.

'rebalance' key word is tightly coupled with the hashing technique used in
distribute translator. That means, If there is any problem with distribute'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's hash layout, then rebalance can be
issued (happens in case of 'add-brick' for all existing directories).

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't see all the files in the
file-system. Similarly, after a remove-brick, 'rebalance' won't migrate the
data (files) from removed brick. In case of remove-brick, 'rebalance' mainly
fixes the hash layout of directories.

If one wants to migrate data with remove-brick, currently one needs to do
'replace-brick'. 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.

-Amar

On Fri, Apr 22, 2011 at 2:36 PM, HU Zhong <hz02ruc at gmail.com> wrote:

> Hi
>
> I succeed to remove a pair of bricks from my dht+afr system, but my system
> is not configured by the command line tool 'gluster', instead, I wrote
> configuration files and run glusterfs+glusterfsd process to start the
> system
> by hand. so it may  differ with yours,  anyway just for a reference.
>
> 1. Remove the target replica set from the system. Update the configuration
>   file of the original system and restart the glusterfs process.
>
> 2. Create a dummy GlusterFS system with the removed replica set and mount
> it
>   on a directory.
>
> 3. Copy the data from the dummy GlusterFS system to the original system.
>
>
>
> -----Original Message----- From: Vincent Thomasset
> Sent: Friday, April 22, 2011 3:51 PM
> To: gluster-users at gluster.org
> Subject: [Gluster-users] rebalancing after remove-brick
>
>
> Hello,
>
> I'm having trouble migrating data from 1 removed replica set to
> another active one in a dist replicated volume.
>
> My test scenario is the following:
>
> - create set (A)
> - create a bunch of files on it
> - add another set (B)
> - rebalance (works fine)
> - remove-brick A
> - rebalance (doesn't rebalance - ran on one brick in each set)
>
> The doc seems to imply that it is possible to remove bricks
> and rebalance afterwards, is this incorrect ? Or should I maybe
> use replace-brick instead for this ?
>
> Thanks a lot,
> Vincent
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
> _______________________________________________
> Gluster-users mailing list
> Gluster-users at gluster.org
> http://gluster.org/cgi-bin/mailman/listinfo/gluster-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://supercolony.gluster.org/pipermail/gluster-users/attachments/20110423/964d457c/attachment.html>


More information about the Gluster-users mailing list