You probably should be reading the Pacemaker site clusterlabs.org
This site conserves Heartbeat specific stuff. See Site news for details.
Configuration
From Linux-HA
Contents |
Basic Connectivity
/etc/ha.d/authkeys
Sample Heartbeat configuration: /etc/ha.d/authkeys
auth 1 1 sha1 PutYourSuperSecretKeyHere
You could generate a new authkey like this:
: > /etc/ha.d/authkeys chmod 0640 /etc/ha.d/authkeys printf "auth 1\n1 sha1 %s\n" "$(head -c 12 /dev/urandom | base64)" > /etc/ha.d/authkeys
Then copy it over to the other hosts.
See also authkeys
/etc/ha.d/ha.cf
Sample Heartbeat configuration: /etc/ha.d/ha.cf
# Node communication bcast eth0 udpport 694 autojoin any # Logging debug 0 coredumps true logfacility daemon # Timeouts suitable for clusters with 2-8 nodes keepalive 1 warntime 6 deadtime 10 initdead 15 # Advanced settings, read the detailed configuration notes before changing realtime yes compression bz2 traditional_compression off
A complete listing of all the Heartbeat configuration options is also available.
Resources
There are two options for configuring cluster resources:
Heartbeat's Built-in Resource Manager
This is simple to configure, because it doesn't do very much
- Clusters are limited to 2 nodes
- No detection of resource-level failures
- Resources organized into independent groups with a strictly linear start/stop order
The Pacemaker Resource Manager
There are various text and graphical user interfaces available for Pacemaker,
- the Cluster Resource Manager Shell Crmsh
- the HA Web Konsole hawk, see also the SUSE documentation
- the Pacemaker + Corosync Configuration System pcs, also comes with pcsd, which is to pcs what Hawk is to crmsh, claiming to be An alternate vision for a full cluster lifecycle configuration shell and web based GUI. Handles everything from cluster installation through to resource configuration and status.
- the Linux Cluster Management Console LCMC, a GUI with an inovative approach for representing the status of and relationships between cluster services. It uses SSH to let you install, configure and manage clusters from your desktop.
Possibly more.
Note that due to an oversight in Pacemaker development, Pacemaker versions 1.1.7 to 1.1.12 won't properly work with heartbeat, where "not properly" ranges from simply blocking on node-fencing (because the fence will succeed, but pacemaker won't notice the success) to segfaults of component daemons causing spurious reboots in various situations.
If you don't want to switch to Corosync 2.x + Pacemaker, but want to use Heartbeat + Pacemaker, please use Heartbeat >= 3.0.6, cluster-glue > 1.0.12, recent resource-agents, and Pacemaker 1.1.12 + patches from this pull request, respectively Pacemaker > 1.1.12 when these have been merged upstream. Or get support, subscription and repository access from Linbit. But as things are now, using Corosync + Pacemaker, you will have a more future proof deployment.
To enable Pacemaker, shut down all the nodes and adding the following to /etc/ha.d/ha.cf
compression_threshold 20 traditional_compression on crmd_spawns_pengine off # if you have pacemaker > 1.1.12 with mentioned patches. crm respawn
Then sit down with a warm drink and read the Pacemaker documentation.