V2, CRM Configuration Style

Axigen Documentation

Current packages of heartbeat 2 use an OCF provider for DRBD, which uses a deprecated command passed to the drbdadm application, which breaks the functionality of this script. Thus, the drbd OCF provider must be modified in order to use the role command instead of the deprecated state one. Please issue the following command on both nodes:

The original OCF provider script will be renamed by sed with drbd-orig.

In case of an update of the heartbeat package, the above command must be issued again, because the package manager will overwrite the script file.

In order to configure the heartbeat cluster, modify or create the /etc/ha.d/ha.cf file to contain the heartbeat communication timeouts, the two nodes defined and the broadcast network interface. Follow the guidelines found on the documentation found online. Please note that this version is no longer supported, thus the documentation may be incomplete or unmaintained. The following resources can be useful:

Below is the heartbeat configuration for the example we have described in this document:

  • /etc/ha.d/authkeys

At this point, make sure the drbd system service is stopped on both nodes and is not set to be started at system boot time. The entire DRBD interaction is being handled by the heartbeat service itself.

Start the heartbeat service with:

The CRM enabled cluster can, now, be configured using the following commands:

  • Setup stickiness

  • Put both nodes in stand-by:

  • Create a temporary file, /tmp/resources.xml, with the following contents:

  • Create a /tmp/constraints.xml file, with the following contents:

  • Update the cluster resources and constraints:

  • Bring both nodes up from stand-by: