12.5.4. Procedure – Configuring Heartbeat resources

Configuring Heartbeat resources has two main steps: creating the resource scripts and adding these resources to the Heartbeat component in ZMC. The general procedure is as follows.

  1. Create a resource script, or modify an existing one. Heartbeat resource scripts have to be placed into the /etc/ha.d/resource.d/ directory — this directory contains a number of resource script samples that cover the most commonly used scripts. Edit the parameters of the selected script.

    The resource scripts installed by default are described in Step 3.

  2. Navigate to the Heartbeat component of the cluster. Resources can be managed in the Resources section of the panel. Click on New to add a new resource.

    Adding new Heartbeat resources

    Figure 12.22. Adding new Heartbeat resources

  3. Enter a name for the resource — this has to be the name of the resource script.

    Configuring Heartbeat resources

    Figure 12.23. Configuring Heartbeat resources

    The following resource scripts are available by default (see the actual scripts in the /etc/ha.d/resource.d directory of the nodes for details):

    • IPaddr: This option adds/removes an alias IP address (that is, the Service IP).

      Note

      If only an IP address is specified as the resource name, it is automatically considered as an IPaddr resource.

    • IPsrcaddr: It manages the preferred source address associated with packets which originate on the localhost and are routed through the default route.

    • MailTo: Send an e-mail to the system administrator whenever a takeover occurs.

    • SendArp: It is an alternative to the IPaddr resource to send gratuitous ARP for an IP address on a given interface without adding the address to that interface. It shall be used if for some reason gratuitous ARP is required to be sent for addresses managed by IPaddr on an additional interface.

  4. The node on which the resource is active by default can be selected using the Master/Slave radio buttons.