[Ceph]librbd::image::PreRemoveRequest: 0x55bab7ded380 handle_exclusive_lock: cannot obtain exclusive lock - not removing

RBD块设备无法删除

[root@node-1 ~]# rbd rm ceph-demo/rbd-snap-new.img
2020-09-05 13:36:32.838 7f51067fc700 -1 librbd::image::PreRemoveRequest: 0x55bab7ded380 handle_exclusive_lock: cannot obtain exclusive lock - 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.

设备被占用(方法一)

[root@node-1 ~]# rbd unmap ceph-demo/rbd-snap-new.img
[root@node-1 ~]# rbd rm ceph-demo/rbd-snap-new.img
Removing image: 100% complete...done.

方法二

[root@ceph3 ~]# rbd status 15k_pool/disk_1
Watchers:
        watcher=172.15.6.224:0/1772541243 client.80382 cookie=140632999857568
[root@ceph3 ~]# ceph osd blacklist add 172.15.6.224:0/1772541243
blacklisting 172.15.6.224:0/1772541243 until 2020-09-08 16:49:12.426399 (3600 sec)
[root@ceph3 ~]# rbd status 15k_pool/disk_1
Watchers: none
[root@ceph3 ~]# rbd rm 15k_pool/disk_1
Removing image: 100% complete...done.

END

posted @ 2020-09-05 13:39  LeoShi2020  阅读(491)  评论(0编辑  收藏  举报