Snapshots and Disappearing Space
troubleshootingThe lived version: you delete a hundred gigabytes of junk to free up room, check the free space—and almost nothing came back. A lifetime of computers said deleting frees space. Actually, deleting a file only frees its space if nothing else is still holding it—and every snapshot taken while those files existed is still holding them. That's what a snapshot is: a promise that a past moment won't be thrown away. The space didn't leak; its ownership moved from your live files to the snapshots. Deleting things in the present cannot un-keep the past. (Operational source: the practitioner's own hourly-snapshot dataset doing exactly this.)
The diagnostic, in order:
zfs list -o space tank/...—readUSEDDS(the live dataset) vsUSEDSNAP(held by snapshots). A bigUSEDSNAPis this exact situation.zfs list -t snapshot -o name,used,creation tank/...—see who's holding. Remember each snapshot'susedshows only unique space, so a chain can collectively hold far more than the column suggests.- To reclaim: destroy the snapshots that span the deletion. Dry-run first—
zfs destroy -nv tank/ds@old1%old8(a range, with-nshowing what would free without doing it).
⚠ Destructive—zfs destroy of snapshots is permanent, and under a
policy tool it's also usually wrong: sanoid will keep pruning on schedule
anyway. Adjust the retention policy, not individual snapshots—hand-culling
what a policy engine manages is how you end up with neither the space nor
the history.