Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Nowadays we can export only raw image by e2image and even though it exports the file system image into sparse file, there is a problem when manipulating with it. The usual approach is to use compression, but compression/decompression takes forever on bigger file system (not even mentioning huge file systems).
Qcow2 format has the advantage of being really small, almost as sparse raw image, but not actually being sparse. It means that we can easily manipulate with it. It it done by packing used data blocks closely together and then addresing them by the system of address tables.
How reproducible:
Try to export and transfer file system image. It is really painful process.
Additional info:
Upstream already have this feature:
commit bf0449b1a6547a566975cb32c18a2ba5972deace
Author: Lukas Czerner <lczerner>
Date: Wed May 18 13:36:53 2011 +0200
e2image: Add support for qcow2 format
This commit adds support for exporting filesystem into QCOW2 image
format. Like sparse format this saves space, by writing only necessary
(metadata blocks) into image. Unlike sparse image, QCOW2 image is NOT
sparse, hence does not change its size by copying with not-sparse-aware
tools.
New options '-Q' has been added to tell the e2image to use QCOW2 as an
output image format. QCOW2 supports encryption and compression, however
e2image so far does no support such features, however you can still
scramble filenames with '-s' option.
Signed-off-by: Lukas Czerner <lczerner>
Signed-off-by: Theodore Ts'o <tytso>
commit 92dcfb7692da5c3ed61899c49c0915f889815c45
Author: Lukas Czerner <lczerner>
Date: Wed May 18 14:20:47 2011 +0200
e2image: Support for conversion QCOW2 image into raw
This commit adds support for converting QCOW2 image created previously
with e2image into raw image. The QCOW2 image is detected automatically,
so there is not new option. Just use following command:
e2image -r image.qcow image.raw
No that this tool is aimed to quickly convert qcow2 image created with
e2image into raw image. In order to improve speed we are doing some
assumption I believe might not be true for regular qcow2 images. So it
was not tested with regular QCOW2 images and it might not work with
them. The intention of this tool is only convert images previously
created by e2image.
Note that there is nothing special with QCOW2 images created by e2images
and it can be used with tools like qemu-img, or qemu-nbd without any
problems.
Signed-off-by: Lukas Czerner <lczerner>
Signed-off-by: Theodore Ts'o <tytso>
commit 9e713505ab4216c1391a14aa86a7f49a6026aa46
Author: Lukas Czerner <lczerner>
Date: Wed May 18 13:36:55 2011 +0200
tests: New i_e2image test to validate image creation/conversion
This commit adds new regression test called i_e2image which should
validate expected behaviour of e2image raw and qcow2 image creation
and qcow2 -> raw image conversion. You can run it with "make check" as
the rest of regression tests.
Testing is performed on three filesystem images with different block
sizes (1024, 2048, 4096). It creates raw and qcow2 images from the
original and then convert qcow2 image back to raw image. The results are
checksummed and compared with pre-prepared results. All md5sums should
stay the same and raw image created from original and qcow2 image should
be the same as well (just for the record).
Signed-off-by: Lukas Czerner <lczerner>
Signed-off-by: Theodore Ts'o <tytso>
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
http://rhn.redhat.com/errata/RHBA-2011-1735.html
Description of problem: Nowadays we can export only raw image by e2image and even though it exports the file system image into sparse file, there is a problem when manipulating with it. The usual approach is to use compression, but compression/decompression takes forever on bigger file system (not even mentioning huge file systems). Qcow2 format has the advantage of being really small, almost as sparse raw image, but not actually being sparse. It means that we can easily manipulate with it. It it done by packing used data blocks closely together and then addresing them by the system of address tables. How reproducible: Try to export and transfer file system image. It is really painful process. Additional info: Upstream already have this feature: commit bf0449b1a6547a566975cb32c18a2ba5972deace Author: Lukas Czerner <lczerner> Date: Wed May 18 13:36:53 2011 +0200 e2image: Add support for qcow2 format This commit adds support for exporting filesystem into QCOW2 image format. Like sparse format this saves space, by writing only necessary (metadata blocks) into image. Unlike sparse image, QCOW2 image is NOT sparse, hence does not change its size by copying with not-sparse-aware tools. New options '-Q' has been added to tell the e2image to use QCOW2 as an output image format. QCOW2 supports encryption and compression, however e2image so far does no support such features, however you can still scramble filenames with '-s' option. Signed-off-by: Lukas Czerner <lczerner> Signed-off-by: Theodore Ts'o <tytso> commit 92dcfb7692da5c3ed61899c49c0915f889815c45 Author: Lukas Czerner <lczerner> Date: Wed May 18 14:20:47 2011 +0200 e2image: Support for conversion QCOW2 image into raw This commit adds support for converting QCOW2 image created previously with e2image into raw image. The QCOW2 image is detected automatically, so there is not new option. Just use following command: e2image -r image.qcow image.raw No that this tool is aimed to quickly convert qcow2 image created with e2image into raw image. In order to improve speed we are doing some assumption I believe might not be true for regular qcow2 images. So it was not tested with regular QCOW2 images and it might not work with them. The intention of this tool is only convert images previously created by e2image. Note that there is nothing special with QCOW2 images created by e2images and it can be used with tools like qemu-img, or qemu-nbd without any problems. Signed-off-by: Lukas Czerner <lczerner> Signed-off-by: Theodore Ts'o <tytso> commit 9e713505ab4216c1391a14aa86a7f49a6026aa46 Author: Lukas Czerner <lczerner> Date: Wed May 18 13:36:55 2011 +0200 tests: New i_e2image test to validate image creation/conversion This commit adds new regression test called i_e2image which should validate expected behaviour of e2image raw and qcow2 image creation and qcow2 -> raw image conversion. You can run it with "make check" as the rest of regression tests. Testing is performed on three filesystem images with different block sizes (1024, 2048, 4096). It creates raw and qcow2 images from the original and then convert qcow2 image back to raw image. The results are checksummed and compared with pre-prepared results. All md5sums should stay the same and raw image created from original and qcow2 image should be the same as well (just for the record). Signed-off-by: Lukas Czerner <lczerner> Signed-off-by: Theodore Ts'o <tytso>