找回密码
 注册
查看: 3362|回复: 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) I* `2 O6 S' B6 F$ s
rbd image '234abd4d-2375-44e3-b64a-0e84f247e2b4_disk':
9 }/ K1 n) w0 I9 T9 a size 10 GiB in 1280 objects- [1 ]7 K0 u+ J6 i  G: j
order 23 (8 MiB objects)4 c- q9 r: z9 R7 d* v7 j
snapshot_count: 00 q  O6 p; d, B1 R
id: 2a3c265c791c4
3 C! d( d1 M' I% N3 Z block_name_prefix: rbd_data.2a3c265c791c4' ~) l( {, B5 I- j6 ~
format: 2
1 h+ Y6 |: }4 G features: layering- n2 t: L3 T5 y/ \2 n9 ]
op_features: 8 g# J4 l3 O+ e  Q4 T. x7 H# q
flags:
. j1 j6 g+ Q3 c& f create_timestamp: Wed Jul 21 15:36:47 2021
/ w* ^" O9 K  L; k0 j& x+ I access_timestamp: Wed Jul 21 15:36:47 2021" ^3 e' d1 n* L  B$ }" \, N
modify_timestamp: Wed Jul 21 15:36:47 2021
- y& [* U6 s  k2 h; f parent: images/64079697-b54d-4499-872b-a79d3daa48b8@snap0 `& P( r' u5 t' A
overlap: 4 GiB  q( Z: W9 ]9 _" m$ ]
[root@compute02 ~]# rbd -p vms rm 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
7 X7 E5 ^* w- f5 h4 y+ w( B2 ?2021-07-21 16:38:39.334 7f14abfff700 -1 librbd::image::PreRemoveRequest: 0x557dd1fd5c30 check_image_watchers: image has watchers - not removing7 N/ l7 x& D/ o6 _$ }$ d! h
Removing image: 0% complete...failed.$ p1 g2 t0 f4 p) v6 e3 F
rbd: error: image still has watchers/ S; p3 X8 c2 |7 Z" a
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.6 t+ Q9 u& w. }. R& J; F; o

: `% s1 Y$ y9 ]/ X  m9 y% T! K删除失败:
! N# H; K# F* G. F3 g- ^0 [解决步骤如下:! I! P9 }0 x% M8 n: R
[root@compute02 ~]# rbd status vms/2d05517a-8670-4cce-b39d-709e055381d6_disk
$ {( K: r' d* E& z7 Irbd: error opening image 2d05517a-8670-4cce-b39d-709e055381d6_disk: (2) No such file or directory4 b/ J4 b$ l4 L5 d% U( q' H/ E4 i
; S% H4 f' G* a% T: p) t7 L
[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
. c) e! j) h3 v( C" x/ g1 i  wWatchers:
1 D5 a4 a4 e, ^2 m- Z. O watcher=192.168.0.77:0/3574198266 client.173021 cookie=93887687311360
* c, R5 v- S# @3 n) b) D! m
  l: L. ?" [; z" o( k
2 n. ~6 Y" v, s, ^6 |6 E5 }[root@compute02 ~]# ceph osd blacklist add 192.168.0.77:0/3574198266
' p2 V: W7 u1 G7 h% H+ fblacklisting 192.168.0.77:0/3574198266 until 2021-07-21 17:40:57.398343 (3600 sec)
$ K/ x3 ^1 V8 w- o  D# x' S8 s0 o- x: L, y

) P0 t" q" C; [/ B, d+ H- A: c[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
# U  Y; @: |3 @: U% C' yWatchers: none+ [* \$ x( Q5 e* W& K6 f$ s  T

% f  Z. o5 P1 R# J& _# H2 b. I: b( U0 W
[root@compute02 ~]# rbd rm vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk5 y7 ^0 v9 \6 \* |
Removing image: 100% complete...done.1 b3 Q+ i4 C" o* L' l4 m

7 p8 ?  X$ v0 P- u; x/ i删除成功6 @; n& {: K, c3 C9 B5 C

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-7-14 14:11:57 | 显示全部楼层
同样的问题再次出现,解决步骤如下:: N6 H- M2 X$ b: F) y% ^

+ ?4 K$ y$ \' [' L7 t$ T[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
, N/ C- p; q/ A- O! F$ I8 H2022-07-14 14:01:37.980 7f3cddffb700 -1 librbd::image::PreRemoveRequest: 0x55b914876b60 check_image_watchers: image has watchers - not removing5 S% z1 d- d' i$ f; \# t
Removing image: 0% complete...failed.& P4 V' @$ Q  p
rbd: error: image still has watchers
) o. {+ j0 ]& b& K# u% a* jThis 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.
. j2 p% H( p% v3 B' f: t# D1 z4 ^7 v0 H; T# P3 v# O: V/ l/ k

; C& J/ H) B& U0 `" P0 f4 J) C[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
. J$ a5 [4 x, V0 i8 p2022-07-14 14:01:51.812 7f1736f22700 -1 librbd::image::PreRemoveRequest: 0x560a2b06ea70 check_image_watchers: image has watchers - not removing4 p9 D+ b  w/ {, t) O' v
Removing image: 0% complete...failed.
! M; m/ o$ f  B( T9 o6 Hrbd: error: image still has watchers
! J0 c1 z+ Z* {4 ^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.
4 z5 B* V7 s/ f2 d7 W1 o" O, q" N; @* `# q

5 }" u' v7 A1 V, R- |[root@host09 ~]# rbd info volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
5 q( y- e$ S8 V$ m, [0 @rbd image 'volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak':
0 Q* f4 {+ x' \$ N        size 50 GiB in 12800 objects
' B! T$ |- h  o3 E# H        order 22 (4 MiB objects)
3 I" N. X) y% J4 x1 @        snapshot_count: 0# t4 a' {5 _& W
        id: 1a910a2feef869* E: e" U, F) \, @
        block_name_prefix: rbd_data.1a910a2feef869: T, `; ]2 ~! U+ ^: n( e9 z
        format: 2' c# \8 A& C0 n+ d
        features: layering6 [* y. C6 O, F% ^( I9 B4 W4 m' z$ h
        op_features:
- P- i2 F. }. d4 O) L/ j  U        flags:
& `, W: U, v4 Q% i" W        create_timestamp: Fri May 14 11:39:01 2021
# Y  p, G% ~' v1 C7 F5 o        access_timestamp: Tue Jul 12 11:19:29 2022
0 V: A) `9 m) q. j( [$ t3 i# x6 E. r1 E        modify_timestamp: Fri May 14 11:39:01 20215 z- z- ~0 I; g0 N  s2 c  m
        parent: images/0728be2a-d8d7-4e29-9e04-90c9ae91dca0@snap' e6 M7 b* m; k6 G3 W6 E, K! K1 X
        overlap: 2 GiB
  Q, c0 d: C+ j( c: t
  X5 x' G$ U1 q4 n8 t+ z[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
, E# X" l' v+ r# s/ b' \Watchers:
4 S6 V3 y5 _# Y; T) J        watcher=172.16.129.12:0/3801911378 client.331035433 cookie=94155368121216
3 R4 A& B; e" G. W! |9 Y
1 B  v$ M" `6 X! R! i/ B: o4 m, L9 x. r2 }" ?
[root@host09 ~]# ceph osd blacklist add 172.16.129.12:0/38019113782 S5 x0 H  n+ }( \; J6 t! l  C- y+ ?
blacklisting 172.16.129.12:0/3801911378 until 2022-07-14 15:07:44.315065 (3600 sec)
- W. J* ~/ o3 d4 c" Z$ a! h: {+ Z3 }* h  X8 O$ p6 B6 ]$ I
# C9 K, c2 T- l
[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak1 t+ K7 Z7 h4 W( o/ J6 b
Watchers: none
  i/ D3 u% }3 V0 z2 U9 z/ [% A
8 M$ [" f! d' D. C7 P
5 n: n! n) ~; M; R[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
7 `$ c- v; [7 M- P% B" q4 [Removing image: 100% complete...done.
2 `% f  O7 y  j
0 c1 c1 w  s9 v! d% x3 D4 l5 }9 c! Z- z9 D0 {# w
[root@host09 ~]# ceph osd blacklist : x, E8 o4 b4 R" ?9 {3 s, L
no valid command found; 3 closest matches:
; F; t# u4 d  f1 ~osd blacklist ls$ h5 K% y0 Q$ c" |
osd blacklist clear# K7 U& _; }% l* c  d, U3 U% k# K
osd blacklist add|rm <EntityAddr> {<float[0.0-]>}
7 ^' W. A% [( ]& f) z2 q
  ]% Z' @- A0 k5 [) ~- t9 a4 }) C4 Z0 H4 }/ a0 P
[root@host09 ~]# ceph osd blacklist ls
" M* Z# L; G3 S! J' Flisted 1 entries
: ^  a( P: q; S3 \172.16.129.12:0/3801911378 2022-07-14 15:07:44.3150656 G+ k7 t. a* [- N
7 B2 x$ l; g; U4 h
9 L; [% @5 |3 T$ G1 y/ B: f
[root@host09 ~]# ceph osd blacklist rm 172.16.129.12:0/3801911378
2 o( z  \" x! A9 H+ V2 h4 ~un-blacklisting 172.16.129.12:0/38019113784 e0 d" ]" ^% F0 A# m
; v1 P: C2 q, t* p

7 J" ~+ O% H# |' \- @9 I[root@host09 ~]# ceph osd blacklist ls. x5 `! K5 l7 {
listed 0 entries
' _: Z2 A' H, u; _0 h; L( S
' I9 E! v( e% I% K2 Y0 j& y0 i  L
5 w( V5 j7 `- D$ f6 g
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 23:02 , Processed in 0.017765 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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