找回密码
 注册
查看: 3216|回复: 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( c9 C6 S* U1 \: n1 ]
2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing
: v7 L4 A! U  v8 [  U: WRemoving image: 0% complete...failed.
8 [" [, `8 Z7 N3 j8 j5 x, drbd: error: image still has watchers
& z; n; `- Z+ D& T/ e! ^/ uThis 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.
9 x& O, Q/ ]3 z$ q4 z, @' k[root@compute01 ~]#  rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
0 ]# e) i( K3 y! B/ KWatchers:/ U9 t  `" q+ q4 n; I, \4 |0 O2 O
        watcher=192.168.6.236:0/1356954254 client.18712163 cookie=140531196089424
& V% s+ @0 w' d2 p6 O[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254 + L$ l. G: {3 r8 t
blacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)9 [. Z) K# k) R  X( |. u5 @; g1 J
[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4/ b- \' O" e5 n; K
2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing
$ n- y4 m: u# h5 P' DRemoving image: 0% complete...failed.
$ q. A; x' f% z6 Z3 @! H* ?6 Yrbd: error: image still has watchers
  i) W0 E0 z& L$ q  c# VThis 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 F' G) Q, G  K* T$ i& I; P5 u

7 `! s6 Z' n! S. H3 V, [2 n' Y将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。
- X2 l3 Q2 n" D[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/2900899764
5 F! ]7 x' z  c6 q- ?blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)8 ?" N$ _3 q" @$ [% C; |7 J
[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea48 \, k  K' N7 o' Q' _0 u# y% B

3 z$ j2 u2 }6 B# N8 TWatchers: none
; h! K0 O) |" D* J9 T+ R
6 [2 m& _: G  k6 f删除rbd3 v/ h/ f8 [) M% X9 _  U7 a6 r
[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk6 Y" v# q% `+ ^3 v2 O
Removing image: 100% complete...done.
3 W0 y' f' p$ J# z/ r3 E1 o! \
" A! d2 {5 @/ H. ?# Z2 C$ y/ C5 [* N! _- |7 e
0 W0 }' q1 K0 c5 o9 }% p
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea40 l1 }: |4 t9 M, a; q
rbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory4 B& m" _+ d! p% I$ p# @( [% z
3 j; E, c- C6 `& ]# M

$ m: [. C( b$ @  i- M
7 y# L( _1 r/ V" F2 Z- V[root@compute01 ~]# rbd -p images ls% U2 t4 p" V8 a
7e20974b-4fea-4ba6-9e47-aa6f4a135bf6' E* M: w6 F6 _7 C( \- l9 s  W
d4c568a5-40c6-4a39-a3ea-44a3a9945dd64 i- s  {6 u' u' z0 b6 W! e4 h
+ o5 ]% u4 A4 [" |; t/ n% g: J+ W

# t( O% @0 m  x* D- y1 a  B+ ]6 q" D
4 C. ~* u, q- H1 O7 A  o5 P
. r; }' D% d4 y+ Q( V! U, y* B. i8 J
清除黑名单配置:
. T- u. [- g, D* {4 G[root@compute01 ~]# ceph osd blacklist ls
, k/ {  ?7 Q- B" v" K+ r! A, N3 f- Llisted 1 entries( a, P/ u! e7 m5 x) \  Q8 c# n
192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461
! @9 I- T1 H! j: T4 |' n[root@compute01 ~]# ceph osd blacklist clear
& Y, x( o& o& X; a: a2 d$ T& f, e removed all blacklist entries
  x. m8 M& u9 a[root@compute01 ~]# ceph osd blacklist ls7 t! [& G5 [5 r
listed 0 entries/ ]1 I/ q3 }# P" y

+ Q$ C4 V6 {) Z! l
4 P3 E8 E# U3 v  z# l) ^7 ~

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:42:28 | 显示全部楼层
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
2 d' ~, f; T1 z" F( z) Q) U2021-10-19 13:39:31.649 7f1b5bfff700 -1 librbd::image::PreRemoveRequest: 0x5566f7682b00 check_image_watchers: image has watchers - not removing5 U4 \: x. u2 T) |; i
Removing image: 0% complete...failed.
$ E- j/ J' b+ W5 v: Trbd: error: image still has watchers
7 R0 D6 n! _: v/ D' {$ IThis 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' M: y* i+ N( a$ V$ w; u
[root@compute01 ~]# rbd status -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
5 l% |, @- ?5 g0 d8 `1 u$ ^. MWatchers:2 ]# ~6 G; @! ?5 ~, y
        watcher=192.168.0.79:0/2773586027 client.125118986 cookie=94233461719040
2 n( Y8 Z' r1 i; s1 u: a[root@compute01 ~]#  ceph osd blacklist add 192.168.0.79:0/2773586027 ! m0 q- ?; M' p3 y9 b' m
blacklisting 192.168.0.79:0/2773586027 until 2021-10-19 14:41:22.677847 (3600 sec)) `: |. P9 I2 }' v  R1 |7 U
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
4 J) P- K; O! ~( a) ~Removing image: 100% complete...done.

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:44:19 | 显示全部楼层
[root@compute01 ~]# ceph osd blacklist ls
6 ~) e. p- a5 y  }& H7 _7 tlisted 1 entries' S: C$ {" c8 ]( @9 \3 @% T, q0 d
192.168.0.79:0/2773586027 2021-10-19 14:41:22.677847
1 j3 A( a8 S( T0 W$ G[root@compute01 ~]# ceph osd blacklist 4 z4 b! N' m& G
add    clear  ls     rm     0 t2 @: W1 A- l( T& I
[root@compute01 ~]# ceph osd blacklist rm 192.168.0.79:0/2773586027
1 h" M3 L  w) vun-blacklisting 192.168.0.79:0/2773586027
, k2 `. |: x$ T3 y* B- s[root@compute01 ~]# ceph osd blacklist ls
3 m6 l7 y1 w  `4 F3 [: |1 c2 \" qlisted 0 entries
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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