Is renaming a cluster node in a 4.4 cluster possible?

ewuewu

Renowned Member
Sep 14, 2010
58
0
71
Hamburg
Hi all,

I've installed a new node to a 5 node cluster (pve 4.4). After I've configured everything I need (incl. ceph) I recognised that I've messed up the hostname of the new node.

My question: Is there a reliable way to change the hostname of my new node without reinstalling everything?
 
I was able to do it, though I don't fully remember what I did cause it was a stressful situation. I did have an issue at first where I had two nodes showing up in GUI, one with old hostname, one with newhostname but without anything working.... then I went through and changed everything I could find that referenced the old hostname to the new hostname.

Here are the files I changed and procedures I took that I can think of:

On the host which name you want to change:

/etc/hostname - make sure hostname is name you want
/etc/hosts - make sure hostname is name you want
/etc/pve/corosync.conf - make sure hostname matches

Then make sure folder located in /etc/pve/nodes which reflects old hostname is moved to the new hostname.

Eg:
old hostname = nodename12, folder name = nodename12
new hostname = newName32, folder name = newName32

I only have a 2 node cluster, and I did this for both hosts (may not be necessary?)

Then you will have to get the new SSH key by the known method of ssh from a node in cluster to the new host name, or else it won't connect either.

Since I lost quorum it was a bit trickier to do all this, but maybe it should be easier for you.

edit: I also restarted the host, and when I did everything "correctly", it worked. So yes, it IS possible, but may be a bit scary if you don't do everything necessary first =D
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!