I have a single periodic task configured on my Scale box to take a daily snapshot of the Apps dataset, and retain snapshots for 2 days. However, when I looked in the Datasets/Snapshots section of the UI just now I noticed that I have more than 2000 snapshots dating back to May.
Any idea why they’re not getting deleted, what I can do to fix that, and how I can clear out the old ones now?
Here’s a screenshoot of the snapshot task configuration:
Closer inspection of the snapshots shows that it is correctly only keeping 2 snapshots, as I only have one for today and yesterday in September. But then I have loads more from back in May/June that I need to get rid of. I guess I should learn how to use ‘zfs destroy’
They were originally created by this same replication task when I was keeping snapshots for longer. I think when I shortened the retention period it didn’t automatically clear out the old snapshots I no longer wanted
The ‘@auto’ part of the name is what’s pertinent to these automated task snapshots
This is the reason why zettarepl[1] is not pruning them, since they do not match the naming schema.
zettarepl is name-based. It does not use a companion database or metadata, or any other means of understanding a snapshot other than its actual “parseable” name. ↩︎
You can use the % symbol to tell zfs destroy to delete an entire sequence of snapshots. Just be aware, it will destroy ALL snapshots in this range, based on their creation date, with a single command.
Quick question, though, @winnielinnie: other than taking up space, does leaving snapshots and checkpoints in place have any performance impact?
In vmware it really slows down access to a storage volume if you’re making changes on top of a snapshot, so it’s considered bad practice to leave them around for longer than you need to. Is the same, or similar, a thing with ZFS?
VMware and ZFS snapshots are very different beasts that work in completely different ways. ZFS snapshots and new data are in the same dataset. I have a feeling that VMware snapshots hold the new data on a completely different virtual disk.