|
|
[root@compute02 ~]# rbd -p vms info 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
% S" d% O, }; h" b. Q& |, f9 V9 \rbd image '234abd4d-2375-44e3-b64a-0e84f247e2b4_disk':
2 D4 c, ]8 j8 f% U6 J size 10 GiB in 1280 objects9 V6 h3 D$ |. r7 b a
order 23 (8 MiB objects)
+ D" { Q- F) b& W# g" p snapshot_count: 02 W2 Q: k: C( j3 f
id: 2a3c265c791c4
; o4 D9 `6 D% J1 ?2 ^; g block_name_prefix: rbd_data.2a3c265c791c4! h3 I, \3 B: n% I
format: 2
; M- O( J; i8 n1 ~& O6 L features: layering
8 ^4 m( B9 a9 B$ ~# R( K, e# c op_features: : R/ ~2 d* V, m% X& j$ E) l$ R3 n: x, V
flags:
2 U. t1 g/ L' \1 T9 P, w' D- y create_timestamp: Wed Jul 21 15:36:47 2021
# X" o% X* K2 _, Q7 q4 { access_timestamp: Wed Jul 21 15:36:47 2021* I/ O, I& `- r' ?0 Y0 m
modify_timestamp: Wed Jul 21 15:36:47 20215 K2 i* l# i Z1 L
parent: images/64079697-b54d-4499-872b-a79d3daa48b8@snap8 u m# ]( I9 q; m' X# N
overlap: 4 GiB4 W) Q+ n& D- R7 p: r/ l g# K1 Q& I: W
[root@compute02 ~]# rbd -p vms rm 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk0 p0 `2 F7 \, `& ~) R; a
2021-07-21 16:38:39.334 7f14abfff700 -1 librbd::image::PreRemoveRequest: 0x557dd1fd5c30 check_image_watchers: image has watchers - not removing9 E6 D' l `3 H
Removing image: 0% complete...failed.; a) i* D3 a; x; V K0 ?% T
rbd: error: image still has watchers5 G3 i8 \3 Y" }& f
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.% o) E0 V) y+ Y. ~7 L0 z, O
" r" l; b# y l9 C1 Q
删除失败:1 q. U* Z# N( i8 `1 P# L* Z& N0 B
解决步骤如下: t" ^3 I# V9 E. K
[root@compute02 ~]# rbd status vms/2d05517a-8670-4cce-b39d-709e055381d6_disk% T! \# a: T0 K9 z1 P- y% U1 Z
rbd: error opening image 2d05517a-8670-4cce-b39d-709e055381d6_disk: (2) No such file or directory
4 C8 c6 w$ \. l" {
7 y% Q' R q5 i- _[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
r; h+ |6 ~6 Z8 q( E3 m B: M$ TWatchers:' R$ }: v& L7 _& }3 b/ [
watcher=192.168.0.77:0/3574198266 client.173021 cookie=93887687311360. F/ r' p4 f/ E2 w' J
9 X. r! n$ ^4 \, E
* ?& Q$ M7 Y' y[root@compute02 ~]# ceph osd blacklist add 192.168.0.77:0/3574198266 7 X6 C2 h* ^$ k5 g
blacklisting 192.168.0.77:0/3574198266 until 2021-07-21 17:40:57.398343 (3600 sec)
+ T9 h8 B$ r) s' |' Q @; t
( m S, ?, V2 K: a1 k$ q4 o
2 r, D0 p1 R+ k. s9 B[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk; c7 W) x- p8 u* p8 b
Watchers: none
9 e5 M3 B- i S- M0 d! F/ M5 O9 L% b( H+ [) ` K; C
3 D |1 \9 z1 t! p y[root@compute02 ~]# rbd rm vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk: s4 A, f2 L& V- @, Z/ z* o7 p
Removing image: 100% complete...done.5 m2 O( Z3 ?( ]/ a
5 H0 D5 R, I: P# m
删除成功9 i+ N9 T- P8 ^( H9 b" \
|
|