[ClusterLabs] How to set Two active servers(Masters) using Pacemaker

Jorge Lopes jmclopes at gmail.com
Sun May 24 19:02:50 UTC 2015


If you want to run your resources in node1 and node2 when a normal
operation is in place and have the resources running in node3 when one of
the nodes has problems, then you might want to use an asymmetrical cluster.
The resources will not be started in any node unless you explicitly say it.

property symmetric-cluster=false

primitive ClusterIP  ocf:heartbeat:IPaddr2 \
        params ip="xxx.xxx.xxx.xxx \
        meta target-role="Started" \
        op monitor interval="30" timeout="60"

location loc-ClusterIP1 ClusterIP inf:    node1
location loc-ClusterIP2 ClusterIP 500:  node3

This will run your ClusterIP in node1 by default and in node3 if node1
becomes unavailable. It will never run on node2, where you can have other
resources with similar location constrains to have the node2 resources
running on node3 if node2 becomes unavailable.


On Sun, May 24, 2015 at 6:45 AM, Andrei Borzenkov <arvidjaar at gmail.com>
wrote:

> В Thu, 23 Apr 2015 02:06:31 +0530
> "Sayed Mujtaba" <mujtaba at riversilica.com> пишет:
>
> > Hi ,
> >
> > I went through the material but could not find any option to set two
> nodes
> > as Active .Can someone let me know How to set two nodes as Active
> servers ?
> >
> >
>
> You misunderstand. Nodes themselves are not active or passive (with the
> only exception of standby) - they are just nodes. Individual
> applications that you want to run under pacemaker control may have
> notion of master and slave instances; in this case it is up to you to
> define on which nodes which instances are allowed to run.
>
> >
> > Thanks
> >
> > -Mujtaba
> >
> >
> >
> >
> >
> > From: Sayed Mujtaba [mailto:mujtaba at riversilica.com]
> > Sent: Wednesday, April 22, 2015 6:15 PM
> > To: 'Cluster Labs - All topics related to open-source clustering
> welcomed'
> > Subject: [ClusterLabs] How to set Two active servers(Masters) using
> > Pacemaker
> >
> >
> >
> > Hi ,
> >
> >
> >
> > I am trying to form 3 node cluster using pacemaker  .  I want to take two
> > nodes a Master (Active nodes) and one as backup node .
> >
> > Is there any configuration step to tell it have two as Active servers?
> >
> >
> >
> > Below is snp shot of my 3 node cluster ..
> >
> >
> >
> >
> >
> >
> >
> > [root at localhost ~]# pcs status
> >
> > Cluster name: mycluster
> >
> > Last updated: Wed Apr 22 05:28:27 2015
> >
> > Last change: Tue Apr 21 15:01:40 2015 via crmd on node2
> >
> > Stack: corosync
> >
> > Current DC: node2 (2) - partition with quorum
> >
> > Version: 1.1.10-32.el7_0.1-368c726
> >
> > 3 Nodes configured
> >
> > 2 Resources configured
> >
> >
> >
> >
> >
> > Online: [ node1 node2 node3 ]
> >
> >
> >
> > Full list of resources:
> >
> >
> >
> > ClusterIP      (ocf::heartbeat:IPaddr2):       Started node1
> >
> > WebSite        (ocf::heartbeat:apache):        Started node1
> >
> >
> >
> > PCSD Status:
> >
> >   node1: Online
> >
> >   node2: Online
> >
> >   node3: Online
> >
> >
> >
> > Daemon Status:
> >
> >   corosync: active/disabled
> >
> >   pacemaker: active/disabled
> >
> >   pcsd: active/enabled
> >
>
>
> _______________________________________________
> Users mailing list: Users at clusterlabs.org
> http://clusterlabs.org/mailman/listinfo/users
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://bugs.clusterlabs.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/users/attachments/20150524/65bf4b91/attachment.htm>


More information about the Users mailing list