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

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

[复制链接]

0

主题

0

回帖

9

积分

管理员

积分
9
QQ
发表于 2021-7-21 17:00:07 | 显示全部楼层 |阅读模式
[root@compute02 ~]# rbd -p vms info 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
! Q. e* F* k, {rbd image '234abd4d-2375-44e3-b64a-0e84f247e2b4_disk':
3 I: B4 Q2 v" s$ _ size 10 GiB in 1280 objects
" q- d" s& D7 B0 ~ order 23 (8 MiB objects)9 J* T( m1 s" r' u8 S4 M
snapshot_count: 0, f9 I& U: O  F! x: C, Z" ?
id: 2a3c265c791c4
. o- F: h; C1 }" ~" i: I block_name_prefix: rbd_data.2a3c265c791c4
3 b! d. u1 S3 R. `9 y% S( e format: 2! A" w4 r1 m  j/ b/ K
features: layering6 o8 }$ G6 O1 R4 ]3 l
op_features: 5 U, e9 Z. I* `8 A3 N3 ^4 P6 @
flags:
8 C4 P# ^* ?% k' Q+ D! c9 p+ n create_timestamp: Wed Jul 21 15:36:47 2021
+ I9 t5 u7 t  J6 v6 K) J/ B8 v, f access_timestamp: Wed Jul 21 15:36:47 2021
& |, W* J! t8 P7 P( V- p( c* X modify_timestamp: Wed Jul 21 15:36:47 2021
' B% Q3 h+ p, b parent: images/64079697-b54d-4499-872b-a79d3daa48b8@snap7 M: M& O, I/ K6 R6 B
overlap: 4 GiB/ q: x# k6 d( h9 p# m$ x
[root@compute02 ~]# rbd -p vms rm 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
& Y7 s/ f$ m+ ?" n2021-07-21 16:38:39.334 7f14abfff700 -1 librbd::image::PreRemoveRequest: 0x557dd1fd5c30 check_image_watchers: image has watchers - not removing- e9 u8 ~8 j$ m, e+ n. h/ z1 E
Removing image: 0% complete...failed.
0 P  ^9 m6 o) {- krbd: error: image still has watchers4 @: X: A* L. K* r
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.3 q6 g: `0 ?* K4 P5 H; }

7 v1 k4 X* L: |0 s0 z* H删除失败:5 J1 f- Z3 _$ R/ K5 u# t
解决步骤如下:$ `2 [9 b) M4 ^$ J, [
[root@compute02 ~]# rbd status vms/2d05517a-8670-4cce-b39d-709e055381d6_disk9 }0 s1 W7 x& D' Y1 `
rbd: error opening image 2d05517a-8670-4cce-b39d-709e055381d6_disk: (2) No such file or directory
# _. e& O9 G2 \; r2 Q( q& j) e; M( |5 W) u2 b8 t' C9 [* H% p* S
[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk! `) x1 w. G% M$ X8 U
Watchers:
* y! K: d& S. ~2 Z' x% G1 R watcher=192.168.0.77:0/3574198266 client.173021 cookie=93887687311360
) X+ d& ^8 R, @& c' P0 ?# }; Y& d$ q" \- m2 C( h# V
3 |( _! o6 f( g- W' U1 @" A2 O
[root@compute02 ~]# ceph osd blacklist add 192.168.0.77:0/3574198266
$ z# q7 j/ f2 V) R( vblacklisting 192.168.0.77:0/3574198266 until 2021-07-21 17:40:57.398343 (3600 sec)
! t! v% l7 i/ k4 x
5 c& C+ z1 v+ B+ g$ `
" q0 H6 N4 {' q% r  U6 n% |. ], m% N4 e[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk0 P5 p5 h8 p6 G- e0 r$ ?  W
Watchers: none5 i! C5 h( u8 ?
$ v2 S0 t7 K# m' c

' S7 B* e4 x% ~. y( \) _[root@compute02 ~]# rbd rm vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
3 N5 x8 x9 ~9 o/ ~Removing image: 100% complete...done.
4 u; i1 ]2 p- e1 D, q+ @5 t3 w" M. I
$ T0 O# x' W+ y& C( G, y! K" u删除成功% e3 I6 |9 Z2 g/ d$ W# _5 {1 x* q0 T

0

主题

0

回帖

9

积分

管理员

积分
9
QQ
 楼主| 发表于 2022-7-14 14:11:57 | 显示全部楼层
同样的问题再次出现,解决步骤如下:
! h0 `. z1 h1 T) r  l6 W, D
" O3 ?3 l: D# T' {, g5 Y% G$ u[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
8 G- Y; l4 [. [; Y2022-07-14 14:01:37.980 7f3cddffb700 -1 librbd::image::PreRemoveRequest: 0x55b914876b60 check_image_watchers: image has watchers - not removing# C3 w8 E$ _8 y# N3 n1 T
Removing image: 0% complete...failed.5 t6 z, G  y9 Y2 h
rbd: error: image still has watchers# v2 J9 `  O  a' a5 n9 k
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.' v5 P0 a$ Y3 W
9 W# |6 n: H( B5 }

( |0 D' e4 g: ?[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak" K) K# `: s- H% @3 P# ]
2022-07-14 14:01:51.812 7f1736f22700 -1 librbd::image::PreRemoveRequest: 0x560a2b06ea70 check_image_watchers: image has watchers - not removing( b# R/ f6 E8 i
Removing image: 0% complete...failed.
4 ?3 k' ^# A$ Y7 f. Prbd: error: image still has watchers; ^  I( U& {, s& P# ?
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. Z* w( y6 M) ?, g& s

& D1 V5 K4 L" ]% b" ?3 O  N
" j) V' j6 E" E" u# J" M[root@host09 ~]# rbd info volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak6 z# v8 G5 \; L/ W3 Y( m
rbd image 'volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak':
8 L# l& `8 F; }+ _  d7 H        size 50 GiB in 12800 objects: V/ F' d" b' [: D5 L$ s( w& U
        order 22 (4 MiB objects)& N  P: j+ L8 B. S' p
        snapshot_count: 0
, x& [) S6 y& F, \0 c        id: 1a910a2feef8692 s2 Y* A7 l0 c) ?" K
        block_name_prefix: rbd_data.1a910a2feef869
. M4 v7 ?& h- I6 `! X  L; g        format: 22 W# N1 f; P" H- F- T0 c9 x$ J& D
        features: layering: P. Y5 \) r2 w; T
        op_features:
# R1 _: H, O& O$ a1 O        flags:
: n5 a% ~5 z3 H: K; j' [! m6 g: K        create_timestamp: Fri May 14 11:39:01 2021
3 z' T0 ?8 ^& J+ z9 Q        access_timestamp: Tue Jul 12 11:19:29 2022
; e4 p% O" j7 y        modify_timestamp: Fri May 14 11:39:01 2021' n0 Q3 Z. k4 p+ V7 x* K0 W
        parent: images/0728be2a-d8d7-4e29-9e04-90c9ae91dca0@snap6 Y. p" p1 I4 K& }; ]( h' A
        overlap: 2 GiB
0 y. B9 M4 d# X' L1 @- d1 r1 z5 z2 [7 b4 Q0 [/ {
[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
5 ~% ]4 T3 b9 l( FWatchers:
/ w3 f. E( x6 |. j        watcher=172.16.129.12:0/3801911378 client.331035433 cookie=94155368121216
! z6 [/ Q$ q% _
1 g7 [1 E+ K! S  `% [  H6 c, ^
! h$ S" l1 W; a[root@host09 ~]# ceph osd blacklist add 172.16.129.12:0/3801911378
8 x" H6 R0 }) X7 l, h' wblacklisting 172.16.129.12:0/3801911378 until 2022-07-14 15:07:44.315065 (3600 sec)
) k! Z4 x: c$ r. Z" L, D( h
  D+ U- V+ F  B& z0 }# T4 d
7 M5 L* i) V# L' {, s. |[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak2 o6 V1 E& ^( w* P
Watchers: none
8 i( Z; [& U/ Q$ w) N# N0 e
0 @/ D7 {1 X* `( S& A3 Z* Y4 N5 J; W( P7 z
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak7 G; a& Q, y0 }
Removing image: 100% complete...done.
% Z; K; w& o: Z& L+ f
( G$ L  @5 I. {* j3 v" o" C) ^  @" F$ m! C+ G
[root@host09 ~]# ceph osd blacklist
$ I; l5 e6 l% L8 _) [7 B9 qno valid command found; 3 closest matches:; q* B) b6 [' V0 x
osd blacklist ls
% P+ U" R4 X. a2 X5 r2 f& h% Kosd blacklist clear" D5 p1 p# S6 F: ~2 Q
osd blacklist add|rm <EntityAddr> {<float[0.0-]>}
4 m, u) h  k! Q0 C7 R, T2 j3 Q; {2 E
9 p5 `. U9 j* I) E" J, p
6 K) B2 A4 R9 ^* i+ b& E[root@host09 ~]# ceph osd blacklist ls
5 r' }& \, R+ q) c8 j( m6 Glisted 1 entries: O# A5 T. H8 H2 B6 z
172.16.129.12:0/3801911378 2022-07-14 15:07:44.3150652 B+ ?5 f- J, ]1 ~% G, s9 n
: a7 v8 ], @: x% v
9 G. e% W$ p4 q6 B7 K& C! z, D
[root@host09 ~]# ceph osd blacklist rm 172.16.129.12:0/3801911378+ A8 j- e  H+ w& D, X7 q: l
un-blacklisting 172.16.129.12:0/3801911378! z; A9 Z6 _3 N$ E) F$ A
# `/ L7 M& ^* @
8 X' @, r# o4 y1 O
[root@host09 ~]# ceph osd blacklist ls( ^% _4 _# {* l4 ]9 U
listed 0 entries. q8 w6 g6 S. l  w0 H% o
" L( J4 H) ]0 T$ U% j
1 L  C& X. W# M* }! E. U0 o- `$ _
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 22:58 , Processed in 0.027484 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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