[Pacemaker] MySQL/PostgreSQL HA cluster with Pacemaker

Andrew Beekhof andrew at beekhof.net
Mon Nov 5 00:24:16 EST 2012


On Fri, Nov 2, 2012 at 7:03 PM, Andrew <nitr0 at seti.kr.ua> wrote:
> On 02/11/12 01:02, Andrew Beekhof wrote:
>>
>> On Fri, Nov 2, 2012 at 2:34 AM, Andrew<nitr0 at seti.kr.ua>  wrote:
>>>
>>> On 01/11/12 03:02, Andrew Beekhof wrote:
>>>>
>>>> On Thu, Nov 1, 2012 at 5:27 AM, Andrew<nitr0 at seti.kr.ua>   wrote:
>>>>>
>>>>> Hi all.
>>>>> I try to build 1+1 MySQL HA cluster, and currently I'm looking on
>>>>> Percona
>>>>> replication manager; other variant - to write own OCF for
>>>>> semi-synchronous
>>>>> master-slave replication. Also I want to run here PostgreSQL HA DB.
>>>>> So I have some questions:
>>>>> 1) How pacemaker decides what node should be master, when both nodes
>>>>> booting
>>>>> after, for ex., power failure? First running node will become a master,
>>>>> or
>>>>> Pacemaker can wait some time till node, that was a master before crash,
>>>>> will
>>>>> be running?
>>>>
>>>> We run monitor on both nodes.
>>>> This is the chance for the resource agent script to tell us their
>>>> preference for being promoted to master.
>>>> We then factor that into our decision.
>>>
>>> Can you explain? Pacemaker doesn't start master resource automatically if
>>> slave is booted succesfully and master is still booting/crashed at boot?
>>
>> It does, but it first makes sure the failed node isn't running
>> anything by fencing it.
>
> So if old master is still booting (for ex., fs check in progress) and hasn't
> running corosync - slave will become a master, and data that wasn't
> replicated to slave will be lost?

It depends if the old master did a clean shutdown while the new master
was active.
If not, then the old master will be fenced (ie. turned off) - with any
consequences that may imply for the data only it had.

Probably it has not been lost yet, but you will get divergent datasets
which may or may not be just as bad.
There is really no way to get transactions off a failed node
automatically, you really need to replicate them /before/ there is a
failure.

> This isn't too critical in most cases (except when one node is crashed and
> after some time all nodes will be rebooted due to power failure), but is
> there a possibility to avoid this behavior?
>
>
> _______________________________________________
> 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://bugs.clusterlabs.org




More information about the Pacemaker mailing list