阿里云-云小站(无限量代金券发放中)
【腾讯云】云服务器、云数据库、COS、CDN、短信等热卖云产品特惠抢购

记录ceph两个rbd删除不了的处理过程

195次阅读
没有评论

共计 1000 个字符,预计需要花费 3 分钟才能阅读完成。

在一个使用的环境发现两个 ceph 的 rbd 删除不了,发现两个 rbd 都是由于残留了 watch 的信息。在此记录处理过程。

处理方法

[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk
2018-06-11 13:19:14.787750 7fd05853bd80 -1 librbd: 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.

查看 rbd 残留的 watch 信息

[root@node-2 ~]# rbd status compute/2d05517a-8670-4cce-b39d-709e055381d6_disk
Watchers:
    watcher=192.168.55.2:0/2900899764 client.14844 cookie=139644428642944

将该残留的 watch 信息添加到 osd 的黑名单,再查看 watch 是否存在。

[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/2900899764
blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)

[root@node-2 ~]# rbd status compute/2d05517a-8670-4cce-b39d-709e055381d6_disk
Watchers: none

删除 rbd

[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk
Removing image: 100% complete…done.

更多 SUSE 相关信息见 SUSE 专题页面 https://www.linuxidc.com/topicnews.aspx?tid=3

正文完
星哥说事-微信公众号
post-qrcode
 
星锅
版权声明:本站原创文章,由 星锅 2022-01-21发表,共计1000字。
转载说明:除特殊说明外本站文章皆由CC-4.0协议发布,转载请注明出处。
【腾讯云】推广者专属福利,新客户无门槛领取总价值高达2860元代金券,每种代金券限量500张,先到先得。
阿里云-最新活动爆款每日限量供应
评论(没有评论)
验证码
【腾讯云】云服务器、云数据库、COS、CDN、短信等云产品特惠热卖中