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

rbd: error: image still has watchers 问题

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2022-7-15 13:00:01 | 显示全部楼层 |阅读模式
同样的问题再次出现,解决步骤如下:
0 P. \0 `+ t) X; l3 Q& q% F* t9 {/ I6 D/ k7 d) e4 o5 A- g9 \
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
% y) _) y, y3 ^9 r2022-07-14 14:01:37.980 7f3cddffb700 -1 librbd::image::PreRemoveRequest: 0x55b914876b60 check_image_watchers: image has watchers - not removing
" [& i) J8 i6 VRemoving image: 0% complete...failed.
1 T& \/ }; q: `4 arbd: error: image still has watchers$ P: Z2 O6 {  p  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.
4 ^( A6 e1 _2 r" Z5 N0 x/ A9 N6 ^: h' ]9 Q4 S$ N9 G
& B' h6 t, t; h
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
% S" J. J3 v. o' P7 R4 Q2022-07-14 14:01:51.812 7f1736f22700 -1 librbd::image::PreRemoveRequest: 0x560a2b06ea70 check_image_watchers: image has watchers - not removing6 F3 O$ P3 o( K/ p3 c
Removing image: 0% complete...failed.
! `4 o% P4 [/ t7 Z5 ?rbd: error: image still has watchers  t8 Y& j0 Y2 [' I- b1 ~
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.: E" S* T, l) S6 n7 m. x

' M' }$ I9 b- R' O# `( ~
3 R3 l2 v) @+ {) Q; G- Q: h& d[root@host09 ~]# rbd info volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak. d& A' w1 T. Z1 s& [. ?! ^/ F
rbd image 'volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak':
2 G/ g: E* ^( }" K        size 50 GiB in 12800 objects& c1 {3 |9 e' q8 Q
        order 22 (4 MiB objects)
, L0 }  E3 K( l- ]! |" H2 Z: K& p        snapshot_count: 0
1 s. }+ q) O4 ]/ U- o        id: 1a910a2feef869
4 c% z  J& x& |  |3 G. `        block_name_prefix: rbd_data.1a910a2feef869
7 I1 e0 k! h; B! a        format: 2' \5 ?) s* ~! W0 |2 J3 A3 R- [
        features: layering
  u# R# f7 b6 D( y' x9 I$ `% [        op_features:
, o" v; F$ U) c' s* Y        flags:
4 e' [, S, V! z& M7 ]8 a, a/ j) {9 N6 l        create_timestamp: Fri May 14 11:39:01 2021
6 Y; k6 e; z" D( h; J2 W$ Z        access_timestamp: Tue Jul 12 11:19:29 2022
/ i" A, n4 q, P* [        modify_timestamp: Fri May 14 11:39:01 2021
# C( o8 G+ x2 m6 D1 x        parent: images/0728be2a-d8d7-4e29-9e04-90c9ae91dca0@snap
) T' R0 t/ d) F, Z# x- F2 a        overlap: 2 GiB6 J1 L, I% @" P$ |2 W, x6 }- N

) }( e- n6 |- i" E- S2 t% s[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
* K3 M, B6 L; ^Watchers:# z+ J: l8 X- s# e6 ~; C
        watcher=172.16.129.12:0/3801911378 client.331035433 cookie=94155368121216/ J1 T# W  H1 }' G8 Q% O- t
* Y6 J8 z1 [- ?1 ?
/ l! \( E, U8 c2 l! d) T7 q9 i
[root@host09 ~]# ceph osd blacklist add 172.16.129.12:0/3801911378  {% X- f6 i/ Z5 f3 j* z
blacklisting 172.16.129.12:0/3801911378 until 2022-07-14 15:07:44.315065 (3600 sec)# Q  ]% V; [- U+ O0 h  f" a- w- T
( l1 t$ X! k5 _

  i# f, L5 q5 H0 s" \- [$ d1 I) h# ?[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
$ n5 K8 q3 J3 T, j4 \( g/ h/ VWatchers: none
8 d& g6 F3 [% o- t, P1 d( J$ r9 N& b
) o7 G! C6 _0 R$ S+ c; i, E0 z& u
[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak( F3 ]( h0 E& [/ e& J1 w' U
Removing image: 100% complete...done.8 H% P# \# n  T$ s9 e( O7 R

, l. l, N7 p9 }9 H+ O
' f0 O  C6 g7 K# I8 {[root@host09 ~]# ceph osd blacklist 0 e6 ~  }* U* @  I, D7 H; @9 F5 w/ h# P
no valid command found; 3 closest matches:* z0 N& H) w& R: K
osd blacklist ls
4 M! Q3 V7 ]6 \# k1 n& }% Q1 `2 _: m' Xosd blacklist clear
, u$ ?' c; j. c, {/ j1 Posd blacklist add|rm <EntityAddr> {<float[0.0-]>}
6 y5 Y0 b2 N' k/ r. Q3 z
4 I, H) N6 t8 |8 r1 E
: m* S# Z, L  h! ?[root@host09 ~]# ceph osd blacklist ls, ^$ T" k+ a0 v; A
listed 1 entries
: h0 X  x+ C9 z172.16.129.12:0/3801911378 2022-07-14 15:07:44.315065
3 c: w7 e- C! P* S
- m; p# R7 F0 _
! Z+ c" J' z* T6 H. h8 J7 w6 X[root@host09 ~]# ceph osd blacklist rm 172.16.129.12:0/3801911378
9 B8 }/ K/ U3 @# `un-blacklisting 172.16.129.12:0/38019113786 A9 @0 h. w- o, F

1 h& X: J4 H! ]6 Q+ Z, `( J2 M# y; s
[root@host09 ~]# ceph osd blacklist ls
, w# A! w  U& k2 blisted 0 entries
4 g$ q* L: B- h  F) A9 I
5 T# ~& E4 I7 U6 [& n+ g9 t
5 K* k3 I- ~& m4 r( U, S; Z% x
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-11 23:01 , Processed in 0.023095 second(s), 24 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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