Only last ZFS snapshot is usable?

micush

Renowned Member
Jul 18, 2015
73
3
73
What's the point of ZFS snapshots if only the very last one can be rolled back to? Seems kind of pointless.
 
What's the point of ZFS snapshots if only the very last one can be rolled back to? Seems kind of pointless.
You can roll to any snapshot you have, destroying all "in-between" snapshots. Better to clone the snapshot you need and test it out.

If you want to have tree-like snapshot capability and want to be able to jump around, just go with QCOW2.
 
  • Like
Reactions: Dunuin
This is not a true statement. Selecting a snapshot a few down the list does not destroy in-between snapshots. It simply fails the rollback operation with a popup that says "can't rollback, 'snapshot' is not the most recent snapshot on 'disk'." I *wish* it destroyed the in-between snapshots and rolled back to the chosen one. That would be at least somewhat useful, but as it stands ZFS snapshots are pretty useless in a real-world snapshot/rollback scenario with any more than 1 snapshot.

Qcow2 disk images significantly slow down over time with the addition/removal of many snapshots, so it is no panacea either.
 
Last edited:
This is not a true statement. Selecting a snapshot a few down the list does not destroy in-between snapshots. It simply fails the rollback operation with a popup that says "can't rollback, 'snapshot' is not the most recent snapshot on 'disk'." I *wish* it destroyed the in-between snapshots and rolled back to the chosen one. That would be at least somewhat useful, but as it stands ZFS snapshots are pretty useless in a real-world snapshot/rollback scenario with any more than 1 snapshot.
You can destroy the last snapshot mutliple times until the last snapshot becomes the snapshot you want to rollback to.
It wouldn't be a problem to destroy all snapshots in between (there is also a hack that does this) but as far as I remember this was a decision to prevent user error and resulting data-loss.
 
Last edited:
Selecting a snapshot a few down the list does not destroy in-between snapshots. It simply fails the rollback operation with a popup that says "can't rollback, 'snapshot' is not the most recent snapshot on 'disk'.
Yes, via the GUI, but via the CLI it works as I explained.

Qcow2 disk images significantly slow down over time with the addition/removal of many snapshots, so it is no panacea either.
True, but you always have to pay with performance for features like this. How many snapshots do you have/want?

Most of the time, I don't use snapshots, I have no fast snapshotable storage, so If I want to snapshot something, I move it online to a ZFS-over-iSCSI storage, play around and after finishing, I move it online back. For VMs, that need a "switchable snapshot state", I use - as I said - QCOW2 due to its "tree-like-snapshot capabilities". What is your usecase?
 
Honestly, if they wanted to make it usable, get rid of the "failed" dialog box and replace it with a "This will remove these other snapshots if you want to rollback to here. Do you wish to continue? yes/no"

As it stands it's not useful -- at least not from the GUI. Okay, the limitation exists. Fine. At least make it less painful to get to a particular ZFS snapshot instead of just throwing up a "failed" dialog box and basically telling you 'no'.

My use case is that I want usable ZFS snapshots from the GUI without having to use Qcow2. Compared to raw disk images on ZFS, Qcow2 can become heavily internally fragmented with the use of a lot of snapshots and can slow them down quite a bit. That's not okay for me. I'd rather have faster storage through raw/zfs and also usable snapshots, even if some automatic pruning has to occur to get to the ones I need.
 
As it stands it's not useful -- at least not from the GUI.
Yes, I would appreciate an explicit command in the Gui to "delete all snapshots newer than the one I selected" too. Or ideally the "tree"-approach without cloning.

As long as this is not available my personal approach is simply to just keep as few snapshots as are actually useful for me: I have only four hourly and two daily from early morning. That's it.

And my nightly backups give me an "endless" history of easily accessible Snapshots...


YMMV; best regards
 
Compared to raw disk images on ZFS, Qcow2 can become heavily internally fragmented with the use of a lot of snapshots and can slow them down quite a bit.
Yes, yet you have tree-like snapshots. Depending on the problem, that is worth it. Depends heavily on the use case. I have - depending for the usecase at hand - all kinds of local or clustered storage available in my PVE cluster, so that I move the VM live to what is approriate for my current need. There is not ONE storage that fits all and it never will. Every storage has its perks.


And my nightly backups give me an "endless" history of easily accessible Snapshots...
Yes, with PBS, this is often my go-to-approach nowadays. I still do manual snapshots (or backups) if I want to change something in the VM and solely rely on the daily backups.

Or ideally the "tree"-approach without cloning.
Yet this is a ZFS limitation, that will not go away. The linearity is by design, even if we want it for virtualization.
 
Thanks for all the discussion. Good stuff. However, none of this is my point. I don't wish to discuss the merits of one storage type or another. I simply would like a usable snapshot feature when using a ZFS volume. It's totally doable. Just change the resulting dialog box and a little code behind it. Or, limit the snapshot feature to 1 when on a ZFS volume. But letting us take a bunch of snapshots and not provide the ability to easily use them is not an acceptable situation, storage limitation or no.
 
I don't know since when ZFS refuses to delete the snapshot, yet in the beginning this was not the case and it got apparently changed to the current situation. Is there already a feature request? If not, please create one and give us the link here. Just complaining about stuff is not going to change it. If you're familiar with extjs, maybe you can change it and create a pull request?
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!