[Pacemaker] Help for Master/Slave Mysql with Pacemaker

rvm at free.fr rvm at free.fr
Mon Mar 9 09:37:45 EDT 2009


Hello,

I'm trying to setup a master/slave mysql with a VIP on my master and a VIP on my slave.
The idea is to use a VIP for R/W connections on the master node and a VIP for R/O connections in the slave node. The R/W VIP always run with the Master role and the R/O can run on the Master node only if the Slave failed (so the R/O VIP prefer to run on a the Slave node).
Actually, with my configuration, my R/W VIP is always on my Master but I can't say to my R/O VIP to prefer run on the Slave node !
My conf (no rules for my R/O VIP) :
primitive MAIL-RO ocf:heartbeat:MailTo \
        params email="MY MAIL" subject="HA"
primitive VIP-SQL-RO ocf:heartbeat:IPaddr2 \
        params ip="x" broadcast="x" nic="eth0" cidr_netmask="24" \
        op monitor interval="11s" timeout="2s"
primitive MAIL-RW ocf:heartbeat:MailTo \
        params email="MY MAIL" subject="HA"
primitive VIP-SQL-RW ocf:heartbeat:IPaddr2 \
        params ip="x" broadcast="x" nic="eth0" cidr_netmask="24" \
        op monitor interval="10s" timeout="2s"
primitive MYSQL ocf:my_ocf:mysql \
        op monitor interval="10s" role="Master" timeout="2s" \
        op monitor interval="11s" role="Slave" timeout="2s"
group RESOURCES-SQL-RO MAIL-RO VIP-SQL-RO
group RESOURCES-SQL-RW MAIL-RW VIP-SQL-RW
ms MasterSlave_MYSQL MYSQL \
        meta clone-max="2" notify="false" globally-unique="false" target-role="Started"
colocation RW-on-MASTER inf: RESOURCES-SQL-RW MasterSlave_MYSQL:Master
order MYSQL_RW-before-GROUP inf: MasterSlave_MYSQL:promote RESOURCES-SQL-RW:start
order MYSQL_RO-before-GROUP inf: MasterSlave_MYSQL:demote RESOURCES-SQL-RO:start
property $id="cib-bootstrap-options" \
        dc-version="1.0.2-c02b459053bfa44d509a2a0e0247b291d93662b7" \
        stonith-enabled="false" \
        no-quorum-policy="ignore"

Any ideas ?
Thanks a lot ! 




More information about the Pacemaker mailing list