undo create cluster

gijsbert

Active Member
Oct 13, 2008
47
3
28
I was playing with some settings and created a cluster doing:

===
root@prox1:~# pvecm create test-cluster-01

Corosync Cluster Engine Authentication key generator.
Gathering 1024 bits for key from /dev/urandom.
Writing corosync key to /etc/corosync/authkey.
Writing corosync config to /etc/pve/corosync.conf
Restart corosync and cluster filesystem
===

After this creation of the cluster I did not configure anything else. Is there an easy/safe way to undo this creation of the cluster, something like "pvm delete test-cluster-01" ? I cannot find something like this with pvecm --help :)

Any help will be appreciated.

Gijsbert
 
For the case were you really do not have other nodes, the cluster is healthy, and nothing was done I have a proven set of steps which destroy this simple cluster.
Do not change order, do not forget steps, all people which have done more or have multiple nodes, please stop here and read: https://pve.proxmox.com/pve-docs/chapter-pvecm.html#pvecm_separate_node_without_reinstall

Code:
# WARNING: only do on simple stand-alone clusters which are healthy and without HA!
rm -f /etc/pve/corosync.conf
rm -rf /etc/corosync/*
systemctl stop corosync pve-cluster
systemctl start pve-cluster

But also just as a note, if you want to keep the node standalone its "cluster" status does not hurt.
 
Dear T. Lamprecht,

Thanks for your reply. It was a simple stand-alone and healty cluster so I removed the corosync.conf and files like described. Seem to work, cluster status is gone and everything still ok.

One more question though. What happens when I reboot the server, will it start the corosync service? And if so, is that normal behaviour?

Thanks again !

Gijsbert
 
One more question though. What happens when I reboot the server, will it start the corosync service? And if so, is that normal behaviour?

No, if no "/etc/corosync/corosync.conf" exists, the corosync service will not be started, see
Code:
systemctl cat corosync.service
there are two conditions where the corosync service will not be started:
* ConditionKernelCommandLine=!nocluster - if you boot the node with a "nocluster" kernel commandline argument (useful when troubleshooting a cluster issue)
* ConditionPathExists=/etc/corosync/corosync.conf - if no corosync.conf exists there's no need for corosync to run.

So if you reboot now it won't run.
 
Last edited:

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!