[Pacemaker] Help for Master/Slave Mysql with Pacemaker

Rvm rvm at free.fr
Tue Mar 10 16:57:27 UTC 2009


Thanks for your answer. I've already try a colocation rule like this but
it doesn't work.
Here my hb_report.

Thanks again.

Andrew Beekhof a écrit :
> On Mon, Mar 9, 2009 at 14:37,  <rvm at free.fr> wrote:
>   
>> 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
>>     
>
>
> colocation RO-on-MASTER 10000: RESOURCES-SQL-RO MasterSlave_MYSQL:Slave
>
> 10000 == a lot but not "infinity", this means it prefers to live with
> the slave, but can live with the master if the slave is not available
>
>   
>> 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 !
>>
>> _______________________________________________
>> Pacemaker mailing list
>> Pacemaker at oss.clusterlabs.org
>> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>>
>>     
>
> _______________________________________________
> Pacemaker mailing list
> Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: report6.tar.bz2
Type: application/x-bzip
Size: 29006 bytes
Desc: not available
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20090310/24804857/attachment-0002.bin>


More information about the Pacemaker mailing list