Bug 1491893 - copyImage fails on block storage if source image is compressed
Summary: copyImage fails on block storage if source image is compressed
Keywords:
Status: CLOSED DUPLICATE of bug 1470435
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.1.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
: ---
Assignee: Fred Rolland
QA Contact: Raz Tamir
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-09-15 01:21 UTC by Germano Veit Michel
Modified: 2021-05-01 16:52 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-09-17 08:56:43 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 3186081 0 None None None 2017-09-15 03:45:07 UTC

Description Germano Veit Michel 2017-09-15 01:21:54 UTC
Description of problem:

1. Download one of the Red Hat provided RHEL7 kvm qcow2 image[1].
   * Or create an image, write some data and compress it.
   # man qemu-img | grep "be compressed"
   -c  indicates that target image must be compressed (qcow format only)
2. Upload image to RHV (Admin Portal/API)
3. Copy disk to same SD (block)

The copy fails with "CopyImageError: low level Image copy failed: No space left on device".

The Red Hat provided image is compressed. The destination LV is not big enough to accommodate the result of the qemu-img convert because it expands without the "-c" option.

Destination LV: 3c998305-ec3a-4d17-ab2c-44751c1667d8 43c67df7-2293-4756-9aa3-de09d67d7050 -wi-ao----   1.00g                                                                     
Source LV:      fb990cda-642e-4a11-93f7-b3fe3b29bc77 43c67df7-2293-4756-9aa3-de09d67d7050 -wi-ao---- 640.00m

I understand the destination is 1GB due to volume_utilization_chunk_mb.

But that specific image expands from 530MB to 1.2GB. For example, doing on my own laptop:

# This is what VDSM does during the copy:
# qemu-img convert -p -t none -T none -f qcow2 rhel-server-7.4-x86_64-kvm.qcow2   -O qcow2    -o compat=1.1 rhel-server-7.4-x86_64-kvm-2.qcow2

# This is an example of doing a convert with compression, so the Red Hat provided image stays the same size.
# qemu-img convert -p -t none -T none -f qcow2 rhel-server-7.4-x86_64-kvm.qcow2   -O qcow2 -c -o compat=1.1 rhel-server-7.4-x86_64-kvm-3.qcow2

# ll -h rhel-server-7.4-x86_64-kvm*
-rw-r--r--. 1 gveitmic gveitmic 1.2G Sep 15 10:16 rhel-server-7.4-x86_64-kvm-2.qcow2
-rw-r--r--. 1 gveitmic gveitmic 531M Sep 15 10:17 rhel-server-7.4-x86_64-kvm-3.qcow2
-rw-rw-r--. 1 gveitmic gveitmic 531M Sep 15 09:54 rhel-server-7.4-x86_64-kvm.qcow2

The destination needs 1.2G, more than twice the size of the source and bigger than 1GB that VDSM rounded up (Virtual size is 10G, doesn't really matter).

[1] Red Hat Enterprise Linux 7.4 KVM Guest Image 
https://access.redhat.com/downloads/content/69/ver=/rhel---7/7.4/x86_64/product-software

Version-Release number of selected component (if applicable):
vdsm-4.19.10.1-1.el7ev.x86_64

How reproducible:
100%

Steps to Reproduce:
As above

Actual results:
Copy fails on block, succeeds on NFS

Expected results:
Succeeds on block too.

Comment 2 Allon Mureinik 2017-09-17 08:56:43 UTC

*** This bug has been marked as a duplicate of bug 1470435 ***


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