找回密码
 注册
查看: 3740|回复: 1

ceph 下rbd删除报错rbd: image has snapshots - these must be deleted with 'rbd snap pur

[复制链接]

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
发表于 2021-6-18 09:26:50 | 显示全部楼层 |阅读模式
rbd rm 87d22aec-ed31-4883-96ce-0d9f3aa21364 -p images
% r; R- [4 n: T  F, `# ?2021-06-18 09:27:22.107 7f81c17fa700 -1 librbd::image::PreRemoveRequest: 0x5556c6060c10 check_image_snaps: image has snapshots - not removing% J* t  u: ^! J/ v
Removing image: 0% complete...failed.5 ~9 H; B( x" o4 h
rbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.
$ h4 P2 }5 q" Z- x5 C  O: O7 y# {' E

; T, G, k5 `3 q& q/ V[root@hostceph1 ~]# rbd rm 87d22aec-ed31-4883-96ce-0d9f3aa21364 -p images
- {- I* N  L7 _4 C! I6 m! O2021-06-18 09:31:27.268 7fa9fdffb700 -1 librbd::image::PreRemoveRequest: 0x55fd20459ac0 check_image_snaps: image has snapshots - not removing4 K5 `+ Q- }" o9 M
Removing image: 0% complete...failed.
# s+ S+ Q/ v' r! Jrbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.
' o' ]8 V+ D5 G* m/ K9 k# e
9 z. v7 U8 S: |. e1 q0 H- n删除失败:+ ~2 g0 Y$ N! I% ^2 G& Q
解决过程如下:
2 u8 @" f$ g& q# I2 x$ S# E. p0 \/ z. V

9 y* T$ t( h4 ]4 {$ J% j[root@hostceph1 ~]# rbd info  -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
% R* R; _. u8 prbd image '87d22aec-ed31-4883-96ce-0d9f3aa21364':
9 c4 I- I% i7 F8 l; n size 2 GiB in 256 objects
( j: m. M1 U  m8 Q. |; @ order 23 (8 MiB objects)* o: @  ], q4 z/ x7 a% s
snapshot_count: 1& w0 o9 g- l/ `$ ?+ q7 f& R
id: 261ce702b1acc
' L( O6 S( |9 I; E# Q# D, | block_name_prefix: rbd_data.261ce702b1acc0 }: Z- e+ X! C) r) t  w
format: 2' R2 f1 l  ^0 o/ V
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten8 @1 w5 I, F8 w$ M, s  ~1 S
op_features:
/ N0 G' t- Q& g, P flags:
+ m+ z8 V4 F& p create_timestamp: Wed Jun 16 17:35:21 2021
& }. j% `, a; q) _$ | access_timestamp: Wed Jun 16 17:35:21 20213 l& E) m+ T8 a' g4 ?9 X/ @/ z
modify_timestamp: Wed Jun 16 17:35:21 2021
( g7 D' U" ^5 `- a/ @: l3 b[root@hostceph1 ~]# rbd snap list -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364* b7 c1 f+ [4 H5 Z
SNAPID NAME SIZE  PROTECTED TIMESTAMP               
. J0 t5 E0 |5 E  Y3 ]7 f3 w     4 snap 2 GiB yes       Wed Jun 16 17:36:16 2021
) U, d7 g. E! Y+ L. ~[root@hostceph1 ~]# rbd snap unprotect images/87d22aec-ed31-4883-96ce-0d9f3aa21364rbd: snapshot name was not specified, ]  e  N9 s& K0 g& f, K
[root@hostceph1 ~]# rbd snap unprotect images/87d22aec-ed31-4883-96ce-0d9f3aa21364@snap; @6 d9 Y1 a% x; C  |2 k' e
[root@hostceph1 ~]# rbd snap purge -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
8 z/ J* Z, i" e4 R. r* QRemoving all snapshots: 100% complete...done.5 [5 ?5 d/ Z4 g0 M5 z! n' g5 k
[root@hostceph1 ~]# rbd rm -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364* \, C/ ?- W; M5 ?* o
Removing image: 100% complete...done.4 V+ G/ U, f  N% `4 i# W" ~$ Q- k
' f( N( `5 N# @7 R
2 V& n* b4 |' d" Q8 {

1

主题

0

回帖

12

积分

管理员

积分
12
QQ
 楼主| 发表于 2021-7-21 16:55:09 | 显示全部楼层
Removing image: 0% complete...failed.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

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