Cinder backup does not cleanup ceph rbd volume snapshot

Solution Verified - Updated -

Environment

  • Red Hat OpenStack Platform 16.1, 16.2
  • Red Hat Ceph Storage 4

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.

  1. List all images of a volume:
rbd du -p {pool-name} {image-name}
  1. 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

  1. Create a volume.
$ openstack volume create  --size 10 test01
  1. Create a backup of the volume.
$ openstack volume backup create test01
  1. Remove the backup.
$ openstack volume backup delete bd86b8c6-ba93-4a3f-ab84-b4954fa46d2f
  1. 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