cephadm shell
bash
ceph osd set noout
ceph osd set norecover
ceph osd set norebalance
ceph osd set nobackfill
ceph osd set nodown
ceph osd set pause
参考文献:
bash
systemctl stop ceph-osd.target
yum remove ceph-common ceph-mon ceph-osd
OR
apt-get remove ceph-common ceph-mon ceph-osd
rm -rf /etc/ceph
/var/lib/ceph/osd
/var/lib/ceph/mon
/etc/systemd/system/ceph*.service
/var/run/ceph
# 主要是这四个目录下的文件
rm -rf /etc/ceph/*
rm -rf /var/lib/ceph/*
rm -rf /var/log/ceph/*
rm -rf /var/run/ceph/*
for i in $(lsblk | awk '/ceph/{print $1}' | awk -F "└─" '/ceph/{print $2}');do dmsetup remove $i;done
lsblk | awk '/ceph/{print $1}' | awk '/ceph/{print $2}' | awk '{print substr($0,3)}'
# 注意特殊节点有系统盘是nvme,这条命令执行前需要谨慎查看。lsblk
for i in $(lsblk | awk '/nvme/{print $1}');do wipefs -a /dev/$i;done
for i in `lsblk | grep sd | grep -v sda | awk '{print $1}'` ; do wipefs -a /dev/$i ; done
lsblk -f
## 如果之前有遗留的环境,需要先删除自动添加的osd
ceph osd tree
## 删除操作
#!/bin/bash
for i in `seq 1 39`
do
ceph osd stop $i
sleep 0.1
ceph osd out $i
sleep 0.1
ceph osd crush rm osd.$i
sleep 0.1
ceph auth del osd.$i
sleep 0.1
ceph osd rm $i
done
bash
openstack server list --all
openstack server list --all | awk 'NR>3{print $2}' > /tmp/1.txt
# for i in `cat /tmp/1.txt`; do XXX ;done
openstack server stop $i
openstack server delete $i
kayobe overcloud service destroy --yes-i-really-really-mean-it