找回密码
 注册
查看: 3215|回复: 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
1 E9 g# Y" Y8 A1 \2021-08-19 12:04:33.037 7f22517fa700 -1 librbd::image::PreRemoveRequest: 0x55d437270b20 check_image_watchers: image has watchers - not removing
3 g, D; l' H( d* p6 NRemoving image: 0% complete...failed.: R' H# Y% D/ A, k! \1 v2 q
rbd: error: image still has watchers
9 }# s& ~' K/ `: _* qThis 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 o7 U# e5 z$ H7 X# e2 j) d7 y/ H
[root@compute01 ~]#  rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
' y! D6 D0 t' E) P8 f8 QWatchers:
* \& ^  G: a; p3 Q) D, M: D        watcher=192.168.6.236:0/1356954254 client.18712163 cookie=140531196089424
* T, l% q+ Z1 c& K2 ?- y[root@compute01 ~]# ceph osd blacklist add 192.168.6.236:0/1356954254
, `: `7 D; y4 ?3 Y% R1 _: V9 P) Mblacklisting 192.168.6.236:0/1356954254 until 2021-08-19 13:06:52.616461 (3600 sec)
; d5 G0 o2 f! |[root@compute01 ~]# rbd -p images rm 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4, a2 y) t! Z4 {+ i4 w, B
2021-08-19 12:07:17.172 7fe104ff9700 -1 librbd::image::PreRemoveRequest: 0x555d7cbfdb00 check_image_watchers: image has watchers - not removing' O- f- w7 m" O% M
Removing image: 0% complete...failed.
: c2 C; y1 N$ B6 ^# Qrbd: error: image still has watchers1 b1 l; ?0 k3 [& Y# S
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.
* z5 T# _2 V7 V  a7 C6 d4 G! @/ a( E6 o. i
将该残留的watch信息添加到osd的黑名单,再查看watch是否存在。; s" H9 k* u$ j$ F; N( M$ x
[root@node-2 ~]# ceph osd blacklist add 192.168.55.2:0/29008997648 F) K. `7 p6 L! l3 {+ Y6 D' n
blacklisting 192.168.55.2:0/2900899764 until 2018-06-11 14:25:31.027420 (3600 sec)( Z, s: E: o/ S$ J6 s5 ?" f8 O3 \
[root@node-2 ~]# rbd images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4& R6 ^) h  L" v% E" f
- O- Y( X9 U$ ?4 C4 E* A7 K! U
Watchers: none
" j2 l9 q- _  R- P# ]) Y0 o' r$ |5 ~% V4 j8 j7 e% ]" a% @: s
删除rbd' a/ L2 \; b3 g( u
[root@node-2 ~]# rbd rm compute/2d05517a-8670-4cce-b39d-709e055381d6_disk. i7 M4 G9 z  X5 G  p
Removing image: 100% complete...done.7 v% T4 B4 M1 P8 e8 {6 i8 r. |

7 M- t! L! P" ]' Y; V! j6 E
! A) U% [0 |/ |3 ?  d7 Q; k( M% s% V. D7 q+ l; H
[root@compute01 ~]# rbd status images/8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4
+ z7 Z8 P! ]4 b# i: \- @) D: x2 n0 Vrbd: error opening image 8a12b9ea-ad08-4103-a0a9-d2d8f5002ea4: (2) No such file or directory
+ O5 A- V0 ]5 Q  P. v
8 d9 Z; f0 L6 w, t* d
- w+ P' F5 Y2 B9 h4 d6 b4 H0 p4 f. K
[root@compute01 ~]# rbd -p images ls% K9 e6 {4 B( r; U9 S7 W
7e20974b-4fea-4ba6-9e47-aa6f4a135bf6
4 |; T" i* h3 ?9 Id4c568a5-40c6-4a39-a3ea-44a3a9945dd6
+ S, ^: {3 p, F3 l2 @  A4 G4 U8 z$ B' r$ B5 ^

1 U% E0 H8 F6 i1 ?6 T- i9 I* D" b9 b
- \- a# J2 Y! w+ g

! n3 c. m5 J, a- S$ D7 c清除黑名单配置:
* b/ g" X5 D4 V, o$ g4 ^" R( ^[root@compute01 ~]# ceph osd blacklist ls  k. {9 S% U1 q8 Y: A4 X# ~
listed 1 entries  o" H- X( T% |$ k$ t) ^
192.168.6.236:0/1356954254 2021-08-19 13:06:52.616461
7 ?! r" {. }2 e[root@compute01 ~]# ceph osd blacklist clear
1 ~( }" g! ?7 d: k* n1 Z% \ removed all blacklist entries
# W- A% Z3 g, R. ^[root@compute01 ~]# ceph osd blacklist ls0 b/ X! }0 s: t
listed 0 entries( G- j4 l4 |1 H* \- a% v, L

3 h& W" f( X, U* m
" H3 s9 V! a, `

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:42:28 | 显示全部楼层
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
4 W( F/ B$ y& S( y3 s  P! ^* y2021-10-19 13:39:31.649 7f1b5bfff700 -1 librbd::image::PreRemoveRequest: 0x5566f7682b00 check_image_watchers: image has watchers - not removing2 L! L( r& G) Y  r
Removing image: 0% complete...failed.
  Y8 j' z; u" F7 z- mrbd: error: image still has watchers
) |  y& o5 h5 w6 eThis 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.
* ?( v/ a+ g4 j8 m! [. K[root@compute01 ~]# rbd status -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk& w1 c5 X8 Q+ _
Watchers:; }: H# m- ~" B/ w* M7 v+ b+ B
        watcher=192.168.0.79:0/2773586027 client.125118986 cookie=94233461719040& T0 ^. u) m2 O. g
[root@compute01 ~]#  ceph osd blacklist add 192.168.0.79:0/2773586027
+ F- B* S$ M/ [6 Kblacklisting 192.168.0.79:0/2773586027 until 2021-10-19 14:41:22.677847 (3600 sec)+ z& m5 l" E" `8 q! I/ a1 c
[root@compute01 ~]# rbd rm -p vms 37e26388-107b-4b73-b34d-85a1bb78dadd_disk
2 U  O% R" i. X& o9 SRemoving image: 100% complete...done.

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-10-19 13:44:19 | 显示全部楼层
[root@compute01 ~]# ceph osd blacklist ls3 J1 O2 m( i; e; C+ N
listed 1 entries
% M7 ^7 U& Z: B3 G192.168.0.79:0/2773586027 2021-10-19 14:41:22.677847& O1 q: e* D. l* X. X: U7 X: I9 V) L
[root@compute01 ~]# ceph osd blacklist ) G, L. ]2 m$ @' Z
add    clear  ls     rm     
* g) L) S5 k4 R7 b0 v# [. H5 g8 Y[root@compute01 ~]# ceph osd blacklist rm 192.168.0.79:0/2773586027
2 e% f$ V& C: p+ n) eun-blacklisting 192.168.0.79:0/2773586027
$ ?( T: i9 n# E* N[root@compute01 ~]# ceph osd blacklist ls
5 E: s) g# E4 Jlisted 0 entries
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 02:01 , Processed in 0.019105 second(s), 22 queries .

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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