Skip to content

Instantly share code, notes, and snippets.

@ergoz
Forked from wheelcomplex/reset-proxmox-cluster.sh
Last active January 12, 2024 10:52
Show Gist options
  • Save ergoz/c2f34ad661a9e21e552a77eb0a165f60 to your computer and use it in GitHub Desktop.
Save ergoz/c2f34ad661a9e21e552a77eb0a165f60 to your computer and use it in GitHub Desktop.
Reset proxmox cluster
#/bin/bash -xe
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
sqlite3 /var/lib/pve-cluster/config.db "delete from tree where name = 'corosync.conf';"
pmxcfs -l
rm /etc/pve/corosync.conf
rm /etc/corosync/*
rm /var/lib/corosync/*
rm -rf /etc/pve/nodes/*
killall pmxcfs
systemctl start pve-cluster
systemctl start corosync
systemctl start pve-cluster.service
systemctl start pvedaemon.service
systemctl start pvestatd.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment