How to change the hostname of a Pacemaker Cluster node
This document (000020597) is provided subject to the disclaimer at the end of this document.
SUSE Linux Enterprise High Availability Extension 15
SUSE Linux Enterprise Server for SAP Applications 12
SUSE Linux Enterprise Server for SAP Applications 15
IMPORTANT: this TID will only explain how to change the hostname of a system that is a node of a Pacemaker Cluster, based on the basic OS and Cluster configurations, and NOT how the change of the hostname will affect the applications, databases or any other software installed.
1. Open a root session on node "blue" and set it into standby mode, this will move all the cluster resources running on "blue" to node "green":
crm node standby
2. Once done, open a root session on node "green", and remove node "blue" from the cluster:
crm cluster remove blue
3. On node "blue", disable all the cluster related services, so it will not start after reboot:
systemctl disable --now pacemaker
systemctl disable --now corosync
systemctl disable --now sbd
4. Change the hostname of node "blue" to "yellow":
hostnamectl set-hostname yellow
5. Verify that the hostname was changed to "yellow" and then reboot the system:
6. Once node "yellow" is back online, verify again that the hostname was properly changed to "yellow":
7. Edit the /etc/hosts file on all the nodes in the cluster, and replace the old hostname "blue" for "yellow" in all the respective entries.
8. Join the node to the cluster, on node "yellow" run as root:
And follow the instructions on screen.
NOTE: while the above example shows the procedure on a two node cluster, it is also valid for clusters with more than two nodes.
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020597
- Creation Date: 01-Mar-2022
- Modified Date:01-Mar-2022
- SUSE Linux Enterprise High Availability Extension
- SUSE Linux Enterprise Server for SAP Applications
For questions or concerns with the SUSE Knowledgebase please contact: firstname.lastname@example.org