12.5.3.1. Procedure – Configure Heartbeat

  1. Select the cluster in the configuration tree and click the New button below the Components in use subwindow on the Cluster tab to add the Heartbeat component.

  2. Choose the Heartbeat default template and then change the component name, if needed.

    Adding the Heartbeat component to the cluster

    Figure 12.12. Adding the Heartbeat component to the cluster

    The Heartbeat component appears in the configuration tree.

  3. Defining master and slave nodes

    Figure 12.13. Defining master and slave nodes

    Define the master and slave hosts in the Hosts field of the Heartbeat main window. Each node must have a unique hostname.

    Note
    Using links for specifying the master and slave nodes

    Figure 12.14. Using links for specifying the master and slave nodes

    You are recommended to use links when referring to nodes and their IP addresses. It is important to link to the properties of the node, and not to the properties of the cluster.

  4. Define encryption method for the Heartbeat messages.

    The default encryption is sha1, but md5 and CRC are also possible.

    Tip

    It is recommended to use the default sha1 encryption.

  5. Setting the shared key

    Figure 12.15. Setting the shared key

    Click the Set shared key button and give a password.

  6. Now the communication channel used to transfer heartbeat messages between the nodes has to be configured. The following steps describe how to configure an Ethernet interface for this purpose. This involves using resources as well; the use of resources is described in Procedure 12.5.4, Configuring Heartbeat resources in detail.

    Note

    When using a serial interface to transfer the heartbeat messages between the two machines, a serial null-modem cable has to be used. It is recommended to use the highest possible communication speed (baud rate). For further information see the documentation of Heartbeat at http://www.linux-ha.org/ConfiguringHeartbeat.

    Defining an Ethernet interface for Heartbeat

    Figure 12.16. Defining an Ethernet interface for Heartbeat

    Go to the Networking component of the cluster, Interfaces tab. Create a new interface, for example, eth1 for HA purposes using the New button.

  7. Linking the bind address of the cluster to the Heartbeat interface

    Figure 12.17. Linking the bind address of the cluster to the Heartbeat interface

    Link the cluster HA IP address in the Type specific parameters field using the link icon. Enter the broadcast address as well.

    Set Netmask and the Network fields, if no defaults are provided.

  8. Selecting the Heartbeat interface
    Selecting the Heartbeat interface

    Figure 12.18. Selecting the Heartbeat interface

    Go to the Heartbeat component of the cluster and click ... at the HA interface field. Click New and select the newly created interface as the HA interface for Heartbeat using the link icon or the drop down list.

    Note

    Heartbeat can use two or more interfaces to avoid false takeovers when the HA interface of a node breaks down. If multiple HA interface are configured, the slave node becomes active only if all HA interfaces stop transmitting heartbeat messages.