Converting Between Cluster and Remote Nodes

In a Pacemaker cluster, nodes can either be full cluster nodes running Corosync, or Pacemaker Remote nodes. This describes how to convert a cluster node to a remote node and vice versa (whether using the Pacemaker command-line interface, pcs, or crm shell).

Replace  with the name of the node being converted in any commands below.

Cluster node to remote node

 * 1) Install Pacemaker Remote on the node to be converted if not already present (this varies by platform, for example  ).
 * 2) If you want resources on the node to continue running during the transition, either unmanage them, or put the entire cluster into maintenance mode.
 * 3) * CLI:
 * 4) * pcs:
 * 5) * crm:
 * 6) If you want to maintain any permanent node attributes, make a note of them. They will have to be manually set after the conversion.
 * 7) Stop the cluster software on the node to be converted.
 * 8) * CLI:  (add   if used)
 * 9) * pcs:
 * 10) Remove the node from Corosync on all cluster nodes, then remove the node from Pacemaker.
 * 11) * CLI: Edit /etc/corosync.conf on all nodes to remove the node entry, run  on each active cluster node, then run   on any active cluster node
 * 12) * pcs:
 * 13) Generate a Pacemaker Remote authentication key and copy it to all nodes, if not already present. Start the Pacemaker Remote daemon on the node to be converted, and enable it to start at boot if desired (which allows the cluster to reconnect to it after it is fenced). Then add an ocf:pacemaker:remote resource for the node to the cluster configuration. (The commands below use default values for parameters such as port, but they can be easily modified to use any desired values. See the relevant man pages for details.)
 * 14) * CLI:  on any one node, and   that file to all nodes. Then run   on the node to be converted, and run   on any cluster node.
 * 15) * pcs:
 * 16) The remote node will be named the same as the resource ID. If this is different from the name used for the node as a cluster node, other parts of the configuration (such as constraints or rules) may need to be updated to use the remote node name. Any node attributes saved earlier can be set now.
 * 17) Take the cluster out of maintenance mode.
 * 18) * CLI:
 * 19) * pcs:
 * 20) * crm:
 * 21) The cluster should start the remote connection and detect any resources still active on the node.

Remote node to cluster node

 * 1) Install full Pacemaker on the node to be converted if not already present (this varies by platform, for example  ).
 * 2) If you want resources on the node to continue running during the transition, unmanage them. (Putting the entire cluster into maintenance mode is not recommended, because the remote connection itself must be stopped.)
 * 3) * CLI: For each affected resource, use  appropriately to set the is-managed meta-attribute to false
 * 4) * pcs: For each affected resource, run, replacing $RESOURCE with the resource ID
 * 5) * crm: For each affected resource, run, replacing $RESOURCE with the resource ID
 * 6) If you want to maintain any permanent node attributes, make a note of them. They will have to be manually set after the conversion.
 * 7) Remove the remote node's ocf:pacemaker:remote resource and any other references to the node (including permanent node attributes, constraints, etc.) from the configuration, remove the node from Pacemaker, and stop Pacemaker Remote on the node (ensuring it is not enabled to start at boot).
 * 8) * CLI: Run  appropriately then   on any cluster node, then run   on the node being converted.
 * 9) * pcs:
 * 10) Add the node to Corosync on all nodes.
 * 11) * CLI: Edit corosync.conf on one cluster node to add the new node, and  it to all other cluster nodes plus the node being converted, and run   on each active cluster node. Finally run   on the node being converted (you can also run   to start Pacemaker at boot if desired).
 * 12) * pcs: Run  on any active cluster node. Add   if you want cluster services to start at boot.