|
|
rbd rm 87d22aec-ed31-4883-96ce-0d9f3aa21364 -p images' E2 G+ n& b5 w- ?8 O4 j) c
2021-06-18 09:27:22.107 7f81c17fa700 -1 librbd::image::PreRemoveRequest: 0x5556c6060c10 check_image_snaps: image has snapshots - not removing# w& D, H$ s+ @
Removing image: 0% complete...failed.
3 }0 B+ v4 N2 z9 F# U0 ~rbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.
1 Y; @6 ^+ E# L" p
0 d7 v; o( n( d6 ]) J z' E3 h/ V2 ?1 m: n) J: K2 l0 K
[root@hostceph1 ~]# rbd rm 87d22aec-ed31-4883-96ce-0d9f3aa21364 -p images
0 m0 ~* j6 i* p* ]4 I2021-06-18 09:31:27.268 7fa9fdffb700 -1 librbd::image::PreRemoveRequest: 0x55fd20459ac0 check_image_snaps: image has snapshots - not removing
. P! ]: {1 h [* ^Removing image: 0% complete...failed. h9 a% O' A- V4 W
rbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.6 t1 d J* z7 z
( o; g3 Y) r% W% P6 v
删除失败:, N$ W# J% M' V; @; i6 j/ R) S
解决过程如下:9 F$ m7 z, O0 m# ?( a; ?9 H% `
, K! k `( u' A i9 S& N( g( C; d! j1 a5 q+ U# w
[root@hostceph1 ~]# rbd info -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
- I! w3 J1 M. b4 v! X2 E& c* Crbd image '87d22aec-ed31-4883-96ce-0d9f3aa21364':
' e1 C4 W+ D9 x; O, r) r size 2 GiB in 256 objects
, H7 c4 s( o' c% t/ P order 23 (8 MiB objects)
) @# ?; ]4 |4 t* v* [9 @7 G snapshot_count: 16 X' {6 L/ [. u# J3 K
id: 261ce702b1acc6 d1 I t$ f. X' o3 |8 U
block_name_prefix: rbd_data.261ce702b1acc" c' O- D8 ?* X/ `+ S
format: 20 b7 e* l0 c3 w0 ^. Y' _* `
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
* c2 N) W* b% G; H& K3 @. I; V op_features:
6 G( ~7 L( V3 H; i flags: + }+ g$ [" h& g& X+ w* H- N
create_timestamp: Wed Jun 16 17:35:21 2021
, F( m' {% f$ H3 b) e" _) F access_timestamp: Wed Jun 16 17:35:21 2021
" F7 a2 b+ Y) w8 ~ modify_timestamp: Wed Jun 16 17:35:21 2021
/ p: ]! s1 B% v! l0 Q) ?[root@hostceph1 ~]# rbd snap list -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
, o \8 r: k8 YSNAPID NAME SIZE PROTECTED TIMESTAMP % n+ D( U4 D5 W- n
4 snap 2 GiB yes Wed Jun 16 17:36:16 2021 * `& P6 a1 r+ H" t+ `
[root@hostceph1 ~]# rbd snap unprotect images/87d22aec-ed31-4883-96ce-0d9f3aa21364rbd: snapshot name was not specified! }3 Z3 m, c8 y/ E8 D4 Y2 c5 \, s
[root@hostceph1 ~]# rbd snap unprotect images/87d22aec-ed31-4883-96ce-0d9f3aa21364@snap6 l+ }7 t' z0 {0 e) U2 |
[root@hostceph1 ~]# rbd snap purge -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
3 m7 d% r; m- r5 wRemoving all snapshots: 100% complete...done.
# g9 m" \+ ?2 \7 L[root@hostceph1 ~]# rbd rm -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
8 ]; ~6 d7 D1 t! SRemoving image: 100% complete...done.
; V5 X0 V9 p6 g l7 K; h
0 h: p0 Q+ `. A" O& i3 a8 _% \) z- t/ X$ l
|
|