MySQL/Galera in Pacemaker High Availability Clusters

Posted on Tue 04 December 2012 in hints-and-kinks • Tagged with Galera, MySQL, Pacemaker • 2 min read

In this walkthrough, you will create a Pacemaker managed MySQL/Galera cluster. It assumes that you are running on a Debian 6.0 (squeeze) box, but the concepts should be equally applicable to other platforms with minimal modifications.

It also assumes that your Galera cluster will consist of three nodes …


Continue reading

Recovering from full cluster shutdown

Posted on Tue 04 December 2012 in hints-and-kinks • Tagged with Galera, MySQL, Pacemaker • 1 min read

If at any time all of the nodes in your cluster have been taken down, it is necessary to re-initialize the Galera replication state. In effect, this is identical to bootstrapping the cluster.

Start by manually bringing up the cluster IP on one of your nodes:

ip address add 192 …

Continue reading

Setting Galera-specific MySQL options

Posted on Tue 04 December 2012 in hints-and-kinks • Tagged with Galera, MySQL, Pacemaker • 1 min read

Now you can proceed with setting Galera specifics in your MySQL configurations.

Create a configuration file, identical on all cluster nodes, named /etc/mysql/conf.d/galera.cnf with the following content:

[mysqld]
bind_address=0.0.0.0
binlog_format=ROW
default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
innodb_locks_unsafe_for_binlog=1

Create another configuration file …


Continue reading

Starting Pacemaker

Posted on Tue 04 December 2012 in hints-and-kinks • Tagged with Galera, MySQL, Pacemaker • 1 min read

Once Corosync is running, you are able to start the Pacemaker cluster resource manager on all cluster nodes:

service pacemaker start

Once cluster startup is completed, you should see output similar to the following when invoking the crm_mon utility:

============
Last updated: Mon Dec  3 15:37:59 2012
Last change …

Continue reading

Testing resource recovery

Posted on Tue 04 December 2012 in hints-and-kinks • Tagged with Galera, MySQL, Pacemaker • 2 min read

If MySQL happens to die in your cluster, Pacemaker will automatically recover the service in place. To test this, select any node on your cluster and send the mysqld process a KILL signal:

killall -KILL mysqld

Then, monitor your cluster status with crm_mon -rf. After a few seconds, you should …


Continue reading