blockdev-snapshot-sync to snapshot a raw file

tincboy

Renowned Member
Apr 13, 2010
466
6
83
As the RAW files has the best IO performance comparing to other supported file formats bye Qemu, I prefer to use it for my database VMs,
But Proxmox doesn't support snapshot of RAW files while there's a command in Qemu `blockdev-snapshot-sync` which can successfully handle snapshots of RAW files. therefor I'm curious why Proxmox is not supporting snapshots of RAW files?
It would be highly apperciated if Proxmox add that feature.
 
  • Like
Reactions: esi_y
It is technically not possible to create snapshots on arbitrary raw devices. It you want such feature, please use lvm-thin (default) or ZFS.
 
Did you try `blockdev-snapshot-sync` command?
You can use it like this: ( while drive-ide0 is a RAW file )
{ "execute": "blockdev-snapshot-sync", "arguments": { "device": "drive-ide0", "snapshot-file": "/var/lib/vz/images/100/vm-100-disk-1-snap-1.qcow2", "format": "qcow2" } }

This will create a qcow2 file as snapshot which backs to the raw file, therefor it's technically possible to create snapshots from raw files and after a while you can merge the qcow2 with original RAW file.
 
In production, snapshots are temporary files, therefor creating a qcow2 file for few hours and then merging it back to RAW file will not make much of performance issue, while it offer flexibility. for example I want to upgrade the database server version in that case I can create a snapshot, do the upgrade and if it was fine merge it back it not revert to original state.
 
Please take a look at VMWare snapshot best practice,
https://kb.vmware.com/s/article/1025279
"Do not use a single snapshot for more than 72 hours."

It's not just VMWare or me, I've headed the same opinion from many sys admins, do you keep snapshots for long period of time out of lab?
 
As the RAW files has the best IO performance comparing to other supported file formats bye Qemu, I prefer to use it for my database VMs,
But Proxmox doesn't support snapshot of RAW files while there's a command in Qemu `blockdev-snapshot-sync` which can successfully handle snapshots of RAW files. therefor I'm curious why Proxmox is not supporting snapshots of RAW files?
It would be highly apperciated if Proxmox add that feature.

This was an excellent question, too bad with basically no real discussion.
 
  • Like
Reactions: waltar
As the RAW files has the best IO performance comparing to other supported file formats bye Qemu
The problem is that the premise is already wrong ... a raw file??? a raw block device is faster, because it has fewer layers, so just use it as @dietmar already pointed out by using LVM-thin and ZFS. 6 years later we also have CEPH, which is a block device and all the good SAN integrations that support this like the one from Blockbridge.


Please take a look at VMWare snapshot best practice,
https://kb.vmware.com/s/article/1025279
"Do not use a single snapshot for more than 72 hours."

It's not just VMWare or me, I've headed the same opinion from many sys admins, do you keep snapshots for long period of time out of lab?
Yeah ... one of the reasons why I don't get why people are using VMware ... it lacks some basic features QEMU/KVM have for decades like using a block storage and not beeing able to do proper trimming/discard on those files even in 2024 ... proper snapshot support for long term use .... unbelieveable .... gladly a lot of people are migrating off to other hypervisors.

EDIT: Where does the previous post from @esi_y has gone in which he wanted more discussion???
 
Last edited:
  • Like
Reactions: Gilberto Ferreira
So, every other post of mine from yesterday seems intact, even as I solicited some annoyed responses on e.g. BZ.

So here I have to ask @dietmar, was it you?
 
I found this tab open on another machine, my post was still there and a like from @waltar as well. I would be happy to discuss this if I know it won't be disappearing further...
 
Yeah, other actual post with raid and controller setup optimization just disappear on sunday or monday but I was not further surprised as here in pve forum is such a strong zfs community and other storage ways would be rather disliked or so but that's not my problem. ;)
 
Yeah, other actual post with raid and controller setup optimization just disappear on sunday or monday but I was not further surprised as here in pve forum is such a strong zfs community and other storage ways would be rather disliked or so but that's not my problem. ;)

You mean it's so strong that ghost-censorship have to happen now? I want to point out, I never before had anything censored here except for patch to remove no subscription popup. I found it strangely insecure, but importantly, the person who moderated that post:
1) clearly sent me a message why;
2) edited out only what they deemed necessary.

If something has changed now, I am happy to hear it out.

It's just all very strange, consider e.g. more contentious topic (mdraid) is properly reacted on:
https://forum.proxmox.com/threads/proxmox-4-4-virtio_scsi-regression.31471/page-3#post-711774

So if you do not want me to cover some topics, please tell me straight. Otherwise it's Streisand effect only.
 
@dietmar Can you please put back my missing comment, I give everyone the benefit of the doubt, but moderator can enable content even if e.g. took out by spam filter.

NB I just link here for now:
https://forum.proxmox.com/threads/only-internal-snapshots-for-qcow2-disks.151772/#post-688193
https://forum.proxmox.com/threads/l...-shared-block-storage-san.146419/#post-711496

I wanted to discuss this together (and give a chance e.g. OP to get back), so ghost removing content is really messed up for allowing any kind of discussion.
 
Last edited:
The post was restored again, the no-necro-bumping guideline was taken a bit too seriously here. We obviously do not care about the topic as then the thread would be gone as a whole.
Yeah, other actual post with raid and controller setup optimization just disappear on sunday or monday but I was not further surprised as here in pve forum is such a strong zfs community and other storage ways would be rather disliked or so but that's not my problem. ;)
Not really, besides post maybe "disappearing" for a bit because getting flagged by the anti-spam system and put into the mod queue, and then either be cleared if obvious spam or approved if not, and post obviously violating our terms and rules we do not delete posts.
 
  • Like
Reactions: esi_y
The post was restored again, the no-necro-bumping guideline was taken a bit too seriously here. We obviously do not care about the topic as then the thread would be gone as a whole.

It's your forum, all I ask for is getting notification if something is removed. I also note you do not care for getting e.g. Feature Requests for this, I just want to e.g. reply further if someone wants to discuss it. Thanks!
 
The problem is that the premise is already wrong ... a raw file??? a raw block device is faster, because it has fewer layers

Yes, so I have that raw block device, what is the issue in that case in your opinion? I do not ask Proxmox to support this in any elaborate ways, I can script it, but why would I be better off not using what gives me - indeed - best performance?

, so just use it as @dietmar already pointed out by using LVM-thin and ZFS. 6 years later we also have CEPH, which is a block device and all the good SAN integrations that support this like the one from Blockbridge.

I do not care for any of these, I do not need it thin either and I want performance (not ZFS, not CEPH). As you said, I want as few layers as possible. And maybe I want to be able to take that drive and shove it elsewhere with that raw format.

... proper snapshot support for long term use ....

I do not need long-term snapshot, I want to keep backups (and I only care for snapshot insofar the backups is being performed, so it really is going to be gone soon after, think LVM-thick like snapshot is all I need).

And I do not care for VMware, I care for using this QEMU feature for exactly what it was made for.
 
I do not need long-term snapshot, I want to keep backups (and I only care for snapshot insofar the backups is being performed, so it really is going to be gone soon after, think LVM-thick like snapshot is all I need).
The qemu internal snapshot is used for backups with PVE internal backup and PBS, so you don't need storage snapshot support, it will not be used either way. It just has the same name 'snapshot', but it's acutally something different.