找回密码
 注册
查看: 572|回复: 0

rbd: error: image still has watchers 问题

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-7-15 13:00:01 | 显示全部楼层 |阅读模式
同样的问题再次出现,解决步骤如下:0 o& X  {& _0 e/ w2 ~/ V6 c+ r
8 B$ x9 f3 E$ R4 J# G
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak+ T" Q! P2 r3 `; }
2022-07-14 14:01:37.980 7f3cddffb700 -1 librbd::image::PreRemoveRequest: 0x55b914876b60 check_image_watchers: image has watchers - not removing1 o; n0 g" d; V
Removing image: 0% complete...failed.
% H% ~8 z' l" Q& }0 jrbd: error: image still has watchers+ r' G$ q' y" ], l( ]; e' r$ U
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 k% V& I" o! D4 X1 L, C8 n, l$ K- o4 y
( J. i1 g: u; n9 ^$ H& d; v

3 {1 b1 \9 @4 C( Y[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
& Q5 Q  S" Q' j6 S' Q2 P" |2022-07-14 14:01:51.812 7f1736f22700 -1 librbd::image::PreRemoveRequest: 0x560a2b06ea70 check_image_watchers: image has watchers - not removing5 E: _+ W6 V% l' [' s5 i6 }; \$ d5 D2 G- F
Removing image: 0% complete...failed.8 U$ }9 T. |& g+ W
rbd: error: image still has watchers
. [; W0 v/ y+ v1 \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.2 ?# e5 f& _- d

# v3 E* h' H8 x4 X1 W1 n. T# X/ b  `$ Y% |5 t; J" }: P/ ~
[root@host09 ~]# rbd info volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak0 k  L' _5 D: ]5 A& Q
rbd image 'volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak':
( \. B; K5 d! d4 O7 X        size 50 GiB in 12800 objects2 r( r1 v* M8 _
        order 22 (4 MiB objects)' l0 e) t7 i' i2 @- O4 J0 }8 O2 C
        snapshot_count: 08 m% @4 S8 j5 S9 r( N2 \
        id: 1a910a2feef869
1 {5 G5 Z* J! C2 Q! \        block_name_prefix: rbd_data.1a910a2feef869+ t" U  j% f/ _6 A
        format: 2, O$ h  T/ o7 l
        features: layering* I5 ]4 _- I+ x: j
        op_features:
% i7 a% |) o% p+ @+ z9 q# J- I5 O/ j        flags:
) z. N1 F; d" y8 }9 r& M        create_timestamp: Fri May 14 11:39:01 2021
6 s1 ^# t1 O1 |1 r        access_timestamp: Tue Jul 12 11:19:29 20225 o  b1 W5 e: J
        modify_timestamp: Fri May 14 11:39:01 20213 _# y& n. U( |
        parent: images/0728be2a-d8d7-4e29-9e04-90c9ae91dca0@snap
$ Y2 C; W' X1 m* P3 s* T        overlap: 2 GiB6 V% F! O  O- U# `
4 S7 |! C+ c1 k* T7 }1 B
[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak1 g( a; ~5 z+ R- y, f3 ^
Watchers:+ H/ J+ _, F# `% h/ l/ i
        watcher=172.16.129.12:0/3801911378 client.331035433 cookie=94155368121216
! d, v3 T$ W) F" o: Q  n
4 @5 \/ C8 c- e7 Z" X
! D* p! y; X' h/ y% c1 H. T3 `[root@host09 ~]# ceph osd blacklist add 172.16.129.12:0/3801911378
0 I# t8 L5 W- g: b* yblacklisting 172.16.129.12:0/3801911378 until 2022-07-14 15:07:44.315065 (3600 sec)
4 n3 i9 v+ E) h! A5 S9 e- E$ V  b$ d7 h/ m0 l
7 T9 b( {9 e* \( r
[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak" F/ P+ {. U3 P$ Y+ H7 z
Watchers: none
, q, g' A1 ^% T; y1 m! n  Z) U  V7 x; R6 N5 G+ ?

$ n$ n, I1 y0 }[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
$ t# n/ G6 J0 h# ]  QRemoving image: 100% complete...done.
, I5 k" p5 X+ p4 h3 W1 [* Q( A4 |0 }& U# r
  L1 G( o: c$ Q$ ?: H" F+ W# ^
[root@host09 ~]# ceph osd blacklist
0 D5 R. M6 T) v+ Jno valid command found; 3 closest matches:9 C: `: _3 [; D& u0 s. H9 e+ F
osd blacklist ls! B4 h9 ~( b8 d5 N2 L
osd blacklist clear
# N' Z2 J& v/ i2 \- V6 I/ Xosd blacklist add|rm <EntityAddr> {<float[0.0-]>}
5 ?; y0 j& u! C, r7 s, `' O
8 Y9 g& Z- u2 D1 O  l( s- Q3 u3 f$ e7 Q
[root@host09 ~]# ceph osd blacklist ls
, P: d1 |. b+ C' y' Klisted 1 entries0 |6 L. f* q. ^4 b3 C" ^7 N" J
172.16.129.12:0/3801911378 2022-07-14 15:07:44.3150651 O( v) D! j. S  v) x3 u0 k$ k  S) O
( D& P- R" m+ j1 H' Z: F/ p
) W2 U" C+ [, U! c* v/ T  A
[root@host09 ~]# ceph osd blacklist rm 172.16.129.12:0/3801911378
7 C: }0 q! b& x  ~* a/ z3 S( qun-blacklisting 172.16.129.12:0/3801911378
, f9 y# N2 x% ]& o) i9 R- Y' {+ ~4 B$ }3 k% e  D3 \
3 z# z4 V: ?" s0 Y& ^9 h7 `. a& g
[root@host09 ~]# ceph osd blacklist ls1 Y. d( c) n* y4 Q6 E- @" J: ?
listed 0 entries
/ j: _7 D' Q" G& {& }. U4 _. V8 }3 m$ ~* f) B
) D2 y; X, \) X1 R( q+ V/ |
: v( n) o' ?8 Q* t7 M
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:04 , Processed in 0.016583 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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