Reference:
tl;dr: Is there actually a way to get Proxmox to use ZFS sparse files for VM storage, or are we stuck with zVols there?
(I’m going to ask this on the Proxmox forum, too, but I wanted to undestand the ZFS side of it first before diving into the Proxmox Way of Things.)
Hello,
Looking through this thread again, I noticed a comment from @mercenary_sysadmin that I realize I don’t quite understand (emphasis added):
With that said, if you’re using zvols, you’re going to lose a LOT of performance right there. Zvol performance sucks, a lot. You’re generally much better off using a sparse file (eg
truncate -s 100G hundredgig.raw
) rather than a zvol.
My understanding is that Proxmox stores VM disks as zVols by default when using the RAW disk image format. See: Proxmox VE Administration Guide
Image Format
On each controller you attach a number of emulated hard disks, which are backed by a file or a block device residing in the configured storage. The choice of a storage type will determine the format of the hard disk image. Storages which present block devices (LVM, ZFS, Ceph) will require the raw disk image format, whereas files based storages (Ext4, NFS, CIFS, GlusterFS) will let you to choose either the raw disk image format or the QEMU image format.
- the QEMU image format is a copy on write format which allows snapshots, and thin provisioning of the disk image.
- the raw disk image is a bit-to-bit image of a hard disk, similar to what you would get when executing the dd command on a block device in Linux. This format does not support thin provisioning or snapshots by itself, requiring cooperation from the storage layer for these tasks. It may, however, be up to 10% faster than the QEMU image format. [35]
- the VMware image format only makes sense if you intend to import/export the disk image to other hypervisors.
I realized as I’m writing this out that the above must refer to QEMU Raw format which is implemented on top of a zVol, not a ZFS sparse file of the type mentioned by @mercenary_sysadmin , which I don’t think I’ve ever worked with before.