Chapter 3. Creating an initial Heartbeat configuration
The following example is a small and simple
ha.cf file:
autojoin none
mcast bond0 239.0.0.43 694 1 0
bcast eth2
warntime 5
deadtime 15
initdead 60
keepalive 2
node alice
node bob
crm respawn
Setting autojoin to none disables cluster node auto-discovery and requires that cluster nodes be listed explicitly, using the node options. This speeds up cluster start-up in clusters with a fixed small number of nodes.
This example assumes that bond0 is the cluster's interface to the shared network, and that eth2 is the interface dedicated for DRBD replication between both nodes. Thus, bond0 can be used for Multicast heartbeat, whereas on eth2 broadcast is acceptable as eth2 is not a shared network.
The next options configure node failure detection. They set the time after which Heartbeat issues a warning that a no longer available peer node may be dead (warntime), the time after which Heartbeat considers a node confirmed dead (deadtime), and the maximum time it waits for other nodes to check in at cluster startup (initdead). keepalive sets the interval at which Heartbeat keep-alive packets are sent. All these options are given in seconds.
The node option identifies cluster members. The option values listed here must match the exact host names of cluster nodes as given by uname -n.
crm respawn enables the Pacemaker cluster manager, and ensures that Pacemaker is automatically restarted in case of a failure.