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.
Bug 1601871 - Target image needs larger size when executing convert with iscsi backend
Summary: Target image needs larger size when executing convert with iscsi backend
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: qemu-kvm-rhev
Version: 7.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Fam Zheng
QA Contact: Tingting Mao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-07-17 11:28 UTC by Tingting Mao
Modified: 2018-07-20 07:14 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-20 07:14:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Tingting Mao 2018-07-17 11:28:26 UTC
Description of problem:
Convert would fail when the target image size is the same as the source image with iscsi backend.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-2.12.0-7.el7
kernel-3.10.0-919.el7

How reproducible:
2/2

Steps to Reproduce:
1.Create lvs after login the iscsi target
#iscsiadm -m node -T iqn.2018-07.com.example:1 -p 10.66.11.19 -l
#pvcreate /dev/sdb
#vgcreate vgtest /dev/sdb
#lvcreate -L 3G -n source vgtest
#lvcreate -L 3G -n target vgtest
2.Convert source image to target
# qemu-img convert -f raw -O qcow2 /dev/vgtest/source /dev/vgtest/target
qemu-img: error while writing sector 6287359: No space left on device


Actual results:
as above.

Expected results:
Convert with no error

Additional info:
1. When creating target file with 4G size, converting successfully
2. The result is correct with qemu-kvm-rhev-2.10.0
# qemu-img --version
qemu-img version 2.10.0(qemu-kvm-rhev-2.10.0-21.el7_5.1)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
# lvcreate -L 3G -n source vgtest01
  Logical volume "source" created.
# lvcreate -L 3G -n target vgtest01
  Logical volume "target" created.
# qemu-img convert -f raw -O qcow2 /dev/vgtest01/source /dev/vgtest01/target -p
    (100.00/100%)
# qemu-img info /dev/vgtest01/target 
image: /dev/vgtest01/target
file format: qcow2
virtual size: 3.0G (3221225472 bytes)
disk size: 0
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

Comment 3 Fam Zheng 2018-07-20 07:14:46 UTC
qcow2 needs some extra disk space for metadata, and in the case of fully allocated image, it will require a bit more than the virtual size.

Use qemu-img measure command to calculate the necessary space:

qemu-img measure /dev/vgtest01/source -O qcow2

The command will count the allocated guest data and estimate metadata.


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