[Pacemaker] HA setup of MySQL service using Pacemaker/DRBD

David Vossel dvossel at redhat.com
Mon Nov 17 11:59:22 EST 2014

----- Original Message -----
> Hi,
> I have a working 2 node HA setup running on CentOS 6.5 with a very simple
> Apache webserver with replicated index.html using DRBD 8.4. The setup is
> configured based on the "Clusters from Scratch" Edition 5 with Fedora 13.
> I now with to replace Apache with a MySQL database, or just simply add it.
> How can I do so? I'm guessing the following:
> 1 . Add MySQL service to the cluster with a "crm configure primitive"
> command. I'm not sure what the params should be though, e.g. the configfile.
> 2. Set the same colocation/order rules.
> 3. Create/initialize a separate DRBD partition for MySQL (or can I reuse the
> same partition as Apache assuming I'll never exceed its capacity?)
> 4. Copy the database/table into the mounted DRBD partition.
> 5. Configure the cluster for DRBD as per Chapter 7.4 of the guide.
> Is this correct? Step by step instructions would be appreciated, I have some
> experience in RHEL/CentOS but not in HA nor MySQL.

You've got the right idea.  I don't have a step by step guide crmsh, but
here's a basic MySQL deploy on shared storage that I test with pcs. I just
mount the shared storage partition to the /var/lib/mysql directory, then start
mysql. From there the database mysql uses exists on shared storage and can follow
the mysql instance wherever it goes in the cluster.


-- Vossel

> Thanks!
> --
> - Goi Sihan
> goister at gmail.com
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org

More information about the Pacemaker mailing list