[Pacemaker] 2 node failover cluster + MySQL Master-Master replica setup

Dan Frincu dfrincu at streamwide.ro
Fri Nov 12 12:50:45 UTC 2010


Hi,

Ruzsinszky Attila wrote:
> Hi,
>
>   
>> A MySQL Multi-Master architecture for a 2 node setup brings a lot of
>> configuration and administration overhead and has no conflict detection or
>> resolution. Integrating such a setup with Pacemaker only adds to the
>>     
> Yes, I found it.
> The real story: I want to learn clustering with a 2 node failover cluster.
> I configured the cluster by DMC (DRBD Management Console).
> I used the GUI configuring a MySQL service. It was almost unsuccessfull
> which wasn't a surprise for me. After that I started to read some HowTo,
> WEB page, etc. for help. I found someone from #mysql-nbd channel who
> helped me and adviced me using M-M MySQL config but he doesn't know
> almost anything about Pacemaker (He uses RH cluster).
>   
And now (officially) RHCS can also use Pacemaker 
http://theclusterguy.clusterlabs.org/post/1551292286
> After we did the working M-M config I started pacemaker and I could see
> MySQL is working. I could connect to the commonIP and I could create a
> test DB. Everything seemed all right until I put standby the master node
> (from pacemaker point of view). In that moment mysqld started to "blinking"
> between working and not working state because pacemaker always restarted
> the process.
>
> In the messages file I clould see some lines about missing privs. (RELOAD
> and SUPER).
>
> So I'm here now.
>   
Yeah, like I said, Master-Master and Pacemaker without a proper resource 
agent will cause issues.
>   
>> server. Even the LSB script doesn't handle a Multi-Master setup. You'd have
>> to write a custom resource agent, and it would probably fit your setup and
>> your setup alone, meaning it couldn't be widely used for other setups, I
>> know I had to make some modifications to the mysql resource agent and those
>> changes were specific to my setup.
>>     
> No, I don't want to write scripts. I'm not a programmer. I just want
> to try out a
> new tech for MySQL clustering except MySQL+DRBD.It is clear for me
> theoretically. The files of mysqld reside on the common dir. which was switched
> by DRBD. Is that right?
>   
Yes.
>   
>> MySQL Cluster is a choice, it could be integrated with Pacemaker, although I
>>     
> Now I don't want MySQL Cluster. I think it is a bigger task for me.
>
>   
>> Anyways, this is just to get a feel for what's involved in the process, and
>> how Pacemaker would fit the picture, at least from my point of view.
>>     
> OK
>
>   
>> I would recommend all questions related to MySQL Cluster, Replication,
>> Multi-Master be directed to the appropriate mailing lists though, and if you
>>     
> As I mentioned I've got an M-M config from #mysql-nbd.
> The recent problem is MySQL (M-M) + Pacemaker.
>   
Back to square one, don't pass go, don't collect $200. No resource 
agent, big problems. Now let me explain this, a 2-node Multi-Master 
MySQL setup means setting up every node as both Master and Slave, node 
1's Master replicates asynchronously to node 2's Slave and node 2's 
Master replicates asynchronously to node 1's Slave. The replication 
channels between the two are not redundant, nor do they recover from 
failure automatically and you have to manually set the 
auto-increment-increment and auto-increment-offset so that you don't 
have primary key collisions.

Now imagine a resource agent and what it should do to keep the resources 
up. First you need to check periodically (monitor) the replication 
channels, if they fail, you must determine which node has the most 
recent information and make sure that first it's information is sent to 
the other node via the Slave replication channel, then activate the 
reverse Master-Slave channel, otherwise you'd be in a MySQL 
'split-brain' situation, where each node has information written to it 
and the database now contains different views on each server. Looking at 
how DRBD handles these kinds of things is one way to go about it, but 
... it's a huge task and there are a lot of things that can go terribly 
wrong.

So again, for the third time, the problem is not the Multi-Master setup, 
nor it is Pacemaker, it's just a very specific use case for which a 
resource agent wasn't written.

Regards,

Dan
>   
>> want to write a resource agent for a Multi-Master setup, by all means, do
>> share :)
>>     
> No, I don't want. I'm a beginner both in clustering and MySQL.
>
>   
>> Hope this helps.
>>     
> Yes, of course.
>
> BTW.
> If I want to solve the above problem can you help me? 
> Of course with my
> strict error messages, config files, etc. I "feel" my M-M config is not
> rock stable (I was able to brake the IO or SQL "channel" between the
> two mysqld processes) so I don't know whether I want this type of setup.
>
> TIA,
> Ruzsi
>
> _______________________________________________
> 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
>   

-- 
Dan FRINCU
Systems Engineer
CCNA, RHCE
Streamwide Romania

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20101112/38107ce7/attachment-0002.htm>


More information about the Pacemaker mailing list