admin 发表于 2021-12-15 12:52:08

无法删除snapshot问题解决方法:


界面上删除snapshort无法删除:
在ceph上执行:
# rbd flatten volumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a
Image flatten: 2021-12-15 10:56:57.651 7f5161c4db00 -1 librbd::Operations: image has no parent0% complete...failed.
rbd: flatten error:
(22) Invalid argument
# rbd flatten volumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a
Image flatten: 2021-12-15 10:58:00.621 7f16fee40b00 -1 librbd::Operations: image has no parent0% complete...failed.
rbd: flatten error: (22) Invalid argument
# rbd snap removevolumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a
rbd: snapshot name was not specified
# rbd lsvolumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a
rbd: namespace 'volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a' does not exist.
rbd: listing images failed: (2) No such file or directory
# rbd children volumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a@
rbd: invalid spec 'volumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a@'
# rbd infovolumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a
rbd image 'volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a':
size 50 GiB in 12800 objects
order 22 (4 MiB objects)
snapshot_count: 1
id: 1df1d86b8b4567
block_name_prefix: rbd_data.1df1d86b8b4567
format: 2
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
op_features:
flags:
create_timestamp: Fri Nov 26 19:31:33 2021
access_timestamp: Fri Nov 26 19:31:33 2021
modify_timestamp: Fri Nov 26 19:31:33 2021
# rbd snap list   volumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a
SNAPID NAME                                          SIZE   PROTECTED TIMESTAMP               
   5 snapshot-3748c5da-c41b-4cf4-b61d-e866fffc0a67 50 GiB yes       Sat Dec4 20:50:21 2021
# rbd children volumes-hdd/volume-1353d6f7-c885-4272-b3bf-8c0e0d1e0b2a@snapshot-3748c5da-c41b-4cf4-b61d-e866fffc0a67
volumes-hdd/volume-58eaff50-bb40-4b38-9210-40163c12c5ee
查看到snap-short有卷

删除掉卷58eaff50-bb40-4b38-9210-40163c12c5ee即可:

页: [1]
查看完整版本: 无法删除snapshot问题解决方法: