|
|
[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 |
|