-   Linux - Server (
-   -   MySQL HA-cluster with DRBD, Pacemaker and Corosync (

Patric.F 12-21-2010 08:00 AM

MySQL HA-cluster with DRBD, Pacemaker and Corosync

I'm setting up a HA-cluster with two Debian Lenny nodes. They both run on two separate VMware ESX-servers.

I have DRBD configured properly, one Primary and one Secondary and it sync just fine.
I use Corosync and Pacemaker for the cluster and I have setup a failover IP that also works just fine using this guide:

Now I want to implement MySQL and DRBD.
I found a guide on: and one on DRBDs site:

But they don't tell me why and what I'm doing. I want to have 100% control of the cluster so I will know exactly how it's set up. I can't either find any documentation about the resources they use in the guides..

Is there anyone that can point me in the right direction to some documentation or maybe tell me what I have to do or what this config does:


crm(live)configure# primitive drbd_mysql ocf:linbit:drbd \
                    params drbd_resource="mysql" \
                    op monitor interval="15s"
crm(live)configure# ms ms_drbd_mysql drbd_mysql \
                    meta master-max="1" master-node-max="1" \
                        clone-max="2" clone-node-max="1" \
crm(live)configure# primitive fs_mysql ocf:heartbeat:Filesystem \
                    params device="/dev/drbd/by-res/mysql" directory="/var/lib/mysql" fstype="ext3"
crm(live)configure# primitive ip_mysql ocf:heartbeat:IPaddr2 \
                    params ip="" nic="eth0"
crm(live)configure# primitive mysqld lsb:mysqld
crm(live)configure# group mysql fs_mysql ip_mysql mysqld
crm(live)configure# colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master
crm(live)configure# order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start


-=Graz=- 01-27-2012 08:29 PM


I plan on trying out a similar project myself soon on fc13.

I found this guide which goes into a good amount of detail around what is going on during the configuration process - this is the one i plan on following.

Not sure if this helps but here:


Patric.F 01-28-2012 05:27 AM

Wow thanks, that document actually looks really nice! I will have a look at it this weekend when I get some time.
Thanks a lot for sharing! :)

All times are GMT -5. The time now is 01:25 AM.