Alok Pathak
unread,May 10, 2013, 6:44:49 AM5/10/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to codersh...@googlegroups.com
Hi Everyone,
I've just configured a Galera cluster for MySQL with 3 nodes. I've added below given setting in wsrep.conf file
wsrep.conf
Node1 : wsrep_cluster_address="gcomm://IP1,IP2,IP3"
Node2 : wsrep_cluster_address="gcomm://IP1,IP2,IP3"
Node3 : wsrep_cluster_address="gcomm://IP1,IP2,IP3"
Starting Cluster
Node1 : service mysql start --wsrep_cluster_address="gcomm://"
Node2 : service mysql start
Node3 : service mysql start
As expected, Node1 started a new cluster and other 2 nodes joined the cluster successfully and all 3 nodes were working fine. Now I had to shut down the all 3 machines of node1,2,3 as power cut was scheduled. So I did
Node1 : init 0
Node2 : init 0
Node3 : init 0
Now I tried to restart the machines of all 3 nodes and as mysql is added as startup service in each machine. It tried to start mysql on startup but startup of mysql failed on all nodes because it couldn't start a new cluster and other nodes didn't find any cluster to join. So I manually did.
Node1 : service mysql start --wsrep_cluster_address="gcomm://"
Node2 : service mysql start
Node3 : service mysql start
After doing this I was able to restart cluster and it was running fine. Now my questions is... Is it mandatory to manually start the new cluster if we want to restart the complete cluster setup. Suppose if all 3 machines in data center rebooted due to some error or power-cut in that case there will not be any automatic way to restart a new cluster so that other nodes can join that. Is there any way by which we can manage to start a new cluster if all other nodes are also down. Since manual start of cluster is required so we may face a downtime of some hours.
I agree that we cannot keep the wsrep_cluster_address="gcomm://" in config of Node1 because it will start a new cluster every time it gets rebooted.
Regards,
Alok