[Gluster-users] replaceing bricks from a cluster with replication
Ted Miller
tmiller at hcjb.org
Tue Oct 14 20:16:15 UTC 2014
On 10/9/2014 4:30 PM, John G. Heim wrote:
> How can I replace machines in a gluster cluster with triple replication?
> I've had crashes and I've replaces single machines before but always with
> one with the same name. Now I need to take machine1, machine2, and machine3
> out of the cluster and replace it with machineA, machineB, and machineC.
>
> Gluster will not let me detach machine1 all by itself. I have to detach
> machine1, machine2, and machine3 all at the same time. But is that going
> to cause data loss?
>
> It seems to me that detaching all 3 machines in a brick on a triple
> replicated cluster would be like removing a single brick from a
> non-replicated cluster. And you can lose data in that case, right?
I am just a user with a replica = 3 cluster running, but I will try to
outline how I would to it. If I goof something up (or explain it badly) I
hope that others will jump in and correct me.
You don't say, so I will assume you have 2 bricks per machine, resulting in 2
names returned when you execute a
gluster volume list
command. I will assume that your volumes are named 'Dick' and 'Jane'.
The only way I know how to do what you want to do is a rather tedious
process, but here it is. I will not try to get all the commands word
perfect, more like give you "pseudocode".
The basic premise is that you cannot add "machines", you can only add and
subtract bricks from a volume.
1. Add machineA to the cluster as a peer.
2. Add brick "DickA" on machineA to volume "Dick", resulting in a "replica 4"
volume.
3. Remove brick "Dick1" on machine1 from volume "Dick", putting you back at a
"replica 3" volume.
4. Repeat steps 2 & 3 for "JaneA" and "Jane1".
5. At this point you no longer have any data on machine1, so remove machine1
from the cluster.
Repeat steps 1-5, substituting machineB and machine2.
Repeat steps 1-5, substituting machineC and machine3.
At that point you should be migrated from machine1,2,3 to machineA,B,C.
Is that clear as mud?
It is probably more tedious than what you wanted to do (especially if you
have 5 or more volumes), but it is the only way I know to do it.
Have fun,
Ted Miller
Elkhart, IN, USA
More information about the Gluster-users
mailing list