Ceph rbd刪除image遭遇watchers異常處理


1、使用rbd rm刪除image

> rbd rm ceph-block/csi-vol-00939e28-14f7-11eb-ac08-2a0aff2a8247

2020-10-31T07:34:50.079+0000 7fa2e53dd700 -1 librbd::image::PreRemoveRequest: 0x5563cae15e90 check_image_watchers: image has watchers - not removing
Removing image: 0% complete...failed.
rbd: error: image still has watchers

報出了image still has watchers錯誤

2、檢查watcher image的client

> rbd status ceph-block/csi-vol-0068f225-14f7-11eb-ac08-2a0aff2a8247
Watchers:
        watcher=10.244.2.0:0/1036319188 client.974190 cookie=18446462598732840961

可以看到watcher client的IP信息,找到對應ip的應用並停止,可破解此錯誤

3、好吧,沒辦法鎖定ip的應用,那就把watcher ip加入到黑名單

> ceph osd blacklist add 10.244.2.0:0/1036319188
blacklisting 10.244.2.0:0/1036319188 until 2020-10-31T08:47:43.513987+0000 (3600 sec)

4、再刪除image

> rbd rm ceph-block/csi-vol-0068f225-14f7-11eb-ac08-2a0aff2a8247
Removing image: 100% complete...done.

5、把剛才加入的ip退出黑名單

> ceph osd blacklist rm 10.244.2.0:0/1036319188
un-blacklisting 10.244.2.0:0/1036319188
#查看黑名單列表
> ceph osd blacklist ls


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM