|
|
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
+ N& x: y! P: _) u) Y6 ?. P5 j6 ]2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing3 N) E" ?- g. \
Removing image: 0% complete...failed., _8 h' t$ l. [: ] l
rbd: error: image still has watchers \ e" S1 W& _; @; C+ k* L
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.# y: R4 V' t- R0 t( U
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
9 s( K# B9 L* G4 ?, LWatchers:
$ J! c1 Z6 w k( e* ]+ W A watcher=192.168.6.236:0/1356954254 client.18712163 cookie=140531196089424' r( D, H& H; [# U. N8 n+ d
[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254 8 A% K* y0 w6 z/ r1 K1 t: o& }" ~
blacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)
' q! \# p+ f) G& T[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
! m5 o6 X4 V+ a' X. a2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing
0 g& b5 S/ V; s" n# P+ ~: MRemoving image: 0% complete...failed.. b2 A- k# K+ s! H
rbd: error: image still has watchers
- A% U, H, u6 w$ K+ KThis 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.
* q% }3 e' D& s, m2 c% S
8 U9 U9 ]3 a( V$ Z, `将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。
& A8 F$ k7 Y0 u1 `/ @[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/2900899764% c$ z- Y' j# C4 H9 N- \
blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)
7 @$ B) e5 p7 e5 r. [/ c8 C1 ]" Q[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
: [ \, |9 r- y/ P
# F) M: P) Z! B; k" mWatchers: none8 ]- ~& z9 @- ?1 `) _# ]
+ y) v7 d7 n/ h/ n( N( @) |* N删除rbd
0 C2 C% U& U- E3 F7 d) c8 t[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk& n! p+ j: P% o% e
Removing image: 100% complete...done.8 U5 A0 F5 l0 C2 W# C: e9 e3 P
, \7 g p" e' V7 U
. C3 I& X: Q z( N0 U8 {
4 \3 C# j O# l% F" E' Q[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
# z9 Y0 [0 V( B& Q! ]' C) Erbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory7 X; v1 @3 J; Y9 g# T8 c
2 ~& x& z8 S$ g! P1 J) z
; A5 S# ~2 \( L' Q' X4 ^- q% q! l5 |% Y, I a3 H
[root@compute01 ~]# rbd -p images ls& T0 R4 l5 Y: [9 S
7e20974b-4fea-4ba6-9e47-aa6f4a135bf66 _/ \) [) m9 P# q: y7 \" ]
d4c568a5-40c6-4a39-a3ea-44a3a9945dd6
' J% r2 O9 m3 f D+ X0 N* ^: v/ P- x( R" J1 J
: s. U3 q- M3 f* S! _- G6 P c9 E6 \ L. ?% h( \
$ a% P7 h0 A( [7 ^+ G( p0 n" m0 z/ N) j F: o7 ^
清除黑名单配置:$ ^/ b( Q2 R; h Y/ a4 m8 s2 D* |
[root@compute01 ~]# ceph osd blacklist ls
; l$ ^ i! u. c7 F. glisted 1 entries' V6 n0 F7 X1 `9 P5 f4 k" H+ _+ c
192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461
& N8 f+ D2 `, a1 w( t[root@compute01 ~]# ceph osd blacklist clear
0 r, D! d3 C2 C7 j3 @4 d removed all blacklist entries
, v" D+ ]7 H5 B- ~2 I+ s9 U[root@compute01 ~]# ceph osd blacklist ls
6 T- @) W8 `6 E# U; r% vlisted 0 entries
( ~8 g2 c) \3 `, R) w0 p s
0 y: _ q8 m& d) H
& y* m0 l; X! J& D4 q) c' w |
|