[Pacemaker] [pacemaker] configuring Multi state resource in pacemaker/HA

Andrew Beekhof andrew at beekhof.net
Tue May 10 02:39:03 EDT 2011


On Fri, May 6, 2011 at 7:30 AM, rakesh k <rakirocker4236 at gmail.com> wrote:
> Hi All
>
> I had configured Mysql process in Linux Ha framework.
>
> Please find the HA configuration for mysql process.
>
> primitive Mysql ocf:heartbeat:mysql \
>         params binary="/usr/bin/mysqld_safe" config="/etc/my.cnf"
> datadir="/var/lib/mysql" user="mysql" pid="/var/lib/mysql/mysql.pid"
> socket="/var/lib/mysql/mysql.sock" test_passwd="slavepass"
> test_table="test.msf_list" test_user="repl" replication_user="repl"
> replication_passwd="slavepass" \
>         op start interval="0" timeout="120s" \
>         op stop interval="0" timeout="120s" \
>         op monitor interval="10s" role="Master" timeout="8s" \
>         op monitor interval="12s" timeout="8s"
> primitive MysqlVIP ocf:heartbeat:IPaddr3 \
>         params ip="192.168.254.217" eth_num="eth0:3"
> vip_cleanup_file="/var/run/bigha.pid" \
>         op start interval="0" timeout="120s" \
>         op stop interval="0" timeout="60s" \
>         op monitor interval="30s" \
>         meta target-role="Started"
> ms MS_Mysql Mysql \
>         meta notify="true" target-role="Started"
> location L_Master MS_Mysql \
>         rule $id="L_Master-rule" $role="Master" 100: #uname eq mysql2 \
>         rule $id="L_Master-rule1" $role="Master" 100: #uname eq mysql3
>
> Here are my scenarios
>
> 1) when i started the Ha process on both the nodes , Mysql process has been
> sarted
> 2) The Master is pointing to mysql2 node
> 3) now i stopped the HA process on node mysql2, then Master mysql has been
> migrated to mysql3
> 4)The data is stored in mysql3 node
> 5) Now again i stopped HA process on mysql3 node .
> 6) And started HA process in Mysql2, Now here i found there is data
> inconsistent at this point of time on both the nodes, where if we update the
> mysql2 node and start the HA process on mysql3 node , found there is
> inconsistent of data on both the nodes.

Well yeah, because they were not both running at the same time - so
there was no chance to replicate the data from 3 -> 2.

>
> Is there is a way to dynamically change the score values of the mysql
> process such that when ever both the nodes started the last mysql master
> will act as a master mysql process.

call crm_master with a different value.
I don't know enough about mysql to say how to calculate it though -
and it wont stop 2 from being promoted if 3 isn't running.


>
>
> Looking forward for your help, thank you very much
>
> Regards
> Rakesh
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at 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
>
>




More information about the Pacemaker mailing list