|
|
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
1 E9 g# Y" Y8 A1 \2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing
3 g, D; l' H( d* p6 NRemoving image: 0% complete...failed.: R' H# Y% D/ A, k! \1 v2 q
rbd: error: image still has watchers
9 }# s& ~' K/ `: _* qThis 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.2 o7 U# e5 z$ H7 X# e2 j) d7 y/ H
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
' y! D6 D0 t' E) P8 f8 QWatchers:
* \& ^ G: a; p3 Q) D, M: D watcher=192.168.6.236:0/1356954254 client.18712163 cookie=140531196089424
* T, l% q+ Z1 c& K2 ?- y[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254
, `: `7 D; y4 ?3 Y% R1 _: V9 P) Mblacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)
; d5 G0 o2 f! |[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4, a2 y) t! Z4 {+ i4 w, B
2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing' O- f- w7 m" O% M
Removing image: 0% complete...failed.
: c2 C; y1 N$ B6 ^# Qrbd: error: image still has watchers1 b1 l; ?0 k3 [& Y# S
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.
* z5 T# _2 V7 V a7 C6 d4 G! @/ a( E6 o. i
将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。; s" H9 k* u$ j$ F; N( M$ x
[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/29008997648 F) K. `7 p6 L! l3 {+ Y6 D' n
blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)( Z, s: E: o/ S$ J6 s5 ?" f8 O3 \
[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4& R6 ^) h L" v% E" f
- O- Y( X9 U$ ?4 C4 E* A7 K! U
Watchers: none
" j2 l9 q- _ R- P# ]) Y0 o' r$ |5 ~% V4 j8 j7 e% ]" a% @: s
删除rbd' a/ L2 \; b3 g( u
[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk. i7 M4 G9 z X5 G p
Removing image: 100% complete...done.7 v% T4 B4 M1 P8 e8 {6 i8 r. |
7 M- t! L! P" ]' Y; V! j6 E
! A) U% [0 |/ |3 ? d7 Q; k( M% s% V. D7 q+ l; H
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
+ z7 Z8 P! ]4 b# i: \- @) D: x2 n0 Vrbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory
+ O5 A- V0 ]5 Q P. v
8 d9 Z; f0 L6 w, t* d
- w+ P' F5 Y2 B9 h4 d6 b4 H0 p4 f. K
[root@compute01 ~]# rbd -p images ls% K9 e6 {4 B( r; U9 S7 W
7e20974b-4fea-4ba6-9e47-aa6f4a135bf6
4 |; T" i* h3 ?9 Id4c568a5-40c6-4a39-a3ea-44a3a9945dd6
+ S, ^: {3 p, F3 l2 @ A4 G4 U8 z$ B' r$ B5 ^
1 U% E0 H8 F6 i1 ?6 T- i9 I* D" b9 b
- \- a# J2 Y! w+ g
! n3 c. m5 J, a- S$ D7 c清除黑名单配置:
* b/ g" X5 D4 V, o$ g4 ^" R( ^[root@compute01 ~]# ceph osd blacklist ls k. {9 S% U1 q8 Y: A4 X# ~
listed 1 entries o" H- X( T% |$ k$ t) ^
192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461
7 ?! r" {. }2 e[root@compute01 ~]# ceph osd blacklist clear
1 ~( }" g! ?7 d: k* n1 Z% \ removed all blacklist entries
# W- A% Z3 g, R. ^[root@compute01 ~]# ceph osd blacklist ls0 b/ X! }0 s: t
listed 0 entries( G- j4 l4 |1 H* \- a% v, L
3 h& W" f( X, U* m
" H3 s9 V! a, ` |
|