Skip to content

Instantly share code, notes, and snippets.

@btamayo
Forked from ianchen06/del_cluster.sh
Last active February 10, 2025 20:19
Show Gist options
  • Select an option

  • Save btamayo/73892d7743666e4815e43fb4e2b9f3f3 to your computer and use it in GitHub Desktop.

Select an option

Save btamayo/73892d7743666e4815e43fb4e2b9f3f3 to your computer and use it in GitHub Desktop.

Revisions

  1. btamayo revised this gist Jan 31, 2023. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion del_cluster.sh
    Original file line number Diff line number Diff line change
    @@ -26,4 +26,6 @@ pmxcfs -l
    rm /etc/pve/corosync.conf
    rm /etc/corosync/*
    rm /var/lib/corosync/*
    rm -rf /etc/pve/nodes/*

    # OPTIONAL: Only if you want to delete nodes their configurations as well:
    # rm -rf /etc/pve/nodes/*
  2. btamayo revised this gist Jan 31, 2023. No changes.
  3. btamayo revised this gist Jun 17, 2018. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions del_cluster.sh
    Original file line number Diff line number Diff line change
    @@ -7,6 +7,8 @@ systemctl stop pve-cluster.service
    systemctl stop corosync
    systemctl stop pve-cluster

    killall pmxcfs

    # edit through sqlite, check, delete, verify
    $ sqlite3 /var/lib/pve-cluster/config.db
    sqlite> select * from tree where name = 'corosync.conf';
    @@ -17,6 +19,7 @@ sqlite> delete from tree where name = 'corosync.conf';
    sqlite> select * from tree where name = 'corosync.conf';
    sqlite> .quit
    #
    killall pmxcfs

    #Remove directories
    pmxcfs -l
  4. @ianchen06 ianchen06 revised this gist Jun 26, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions del_cluster.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    # source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/
    #/bin/sh
    # stop service
    systemctl stop pvestatd.service
  5. @ianchen06 ianchen06 renamed this gist Jun 26, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions del_cluster.md → del_cluster.sh
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    #/bin/sh
    # stop service
    systemctl stop pvestatd.service
    systemctl stop pvedaemon.service
  6. @ianchen06 ianchen06 created this gist Jun 26, 2017.
    24 changes: 24 additions & 0 deletions del_cluster.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # 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/*