If you run XtraDB/Galera in a 2 nodes cluster, it implies that on a split-brain event both nodes will goes down. That’s the default behavior of the cluster management system of Galera. This could be changed but we don’t really want that. This is why we use garbd in order to prevent split-brain situation. Basically it connects to your cluster and acts as a member. Let’s say someone, inadvertently bring down the dedicated link interface of your cluster, you’re in big trouble. In this particular situation garbd will act as a replication replay. That will let you some time to investigate about the outage without any downtime.
This article doesn’t aim to explain how Galera works neither garbd. For this you can refer to my Galera post.
On both both cluster nodes, add the Percona repository
$ sudo echo"deb http://repo.percona.com/apt squeeze main" > /etc/apt/sources.list.d/percona.list $ sudo echo" deb-src http://repo.percona.com/apt squeeze main" >> /etc/apt/sources.list.d/percona.list $ sudo gpg --keyserver hkp://keys.gnupg.net --recv-keys 1C4CBDCDCD2EFD2A gpg: directory `/root/.gnupg' created gpg: new configuration file `/root/.gnupg/gpg.conf' created gpg: WARNING: options in `/root/.gnupg/gpg.conf' are not yet active during this run gpg: keyring `/root/.gnupg/secring.gpg' created gpg: keyring `/root/.gnupg/pubring.gpg' created gpg: requesting key CD2EFD2A from hkp server keys.gnupg.net gpg: /root/.gnupg/trustdb.gpg: trustdb created gpg: key CD2EFD2A: public key "Percona MySQL Development Team <[email protected]>" imported gpg: Total number processed: 1 gpg: imported: 1 $ sudo gpg -a --export CD2EFD2A | sudo apt-key add - OK
Download and install the package which contains garbd: