Skip to content

Instantly share code, notes, and snippets.

@shawnhank
Forked from ianchen06/del_cluster.sh
Created November 10, 2021 04:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawnhank/5d24a9f865ec7ea9b16febe965ebfefd to your computer and use it in GitHub Desktop.
Save shawnhank/5d24a9f865ec7ea9b16febe965ebfefd to your computer and use it in GitHub Desktop.
delete proxmox cluster
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
#/bin/sh
# stop service
systemctl stop pvestatd.service
systemctl stop pvedaemon.service
systemctl stop pve-cluster.service
systemctl stop corosync
systemctl stop pve-cluster
# edit through sqlite, check, delete, verify
$ sqlite3 /var/lib/pve-cluster/config.db
sqlite> select * from tree where name = 'corosync.conf';
254327|0|254329|0|1480944811|8|corosync.conf|totem {
version: 2
[...]
sqlite> delete from tree where name = 'corosync.conf';
sqlite> select * from tree where name = 'corosync.conf';
sqlite> .quit
#
#Remove directories
pmxcfs -l
rm /etc/pve/corosync.conf
rm /etc/corosync/*
rm /var/lib/corosync/*
rm -rf /etc/pve/nodes/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment