3. The Cluster Layer

3.1. Pacemaker and the Cluster Layer

Pacemaker utilizes an underlying cluster layer for two purposes:

  • obtaining quorum
  • messaging between nodes

Currently, only Corosync 2 and later is supported for this layer.

3.2. Managing Nodes in a Corosync-Based Cluster

3.2.1. Adding a New Corosync Node

To add a new node:

  1. Install Corosync and Pacemaker on the new host.
  2. Copy /etc/corosync/corosync.conf and /etc/corosync/authkey (if it exists) from an existing node. You may need to modify the mcastaddr option to match the new node’s IP address.
  3. Start the cluster software on the new host. If a log message containing “Invalid digest” appears from Corosync, the keys are not consistent between the machines.

3.2.2. Removing a Corosync Node

Because the messaging and membership layers are the authoritative source for cluster nodes, deleting them from the CIB is not a complete solution. First, one must arrange for corosync to forget about the node (pcmk-1 in the example below).

  1. Stop the cluster on the host to be removed. How to do this will vary with your operating system and installed versions of cluster software, for example, pcs cluster stop if you are using pcs for cluster management.

  2. From one of the remaining active cluster nodes, tell Pacemaker to forget about the removed host, which will also delete the node from the CIB:

    # crm_node -R pcmk-1
    

3.2.3. Replacing a Corosync Node

To replace an existing cluster node:

  1. Make sure the old node is completely stopped.
  2. Give the new machine the same hostname and IP address as the old one.
  3. Follow the procedure above for adding a node.