blockdev-snapshot-sync to snapshot a raw file

tincboy

Renowned Member
Apr 13, 2010
466
4
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
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
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:

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!