RFC e2image: Add support for QCOW2 image format
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest0 of 1 patch 11 repliesIn review
Patches in v1 No applies recorded yet
The patch the cover letter announces is not in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PARCH 0/1 RFC] e2image: Add support for QCOW2 image format
Hi, all
As Ted suggested on LPC I started to play with e2image to add support for exporting images in QCOW2 format (http://en.wikipedia.org/wiki/Qcow2). The advantage of this format is mainly that the resulting image is quite small (because we write only the metadata blocks) and it is not sparse unlike "sparse" image format.
I am presenting you an initial parch, which works for me quite nicely, however so far it did received just limited testing. Nevertheless you can try it simply by invoking e2image with '-q' parameter like this:
e2image -q /dev/sda1 myimage
or you can add '-s' option so the file names are scrambled. To mount that qcow2 image I usually use 'qemu-nbd':
modprobe nbd max_part=8
qemu-nbd --connect=/dev/nbd0 myimage
mount -o ro /dev/nbd0 /mnt/test/
However I have experienced some problems with qemu-nbd from time to time. Also for some reason, when you mount the image read-write, you'll destroy it. So far I was not able to figure out why (I did not tried at all to be honest), it may be problem in my image format or even in qemu itself, so if you have any idea, please let me know.
QCOW2 format supports other neat features like compression, encryption and snapshots. None of those feature are supported in this patch and the question is, do we need it ? I can imagine for example snapshots to be useful for roll-back changes made by e2fsck, but this is hardly problem of e2image itself.
So, please look at the patch, try it and let me know what else you thing is useful to implement, or what would you like to change.
Anny comments appreciated.
Thanks!
-Lukas