找回密码
 注册
查看: 3214|回复: 2

记录ceph rbd删除过程Removing image: 0% complete...failed.

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-8-19 12:12:52 | 显示全部楼层 |阅读模式
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
+ N& x: y! P: _) u) Y6 ?. P5 j6 ]2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing3 N) E" ?- g. \
Removing image: 0% complete...failed., _8 h' t$ l. [: ]  l
rbd: error: image still has watchers  \  e" S1 W& _; @; C+ k* L
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.# y: R4 V' t- R0 t( U
[root@compute01 ~]#  rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
9 s( K# B9 L* G4 ?, LWatchers:
$ J! c1 Z6 w  k( e* ]+ W  A        watcher=192.168.6.236:0/1356954254 client.18712163 cookie=140531196089424' r( D, H& H; [# U. N8 n+ d
[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254 8 A% K* y0 w6 z/ r1 K1 t: o& }" ~
blacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)
' q! \# p+ f) G& T[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
! m5 o6 X4 V+ a' X. a2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing
0 g& b5 S/ V; s" n# P+ ~: MRemoving image: 0% complete...failed.. b2 A- k# K+ s! H
rbd: error: image still has watchers
- A% U, H, u6 w$ K+ KThis 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.
* q% }3 e' D& s, m2 c% S
8 U9 U9 ]3 a( V$ Z, `将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。
& A8 F$ k7 Y0 u1 `/ @[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/2900899764% c$ z- Y' j# C4 H9 N- \
blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)
7 @$ B) e5 p7 e5 r. [/ c8 C1 ]" Q[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
: [  \, |9 r- y/ P
# F) M: P) Z! B; k" mWatchers: none8 ]- ~& z9 @- ?1 `) _# ]

+ y) v7 d7 n/ h/ n( N( @) |* N删除rbd
0 C2 C% U& U- E3 F7 d) c8 t[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk& n! p+ j: P% o% e
Removing image: 100% complete...done.8 U5 A0 F5 l0 C2 W# C: e9 e3 P
, \7 g  p" e' V7 U

. C3 I& X: Q  z( N0 U8 {
4 \3 C# j  O# l% F" E' Q[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
# z9 Y0 [0 V( B& Q! ]' C) Erbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory7 X; v1 @3 J; Y9 g# T8 c

2 ~& x& z8 S$ g! P1 J) z
; A5 S# ~2 \( L' Q' X4 ^- q% q! l5 |% Y, I  a3 H
[root@compute01 ~]# rbd -p images ls& T0 R4 l5 Y: [9 S
7e20974b-4fea-4ba6-9e47-aa6f4a135bf66 _/ \) [) m9 P# q: y7 \" ]
d4c568a5-40c6-4a39-a3ea-44a3a9945dd6
' J% r2 O9 m3 f  D+ X0 N* ^: v/ P- x( R" J1 J

: s. U3 q- M3 f* S! _- G6 P  c9 E6 \  L. ?% h( \

$ a% P7 h0 A( [7 ^+ G( p0 n" m0 z/ N) j  F: o7 ^
清除黑名单配置:$ ^/ b( Q2 R; h  Y/ a4 m8 s2 D* |
[root@compute01 ~]# ceph osd blacklist ls
; l$ ^  i! u. c7 F. glisted 1 entries' V6 n0 F7 X1 `9 P5 f4 k" H+ _+ c
192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461
& N8 f+ D2 `, a1 w( t[root@compute01 ~]# ceph osd blacklist clear
0 r, D! d3 C2 C7 j3 @4 d removed all blacklist entries
, v" D+ ]7 H5 B- ~2 I+ s9 U[root@compute01 ~]# ceph osd blacklist ls
6 T- @) W8 `6 E# U; r% vlisted 0 entries
( ~8 g2 c) \3 `, R) w0 p  s
0 y: _  q8 m& d) H
& y* m0 l; X! J& D4 q) c' w

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:42:28 | 显示全部楼层
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk, H% f4 u7 Q; M* |) q& s
2021-10-19 13:39:31.649 7f1b5bfff700 -1 librbd::image::PreRemoveRequest: 0x5566f7682b00 check_image_watchers: image has watchers - not removing
) Q2 P0 W/ I2 pRemoving image: 0% complete...failed.( p" u: g1 E, A; Y
rbd: error: image still has watchers7 n* W: m- p) C
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., Q; h) {" c3 @0 s5 r5 B( x
[root@compute01 ~]# rbd status -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk1 r: g8 p0 E( j% `% \5 w
Watchers:
4 i+ [5 S# @8 j2 ^0 {+ q        watcher=192.168.0.79:0/2773586027 client.125118986 cookie=94233461719040- U* N$ A9 z" v: Q( P" ^! X+ m
[root@compute01 ~]#  ceph osd blacklist add 192.168.0.79:0/2773586027 : W0 H. ^2 l9 y7 y+ r+ y; F! x
blacklisting 192.168.0.79:0/2773586027 until 2021-10-19 14:41:22.677847 (3600 sec)
7 z9 Q0 [+ N" q( |* \[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
) i* ^# w* t, I! C% C  gRemoving image: 100% complete...done.

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:44:19 | 显示全部楼层
[root@compute01 ~]# ceph osd blacklist ls
4 Z! o$ e# ?% u, |, \9 q2 ?listed 1 entries
- J' ?. [. A5 `! @192.168.0.79:0/2773586027 2021-10-19 14:41:22.677847
0 t" E- z* ~& c& g4 C% K7 J[root@compute01 ~]# ceph osd blacklist
( f7 v4 R. Y" Z  @3 yadd    clear  ls     rm     
  y% j* b1 N0 I* L[root@compute01 ~]# ceph osd blacklist rm 192.168.0.79:0/2773586027
9 H' Z* X3 X+ Q+ Yun-blacklisting 192.168.0.79:0/2773586027
2 @' s5 V6 n+ g6 E[root@compute01 ~]# ceph osd blacklist ls# K- L1 o0 c1 v8 D, P
listed 0 entries
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:02 , Processed in 0.021404 second(s), 23 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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