This is Tiki v1.8.2 (CVS) -Polaris- © 2002–2004 by the Tiki community Sat 14 of Aug, 2004 [18:23 UTC]

heartbeat

HOWTO setup a high availability cluster using Heartbeat print
Heartbeat takes care of dead node detection, and service/resource migration. Heartbeat clusters can be ridiculously simple or complex. We will cover setting up a simple cluster. To learn more about heartbeat, and how to setup even more complex setups see:
Linux HA website (cache)

I this HOWTO we are assuming that you have 2 nodes (cluster1 and cluster2) with ip addresses (192.168.0.1 and 192.168.0.2 respectively), and you will have one cluster ip (192.168.0.5).

  • Install heartbeat

$ emerge heartbeat

This should complete without any problems, but if there are any report them via
bugzilla (cache)

  • Configure heartbeat

Edit ha.cf

$ pico /etc/ha.d/ha.cf

You need at least the following settings(see below for more info about these options):
bcast eth0
keepalive 2
warntime 10
deadtime 30
auto_failback off
node cluster1
node cluster2

if you are going to be using a serial cable as a heartbeat transport:
serial /dev/ttyS0
baud 19200

bcast — send broadcast heartbeats on the device
keepalive — time between heartbeats (in seconds)
warntime — time before a warning is logged (in seconds)
deadtime — time before a node is declared dead (in seconds), and recovery starts
auto_failback — on=resources are reclaimed by original node, off= resources are not reclaimed by original node
node — uname -n of each node (i.e. you should have multiple node settings)

serial — device connected to other machine
baud — baud rate of serial device connected to other node

Other settings note mentioned above:
ucast — send unicast heartbeats to the ip of the other machine on the device
(ucast [dev] [ip of other node])
mcast — use multicast to send heartbeats to other cluster members
(mcast [dev] [mcast group] [port] [ttl] [loop])

Edit haresources
note: haresources must be identical on all cluster nodes

$ pico /etc/ha.d/haresources

you only need the following line(edit the nodenames/ip addresses accordingly):
cluster1 192.168.0.5

This will get you an ip address that moves to cluster2 if cluster1 dies

Configure Authkeys

$ pico /etc/ha.d/authkeys

You'll want to use these 2 lines, there are other choices available.

auth 1
1 sha1 key-for-sha1-any-text-you-want

  • Start heartbeat

$ /etc/init.d/heartbeat start

  • Test Heartbeat

You can pull the plug on cluster1 to test failover, or you can just shutdown heartbeat on cluster1, and watch as your cluster ip migrates to the other node.

The intial version of this doc borrowed from "Getting Started with Linux-HA" (cache)

Created by: iggy last modification: Sunday 27 of July, 2003 [04:21:19 UTC] by iggy



Login
[ register | I forgot my pass ]
Powered by TikiWiki Made with CSS Valid XHTML 1.0! powered by pear powered by adodb powered by PHP powered by smarty powered by RDF
rss Wiki rss Blogs rss Articles rss Image galleries rss File galleries rss Forums rss Maps
[ Execution time: 0.64 secs ]   [ Memory usage: 5.62MB ]   [ 51 database queries used ]   [ GZIP Disabled ]   [ Server load: 0.30 ]