John G. Heim
2014-Oct-09 20:30 UTC
[Gluster-users] replaceing bricks from a cluster with replication
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?
Ted Miller
2014-Oct-14 20:16 UTC
[Gluster-users] replaceing bricks from a cluster with replication
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
Joe Julian
2014-Oct-14 21:07 UTC
[Gluster-users] replaceing bricks from a cluster with replication
Start with: gluster volume replace-brick myvol1 machine1:/foo machineA:/foo commit force Then do: gluster volume heal myvol1 info until it's empty which should indicate that the new brick on machineA now has a complete replica. repeat above for machine2/B and machine3/C. On 10/09/2014 01: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? > _______________________________________________ > Gluster-users mailing list > Gluster-users at gluster.org > http://supercolony.gluster.org/mailman/listinfo/gluster-users
I want to shrink a gluster 3.2 volume. I've been reading the documentation at: http://gluster.org/community/documentation/index.php/Gluster_3.2:_Shrinking_Volumes Something that is unclear on this document is whether I will lose data if I follow those instructions. If I do a remove-brick and then rebalance, is the data copied off the removed brick to another brick? Reading between the lines, I am thinking that I can remove the brick and then manually copy the data to another brick and then rebalance.