Cleaning up PVE Corosync after removing from cluster

At times it will be needed to remove a server from a cluster or there has been problems connecting a new node to an existing ProxMox cluster. Once the server has been removed from the cluster using “pvecm delnode” there will be leftover cluster configs on the removed node that will prevent rejoining to the ProxMox cluster or cause troubles when connecting to another cluster.

When this happens it will be necessary to get to a point where pve-cluster/corosync can start fresh. For this to work you will also need to ensure that the server has been completely and cleanly removed from the ProxMox cluster as well. The steps to clean pve-cluster/corosync are as follows:

systemctl stop pve-cluster corosync
pmxcfs -l
rm /etc/corosync/*
rm /etc/pve/corosync.conf
killall pmxcfs
systemctl start pve-cluster