找回密码
 注册
查看: 3213|回复: 2

记录ceph rbd删除过程Removing image: 0% complete...failed.

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-8-19 12:12:52 | 显示全部楼层 |阅读模式
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
5 R' V7 W1 n# |. a! v. r" j7 P2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing
+ ~3 B* \4 x2 l( K4 z. W4 I# m/ D" B% X. DRemoving image: 0% complete...failed.
7 I8 Y* E) L5 B3 U; Zrbd: error: image still has watchers
, x4 g( `- F& v( }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.
: w* L! S, `2 U5 R[root@compute01 ~]#  rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea41 W$ G; Z+ l( P: r& E" f
Watchers:. E: V" l% F' [( z; B: |
        watcher=192.168.6.236:0/1356954254 client.18712163 cookie=1405311960894245 U3 v1 ?1 G  s) L8 @' L
[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254 8 x$ D# v: p$ u4 J3 ?' i
blacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)# L( H! t# I: z+ w+ O* g* `0 w
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
" E, F3 J$ ]) f: U1 h% l2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing/ N9 c' ^$ p/ h% I& k4 x/ d% Q
Removing image: 0% complete...failed.8 ^( y/ q7 b7 E# t) H5 }
rbd: error: image still has watchers
8 {, o; C  D5 G9 hThis 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., ^% _# J; Y, u* _

$ T" {- U7 ?. U" v) L: ^将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。: n. N( x, C; z9 \. w/ V, B
[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/2900899764" ?4 k' i% @% D& [6 H; K
blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)" f1 _: p. Q0 a* T- Q
[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
( T4 `% b) _' M; ]
  \- @, S3 P4 x% A- uWatchers: none9 b1 s' u8 S+ x! E2 I& U- }
/ c; z8 l2 z" N$ w: h9 Y7 ?+ F/ B
删除rbd2 L! @. X  A5 V$ Z( H/ n
[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk# {$ T% |5 Z; ~8 f& h; D: m& i( f
Removing image: 100% complete...done.
, k  M  o0 F3 r$ [. [# o" x6 k9 A9 w

+ H6 l1 K8 [# R; n2 U" m. h; }, G1 t% M  K
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4- n3 f) ?4 M3 V5 D  ]
rbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory
( u4 ~: k, d0 }5 N2 V" _) ~
0 [4 j% q. k+ H/ v, q
4 G  z5 s# W: L* t0 e; j6 H& z
! U) w% R% O4 I' T: F! H[root@compute01 ~]# rbd -p images ls, ^0 f( B' ]- A! P2 I; ~# N8 a
7e20974b-4fea-4ba6-9e47-aa6f4a135bf6. \4 I) Z  T: c  p* ?8 h5 }' Y
d4c568a5-40c6-4a39-a3ea-44a3a9945dd6; j0 r0 o9 X$ A
( ~7 n2 ~1 n" X* v7 @

6 b0 b- P7 X3 A+ [7 s2 G0 M
6 n0 E* k0 g, C$ r/ r; C6 C% E: S3 M/ M

" u' S  N5 a4 T. a2 c+ d( A/ z: B清除黑名单配置:
( Q+ _- G( v- K* Y, [( E[root@compute01 ~]# ceph osd blacklist ls* g" C; P. w) _; e: S
listed 1 entries
9 s( W  r/ ?! A192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461# i8 C7 X/ k3 @9 }( e
[root@compute01 ~]# ceph osd blacklist clear 6 ?. w. ^5 |7 u8 Q
removed all blacklist entries$ ]& s& U. B* K0 }" u! X
[root@compute01 ~]# ceph osd blacklist ls- O1 Q4 L" }& p3 T! C, Q
listed 0 entries0 y# R' A; L. U6 X! Q6 u
$ F% {, p0 C* C, Z

! O) [: e, P. ]+ X+ M8 E

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:42:28 | 显示全部楼层
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk: E9 q9 s# o" [
2021-10-19 13:39:31.649 7f1b5bfff700 -1 librbd::image::PreRemoveRequest: 0x5566f7682b00 check_image_watchers: image has watchers - not removing
" U5 n+ y$ X7 Q' q4 KRemoving image: 0% complete...failed.
" {. j0 Q; Y* H$ h) w+ Crbd: error: image still has watchers/ }7 w5 S$ W$ ^, i1 @- N1 e
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.
7 v' N+ s) ^! W7 t" ?2 J[root@compute01 ~]# rbd status -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
  s0 Q3 j9 o( c/ W$ O2 TWatchers:
$ b8 R3 e+ U* S- B5 F        watcher=192.168.0.79:0/2773586027 client.125118986 cookie=94233461719040
; l; F- }- j/ a4 d( [[root@compute01 ~]#  ceph osd blacklist add 192.168.0.79:0/2773586027
# W2 `; f7 ~7 Eblacklisting 192.168.0.79:0/2773586027 until 2021-10-19 14:41:22.677847 (3600 sec)" L! F) A/ ]; ?, i; r
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
1 N3 }6 M. L7 DRemoving image: 100% complete...done.

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:44:19 | 显示全部楼层
[root@compute01 ~]# ceph osd blacklist ls
: z$ d  g1 ?4 U) n: y4 m' `4 jlisted 1 entries+ w& V# g4 S3 s& k, k  O. B
192.168.0.79:0/2773586027 2021-10-19 14:41:22.677847
( \4 t6 B9 ~0 }[root@compute01 ~]# ceph osd blacklist
% Y& _: p+ T% nadd    clear  ls     rm     ' s7 S6 }+ m7 w$ T4 y- D8 ]7 }1 R
[root@compute01 ~]# ceph osd blacklist rm 192.168.0.79:0/2773586027
8 I; _5 s$ C( {9 mun-blacklisting 192.168.0.79:0/2773586027
: V( z" m3 F3 l[root@compute01 ~]# ceph osd blacklist ls: q$ s' b: g7 q% J
listed 0 entries
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:00 , Processed in 0.031282 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表