3

I have setup two node active/active ip failover with heartbeat and pacemaker following the link at zivtech on the two load balancers for the backend web servers. Two LBs has public ip each which is shared for failover and I checked if the ips are taken over by available lb if one lb fails and it's doing fine. Now I want to add one more load balancer for one more public ip failover(totally 3 ips) and I guess it's not possible with heartbeat. How do I do this? Any suggestions please?

Thanks!

EDIT:1

Tried directly adding 3rd node in ha.cf file with autojoin any but crm_mon didn't show the third node as if it's added neither Online nor Offline.

ha.cf:

ucast eth0 192.168.1.2
ucast eth0 192.168.1.3
ucast eth0 192.168.1.4
.....
node lb1
node lb2
node lb3
........
autojoin any

crm_mon -1:

============
Last updated: Mon Jan 16 22:29:20 2012
Stack: Heartbeat
Current DC: lb2 (47f9c1f7-e24b-4183-b9f0-9082e268578e) - partition WITHOUT quorum
Version: 1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd
2 Nodes configured, unknown expected votes
3 Resources configured.
============

Online: [ lb1 lb2 ]

 site_one_ip    (ocf::heartbeat:IPaddr):    Started lb1
 site_two_ip    (ocf::heartbeat:IPaddr):    Started lb2
 site_three_ip  (ocf::heartbeat:IPaddr):    Started lb1
user53864
  • 1,653
  • 8
  • 36
  • 66
  • Why do you think it's not possible to have a third ip? – becomingwisest Jan 15 '12 at 15:55
  • Actually, I heard heartbeat is limited to 2 nodes! – user53864 Jan 15 '12 at 16:12
  • If possible could you show me how do I do this with 3 ips with heartbeat alone or with pacemaker integration. – user53864 Jan 15 '12 at 16:15
  • Note, i have not setup a three node heartbeat setup, nor have i used pacemaker.Try adding a node grandpa, to the /etc/ha.d/ha.cf and updating all the nodes. Be sure to copy the auth keys too. Then use the crm util to add a third ip. – becomingwisest Jan 15 '12 at 16:30
  • Nice thought, I'll give a try... – user53864 Jan 15 '12 at 16:47
  • 1
    You might also look at replacing heartbeat with corosync. Heartbeat development has been discontinued in favor of corosync + pacemaker clusters. And corosync + pacemaker can have as many nodes as you want. – phemmer Jan 15 '12 at 17:12
  • @Christopher Evans: I tried adding `node`, `ucast`, with `autojoin any` but crm_mon didn't show my third node even after restarting heartbeat many times. No luck! – user53864 Jan 16 '12 at 15:54
  • @Patrick: If `corosync` does the thing what heartbeat does but for multiple nodes, I'm ready to switch. Do you know any corosync+pacemaker link for ubuntu? – user53864 Jan 16 '12 at 15:56
  • @user53864: Try http://www.clusterlabs.org/wiki/Initial_Configuration . Its pretty simple to switch since you've already got pacemaker set up. Once youve gone through that page (doing the corosync instructions) you should be able to start corosync, then pacemaker, and it'll just work. – phemmer Jan 16 '12 at 23:41
  • I didn't see as no where it's describing about adding multiple nodes in the above clusterlabs link... – user53864 Jan 26 '12 at 02:52

1 Answers1

2

Whoever in curious to know if heartbeat with more than 2 node is possible, then I say heartbeat is not limited to 2 nodes we can join more than 2 nodes. Actually I didn't copy the same authkey for the 3rd node. All the three nodes is listing now.

I Also tried Corosync, and one of the node I couldn't get online don't know why having all config and keys same, just started doubting the reliability of the Corosync which never happend in Heartbeat. Moreover, no support for Unicast in corosysnc didn't impress much.

Thanks!

user53864
  • 1,653
  • 8
  • 36
  • 66
  • 1
    Thanks for confirming that Heartbeat does work with more than 2 nodes. Just a point of mention though, Corosync does support Unicast (as of version 1.3 (Nov. 2010) - unfortunately, most repositories don't yet have that version) - see [this question](http://serverfault.com/questions/276170/alternatives-to-heartbeat-pacemaker-and-corosync/286516#286516) for more info. – cyberx86 Feb 10 '12 at 01:10
  • First of all Thank you revealing the secret!. I definitely don't leave `Corosync` if it supports and works with unicast as you said if I use 1.3. Is `bindnetadd` is required again specifying network id?. Just thinking how to install the version 1.3, if building from source works fine. – user53864 Feb 10 '12 at 03:58
  • Corosync can be built from source, but I prefer to build binaries, since they have to be deployed to multiple nodes (and I try to avoid having development tools on production machines). `bindnetaddr` is required in the interface section - it is a network address, not an interface address (since you want it to remain the same across all configurations) - so, typically just zero out the last octal of the local interface address. (If you are building RPMs, the process differs slightly from the typical rpmbuild - just use `./autogen.sh && ./configure` and `make rpm`). – cyberx86 Feb 10 '12 at 12:23