[Pacemaker] can pacemaker do mysql Master/Slave.

Joe weester at hotmail.com
Mon Oct 31 13:39:52 EDT 2011


I have a quick question is the Master Slave setting in pacemaker only 
allowed in regards to a DRBD device? Can you use it to create other 
Master Slave relationships such as mysql . What I am trying to do is to 
failover mysql service on a primary to a secondary if the mysql service 
fails on the primary . Here is my RA Mysql Service.

_crm configure show_
node mysqldrbd01 \
         attributes standby="off"
node mysqldrbd02 \
         attributes standby="off"
primitive DRBD ocf:linbit:drbd \
         params drbd_resource="QD-RES" \
         operations $id="DRBD-operations" \
         op start interval="0" timeout="240" \
         op stop interval="0" timeout="100" \
         op monitor interval="120" \
         meta target-role="started"
primitive FAILOVER-ADDR ocf:heartbeat:IPaddr2 \
         params ip="192.168.1.160" nic="eth1" \
         operations $id="FAILOVER-ADDR-operations" \
         op monitor start-delay="0" interval="10" \
         meta target-role="started"
primitive PING-NET ocf:pacemaker:ping \
         params multiplier="100" host_list="192.168.1.5" \
         operations $id="PING-NET-operations" \
         op start interval="0" timeout="60" \
         op stop interval="0" timeout="60" \
         op monitor interval="60" timeout="60" start-delay="0" \
         meta target-role="started"
primitive SRV-MOUNT ocf:heartbeat:Filesystem \
         params device="/dev/drbd0" directory="/data/" fstype="ext3" \
         operations $id="SRV-MOUNT-operations" \
         op start interval="0" timeout="60" \
         op stop interval="0" timeout="60" \
         meta target-role="started"
primitive res_mysqld_MYSQL_SRV lsb:mysqld \
         operations $id="res_mysqld_MYSQL_SRV-operations" \
         op start interval="0" timeout="15" \
         op stop interval="0" timeout="15" \
         op monitor interval="15" timeout="15" start-delay="15"
group AP-CLUST SRV-MOUNT FAILOVER-ADDR
ms DRBD-DATA DRBD \
         meta clone-max="2" notify="true" target-role="started"
ms MYSQ_MASTER_SLAVE res_mysqld_MYSQL_SRV \
         meta clone-max="2" notify="true" target-role="started"
clone PING-NET-CLONE PING-NET \
         meta clone-max="2"
location connected_node DRBD-DATA \
         rule $id="connected_node-rule" -inf: not_defined pingd or pingd 
lte 0
colocation AP-CLUST_on_DRBD inf: AP-CLUST DRBD-DATA:Master
order AP-CLUST_after_DRBD-DATA inf: DRBD-DATA:promote AP-CLUST:start
property $id="cib-bootstrap-options" \
         expected-quorum-votes="2" \
         stonith-enabled="false" \
         dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87" \
         no-quorum-policy="ignore" \
         cluster-infrastructure="openais" \
         last-lrm-refresh="1320082592"
rsc_defaults $id="rsc-options" \
         resource-stickiness="100"




thank you very much,
Joe

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111031/efff2f39/attachment-0003.html>


More information about the Pacemaker mailing list