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. Define the master and slave hosts in the Hosts field of the Heartbeat main window. Each node must have a unique hostname.

    Defining master and slave nodes

    Figure 12.13. Defining master and slave nodes

    Note

    It is 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.

    Using links for specifying the master and slave nodes

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

  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. Click the Set shared key button and give a password.

    Setting the shared key

    Figure 12.15. Setting the shared key

  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. 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.

    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

  8. 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.

    Selecting the Heartbeat interface

    Figure 12.18. Selecting the Heartbeat interface

    Creating and naming a new Heartbeat interface

    Figure 12.19. Creating and naming a new Heartbeat interface

    Note

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