[Pacemaker] MySQL HA with pacemaker and DRBD - How to monitor mysql service

coma coma.inf at gmail.com
Thu Mar 22 06:33:22 EDT 2012


I have a question about mysql service monitoring into a MySQL HA cluster
with pacemaker and DRBD,
I have set up a configuration to allow a failover between two nodes, it
work fine when a node is offline (or standby), but i want to know if
it is possible
to monitor the mysql service to perform a failover if mysql is stopped or

Thank you in advance for any response.

My crm configuration:

node node1 \
        attributes standby="off"
node node2 \
        attributes standby="off"
primitive Cluster-VIP ocf:heartbeat:IPaddr2 \
        params ip="x.x.x.x" broadcast="x.x.x.x" nic="eth0"
cidr_netmask="21" iflabel="VIP1" \
        op monitor interval="10s" timeout="20s" \
        meta is-managed="true"
primitive datavg ocf:heartbeat:LVM \
        params volgrpname="datavg" exclusive="true" \
        op start interval="0" timeout="30" \
        op stop interval="0" timeout="30"
primitive drbd_mysql ocf:linbit:drbd \
        params drbd_resource="drbd-mysql" \
        op monitor interval="15s"
primitive fs_mysql ocf:heartbeat:Filesystem \
        params device="/dev/datavg/data" directory="/data" fstype="ext3"
primitive mysqld lsb:mysqld
group mysql datavg fs_mysql Cluster-VIP mysqld
ms ms_drbd_mysql drbd_mysql \
        meta master-max="1" master-node-max="1" clone-max="2"
clone-node-max="1" notify="true"
location master-prefer-node-1 Cluster-VIP 25: node1
colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master
order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start
property $id="cib-bootstrap-options" \
        cluster-infrastructure="openais" \
        expected-quorum-votes="2" \
        stonith-enabled="false" \
        no-quorum-policy="ignore" \
rsc_defaults $id="rsc-options" \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.clusterlabs.org/pipermail/pacemaker/attachments/20120322/b777c2d2/attachment-0002.html>

More information about the Pacemaker mailing list