7.6 Heartbeat Configuration Files

Three files are required to configure the Linux heartbeat software for Novell Linux Point of Service:

IMPORTANT:Templates of these files are provided in the /etc/opt/SLES/POS/ha/ directory; however, all three files must be copied to the /etc/ha.d/ directory on the active and standby servers to run HA services.

The following sections provide explanations and samples of these heartbeat configuration files.

7.6.1 ha.cf

ha.cf is the High Availability configuration file. There are many options in this file; however, the only parameters you must set are a set of nodes and the port or interface (serial, bcast, mcast, or ucast) for heartbeat.

IMPORTANT:The configuration file is read line by line, so the order of the configuration entries is very important. In particular, make sure that the timings and udpport are set before the heartbeat media are defined. If you maintain the original order of the items in the template file, everything will work correctly.

During the configuration of the HA Branch Server pair, you must modify the following parameters in the ha.cf file:

#	What UDP port to use for communication?
#		[used by bcast and ucast]
#udpport	694
#
#	What interfaces to broadcast heartbeats over?
#bcast 	eth0 		 # Linux
#bcast	 eth1 eth2  	# Linux
bcast 	eth3  	# Linux
#bcast 	le0		  # Solaris
#bcast	 le1 le2  		# Solaris
#
#	Tell what machines are in the cluster node
#	nodename ...	-- must match uname -n
#
ucast eth2 192.168.2.2
#
#	Watchdog is the watchdog timer.  If our own heart doesn’t beat
#     for 	a minute, then our machine will reboot.
#
#	Tell what machines are in the cluster node
#	nodename ...	-- must match uname -n
node	bs1
node	bs2

7.6.2 authkeys

authkeys is the authentication file used to authenticate failover between the active (BS1) and standby (BS2) servers.

The available authentication methods are CRC, SHA1, and MD5. The default method is CRC; however, this method only verifies packet integrity-it provides no security. Therefore, it should be used only on physically secure networks.

To run HA services, this file must be in mode 600. For more information, see Step 18.b.

The file format is as follows:

auth 1
1 crc
#2 sha1 HI!
#3 md5 Hello!

7.6.3 haresources

IMPORTANT:The haresources files must be identical on all nodes of the cluster. The node name listed in front of the resource group information is the name of the preferred node to run the service. It is not necessarily the name of the current machine. If you are running nice_failback OFF, these services start on the preferred node any time it is up. If you are running with nice_failback ON, the node information is used for a simultaneous start-up. In either case, the haresources files must be identical. If your files are different, the HA services do not work.

haresources contains a list of resources that move from machine to machine as nodes go down and come up in the cluster. These resources are represented either as IP addresses or the name of scripts to run to “start” or “stop” the given resource.

The format is as follows:

node-name resource1 resource2 resource3 ...

If a resource name contains an :: in the middle, the part after the :: is passed to the resource script as an argument. Multiple arguments are separated by the :: delimiter

In IP addresses, the resource script name IPaddr is implied. For example, the IP address 135.9.8.7 could also be represented as IPaddr::135.9.8.7

IMPORTANT:Do not include “administrative” or fixed IP addresses in this file.