找回密码
 注册
查看: 3364|回复: 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
% S" d% O, }; h" b. Q& |, f9 V9 \rbd image '234abd4d-2375-44e3-b64a-0e84f247e2b4_disk':
2 D4 c, ]8 j8 f% U6 J size 10 GiB in 1280 objects9 V6 h3 D$ |. r7 b  a
order 23 (8 MiB objects)
+ D" {  Q- F) b& W# g" p snapshot_count: 02 W2 Q: k: C( j3 f
id: 2a3c265c791c4
; o4 D9 `6 D% J1 ?2 ^; g block_name_prefix: rbd_data.2a3c265c791c4! h3 I, \3 B: n% I
format: 2
; M- O( J; i8 n1 ~& O6 L features: layering
8 ^4 m( B9 a9 B$ ~# R( K, e# c op_features: : R/ ~2 d* V, m% X& j$ E) l$ R3 n: x, V
flags:
2 U. t1 g/ L' \1 T9 P, w' D- y create_timestamp: Wed Jul 21 15:36:47 2021
# X" o% X* K2 _, Q7 q4 { access_timestamp: Wed Jul 21 15:36:47 2021* I/ O, I& `- r' ?0 Y0 m
modify_timestamp: Wed Jul 21 15:36:47 20215 K2 i* l# i  Z1 L
parent: images/64079697-b54d-4499-872b-a79d3daa48b8@snap8 u  m# ]( I9 q; m' X# N
overlap: 4 GiB4 W) Q+ n& D- R7 p: r/ l  g# K1 Q& I: W
[root@compute02 ~]# rbd -p vms rm 234abd4d-2375-44e3-b64a-0e84f247e2b4_disk0 p0 `2 F7 \, `& ~) R; a
2021-07-21 16:38:39.334 7f14abfff700 -1 librbd::image::PreRemoveRequest: 0x557dd1fd5c30 check_image_watchers: image has watchers - not removing9 E6 D' l  `3 H
Removing image: 0% complete...failed.; a) i* D3 a; x; V  K0 ?% T
rbd: error: image still has watchers5 G3 i8 \3 Y" }& f
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.% o) E0 V) y+ Y. ~7 L0 z, O
" r" l; b# y  l9 C1 Q
删除失败:1 q. U* Z# N( i8 `1 P# L* Z& N0 B
解决步骤如下:  t" ^3 I# V9 E. K
[root@compute02 ~]# rbd status vms/2d05517a-8670-4cce-b39d-709e055381d6_disk% T! \# a: T0 K9 z1 P- y% U1 Z
rbd: error opening image 2d05517a-8670-4cce-b39d-709e055381d6_disk: (2) No such file or directory
4 C8 c6 w$ \. l" {
7 y% Q' R  q5 i- _[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk
  r; h+ |6 ~6 Z8 q( E3 m  B: M$ TWatchers:' R$ }: v& L7 _& }3 b/ [
watcher=192.168.0.77:0/3574198266 client.173021 cookie=93887687311360. F/ r' p4 f/ E2 w' J

9 X. r! n$ ^4 \, E
* ?& Q$ M7 Y' y[root@compute02 ~]# ceph osd blacklist add 192.168.0.77:0/3574198266 7 X6 C2 h* ^$ k5 g
blacklisting 192.168.0.77:0/3574198266 until 2021-07-21 17:40:57.398343 (3600 sec)
+ T9 h8 B$ r) s' |' Q  @; t
( m  S, ?, V2 K: a1 k$ q4 o
2 r, D0 p1 R+ k. s9 B[root@compute02 ~]# rbd status vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk; c7 W) x- p8 u* p8 b
Watchers: none
9 e5 M3 B- i  S- M0 d! F/ M5 O9 L% b( H+ [) `  K; C

3 D  |1 \9 z1 t! p  y[root@compute02 ~]# rbd rm vms/234abd4d-2375-44e3-b64a-0e84f247e2b4_disk: s4 A, f2 L& V- @, Z/ z* o7 p
Removing image: 100% complete...done.5 m2 O( Z3 ?( ]/ a
5 H0 D5 R, I: P# m
删除成功9 i+ N9 T- P8 ^( H9 b" \

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2022-7-14 14:11:57 | 显示全部楼层
同样的问题再次出现,解决步骤如下:/ b0 ?7 U9 ?% g* r& ?

% }- U- S5 X* ~0 v" x* E% v: y( x' r[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
* Z) Z. u! ?( `  u1 X2022-07-14 14:01:37.980 7f3cddffb700 -1 librbd::image::PreRemoveRequest: 0x55b914876b60 check_image_watchers: image has watchers - not removing" |# T  ^! p& Z  z
Removing image: 0% complete...failed.% }! Z" v  H* u& p- y2 q" \) _
rbd: error: image still has watchers
9 \2 h  I( W8 l. X# P* gThis 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 l+ t- i$ c) d: w& G
5 e8 L: ^& m. v3 Q+ q

( f; _: z4 p$ V4 B' }1 }[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
% S6 I! N5 g' E+ }) ]0 K2022-07-14 14:01:51.812 7f1736f22700 -1 librbd::image::PreRemoveRequest: 0x560a2b06ea70 check_image_watchers: image has watchers - not removing: {: `; V3 o* B( x4 V
Removing image: 0% complete...failed.
  l+ e* t7 c/ b0 `rbd: error: image still has watchers# E+ X) N# n! N0 z: h
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 E5 w8 s& o; g5 r. t: m+ z+ b' t! _' y2 A4 `& f( O( N9 y

4 n; T7 F$ ?/ _" D: V, _3 T[root@host09 ~]# rbd info volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
" S: s2 B& m, }* ]/ R. Jrbd image 'volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak':) v) h$ o! t7 n% ^! I- h
        size 50 GiB in 12800 objects9 s; P3 l. i4 u+ n
        order 22 (4 MiB objects)0 d) m3 i9 ^1 j9 N
        snapshot_count: 0
6 I$ t0 B$ ~8 e1 u        id: 1a910a2feef869  z0 [% J7 E" t+ e* E
        block_name_prefix: rbd_data.1a910a2feef869
! U+ s$ Z) L; F' g, z* y' L+ U        format: 2
9 _$ F3 n' E9 O  k) w        features: layering
" K8 f) \/ X) w        op_features: 9 P5 I; T( _" g
        flags:
5 _2 i4 L  d1 y4 L8 s        create_timestamp: Fri May 14 11:39:01 2021
6 a  c! K; }+ L4 j$ y" k2 I$ H        access_timestamp: Tue Jul 12 11:19:29 20227 N- N1 l5 s# R) y  ^. h1 }
        modify_timestamp: Fri May 14 11:39:01 2021
; }% ~$ M8 }) f* E. V6 j        parent: images/0728be2a-d8d7-4e29-9e04-90c9ae91dca0@snap' G" C9 P6 s+ H% V6 z+ k
        overlap: 2 GiB
0 A# [1 G. j7 p/ Y6 t9 Q
; F2 R# s! s6 M# o[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak1 Q) a4 u% o% J1 D* H5 o- K% ]* A
Watchers:
, w8 w) r0 B% H. d8 s$ }        watcher=172.16.129.12:0/3801911378 client.331035433 cookie=94155368121216; D) C' o/ @" j& `# z

4 n  d9 T; m* B+ {! ?
+ p. g1 c6 ]+ P2 u% j[root@host09 ~]# ceph osd blacklist add 172.16.129.12:0/3801911378" x% h: w9 i' w; O, v
blacklisting 172.16.129.12:0/3801911378 until 2022-07-14 15:07:44.315065 (3600 sec): Q% Q' ?9 b  P+ a, W& h2 l+ h

' \; q: E9 Y0 a4 M
* c8 {; e6 O4 Y  q' l* K1 _[root@host09 ~]# rbd status volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak1 f( U9 F& t6 c. j
Watchers: none- F' E: r- i  _1 g( z

+ y* s2 x( N1 J! D  `3 s
% `, z. c5 j3 D( W7 f[root@host09 ~]# rbd rm volumes-hdd/volume-98e50ac1-3b42-4393-b53f-6c6832fec4c4-bak
8 M5 ?* m& `1 D( y- L7 d& e# uRemoving image: 100% complete...done.
# v, s1 D  y+ x1 A) A6 _. r  q  ~+ a5 u0 j% N- {

5 G, l! I) V  Z0 @1 d* d0 Q[root@host09 ~]# ceph osd blacklist
- L9 y! R. ?' B4 q# {! Yno valid command found; 3 closest matches:/ O, x. v& Q3 S/ y
osd blacklist ls
# D: ]) G6 N3 k6 l6 O+ A0 ?. r0 uosd blacklist clear
$ {# |+ J: B5 m/ A, ?, @osd blacklist add|rm <EntityAddr> {<float[0.0-]>}
- @5 b5 E, ]8 z- N$ Y
) q- I+ D) b6 V  b: x- l% C. M; F0 R7 s# r
[root@host09 ~]# ceph osd blacklist ls8 r$ t6 G9 z: S
listed 1 entries/ j2 p2 G! Z( {& `# d3 J
172.16.129.12:0/3801911378 2022-07-14 15:07:44.315065" j8 |. Q( {6 `: m* o3 l
. I/ h  i" S1 Y2 E
2 [% }7 O! C- [3 |1 x
[root@host09 ~]# ceph osd blacklist rm 172.16.129.12:0/3801911378
3 s2 g% F9 y, N9 H0 _% Q- D6 yun-blacklisting 172.16.129.12:0/3801911378- E4 R" x& J& |5 g6 R  }2 D
1 E  D3 B  s1 v! g" z

: f9 ^& E1 @+ \! V4 Y: J! Z+ n[root@host09 ~]# ceph osd blacklist ls( j, {4 A* N4 S9 U0 n
listed 0 entries; R' H# L4 c. U' H3 k" n
" z8 u% e, V# ]* z5 D
" v4 o; h2 _! r; l0 S  W9 d! q
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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