将设为首页浏览此站
开启辅助访问 天气与日历 收藏本站联系我们切换到窄版

易陆发现论坛

 找回密码
 开始注册
查看: 52|回复: 2
收起左侧

rbd: error: image still has watchers ceph删除文件报错

[复制链接]
发表于 2021-6-9 11:12:31 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有帐号?开始注册

x
rbd: error: image still has watchers
: U2 [' T5 C. x( x, q, }. o* T) N( M: A) J4 Q% f
2021-06-09 11:07:10.268 7f106f7fe700 -1 librbd::image::PreRemoveRequest: 0x55a195e2a990 handle_exclusive_lock: cannot obtain exclusive lock - not removing% m1 B- c+ q& v6 \, D7 u
Removing image: 0% complete...failed.
) p$ H" f$ Z+ g: z" x- O4 b9 t+ Z$ `. Srbd: error: image still has watchers+ Z" P. I8 I  b  H% 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.- @8 q$ P, h" [" B. W% D

6 B0 v+ d3 ]0 m1 ]6 k# N解决办法:
+ K9 |3 ^6 s( L  L# g0 i经过排查应该是有虚机在使用。( s3 A$ c4 {( ^, x4 e+ `% G: d

: c: `$ h, T. A) R3 s
 楼主| 发表于 2021-6-10 14:32:38 | 显示全部楼层
rbd snap list 0fa46015-aa49-438d-9f63-42b0ade623b5 -p images' H3 n5 a+ R" j0 S6 G
rbd snap unprotect images/06612a88-8e05-41b3-8e75-e29351dff412@snap- ~8 z, ^& k! C+ N" D2 T
rbd snap purge 06612a88-8e05-41b3-8e75-e29351dff412 -p images' o' S" Q4 i1 h3 |6 r
rbd remove 06612a88-8e05-41b3-8e75-e29351dff412  -p images
 楼主| 发表于 2021-6-10 14:33:25 | 显示全部楼层
[root@host09 ~]# rbd info -p images 5f9362c5-62c7-481d-bd90-b82fcfcb973a
# ^# ?7 O7 \1 F0 _8 S" grbd image '5f9362c5-62c7-481d-bd90-b82fcfcb973a':6 r' a3 w! j' b+ R
        size 4 GiB in 512 objects7 R0 {' c5 q, {$ h  F; N
        order 23 (8 MiB objects)
/ [/ n) R/ @; _9 e! b1 A        snapshot_count: 1
+ E1 G5 O0 H- ^  y8 O$ r        id: 6f72385bf8fd
, w0 \1 I9 c, R8 @4 O        block_name_prefix: rbd_data.6f72385bf8fd
/ E$ u3 a( m) e+ G1 C8 D' ?        format: 28 {& h! t! t& L/ T5 q* c- k( j
        features: layering, exclusive-lock, object-map, fast-diff, deep-flatten& \! g: L$ _. ~7 W! u
        op_features:
/ \* [$ q  }9 S* \; [- r0 t5 w0 A# a' f        flags:
  @$ a3 l9 A+ y5 ]0 {8 c8 h        create_timestamp: Wed Jun  2 13:37:44 2021' a8 R" V& T1 ~/ _/ ?/ a- o# H
        access_timestamp: Wed Jun  2 13:37:44 20216 k) y) `# }- F. B' ~' s9 ~  @6 K) N
        modify_timestamp: Wed Jun  2 13:37:44 20211 y  z- Z# V/ C& X
[root@host09 ~]# rbd snap list 5f9362c5-62c7-481d-bd90-b82fcfcb973a -p images
; ^" W) m9 v; c: C. i0 nSNAPID NAME SIZE  PROTECTED TIMESTAMP                * x3 I$ Q- A4 o
     4 snap 4 GiB yes       Wed Jun  2 13:39:09 2021 ) _, i  E2 H2 |) Q* H' x- e
[root@host09 ~]# rbd snap unprotect images/5f9362c5-62c7-481d-bd90-b82fcfcb973a@snap* T. S. x: h7 R- K' v, p* U0 N6 k0 U
[root@host09 ~]# rbd snap purge 5f9362c5-62c7-481d-bd90-b82fcfcb973a -p images
* e5 F$ Z1 _3 `0 sRemoving all snapshots: 100% complete...done.
8 w: P+ W2 S3 A+ F: h[root@host09 ~]# rbd rm 5f9362c5-62c7-481d-bd90-b82fcfcb973a -p images
9 B! N" x) m; r1 CRemoving image: 100% complete...done.
您需要登录后才可以回帖 登录 | 开始注册

本版积分规则

关闭

站长推荐上一条 /4 下一条

如有购买积分卡请联系497906712

QQ|返回首页|Archiver|手机版|小黑屋|易陆发现 点击这里给我发消息

GMT+8, 2021-6-20 21:50 , Processed in 0.049235 second(s), 23 queries .

Powered by 龙睿 bbs168x X3.2

© 2001-2020 Comsenz Inc.

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