Bug 658753 - wrong file format when " qemu-img info " on lvm
wrong file format when " qemu-img info " on lvm
Status: CLOSED NEXTRELEASE
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm (Show other bugs)
5.6
Unspecified Unspecified
low Severity medium
: rc
: ---
Assigned To: Kevin Wolf
Virtualization Bugs
:
Depends On:
Blocks: Rhel5KvmTier3
  Show dependency treegraph
 
Reported: 2010-12-01 02:19 EST by slei
Modified: 2010-12-02 05:23 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-12-02 05:23:22 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description slei 2010-12-01 02:19:03 EST
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 05:23:22 EST
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.