Initial Configuration

Heartbeat
Sample /etc/ha.d/ha.cf configuration file

# Logging debug				1 use_logd			false logfacility			daemon # Misc Options traditional_compression 	off compression			bz2 coredumps			true # Communications udpport			691 bcast				eth0 autojoin			any # Thresholds (in seconds) keepalive			1 warntime			6 deadtime			10 initdead			15

For more details on these and other available options, please refer to http://www.linux-ha.org/ha.cf

OpenAIS
Before starting OpenAIS for the first time, you need to create the authkey-file for authentication within cluster communication.

ais-keygen #no arguments required
 * Create /etc/ais/authkey:

Then you need to copy that file to all of your nodes and put it in /etc/ais/ with user=root, group=root and mode 0400.

totem { version: 2 # How long before declaring a token lost (ms) token:         10000 # How many token retransmits before forming a new configuration token_retransmits_before_loss_const: 20 # How long to wait for join messages in the membership protocol (ms) join:          60 # How long to wait for consensus to be achieved before starting a new round of membership configuration (ms) consensus:     4800 # Turn off the virtual synchrony filter vsftype:       none # Number of messages that may be sent by one processor on receipt of the token max_messages:  20 # Disable encryption secauth:	off # How many threads to use for encryption/decryption threads:  	0 # Limit generated nodeids to 31-bits (positive signed integers) clear_node_high_bit: yes # Optionally assign a fixed node id (integer) # nodeid:        1234 interface { ringnumber: 0 # The following three values need to be set based on your environment bindnetaddr: 10.0.0.1 mcastaddr: 226.94.1.1 mcastport: 5405 } }  logging { fileline: off to_syslog: yes to_stderr: yes syslog_facility: daemon debug: on 	timestamp: on  } amf { mode: disabled }
 * Example /etc/ais/openais.conf configuration file:

Heartbeat
Add the following to /etc/ha.d/ha.cf crm yes

or, if you plan to enable STONITH crm respawn

OpenAIS
To instruct OpenAIS to start Pacemaker, add the following fragment to openais.conf

service { # Load the Pacemaker Cluster Resource Manager name: pacemaker ver: 0 }

Additionally, it is required is to tell OpenAIS to run as root (so that the processes it spawns to manage resources also has root privileges). To do this, add the following to the top of /etc/ais/openais.conf

aisexec { user:	root group:	root }

A Special Note for People Switching Cluster Stacks
OpenAIS and Heartbeat identify nodes differently. This is reflected in the value of 'id' for 'node' objects in the CIB.

Since 'id' is the attribute by which a node is identified, this can lead to each node having duplicate entries in the CIB's 'nodes' section and cause expected cluster behavior.

To prevent this, delete the contents of 'nodes' before starting up the alternative cluster stack (and remember to zap the .sig files in the same directory after you do so).

Heartbeat
/etc/init.d/heartbeat start

OpenAIS
/etc/init.d/ais start

Next Steps
Try checking out some of our Documentation