You can use my mysqlping resource https://github.com/Sov1et/ocf-mysqlping
Start mysql on nodes manually. If you start them as clone resource yo can
get some issues with restart mysql on one node.
So I suggest don't do this.

2011/5/12 Joan Mauri <j...@freeway.com>

> Hi all,
>
> I've been struggling with this for a few days/weeks and I don't know what
> to do. I would really appreciate some help.
>
> I need to run MYSQL in 2 nodes and use a virtual IP which will switch from
> one node to the other one in case MYSQL fails in one of the other nodes. The
> important constraint is that i MYSQL must run on both nodes at the same
> time.
>
> So I decided to clone MYSQL and I've tried to configure a location binding
> VIRTUALIP (or the group) to MYSQL service... but no luck.
>
> My config is:
>
> crm(live)configure# show
> node $id="91e3bbf4-a8fc-416d-bb5e-ab0c0a8fa5a9" db-backupmaster
> node $id="b61f8090-fb35-456c-91fd-cbb7fa869058" db-backupslave
> primitive MYSQL ocf:heartbeat:mysql \
>         op monitor interval="30s" timeout="20s" \
>         meta migration-threshold="3"
> primitive VIRTUALIP ocf:heartbeat:IPaddr2 \
>         params ip="10.10.65.38" \
>         op monitor interval="30s" timeout="5s" migration-threshold="3"
> group MYGROUP VIRTUALIP \
>         meta target-role="Started"
> clone mysqldclone MYSQL \
>         meta globally-unique="false" target-role="Started"
> location VIRTUALIP_ON_ACTIVE_MYSQL VIRTUALIP \
>         rule $id="VIRTUALIP_ON_ACTIVE_MYSQL-rule" -inf: not_defined MYSQL
> property $id="cib-bootstrap-options" \
>         dc-version="1.0.10-da7075976b5ff0bee71074385f8fd02f296ec8a3" \
>         cluster-infrastructure="Heartbeat" \
>         expected-quorum-votes="2" \
>         stonith-enabled="0" \
>         default-resource-stickiness="1"
>
> If I do a crm_mon -r
>
> Online: [ db-backupslave db-backupmaster ]
>
> Full list of resources:
>
>  Clone Set: mysqldclone
>      Started: [ db-backupslave db-backupmaster ]
>  Resource Group: MYGROUP
>      VIRTUALIP  (ocf::heartbeat:IPaddr2):       Stopped
>
> can anyone suggest me how to do that location ?? or how to do that ?
>
> Thanks in advance
>
> _______________________________________________
> 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
>
>


-- 
Viacheslav Biriukov
BR
http://biriukov.com
_______________________________________________
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

Reply via email to