[Pacemaker] Circular replication help needed - how to make sure VIP runs on same node with a healthy mysql

Michael Marrotte marrotte at gmail.com
Sun Nov 6 10:48:45 EST 2011


Attila:

Hope this helps:

primitive p_mysql ocf:heartbeat:mysql \
        params binary="/usr/sbin/mysqld" config="/etc/mysql/my.cnf" \
            replication_user="xxx" replication_passwd="xxx" \
            test_passwd="password" pid="/var/run/mysqld/mysqld.pid" \
            socket="/var/run/mysqld/mysqld.sock" \
        params additional_parameters="--skip-slave-start \
             --log-bin=/var/log/mysql/mysqld-bin.log \
             --relay-log=/var/log/mysql/mysqld-relay-bin.log" \
        op start interval="0" timeout="120" \
        op stop interval="0" timeout="120" \
        op promote interval="0" timeout="120" \
        op demote interval="0" timeout="120" \
        op monitor interval="30" timeout="30" OCF_CHECK_LEVEL="1"

ms ms_mysql p_mysql \
        meta notify="true" master-max="1" clone-max="2"

colocation sql-master-ip-with-ms_sql-master inf: sql-master-ip ms_mysql:Master
colocation sql-slave-ip-with-ms_sql-slave inf: sql-slave-ip ms_mysql:Slave

~Mike


On Sun, Nov 6, 2011 at 9:34 AM, Florian Haas <florian at hastexo.com> wrote:

> On 2011-11-05 18:20, Attila Megyeri wrote:
> > Hello,
> >
> >
> >
> > I am having a hard time configuring a relatively simple mysql
> environment.
> >
> >
> >
> > What I’d like to achieve is:
> >
> > ·         One master and a slave, with replication
> >
> > ·         Relatively quick failover if the master node, or Mysql fail.
> >
> >
> >
> > I tried the Mysql cluster approach, but seemed to be too slow, and to
> > many limitations (foreign keys, triggers, views, etc).
> >
> >
> >
> > I decided to go with the Mysql replication.
>
> You want a simple 2-node MySQL cluster with failover? Why not go with
> DRBD then, as everyone else would in that situation?
>
> > Tried to use the mysql RA from clusterlabs 3.9.2 – but no luck,
> > replicaiton simply did not work out.
>
> Sorry to say this, but as a co-author of that agent I'll say that that's
> exactly the kind of feedback we strongly dislike, as it doesn't help us
> at all improving the agent, or its documentation. So,
>
> - What were you trying to achieve?
> - What was your configuration?
> - What went wrong?
> - What were you unable to fix?
>
> For the DRBD based approach (which I would highly recommend), do
> consider taking a look at
>
> http://www.hastexo.com/content/mysql-high-availability-sprint-launch-pacemaker
> .
> We'll be happy to provide you with the virtual images used in this
> tutorial, so you can set things up yourself in a cleanroom testing
> environment.
>
> Cheers,
> Florian
>
> --
> Need help with High Availability?
> http://www.hastexo.com/now
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20111106/28371a7d/attachment-0003.html>


More information about the Pacemaker mailing list