找回密码
 注册
查看: 3363|回复: 1

rbd: error: image still has watchers....Try again after closing/unmapping ...rbd

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-7-21 17:00:07 | 显示全部楼层 |阅读模式
[root@compute02 ~]# rbd -p vms info 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk% J2 c! j1 t  N( g- P4 S
rbd image '234abd4d-2375-44e3-b64a-0e84f247e2b4_disk':
( R, C. V8 a  |. {& L# m- ^( ] size 10 GiB in 1280 objects. F- T/ \  m# r* J$ E
order 23 (8 MiB objects)6 D  z+ R+ o0 t2 a7 k% z
snapshot_count: 0
, C, o( e7 J' Y3 |$ p id: 2a3c265c791c4
8 V: Q6 c% w  [5 D! q block_name_prefix: rbd_data.2a3c265c791c42 }4 c' y( U( h* U
format: 2) Z& j: u3 I. O" H
features: layering
4 N% ~! T  R* b1 V3 X op_features: / u8 K- N& ~+ J+ w# w% W
flags: 8 P& o$ c6 s9 r, L" u" \1 D0 c( \6 H
create_timestamp: Wed Jul 21 15:36:47 2021
+ d, h; h% `  I. c2 [( L access_timestamp: Wed Jul 21 15:36:47 20211 x8 R1 ]% N. I$ z) s5 J
modify_timestamp: Wed Jul 21 15:36:47 2021
. L: b9 j* o+ o: u, f) _2 z parent: images/64079697-b54d-4499-872b-a79d3daa48b8@snap
( z7 i. M6 M9 r% v overlap: 4 GiB
7 o0 i, @4 o8 |! [8 @3 J/ z[root@compute02 ~]# rbd -p vms rm 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
/ n* H% v9 S, Q: x) J2021-07-21 16:38:39.334 7f14abfff700 -1 librbd::image::PreRemoveRequest: 0x557dd1fd5c30 check_image_watchers: image has watchers - not removing# q+ i' M! f8 T, M; w
Removing image: 0% complete...failed.
4 O1 ?4 a4 w1 m1 d9 Mrbd: error: image still has watchers; B8 V# C5 O7 t
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.
" i' f. g9 [! k- C4 ]
/ J* z7 F  `" i/ v/ r删除失败:$ R; V- t+ {/ N7 S2 [# T
解决步骤如下:
! f) x$ l0 e' t( X# E[root@compute02 ~]# rbd status vms/2d05517a-8670-4cce-b39d-709e055381d6_disk+ r" L0 p+ Y2 C+ ~; H9 h
rbd: error opening image 2d05517a-8670-4cce-b39d-709e055381d6_disk: (2) No such file or directory
7 ]) Q/ B( W. H  l4 X, z7 W& K9 i. T& U* e2 J
[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
# f: d0 h1 R; GWatchers:
# X- J2 B  ~) f- F* w6 ^ watcher=192.168.0.77:0/3574198266 client.173021 cookie=93887687311360* m. |" q, g2 }' q' w( L
( T& v" l" v& r: ?

. V" w1 s! A. w  r: M[root@compute02 ~]# ceph osd blacklist add 192.168.0.77:0/3574198266 . t: i& h4 i% c
blacklisting 192.168.0.77:0/3574198266 until 2021-07-21 17:40:57.398343 (3600 sec)8 ]; j1 `; P6 K2 e. h: A7 U9 N
. E4 `/ B) i) k9 _- W( {+ r

& x# j; @# ?  E; Z0 m+ d. D& P) I( N[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk! q: c# R9 ]" L. J
Watchers: none9 `) H5 k. O  Q* V
  j' A- x! L/ ?& q) H$ i0 ~9 J
+ L/ ^3 t. `1 M* ~5 B& q( ]
[root@compute02 ~]# rbd rm vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
1 s, A: T- I9 K6 b2 }Removing image: 100% complete...done.% W1 ^! @( u! Q/ L5 K$ Z: R! r

: B9 Z9 y: r  Y! n7 ?删除成功
8 `) L4 ?7 u6 N8 p

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-7-14 14:11:57 | 显示全部楼层
同样的问题再次出现,解决步骤如下:7 L; c0 Z6 v& X+ V
/ n  F2 L* H+ D3 h. n
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
8 [( L0 m  {, ]1 }1 R6 g1 \2022-07-14 14:01:37.980 7f3cddffb700 -1 librbd::image::PreRemoveRequest: 0x55b914876b60 check_image_watchers: image has watchers - not removing
5 [0 V& H. F+ Y7 p/ Q- X0 jRemoving image: 0% complete...failed.7 l3 \, w3 N2 v% Z7 Y7 M
rbd: error: image still has watchers
, B" V( j% l' F- e$ S0 R& DThis 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 w' r7 r( t) D! t7 `5 l* {' u1 d  A+ M  f
# G; w3 e5 m2 r7 x8 |" n' `% Z# f
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
* F9 b9 {6 z" x; X2022-07-14 14:01:51.812 7f1736f22700 -1 librbd::image::PreRemoveRequest: 0x560a2b06ea70 check_image_watchers: image has watchers - not removing2 u. C) s% i  M: n. K0 O
Removing image: 0% complete...failed.: }; C" S* \1 r
rbd: error: image still has watchers
& O( o5 y! m/ a" W# ~. J$ 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.( }: ~/ L7 l5 F% d: P5 f2 U$ p

) G) v0 J6 k/ H# C* `$ }+ u/ m1 l9 j8 v% Z3 T/ Y
[root@host09 ~]# rbd info volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
' I2 C8 x/ q9 C9 M+ Zrbd image 'volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak':
. J+ B: I. e" _- x: n8 Y3 Z$ H        size 50 GiB in 12800 objects$ O5 N6 e- W- u& }. S5 l" H
        order 22 (4 MiB objects)
6 j3 M  Z8 x9 R; \. s' Q9 t        snapshot_count: 0
8 g' Q( ]1 \1 i* d; d9 \        id: 1a910a2feef869! U- P( B3 b1 N! r
        block_name_prefix: rbd_data.1a910a2feef869) w* E- |0 {3 r) P
        format: 2
7 w/ l2 K  M1 s1 |: B' u( d        features: layering
5 K) M1 c( n$ B        op_features:
% b, l' s( O# f        flags:
3 w& Z) l! ]+ U  o" V. j) Y        create_timestamp: Fri May 14 11:39:01 2021: }' t3 e* j. v1 m
        access_timestamp: Tue Jul 12 11:19:29 20221 q3 V9 D: {3 r
        modify_timestamp: Fri May 14 11:39:01 2021
% A( @$ M0 W" Z% w% L- q4 t        parent: images/0728be2a-d8d7-4e29-9e04-90c9ae91dca0@snap2 P) g/ v' `% p' @9 o9 z" u
        overlap: 2 GiB
8 H. v4 L( \! H6 Q7 |. ?
& @1 r+ i8 `  h( [8 Y) V* G' Q! M[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
) U5 h6 Z3 @1 G  AWatchers:
  p2 _4 {9 F0 V" r- S2 l4 w; _        watcher=172.16.129.12:0/3801911378 client.331035433 cookie=94155368121216
# _/ y' g1 q) B8 P/ O0 R* }, C2 ]% X1 B9 R- {
: i: b+ w" j( Y$ a( m( P
[root@host09 ~]# ceph osd blacklist add 172.16.129.12:0/3801911378+ o9 U; L/ e: [1 S7 a; j
blacklisting 172.16.129.12:0/3801911378 until 2022-07-14 15:07:44.315065 (3600 sec)+ N+ N) }$ O& W# y$ N& D

$ q- I6 N9 M+ q$ W% e
* v( n0 y9 s* H# U& e% J[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak! f* k6 h: M0 F( Y
Watchers: none$ X3 y7 C3 }8 M3 |) R6 V% m+ r

, o1 M( k8 i! [) w2 }8 M' C2 o5 N; h3 T1 u( t2 H$ U( g; P
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
( A: T  x" }, G5 ~* h1 u0 IRemoving image: 100% complete...done.
* s* a7 @! c% d, d' X! `. ^, x/ s6 ]0 r" M- U( [

& c0 N' g8 q5 k: _' P& \9 f[root@host09 ~]# ceph osd blacklist
& @. L& {; R7 n& l, W1 Bno valid command found; 3 closest matches:
- w& w. o3 R4 y; `5 ~1 |0 L3 T$ Qosd blacklist ls5 w5 ]  R( V: g- m& ~2 i
osd blacklist clear. I  ?' X  s6 w0 y3 D6 Y
osd blacklist add|rm <EntityAddr> {<float[0.0-]>}' x* }4 `7 ~" o: i+ _2 w
/ {9 _2 H4 F5 e8 }  h

' q) m0 s4 {0 E' S" |' i[root@host09 ~]# ceph osd blacklist ls
/ a  W* m' Y' n/ v: X6 T& mlisted 1 entries  ]' L& i8 j0 w7 W5 f
172.16.129.12:0/3801911378 2022-07-14 15:07:44.3150659 N5 K9 N' b3 ?0 v; f

* O) m9 v8 K2 o7 O& G+ x( o5 q6 D: f1 H0 b0 A
[root@host09 ~]# ceph osd blacklist rm 172.16.129.12:0/3801911378. P, F; T$ `* `
un-blacklisting 172.16.129.12:0/3801911378
* z2 O. w; M' P. K4 y! G7 S5 A/ X* y9 z2 R! F1 ]0 b8 Y

1 W4 ~/ P% c2 r" A$ }[root@host09 ~]# ceph osd blacklist ls
6 o8 {6 p1 C! C! ~8 k/ v- flisted 0 entries, B* _9 \7 k+ B

7 x: r! x* j& I6 [3 _6 h5 d# U% S
您需要登录后才可以回帖 登录 | 注册

本版积分规则

返回首页|Archiver|手机版|小黑屋|易陆发现技术论坛 ( 蜀ICP备2026014127号-1 )

GMT+8, 2026-6-12 00:10 , Processed in 0.017226 second(s), 21 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表