Error EBUSY: osd.0 is still up; must be down before removal的解决办法
标签(空格分隔):ceph,ceph运维,osd故障
集群环境:
[root@node3 ~]# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
[root@node3 ~]# ceph -v
ceph version 12.2.1 (3e7492b9ada8bdc9a5cd0feafd42fbca27f9c38e) luminous (stable)
问题描述:
在使用批量删除osd的shell脚本删除所有的osd时,提示:Error EBUSY: osd.0 is still up; must be down before removal.查看集群架构:
[root@node1 ceph]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0 root default
-3 0 host node1
-5 0 host node2
-7 0 host node3
0 0 osd.0 up 0 1.00000
很明显就是需要把osd.0先down掉,然后我使用命令:systemctl stop ceph-osd@0 发现osd的状态并未改变,然后通过查看osd.0的进程,发现并没有运行。
解决方法:
如此简单,通过ceph命令强行标记为down,之后删除即可。下面先标记为down:
[root@node1 ceph]# ceph osd down osd.0
marked down osd.0.
此时查看集群布局:
[root@node1 ceph]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0 root default
-3 0 host node1
-5 0 host node2
-7 0 host node3
0 0 osd.0 down 0 1.00000
最后删除该osd.0:
[root@node1 ceph]# ceph osd rm 0
removed osd.0
确认是否删除:
[root@node1 ceph]# ceph osd tree
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
-1 0 root default
-3 0 host node1
-5 0 host node2
-7 0 host node3
参考文献:
posted on 2017-11-10 11:14 sisimi_2017 阅读(3164) 评论(0) 编辑 收藏 举报