cephadm shell
ceph osd set noout
ceph osd set norecover
ceph osd set norebalance
ceph osd set nobackfill
ceph osd set nodown
ceph osd set pause
参考文献:
https://blog.csdn.net/lyf0327/article/details/90294011
systemctl stop ceph-osd.targetyum remove ceph-common ceph-mon ceph-osd
OR
apt-get remove ceph-common ceph-mon ceph-osdrm -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;donelsblk | 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;donefor i in `lsblk | grep sd | grep -v sda | awk '{print $1}'` ; do wipefs -a /dev/$i ; donelsblk -f## 如果之前有遗留的环境,需要先删除自动添加的osd
ceph osd tree## 删除操作
#!/bin/bashfor 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
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 ;doneopenstack server stop $i
openstack server delete $i
kayobe overcloud service destroy --yes-i-really-really-mean-it