|
|
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4( c9 C6 S* U1 \: n1 ]
2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing
: v7 L4 A! U v8 [ U: WRemoving image: 0% complete...failed.
8 [" [, `8 Z7 N3 j8 j5 x, drbd: error: image still has watchers
& z; n; `- Z+ D& T/ e! ^/ uThis 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.
9 x& O, Q/ ]3 z$ q4 z, @' k[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
0 ]# e) i( K3 y! B/ KWatchers:/ U9 t `" q+ q4 n; I, \4 |0 O2 O
watcher=192.168.6.236:0/1356954254 client.18712163 cookie=140531196089424
& V% s+ @0 w' d2 p6 O[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254 + L$ l. G: {3 r8 t
blacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)9 [. Z) K# k) R X( |. u5 @; g1 J
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4/ b- \' O" e5 n; K
2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing
$ n- y4 m: u# h5 P' DRemoving image: 0% complete...failed.
$ q. A; x' f% z6 Z3 @! H* ?6 Yrbd: error: image still has watchers
i) W0 E0 z& L$ q c# VThis 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.4 F' G) Q, G K* T$ i& I; P5 u
7 `! s6 Z' n! S. H3 V, [2 n' Y将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。
- X2 l3 Q2 n" D[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/2900899764
5 F! ]7 x' z c6 q- ?blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)8 ?" N$ _3 q" @$ [% C; |7 J
[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea48 \, k K' N7 o' Q' _0 u# y% B
3 z$ j2 u2 }6 B# N8 TWatchers: none
; h! K0 O) |" D* J9 T+ R
6 [2 m& _: G k6 f删除rbd3 v/ h/ f8 [) M% X9 _ U7 a6 r
[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk6 Y" v# q% `+ ^3 v2 O
Removing image: 100% complete...done.
3 W0 y' f' p$ J# z/ r3 E1 o! \
" A! d2 {5 @/ H. ?# Z2 C$ y/ C5 [* N! _- |7 e
0 W0 }' q1 K0 c5 o9 }% p
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea40 l1 }: |4 t9 M, a; q
rbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory4 B& m" _+ d! p% I$ p# @( [% z
3 j; E, c- C6 `& ]# M
$ m: [. C( b$ @ i- M
7 y# L( _1 r/ V" F2 Z- V[root@compute01 ~]# rbd -p images ls% U2 t4 p" V8 a
7e20974b-4fea-4ba6-9e47-aa6f4a135bf6' E* M: w6 F6 _7 C( \- l9 s W
d4c568a5-40c6-4a39-a3ea-44a3a9945dd64 i- s {6 u' u' z0 b6 W! e4 h
+ o5 ]% u4 A4 [" |; t/ n% g: J+ W
# t( O% @0 m x* D- y1 a B+ ]6 q" D
4 C. ~* u, q- H1 O7 A o5 P
. r; }' D% d4 y+ Q( V! U, y* B. i8 J
清除黑名单配置:
. T- u. [- g, D* {4 G[root@compute01 ~]# ceph osd blacklist ls
, k/ { ?7 Q- B" v" K+ r! A, N3 f- Llisted 1 entries( a, P/ u! e7 m5 x) \ Q8 c# n
192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461
! @9 I- T1 H! j: T4 |' n[root@compute01 ~]# ceph osd blacklist clear
& Y, x( o& o& X; a: a2 d$ T& f, e removed all blacklist entries
x. m8 M& u9 a[root@compute01 ~]# ceph osd blacklist ls7 t! [& G5 [5 r
listed 0 entries/ ]1 I/ q3 }# P" y
+ Q$ C4 V6 {) Z! l
4 P3 E8 E# U3 v z# l) ^7 ~ |
|