I have a disk attached to my server and I want to make the disk image of it downloadable on the same server. The disk itself is 500GB but I don't want to have a 500GB disk image for download. I'd like to try using squashfs containing the disk image. I've seen using it with dd directly (using the -p
option of mksquashfs
) but I can't find any documentaion if you can use this process with two commands (required for qcow2: qemu-img create -f qcow2 foo.qcow2 500G
and qemu-img convert -f raw -O qcow2 /dev/sdb foo.qcow2
)
Is it possible to do this?
EDIT: I know it's possible to make a compressed qcow2 but I also can't find any documentation of how to make a compressed qcow2 directly (not making the image then converting), if anyone knows how that would be very useful