You can use my mysqlping resource <a href="https://github.com/Sov1et/ocf-mysqlping">https://github.com/Sov1et/ocf-mysqlping</a><div>Start mysql on nodes manually. If you start them as clone resource yo can get some issues with restart mysql on one node.</div>
<div>So I suggest don't do this.<br><br><div class="gmail_quote">2011/5/12 Joan Mauri <span dir="ltr"><<a href="mailto:joan@freeway.com">joan@freeway.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi all,
<div><br></div><div>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. </div><div><br></div><div>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.</div>
<div><br></div><div>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. </div><div><br></div><div>My config is:</div><div><br></div><div>
<div><div>crm(live)configure# show</div><div>node $id="91e3bbf4-a8fc-416d-bb5e-ab0c0a8fa5a9" db-backupmaster</div><div>node $id="b61f8090-fb35-456c-91fd-cbb7fa869058" db-backupslave</div><div>primitive MYSQL ocf:heartbeat:mysql \</div>
<div> op monitor interval="30s" timeout="20s" \</div><div> meta migration-threshold="3"</div><div>primitive VIRTUALIP ocf:heartbeat:IPaddr2 \</div><div> params ip="10.10.65.38" \</div>
<div> op monitor interval="30s" timeout="5s" migration-threshold="3"</div><div>group MYGROUP VIRTUALIP \</div><div> meta target-role="Started"</div><div>clone mysqldclone MYSQL \</div>
<div> meta globally-unique="false" target-role="Started"</div><div>location VIRTUALIP_ON_ACTIVE_MYSQL VIRTUALIP \</div><div> rule $id="VIRTUALIP_ON_ACTIVE_MYSQL-rule" -inf: not_defined MYSQL</div>
<div>property $id="cib-bootstrap-options" \</div><div> dc-version="1.0.10-da7075976b5ff0bee71074385f8fd02f296ec8a3" \</div><div> cluster-infrastructure="Heartbeat" \</div><div>
expected-quorum-votes="2" \</div>
<div> stonith-enabled="0" \</div><div> default-resource-stickiness="1"</div></div></div><div><br></div><div>If I do a crm_mon -r</div><div><br></div><div><div>Online: [ db-backupslave db-backupmaster ]</div>
<div><br></div><div>Full list of resources:</div><div><br></div><div> Clone Set: mysqldclone</div><div> Started: [ db-backupslave db-backupmaster ]</div><div> Resource Group: MYGROUP</div><div> VIRTUALIP (ocf::heartbeat:IPaddr2): Stopped</div>
</div><div><br></div><div>can anyone suggest me how to do that location ?? or how to do that ?</div><div><br></div><div>Thanks in advance</div>
<br>_______________________________________________<br>
Pacemaker mailing list: <a href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
<a href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker" target="_blank">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
<br>
Project Home: <a href="http://www.clusterlabs.org" target="_blank">http://www.clusterlabs.org</a><br>
Getting started: <a href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf" target="_blank">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
Bugs: <a href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker" target="_blank">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Viacheslav Biriukov<br>BR<br><div><a href="http://biriukov.com" target="_blank">http://biriukov.com</a></div><br>
</div>