*** (0.28) *** Re: [Linux-HA] Two node cluster with Postgres in WAL file fwding mode

Andrew Beekhof beekhof at gmail.com
Mon Mar 5 03:55:37 MST 2007


On 3/2/07, Serge Dubrouski <sergeyfd at gmail.com> wrote:
> On 3/2/07, Alan Robertson <alanr at unix.sh> wrote:
> > Serge Dubrouski wrote:
> > > On 3/2/07, Andrew Beekhof <beekhof at gmail.com> wrote:
> > >> On 3/1/07, Serge Dubrouski <sergeyfd at gmail.com> wrote:
> > >> > Here is the main idea, though I can't test it and I never used it:
> > >> >
> > >> > You need to have 2 instances of PostgreSQL configured, one for active
> > >> > and one for passive with collocation rules that they should never run
> > >> > on the same node. For both instances you can use pgsql RA that comes
> > >> > with standard Heartbeat distribution but you need to use different OCF
> > >> > parameters to make your instances work in different modes.
> > >>
> > >> or alternatively, add master-slave capabilities to the RA
> > >> have it start in standby mode, promote could make it active and demote
> > >> return it to standby
> > >
> > > In the document describing master/slave concept it is said that RA is
> > > fully reponsible on identifying in which state the reource is.
> >
> > Yes.  But, that's not the same as _putting it into that state_.
> > Heartbeat will do that.
> > > But how
> > > would RA know to what state it should bring the resource at start
> > > time? How would it know the state of the resource on peer nodes? Let
> > > say we have a master copy of DB running on node A and we need 2 copies
> > > that DB in warm stand-by mode on nodes B and C. How would RA on node B
> > > know if DB on A is still up? Looks like crm_master should be used for
> > > that but it's nor clear how it should be used.
> >
> > When a node is capable of being master (not that it _is_ master) then
> > you should issue the crm_master command -- so that heartbeat knows that
> > it's eligible to become master according to whatever criteria criteria
> > the resource defines for that role.  This criteria will vary from
> > resource type to resource type.
> >
> > Does that help?
>
> Not really. If both nodes are capable to be master or slave how whould
> RA know what should be started?

it doesn't.  see below

> It sounds that there should be some
> kind of external process or trigger that tells RA what mode has to be
> started.

* an RA must _always_ start in "slave" mode.
* as part of the start action, it can use the crm_master utility to
indicate how badly it wants/needs to be the master.
* based on this information, the PE will chose one or more instances
to be master
* each chosen instance will then have it's "promote" action called

* also, before a "master" instance is stopped, it will have its
"demote" action called


More information about the Linux-HA mailing list