Joe: Yes. There is now support for replication (master/slave):
- See if the installed MySQL RA (Resource Agent) includes support for replication (your paths might be different) grep -i 'replication capability' /usr/lib/ocf/resource.d/heartbeat/mysql # Marian Marinov, Florian Haas: add replication capability - If not (grep's empty), then grab the latest from GitHub?<https://trac.dechocorp.com/wiki/GitHub>: wget https://raw.github.com/ClusterLabs/resource-agents/master/heartbeat/mysql - Backup the current MySQL RA, move the new one in place (paths might be different): mv /usr/lib/ocf/resource.d/heartbeat/mysql /usr/lib/ocf/resource.d/heartbeat/mysql.backup mv mysql /usr/lib/ocf/resource.d/heartbeat/mysql chmod +x /usr/lib/ocf/resource.d/heartbeat/mysql - You might have to do something like this if your paths are off -- Patch the new MySQL RA:: Open /usr/lib/ocf/resource.d/heartbeat/mysql and replace: : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} . ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs with : ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat} . ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs ~Mike On Mon, Oct 31, 2011 at 1:39 PM, Joe <wees...@hotmail.com> wrote: > 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 > > > _______________________________________________ > Pacemaker mailing list: Pacemaker@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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker > >
_______________________________________________ Pacemaker mailing list: Pacemaker@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://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker