{"id":159571,"date":"2019-10-17T11:01:51","date_gmt":"2019-10-17T03:01:51","guid":{"rendered":"https:\/\/gulass.cn\/?p=159571"},"modified":"2019-09-28T11:04:01","modified_gmt":"2019-09-28T03:04:01","slug":"ceph-rbd-watchers","status":"publish","type":"post","link":"https:\/\/gulass.cn\/ceph-rbd-watchers.html","title":{"rendered":"\u8bb0\u5f55ceph\u4e24\u4e2arbd\u5220\u9664\u4e0d\u4e86\u7684\u5904\u7406\u8fc7\u7a0b"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u5728\u4e00\u4e2a\u4f7f\u7528\u7684\u73af\u5883\u53d1\u73b0\u4e24\u4e2aceph\u7684rbd\u5220\u9664\u4e0d\u4e86\uff0c\u53d1\u73b0\u4e24\u4e2arbd\u90fd\u662f\u7531\u4e8e\u6b8b\u7559\u4e86watch\u7684\u4fe1\u606f\u3002\u5728\u6b64\u8bb0\u5f55\u5904\u7406\u8fc7\u7a0b\u3002
\n\u63a5\u4e0b\u6765\u672c\u6587\u5c06\u5217\u4e3e\u4e24\u4e2a\u6709\u6548\u7684\u5904\u7406\u8fc7\u7a0b\uff0c\u8bf7\u8bfb\u8005\u53c2\u8003\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n
\u5904\u7406\u65b9\u6cd5<\/strong><\/div>\n
\r\n[root@node-2 ~]# rbd rm compute\/2d05517a-8670-4cce-b39d-709e055381d6_disk\r\n2018-06-11 13:19:14.787750 7fd05853bd80 -1 librbd: cannot obtain exclusive lock - not removing\r\nRemoving image: 0% complete...failed.\r\nrbd: error: image still has watchers\r\nThis 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.\r\n<\/pre>\n
\u67e5\u770brbd \u6b8b\u7559\u7684watch\u4fe1\u606f<\/strong><\/span><\/div>\n
\r\n[root@node-2 ~]# rbd status compute\/2d05517a-8670-4cce-b39d-709e055381d6_disk\r\nWatchers:\r\n    watcher=192.168.55.2:0\/2900899764 client.14844 cookie=139644428642944\r\n<\/pre>\n

\u5c06\u8be5\u6b8b\u7559\u7684watch\u4fe1\u606f\u6dfb\u52a0\u5230osd\u7684\u9ed1\u540d\u5355\uff0c\u518d\u67e5\u770bwatch\u662f\u5426\u5b58\u5728\u3002<\/p>\n

\r\n[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0\/2900899764\r\nblacklisting 192.168.55.2:0\/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)\r\n\r\n[root@node-2 ~]# rbd status compute\/2d05517a-8670-4cce-b39d-709e055381d6_disk\r\nWatchers: none\r\n<\/pre>\n
\u5220\u9664rbd<\/strong><\/span><\/div>\n
\r\n[root@node-2 ~]# rbd rm compute\/2d05517a-8670-4cce-b39d-709e055381d6_disk\r\nRemoving image: 100% complete...done.\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

[root@node-2 ~]# rbd rm compute\/2d05517a-8670-4cce-b39d […]<\/p>\n","protected":false},"author":63,"featured_media":159572,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-159571","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/159571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=159571"}],"version-history":[{"count":5,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/159571\/revisions"}],"predecessor-version":[{"id":160423,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/159571\/revisions\/160423"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/159572"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=159571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=159571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=159571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}