After Renaming Node Everything is Gone or Won't Start

jpop

Member
Aug 30, 2022
23
4
8
I'm still trying to wrap my head around this because at no time was there a 'rm -rf' command run today - specifically one removing the contents of /etc/pve. So I may not have all the answers yet, but at this point I have given up trying to recover from LVM.

All I was trying to do is change the host name for a node to match naming conventions for my other two nodes. This involved removing the four default certificate files and trying to regenerate them from the command line when I noticed the /etc/pve folder was completely empty. My /data partition is intact, with all the disk images etc. I also have an LVM backup and several archive files with .vg extensions, but I don't know what to do with any of those things.

If I don't want to lose all kinds of data I will need help to be sure the next things I do are not making things worse. First, is there a way to recover just /etc/pve from an LVM backup or archive? If not, how do I get the web ui running again so I can try to rebuild everything manually.

Oh by the way, none of the Proxmox services are able to start, but the base Linux boots and I can SSH to it. Presently, this server is booted to a System Rescue USB, the LVM root is mounted, but will need to be umounted if we need to run any new commands.

I'll be here hoping for a miracle in the meantime.

Regards,
Jeff
 
Hi,

did you see our guide and the accompanying disclaimer for renaming nodes? https://pve.proxmox.com/wiki/Renaming_a_PVE_node
Generally, renaming is not recommended as things can break, esp. on non-empty and/or clustered nodes.

Are these nodes a cluster or standalone, separate nodes?
I'd start with matching all the steps as laid out in the wiki and rebooting.

First, is there a way to recover just /etc/pve from an LVM backup or archive?
/etc/pve only holds the configuration data, so any VM/CT disks are hopefully backed up separately.

Since you mention that /etc/pve is empty, the cluster filesystem is probably not mounted.
You can check whether /var/lib/pve-cluster/config.db exist, which should be a few hundred KiBs in size. If it does, all your configuration should be intact.
 
Hi,

did you see our guide and the accompanying disclaimer for renaming nodes? https://pve.proxmox.com/wiki/Renaming_a_PVE_node
Generally, renaming is not recommended as things can break, esp. on non-empty and/or clustered nodes.
Unfortunately I had not seen that Wiki post until now. I just assumed as I know I shouldn't have done that this was as simple as it is in regular Linux.

Are these nodes a cluster or standalone, separate nodes?
I'd start with matching all the steps as laid out in the wiki and rebooting.
Standalone
/etc/pve only holds the configuration data, so any VM/CT disks are hopefully backed up separately.

Since you mention that /etc/pve is empty, the cluster filesystem is probably not mounted.
You can check whether /var/lib/pve-cluster/config.db exist, which should be a few hundred KiBs in size. If it does, all your configuration should be intact.
Yes my config.db is 56kb.

What would be my next steps to restoring my configs?
 
Undo our changes? Maybe follow the guide? Or remove the node from the cluster and reinstall and add the node using the new name and new IP address.

Maybe the guide only has two action items (edit /etc/hosts and /etc/hostname), which I did already and it is basically how we got here.

I'm not removing the node, I have VMs and Containers on this node and I won't take any more chances. If my /var/lib/pve-cluster/config.db is still intact, then there must be some way to extract or restore them?
 
you should first restart pve-cluster service, to mount the /etc/pve directory . (it's used /var/lib/pve-cluster/config.db as backend, and expose it like a fs in /etc/pve)

No dice.

Code:
systemctl restart pve-cluster.service
Job for pve-cluster.service failed because the control process exited with error code.
See "systemctl status pve-cluster.service" and "journalctl -xeu pve-cluster.service" for details.

Code:
May 26 17:39:36 dude.knowelltech.net pmxcfs[38424]: [main] crit: Unable to resolve node name 'dude' to a non-loopback IP address - missing entry in '/etc/hosts' or DNS?

The reason doesn't make sense at all. My /etc/hosts and DNS is correct per every config file associated Proxmox.
 
I'm not removing the node, I have VMs and Containers on this node and I won't take any more chances.
You just decides to start messing with your (production) cluster because you didn't like the name of the node? But you won't migrate the VMs/CTs of the node or have recent backups to just replace the node (like you planned and trained for)? Talking about taking chances... Best of luck getting yourself out of this!
 
You just decides to start messing with your (production) cluster because you didn't like the name of the node? But you won't migrate the VMs/CTs of the node or have recent backups to just replace the node (like you planned and trained for)? Talking about taking chances... Best of luck getting yourself out of this!

Really? Listen bud, just because you pay to be a subscriber, does not give you the right to be an ass. If you can't be helpful, which you aren't, then step aside and let the smart people talk.
 
Really? Listen bud, just because you pay to be a subscriber, does not give you the right to be an ass. If you can't be helpful, which you aren't, then step aside and let the smart people talk.
Why not undo some steps and follow some guides? Don't worry, I'll step aside now and let other people help you (which I thought I implied in my last post).
I do resent the remark about paying to support an open-source software company. Please consider a subscription with support tickets to get real expert to help solve your issues.
It's all fine. We are all random strangers on the internet and this forum it mostly run on volunteers and someone will try to be helpful eventually.

EDIT: Because this seems to worry you, I won't post a new message. I do think my likes and general replies indicate that I try to be helpful. I totally agree that I don't succeed in doing that all the time. Then again, why won't you respond to the on-topic part of my post about undoing your rename changes and either follow the guide or restore your guests on another node.
 
Last edited:
Why not undo some steps and follow some guides? Don't worry, I'll step aside now and let other people help you (which I thought I implied in my last post).
I do resent the remark about paying to support an open-source software company. Please consider a subscription with support tickets to get real expert to help solve your issues.
It's all fine. We are all random strangers on the internet and this forum it mostly run on volunteers and someone will try to be helpful eventually.
But you took the time to reply even though I asked you not to. You are sure full of yourself, yet, you can't seem to be helpful at all. You are the type of person that pays for status with an open source company and then expects people to bow to you just because you exist. Get lost.
 
All,

I solved this issue myself and all it took was looking closer at the results from the logs to clue me into what was expected from Proxmox.
I simply added the hostname to the end of the /etc/hosts file where my node was listed.

How my /etc/hosts was:
Code:
127.0.0.1 localhost.localdomain localhost
192.168.122.1    dude.knowelltech.net

How my /etc/hosts is now:
Code:
127.0.0.1 localhost.localdomain localhost
192.168.122.1    dude.knowelltech.net    dude

Notice the change was the addition of the short host name on line 2 of /etc/hosts.

Peace out.
Jeff

P.S. None of this was that critical. This was on my home self-hosted server not a Production host or anything serious. I could have rebuilt everything from scratch, but it wasn't needed.