Rename a cluster node

In RHEL 10.3 and later, you can rename a cluster node using the pcs cluster node rename-corosync and pcs cluster node rename-cib commands. Before RHEL 10.3, renaming a cluster node required numerous manual configuration edits across multiple files.

Before you begin

  • The new node name is configured in the operating system on all cluster nodes, including the hostname, /etc/hosts entries, and DNS records.
  • The cluster is running.
  • You have configured pcs authentication between cluster nodes.

Procedure

  1. In this example, the existing node name is clusternode-01.example.com and the new name is newnode-01.example.com. Put all nodes on standby to prevent resources from running during the rename.
    # pcs node standby --all
  2. Stop the cluster on all nodes.
    # pcs cluster stop --all
  3. Authenticate the new node name with pcs.
    # pcs host auth newnode-01.example.com
  4. Rename the node in the Corosync configuration and distribute the updated configuration to all online nodes.
    # pcs cluster node rename-corosync clusternode-01.example.com newnode-01.example.com
    Note
    To rename multiple nodes, repeat steps 3 and 4 for each node before continuing to step 5. If some nodes are offline and cannot receive the updated corosync.conf, use the --skip-offline option to allow the command to proceed. You must distribute the updated corosync.conf to those nodes by other means before they can rejoin the cluster.
  5. Start the cluster on all nodes.
    # pcs cluster start --all
  6. Rename the node in the Cluster Information Base (CIB). This command replaces all references to the old node name in the CIB. Any references that cannot be updated automatically are reported for manual review.
    # pcs cluster node rename-cib clusternode-01.example.com newnode-01.example.com
  7. Remove all nodes from standby.
    # pcs node unstandby --all
  8. Optional. Deauthenticate the old node name.
    # pcs host deauth clusternode-01.example.com