beautypg.com

1 generating the cib.xml file – HP StorageWorks Scalable File Share User Manual

Page 35

background image

It is possible to generate the simple files ha.cf, haresources, and authkeys by hand if
necessary. One set of ha.cf with haresources is needed for each failover pair. A single
authkeys

is suitable for all failover pairs.

ha.cf

The /etc/ha.d/ha.cf file for the example configuration is shown below:

use_logd yes
deadtime 10
initdead 60
mcast eth0 239.0.0.3 694 1 0
mcast ib0 239.0.0.3 694 1 0
node node5
node node6
stonith_host * external/riloe node5 node5_ilo_ipaddress ilo_login ilo_password 1 2.0 off
stonith_host * external/riloe node6 node6_ilo_ipaddress ilo_login ilo_password 1 2.0 off
crm yes

The ha.cf files are identical for both members of a failover pair. Entries that differ between
failover pairs are as follows:

mcast

An HP SFS G3.0-0 system consists of multiple Heartbeat clusters. IP multicast groups
are used in the privately-administered IP multicast range to partition the internode
cluster traffic. The final octet (3 in the example above) must be different for each
failover pair. The multicast group addresses specified here must not be used by other
programs on the same LAN. (In the example, the value 694 is the UDP port number,
1

is the TTL and 0 is boilerplate.)

node

Specifies the nodes in the failover pair. The names here must be the same as that
returned by hostname or uname -n.

stonith_host

Each of these lines contains a node name (node5 and node6 in this case), the IP
address or name of the iLO, and the iLO login and password between some boilerplate.

haresources

The /etc/ha.d/haresources file for the example configuration is shown below:

node5 Filesystem::/dev/mapper/mpath1::/mnt/ost8::lustre
node5 Filesystem::/dev/mapper/mpath2::/mnt/ost9::lustre
node5 Filesystem::/dev/mapper/mpath3::/mnt/ost10::lustre
node5 Filesystem::/dev/mapper/mpath4::/mnt/ost11::lustre
node6 Filesystem::/dev/mapper/mpath7::/mnt/ost12::lustre
node6 Filesystem::/dev/mapper/mpath8::/mnt/ost13::lustre
node6 Filesystem::/dev/mapper/mpath9::/mnt/ost14::lustre
node6 Filesystem::/dev/mapper/mpath10::/mnt/ost15::lustre

The haresources files are identical for both nodes of a failover pair. Each line specifies the
preferred node (node5), LUN (/dev/mapper/mpath8), mount-point (/mnt/ost8) and file
system type (lustre).

authkeys

The etc/ha.d/authkeys file for the sample configuration is shown below:

auth 1
1 sha1 HPSFSg3Key

The authkey file describes the signature method and key used for signing and checking packets.
All HP SFS G3.0-0 cluster nodes can have the same authkeys file. The key value, in this case
HPSFSg3Key

, is arbitrary, but must be the same on all nodes in a failover pair.

5.2.3.1 Generating the cib.xml File

The cib.xml file is generated using a script that comes with Heartbeat, /usr/lib64/
heartbeat/haresources2cib.py

, from ha.cf and haresources. By default,

haresources2cib.py

reads the ha.cf and haresources files from /etc/ha.d and writes

the output to /var/lib/heartbeat/crm/cib.xml.

5.2 Configuring Heartbeat

35