1、关闭ceph osd进程
service ceph stop osd
2、让ceph集群中的数据进行平衡
3、等所有的pg都达到active+clean平衡度时删除osd节点
删除前ceph集群状态
[[email protected] ~]# ceph osd tree
# id weight type name up/down reweight
-1 4 root default
-2 1 host os-node3
0 1 osd.0 down 0
-3 1 host os-node4
1 1 osd.1 up 1
-4 1 host os-node5
2 1 osd.2 up 1
-5 1 host os-node6
3 1 osd.3 up 1
1)、在集群中删除一个osd硬盘
[[email protected] ~]# ceph osd rm 0
removed osd.0
[[email protected] ~]# ceph osd tree
# id weight type name up/down reweight
-1 4 root default
-2 1 host os-node3
0 1 osd.0 DNE
-3 1 host os-node4
1 1 osd.1 up 1
-4 1 host os-node5
2 1 osd.2 up 1
-5 1 host os-node6
3 1 osd.3 up 1
2)、在集群中删除一个osd 硬盘 crush map
[[email protected] ~]# ceph osd crush rm osd.0
removed item id 0 name ‘osd.0‘ from crush map
[[email protected] ~]# ceph osd tree
# id weight type name up/down reweight
-1 3 root default
-2 0 host os-node3
-3 1 host os-node4
1 1 osd.1 up 1
-4 1 host os-node5
2 1 osd.2 up 1
-5 1 host os-node6
3 1 osd.3 up 1
3)、在集群中删除一个osd节点
[[email protected] ~]# ceph osd crush rm os-node3
removed item id -2 name ‘os-node3‘ from crush map
[[email protected] ~]#
[[email protected] ~]# ceph osd tree
# id weight type name up/down reweight
-1 3 root default
-3 1 host os-node4
1 1 osd.1 up 1
-4 1 host os-node5
2 1 osd.2 up 1
-5 1 host os-node6
3 1 osd.3 up
ceph摘掉osd节点