Bug 658753 - wrong file format when " qemu-img info " on lvm
Summary: wrong file format when " qemu-img info " on lvm
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.6
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: Rhel5KvmTier3
TreeView+ depends on / blocked
 
Reported: 2010-12-01 07:19 UTC by slei
Modified: 2010-12-02 10:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-12-02 10:23:22 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description slei 2010-12-01 07:19:03 UTC
Description of problem:
when i check the qcow2 file with following command:
#qemu-img check /dev/vg/lv 
qemu-img: This image format does not support checks

then i add " -f qcow2 " to the above command :
#qemu-img check -f qcow2 /dev/vg/lv
No errors were found on the image.

In order to know the reason ,i use the following command to check the file format of the "/dev/vg/lv":
#qemu-img info /dev/vg/lv
image: /dev/vg/lv
file format: host_device
virtual size: 10G (10737418240 bytes)
disk size: 0




Version-Release number of selected component (if applicable):
kernel version:
2.6.18-234.el5
kvm version:
kvm-83-219.el5


How reproducible:
1,create the lvm:
#qemu-img create -f raw 0.raw 10G && qemu-img create -f raw 1.raw 10G && losetup /dev/loop0 0.raw && losetup /dev/loop1 1.raw && pvcreate /dev/loop0 /dev/loop1 && vgcreate vg /dev/loop0 /dev/loop1 && lvcreate -L10G -n lv vg
Formatting '0.raw', fmt=raw, size=10485760 kB
Formatting '1.raw', fmt=raw, size=10485760 kB
  Physical volume "/dev/loop0" successfully created
  Physical volume "/dev/loop1" successfully created
  Volume group "vg" successfully created
  Logical volume "lv" created

2, create qcow2 image:
#qemu-img create -f qcow2 /dev/vg/lv 6G
Formatting '/dev/vg/lv', fmt=qcow2, size=10485760 kB

3, check /dev/vg/lv:
#qemu-img check  /dev/vg/lv
qemu-img: This image format does not support checks

4, check /dev/vg/lv with "-f qcow2":
#qemu-img check -f qcow2 /dev/vg/lv
No errors were found on the image.

5, check the file format :
#qemu-img info /dev/vg/lv
image: /dev/vg/lv
file format: host_device
virtual size: 10G (10737418240 bytes)
disk size: 0

Actual results:


Expected results:
3, check /dev/vg/lv:
#qemu-img check  /dev/vg/lv
No errors were found on the image.

5, check the file format :
#qemu-img info /dev/vg/lv
...
file format: qcow2
...


Additional info:

Comment 1 Kevin Wolf 2010-12-02 10:23:22 UTC
This is a known problem, but not fixable with reasonable effort in RHEL 5.

RHEL 6 does the expected thing here.


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