Skip to content

Instantly share code, notes, and snippets.

@airtonzanon
Last active April 5, 2025 13:47
Show Gist options
  • Save airtonzanon/b402269d420b9dee6fe373189a4ac442 to your computer and use it in GitHub Desktop.
Save airtonzanon/b402269d420b9dee6fe373189a4ac442 to your computer and use it in GitHub Desktop.
remove Ceph installation from Proxmox (not sure if it works with Ceph in another env)
#!/bin/bash
ceph config set global mon_allow_pool_size_one true
ceph osd pool set data_pool min_size 1
ceph osd pool set data_pool size 1 --yes-i-really-mean-it
#!/bin/bash
echo "\n #####################"
echo "Remove Ceph Installation script"
echo "Copied this from some Stackoverflow around there, thanks person who posted it there \n"
systemctl stop ceph-mon.target
systemctl stop ceph-mgr.target
systemctl stop ceph-mds.target
systemctl stop ceph-osd.target
rm -rf /etc/systemd/system/ceph*
killall -9 ceph-mon ceph-mgr ceph-mds ceph-osd
rm -rf /var/lib/ceph/mon /var/lib/ceph/mgr /var/lib/ceph/mds /var/lib/ceph/osd
pveceph purge
apt -y purge ceph-mon ceph-osd ceph-mgr ceph-mds
apt -y purge ceph-base ceph-mgr-modules-core
rm /etc/init.d/ceph
for i in $(apt search ceph | grep installed | awk -F/ '{print $1}'); do apt reinstall $i; done
dpkg-reconfigure ceph-base
dpkg-reconfigure ceph-mds
dpkg-reconfigure ceph-common
dpkg-reconfigure ceph-fuse
for i in $(apt search ceph | grep installed | awk -F/ '{print $1}'); do apt reinstall $i; done
rm -rf /etc/ceph/*
rm -rf /etc/pve/ceph.conf
rm -rf /etc/pve/priv/ceph.*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment