[Pacemaker] MySQL Master-Master replication with Corosync and Pacemaker

Andrew Beekhof andrew at beekhof.net
Sun Jan 29 22:02:36 EST 2012


On Sat, Jan 28, 2012 at 5:45 AM, Peter Scott <Peter at psdt.com> wrote:
> On 1/26/2012 8:12 PM, gustavo panizzo <gfa> wrote:
>>>
>>> crm_mon says it is starting mysqld on mysql01.
>>> (I think it actually stopped and restarted mysqld on mysql01 but
>>> haven't been able to verify yet.  Seems gratuitous, but I can live
>>> with that though.)
>>
>> do not start clustered services from init
>>
>> this is not pacemaker specific, any cluster vendor will tell you the
>> same
>>
> Okay, but I can't see how that solves my problem, and testing shows it
> doesn't.
>
> mysqld          0:off   1:off   2:off   3:off   4:off   5:off   6:off
>
> Now when I reboot both machines pacemaker starts mysqld on the preferred
> node and never starts it at all on the other node.  That's no good because
> if the preferred node ever goes down the other node won't have an up-to-date
> copy of the database replicated from it.
>
> We can't be the first people who want to have transparent failover of a
> database, and that means that there must be another mysql server for the
> first one to replicate all changes to.  Is pacemaker simply the wrong tool
> to manage this with?  Because pacemaker seems to require that only one node
> should be running its managed service at a time.  Or have I just failed to
> understand how to configure it to act differently?  Thanks.

You need to look for the master/slave resource type.
This might get you started:
   http://www.mysqlperformanceblog.com/2011/11/29/percona-replication-manager-a-solution-for-mysql-high-availability-with-replication-using-pacemaker/




More information about the Pacemaker mailing list