Cinder backup does not cleanup ceph rbd volume snapshot
Environment
- Red Hat OpenStack Platform 16.1, 16.2, 17.1
- Red Hat Ceph Storage 4, 5, 6
Issue
Snapshots from volume backups created by Cinder are never removed, even if the backup is removed and increases backups occupation.
Resolution
To save space, a manual delete can be done with rbd commands. The workaround is to list the snapshots and delete the ones is not needed.
- List all images of a volume:
rbd du -p {pool-name} {image-name}
- Remove a snapshot of a volume (if needed execute for more snapshots):
rbd snap rm {pool-name}/{image-name}@{snap-name}
Root Cause
It is being investigated in Bugzilla Bug 2120749.
Diagnostic Steps
- Create a volume.
$ openstack volume create --size 10 test01
- Create a backup of the volume.
$ openstack volume backup create test01
- Remove the backup.
$ openstack volume backup delete bd86b8c6-ba93-4a3f-ab84-b4954fa46d2f
- List the volumes or snapshots and should exist a snapshot of the backup (rbd du, rbd snap ls).
# rbd du -p volumes volume-03ccce5c-0572-4855-9bab-0bb706d2793f
NAME PROVISIONED USED
volume-03ccce5c-0572-4855-9bab-0bb706d2793f@backup.bd86b8c6-ba93-4a3f-ab84-b4954fa46d2f.snap.1661271680.6115808 10 GiB 0 B
volume-03ccce5c-0572-4855-9bab-0bb706d2793f 10 GiB 0 B
<TOTAL> 10 GiB 0 B
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments