This site best when viewed with a modern standards-compliant browser. We recommend Firefox Get Firefox!.

Linux-HA project logo
Providing Open Source High-Availability Software for Linux and other OSes since 1999.

USA Flag UK Flag

Japanese Flag

Homepage

About Us

Contact Us

Legal Info

How To Contribute

Security Issues

This web page is no longer maintained. Information presented here exists only to avoid breaking historical links.
The Project stays maintained, and lives on: see the Linux-HA Reference Documentation.
To get rid of this notice, you may want to browse the old wiki instead.

1 February 2010 Hearbeat 3.0.2 released see the Release Notes

18 January 2009 Pacemaker 1.0.7 released see the Release Notes

16 November 2009 LINBIT new Heartbeat Steward see the Announcement

Last site update:
2017-12-13 22:10:50

A Basic Single IP address Configuration

The most common, basic configuration is that of a high-availability server which simply provides a single IP address (1.2.3.4) to be failed over between the nodes of our cluster. This is an ActivePassive configuration - the most basic configuration.

/etc/ha.d/ha.cf file

This is for Heartbeat 1.2.x

logfacility daemon         # Log to syslog as facility "daemon"
node paul silas            # List our cluster members
keepalive 1                # Send one heartbeat each second
deadtime 10                # Declare nodes dead after 10 seconds
bcast eth0 eth1            # Broadcast heartbeats on eth0 and eth1 interfaces
ping 1.2.3.254             # Ping our router to monitor ethernet connectivity
auto_failback no           # Don't fail back to paul automatically
respawn hacluster /usr/lib/heartbeat/ipfail  # Failover on network failures

This is for Heartbeat 2.0.x without CRM

logfacility     daemon
keepalive 1
deadtime 10
warntime 5
initdead 120 # depend on your hardware
udpport 694
ping 1.2.3.254
bcast eth0
auto_failback off
node    paul
node    silas
respawn hacluster /usr/lib/heartbeat/ipfail
use_logd yes

This is for Heartbeat 2.0.x with CRM

logfacility     daemon
keepalive 1
deadtime 10
warntime 5
initdead 120 # depend on your hardware
udpport 694
ping 1.2.3.254
bcast eth0
auto_failback off
node    paul
node    silas
use_logd yes
compression     bz2
compression_threshold 2
crm yes

See the ipfail page for more information on ipfail.

bcast / mcast / ucast

If you want less broadcast traffic, use ucast, which is strictly peer-to-peer. bcast is limited to the logical segment and not routed, while ucast/mcast are potentially routed. ucast duplicates the packets, as it has to be sent to each node and not just broad/multicasted to all of them at the same time.

/etc/ha.d/haresources file

For Heartbeat version 2 with CRM, you'll need to modify cib.xml instead of this file. Please see the Basic Single IP address Configuration for version 2 page for details.

paul    1.2.3.4

The first word (paul) on the line represents the "preferred" host for the service. The remainder of the line is the list of resources (services) which are part of this ResourceGroup. In this case, there is only one resource -- an IP address. This is a shorthand notation for IPaddr::1.2.3.4. There are many possible variants of how to specify the IP address, to learn about them, see the page on the IPaddr resource agent.

Note that this address cannot be used for anything else on these machines. In particular, it has to be controlled only by Heartbeat, and cannot be brought up by your operating system at boot time. We call this address a ServiceAddress - which is distinct from an AdministrativeAddress, like those brought up by your operating system.

/etc/ha.d/authkeys file

/etc/ha.d/authkeys must be mode 600. See the section on GeneratingAuthkeysAutomatically for information how to generate good keys automatically.

auth 1
1 sha1 PutYourSuperSecretKeyHere

See Also

ha.cf, haresources, authkeys, AddressFailover, GettingStarted/TwoIPaddresses, A Basic Single IP address Configuration for version 2