﻿# Deleting an RBD snapshot does not immediately reclaim OSD space

Ceph snapshot removal and asynchronous snaptrim are separate completion boundaries. Observe queued work and actual capacity before promising reclaimed space.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/ceph-snapshot-trim-space-recovery/
Language: en

## The snapshot disappeared but space did not return

An RBD snapshot is deleted during a capacity incident. The snapshot listing no longer contains it, but OSD utilization remains high. This need not mean the removal request failed: the underlying data cleanup is asynchronous and has its own progress boundary.

The [RBD snapshot reference](https://docs.ceph.com/en/tentacle/rbd/rbd-snapshot/) names this process snaptrim and explicitly warns that deleting a snapshot does not immediately free underlying OSD capacity. A cleanup report must not translate namespace disappearance into a measured reclamation result.

## Separate deletion intent from trimming work

Preserve the pool, image and snapshot identity, removal outcome and time. Verify that the intended logical snapshot was removed, while keeping any errors or dependency restrictions separate. A request aimed at the wrong image cannot be validated from a cluster-wide capacity change.

Then observe the relevant background work. The [PG state reference](https://docs.ceph.com/en/tentacle/rados/operations/pg-states/) distinguishes active snaptrim, queued snaptrim_wait and snaptrim_error. These states describe different reasons for capacity not yet returning and should not be collapsed into a generic delayed-delete label.

## Account for scheduling competition

The [mClock reference](https://docs.ceph.com/en/tentacle/rados/configuration/mclock-config-ref/) classifies snaptrim as background best-effort work. Foreground I/O, recovery and other background tasks can therefore affect observed progress under the active profile. A delete request does not reserve immediate cleanup bandwidth.

Record the scheduler and competing work before changing limits. Increasing cleanup activity during a busy period can affect application behavior, while disabling or deferring background work can extend capacity pressure. No universal safe trimming rate follows from the existence of the queue.

## Measure capacity in the right scope

Capture per-OSD utilization and pool accounting on a consistent timeline, including concurrent writes and other deletions. An unchanged net total can hide reclamation offset by new data. Conversely, falling utilization elsewhere does not prove that this snapshot's trimming finished.

Do not assume the snapshot's logical size equals reclaimable physical bytes. Shared retained data and accounting scope can change the relationship. Use actual capacity observations and the system's documented accounting rather than subtracting a filename size from a dashboard.

## Acceptance for reclaimed headroom

Accept logical removal and space recovery as separate results. Capacity acceptance requires the intended trimming outcome, sufficient usable headroom in the affected placement domain and no unresolved trimming errors. Preserve any remaining work explicitly before authorizing new growth based on expected cleanup.

[Snapshot consistency](/journal/guide-storage-filesystem-snapshot/) explains the separate value of the deleted recovery point. [Storage placement](/journal/storage-optimized-hosting/) explains why available capacity must be useful to the workload and its destinations, not only free in aggregate.

## Retention cannot be undone by a later queue check

A delayed reclamation does not mean the removed recovery point remains available. Keep another required verified checkpoint before deletion, independently of when bytes return. This procedure separates recovery-policy intent, asynchronous maintenance and capacity evidence so neither an absent snapshot nor a quiet queue is mistaken for a complete proof of the other.
