|
|
rbd rm 87d22aec-ed31-4883-96ce-0d9f3aa21364 -p images" S; y- h2 Z- }! u: h5 O' m
2021-06-18 09:27:22.107 7f81c17fa700 -1 librbd::image::PreRemoveRequest: 0x5556c6060c10 check_image_snaps: image has snapshots - not removing" `, X2 @8 o7 n' P/ I6 N' \2 R
Removing image: 0% complete...failed." @; ?/ w6 J9 ?( |: g, L
rbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.% d9 ?/ N( \, G+ y$ T: S
( Q" }7 f% q# i
6 d- H a0 m( O7 W' ^3 T[root@hostceph1 ~]# rbd rm 87d22aec-ed31-4883-96ce-0d9f3aa21364 -p images
7 L! S) ?8 O _: |8 `( |2021-06-18 09:31:27.268 7fa9fdffb700 -1 librbd::image::PreRemoveRequest: 0x55fd20459ac0 check_image_snaps: image has snapshots - not removing1 ~, H1 ^1 b$ E! { o9 b6 I
Removing image: 0% complete...failed.* g& f# S* P+ o; b" O1 g
rbd: image has snapshots - these must be deleted with 'rbd snap purge' before the image can be removed.
8 b, m: F) K4 H# O4 x h5 F5 ]8 f5 n* q& u0 A+ T1 S: a, S( r: B% O
删除失败:! N$ k4 [ `5 \9 Z0 c- v! r/ p3 ]
解决过程如下: J/ i& d9 _* G6 W: b/ C
& c, V6 c& a' U, J8 g! v L/ P. w8 u8 Y% S- r1 t
[root@hostceph1 ~]# rbd info -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
# `4 ]4 c2 f& \, ^rbd image '87d22aec-ed31-4883-96ce-0d9f3aa21364':
4 ?1 |1 f' \- z: ] size 2 GiB in 256 objects
( a( ]; V1 o8 V" M order 23 (8 MiB objects)
0 X! s$ H9 F1 e, g, K& f$ [ snapshot_count: 1' ^" `% e0 R" d6 |) r4 K: t5 n
id: 261ce702b1acc
% _' _4 e) Q$ R+ F5 ~ block_name_prefix: rbd_data.261ce702b1acc8 ?+ ?% w1 b) v/ G
format: 2% I% \' v' S' L4 P. H4 Z ?
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
! s2 ~) g5 I* h6 K, z# n. h! w0 h op_features: 8 y' f& ]: h: G. S2 u4 S6 X- T- }
flags: 4 u2 f8 ^! y. H" v& M
create_timestamp: Wed Jun 16 17:35:21 20218 ]! h/ R J" [' R
access_timestamp: Wed Jun 16 17:35:21 2021
6 A+ B. T' D% E5 @& R modify_timestamp: Wed Jun 16 17:35:21 2021% a2 s _$ c, U. I! U8 B
[root@hostceph1 ~]# rbd snap list -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
1 e% W$ l4 K& K) g5 q8 O" }SNAPID NAME SIZE PROTECTED TIMESTAMP , N# E* E6 K" \6 v N; s
4 snap 2 GiB yes Wed Jun 16 17:36:16 2021
- q1 w- h% M# R[root@hostceph1 ~]# rbd snap unprotect images/87d22aec-ed31-4883-96ce-0d9f3aa21364rbd: snapshot name was not specified: k% G+ z) n9 D0 n& h
[root@hostceph1 ~]# rbd snap unprotect images/87d22aec-ed31-4883-96ce-0d9f3aa21364@snap+ d0 \9 u3 g4 M+ K, ? h
[root@hostceph1 ~]# rbd snap purge -p images 87d22aec-ed31-4883-96ce-0d9f3aa21364
' u' d! i0 O+ Y+ W3 {' }Removing all snapshots: 100% complete...done.
, \5 W7 H9 Y; A5 p) L4 F0 z( _4 V- R[root@hostceph1 ~]# rbd rm -p images 87d22aec-ed31-4883-96ce-0d9f3aa213643 B9 ^2 ?0 B9 l1 D& B; [* s
Removing image: 100% complete...done.
' H Y+ Q. P. h+ Z# ]3 C% C+ o
+ @- B9 m! ], d% h9 q7 x8 z
' g9 {& Z) j8 V) I |
|