If you’ve ever been curious about how to investigate (or just understand!) OpenZFS space accounting, this article of mine that just published at Klara ought to help:
3 Likes
FYI, there’s also a tool that combines a bunch of snapshot filter expressions with the dryrun mode of ‘zfs destroy’ to print how many GB of disk space in total would be freed if the selected snapshots would be deleted for real.
For example, play around with snapshot retention periods and see what effect they’d have on disk space, like so:
bzfs dummy tank1/foo/bar --dryrun --recursive --skip-replication --delete-dst-snapshots --delete-dst-snapshots-except-periods "{'autosnap': {'':{'hourly':48,'daily':31,'weekly':26,'monthly':18,'yearly':5}}}" | grep 'would reclaim'