如何删除ceph集群中无效的osd?

如何删除ceph集群中无效的osd?
[root@dev-master ceph-cluster]# ceph osd tree
ID WEIGHT  TYPE NAME     UP/DOWN REWEIGHT PRIMARY-AFFINITY
-1 0.01740 root default
-4 0.00580     host osd2
 0 0.00580         osd.0    down        0          1.00000
-5 0.00580     host osd3
 1 0.00580         osd.1    down        0          1.00000
-6 0.00580     host osd1
 2 0.00580         osd.2    down        0          1.00000
 5       0 osd.5              up        0          1.00000
[root@dev-master ceph-cluster]# ceph osd out 5
osd.5 is already out.
[root@dev-master ceph-cluster]# ceph osd crush remove osd.5
device 'osd.5' does not appear in the crush map
[root@dev-master ceph-cluster]# ceph auth del osd.5
entity osd.5 does not exist
[root@dev-master ceph-cluster]# ceph osd rm 5
Error EBUSY: osd.5 is still up; must be down before removal.

但我在任何主机上都找不到 osd.5。

答案1

您可以尝试手动将 osd 标记为 down;如果 osd 进程实际上正在某处运行,它会在几秒钟后将自己标记为备份。

ceph osd down osd.5; ceph osd rm "$_"

答案2

有时ceph osd purge [osd.daemon]有效。

答案3

毕竟它是给定节点上的服务,所以我建议首先停止该服务。

systemctl disable [email protected]

然后去

ceph osd out osd.5
ceph osd safe-to-destroy osd.5
ceph osd destroy osd.5 --yes-i-really-mean-it
ceph osd crush remove osd.5
ceph osd rm osd.5

相关内容