Ceph RBD 删除不了处理过程

2024-05-23 129 0

[root@ceph01 ceph]# rbd ls --pool sunday-rbd -l
NAME         SIZE  PARENT FMT PROT LOCK 
rbd-demo.img 1 GiB 

[root@ceph01 ceph]# rbd remove sunday-rbd/rbd-demo.img
2024-05-22 12:36:33.129 7f82c569c700 -1 librbd::image::PreRemoveRequest: 0x558238a32260 check_image_watchers: image has watchers - not removing
Removing image: 0% complete...failed.
rbd: error: image still has watchers
This means the image is still open or the client using it crashed. Try again after closing/unmapping it or waiting 30s for the crashed client to timeout.

解决:

  • 查看rbd 残留的watch信息
  • 将该残留的watch信息添加到osd的黑名单,再
    -查看watch是否存在。
  • 没有残留的watch信息再进行删除操作
[root@ceph01 ceph]#  rbd status sunday-rbd/rbd-demo.img
Watchers:
    watcher=192.168.77.41:0/256293269 client.4684 cookie=18446462598732840962
[root@ceph01 ceph]# ceph osd blacklist add 192.168.77.41:0/256293269
blacklisting 192.168.77.41:0/256293269 until 2024-05-22 13:39:04.317302 (3600 sec)

[root@ceph01 ceph]# rbd status sunday-rbd/rbd-demo.img
Watchers: none

[root@ceph01 ceph]# rbd remove sunday-rbd/rbd-demo.img
Removing image: 100% complete...done.

相关文章

Ceph RBD 使用常用命令
ceph-deploy 部署ceph-14.2.22 nautilus二进制集群
Ceph-deploy 二进制单机部署及集群扩容

发布评论