Bug 786942 - Import of compressed qcow2 images fails
Summary: Import of compressed qcow2 images fails
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: oVirt
Classification: Retired
Component: vdsm
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.3.4
Assignee: Federico Simoncelli
QA Contact:
URL:
Whiteboard: storage
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-02 17:43 UTC by Ian McLeod
Modified: 2016-02-10 16:59 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-03-12 09:37:30 UTC
oVirt Team: Storage


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 768013 1 None None None 2021-01-20 06:05:38 UTC

Internal Links: 768013

Description Ian McLeod 2012-02-02 17:43:38 UTC
Imports of a compressed qcow2 image will fail if the uncompressed qcow2 image size differs substantially from the compressed size.

This issue is the root cause of image import failures observed in the Image Factory component of Aeolus tracked under this BZ:

https://bugzilla.redhat.com/show_bug.cgi?id=768013

Comment 1 Saggi Mizrahi 2012-02-02 17:49:43 UTC
The root of the problem lies in how VDSM allocates the target storage when doing a qcow2->qcow2 copy.
VDSM assumes that because both files have the same format the target will have the same size or less. This is not true in case of compressed source files as the target will be uncompressed.

More info at
https://bugzilla.redhat.com/show_bug.cgi?id=768013#c43

Comment 2 Saggi Mizrahi 2012-02-03 16:16:08 UTC
I was told not anyone can see my comment on the linked bug.
Here it is copied verbatim here.
You can now have you eyes touched with the light of it's hidden splendor.

"""
The issue seems to be the fact that you are trying to import a compressed qcow2
image.

VDSM allocates the volume base on the size of the original file. Upon
conversion the qcow gets uncompressed and inflates significantly and
effectively runs out of space.

A workaround would be to just not use compressed qcow images. (VDSM should
check this before copying?)

For the long run VDSM needs a way to calculate the target uncompressed size so
it can allocate enough disk space.

Just for people looking to write a patch for this the problem is in:
file: image.py
method: _createTargetImage()
look for: dstVol.extend((volParams['apparentsize'] + 511) / 512)
""""

Comment 3 Itamar Heim 2013-03-12 09:37:30 UTC
Closing old bugs. If this issue is still relevant/important in current version, please re-open the bug.


Note You need to log in before you can comment on or make changes to this bug.