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 1301815 - Guest image occured error in qemu-img check after enlarge a small lvm to resume installing guest.
Summary: Guest image occured error in qemu-img check after enlarge a small lvm to resu...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.8
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 1302929 1302930 1610930
TreeView+ depends on / blocked
 
Reported: 2016-01-26 03:28 UTC by xiagao
Modified: 2019-05-21 09:29 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1302929 1302930 (view as bug list)
Environment:
Last Closed: 2016-02-16 19:49:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description xiagao 2016-01-26 03:28:51 UTC
Description of problem:
Install rhel6.7 guest on a small lvm based iscsi storage, and enlarge lvm to resume installing guest when there is no space. After installation, check guest image with error info.

Version-Release number of selected component (if applicable):
qemu-kvm-rhev-0.12.1.2-2.483.el6.x86_64
qemu-img-rhev-0.12.1.2-2.483.el6.x86_64
kernel-2.6.32-595.el6.x86_64

How reproducible:
4/5

Steps to Reproduce:
1.login iscsi server and create lvm on host.
# iscsiadm -m node -T iqn.2016-01.com.xiagao:server.target0 -p 10.66.83.216 --login
# vgcreate vgtest /dev/sdc
# lvcreate -L 3g -n lvtest vgtest
# lvs
 lvtest vgtest       -wi-a-----   3.00g

2.Create a large enough qcow2 file on lvm .
# qemu-img create -f qcow2 /dev/vgtest/lvtest 80G

3.Install rhel6.7.z guest with -drive file=...,format=qcow2...., using pxe installaion method
/usr/libexec/qemu-kvm \
    -S  \
    -name 'virt-tests-vm1' \
    -machine rhel6.6.0  \
    -nodefaults  \
    -vga cirrus \
    -drive file=/dev/vgtest/lvtest,if=none,id=drive-virtio-disk0,boot=on,format=qcow2,cache=none,werror=stop,rerror=stop \
    -device virtio-blk-pci,bus=pci.0,addr=0x4,drive=drive-virtio-disk0,id=virtio-disk0 \
    -device virtio-net-pci,mac=9a:d5:d6:d7:d8:d9,id=idnNqY2H,vectors=4,netdev=idz3Tned,bus=pci.0,addr=05  \
    -netdev tap,id=idz3Tned  \
    -m 4096  \
    -smp 4,cores=4,threads=1,sockets=1 \
    -cpu 'Conroe' \
    -vnc :0  \
    -enable-kvm \
    -monitor stdio

4.wait until vm pause on no space

5.extend the lvm. 
# lvextend -L +50M /dev/vgtest/lvtest

6.in qmp monitor . issue cont.
for qmp : {"execute":"cont"}

7. repeat 4~6.

8. after installation, check guest image

Actual results:
#qemu-img check /dev/vgtest/lvtest
Leaked cluster 49092 refcount=1 reference=0
Leaked cluster 49093 refcount=1 reference=0
Leaked cluster 49094 refcount=1 reference=0
Leaked cluster 49095 refcount=1 reference=0
Leaked cluster 49096 refcount=1 reference=0

........

Leaked cluster 69715 refcount=1 reference=0
Leaked cluster 69716 refcount=1 reference=0
Leaked cluster 69717 refcount=1 reference=0
Leaked cluster 69718 refcount=1 reference=0
Leaked cluster 69719 refcount=1 reference=0
Leaked cluster 69720 refcount=1 reference=0

4595 leaked clusters were found on the image.
This means waste of disk space, but no harm to data.
Image end offset: 4759093248

Expected results:
no error.

Additional info:
1.host cpu info
processor	: 1
vendor_id	: AuthenticAMD
cpu family	: 15
model		: 107
model name	: AMD Athlon(tm) Dual Core Processor 5400B
stepping	: 2
cpu MHz		: 1000.000
cache size	: 512 KB
physical id	: 0
siblings	: 2
core id		: 1
cpu cores	: 2
apicid		: 1
initial apicid	: 1
fpu		: yes
fpu_exception	: yes
cpuid level	: 1
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt rdtscp lm 3dnowext 3dnow rep_good extd_apicid pni cx16 lahf_lm cmp_legacy svm extapic cr8_legacy 3dnowprefetch lbrv

2.after installation,check lvm
# lvs
lvtest vgtest       -wi-a-----   4.74g

3.guest can boot normally.

4.guest imag info
# qemu-img info /dev/vgtest/lvtest
image: /dev/vgtest/lvtest
file format: qcow2
virtual size: 80G (85899345920 bytes)
disk size: 0
cluster_size: 65536

Comment 2 xiagao 2016-01-26 08:26:27 UTC
Can reproduce it on rhel6.7 release version.

pkg version:
qemu-kvm-rhev-0.12.1.2-2.479.el6.x86_64
qemu-img-rhev-0.12.1.2-2.479.el6.x86_64

When trigger cont after extend lvm at the first time, the image occured error.


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