Bug 537655 - qemu-img: error creating a new preallocated volume image on FCP storage
Summary: qemu-img: error creating a new preallocated volume image on FCP storage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kvm
Version: 5.4.z
Hardware: All
OS: Linux
urgent
high
Target Milestone: rc
: ---
Assignee: Kevin Wolf
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 540883 (view as bug list)
Depends On:
Blocks: 511072 550957
TreeView+ depends on / blocked
 
Reported: 2009-11-15 14:03 UTC by yeylon@redhat.com
Modified: 2016-04-18 06:27 UTC (History)
13 users (show)

Fixed In Version: kvm-83-147.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-30 07:52:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2010:0271 0 normal SHIPPED_LIVE Important: kvm security, bug fix and enhancement update 2010-03-29 13:19:48 UTC

Description yeylon@redhat.com 2009-11-15 14:03:35 UTC
Description of problem:

SPM node: ovirt - 5.5-2.1.98 
VDSM: vdsm-4.5-4

when creating a new pre-allocated virtual disk on FCP storage an error occurs on the VDSM level 

1621f383-fa7a-475a-8ae8-c8feb54e0c5c::WARNING::2009-11-15 14:09:06,033::misc::97::irs::FAILED: <err> = 'qemu-img: Error while formatting\n'; <rc> = 1
1621f383-fa7a-475a-8ae8-c8feb54e0c5c::DEBUG::2009-11-15 14:09:06,034::vg::95::irs::(vg) fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef: syncExecCmd obj 51760b89-3eff-4e83-8ec0-014726393630 cmd ['/usr/sbin/lv
s', '-o', 'attr', '--noheadings', 'fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630'] ex False try False


1621f383-fa7a-475a-8ae8-c8feb54e0c5c::ERROR::2009-11-15 14:09:06,307::task::312::irs::(runCmd): Exception in <bound method Secure.run of <storage.spm.Secure instance at 0x2b1ed20cfe18>> - Error cr ating a new volume: (["Formatting '/rhev/data-center/26592a60-9726-42b3-9372-fd141e3e746f/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/images/d58ad81f-5dcd-4d5d-91ca-4e2353fbe8d2/51760b89-3eff-4e83-8ec0-0 4726393630', fmt=raw, size=2097152 kB"],)


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. create a new VM from blank (on FC SD)
2. attach for this VM a new virtual disk (IDE/pre-allocated)
3. see that the disk is not created in the GUI
4. check out VDSM log
  
Actual results:


Expected results:


Additional info:

Comment 2 Ayal Baron 2009-11-15 16:08:18 UTC
There is a regression with qemu-img.
For some reason, formatting with raw format always fails:

[root@green-vdsa ~]# /usr/bin/qemu-img create -f raw /dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630 1G
Formatting '/dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630', fmt=raw, size=1048576 kB
qemu-img: Error while formatting


[root@green-vdsa ~]# /usr/bin/qemu-img create -f host_device /dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630 1G
Formatting '/dev/fe3fc2d8-ba10-4836-a957-be3f0a5fc1ef/51760b89-3eff-4e83-8ec0-014726393630', fmt=host_device, size=1048576 kB

Comment 3 Dor Laor 2009-11-16 15:46:53 UTC
What is the kvm version? Do you know when it worked?

Comment 4 Kevin Wolf 2009-11-16 15:56:43 UTC
If it works with -f host_device, then it's a device and not a raw file. That it doesn't work any more with -f raw is a bug fix (errors during image creation were not always reported), not a regression. You need to correct your call.

Comment 22 Ayal Baron 2010-01-17 08:19:21 UTC
I may be missing something but I think this doesn't work

[root@dhcp-X reg]# rpm -qa kvm
kvm-83-147.el5
[root@dhcp-X reg]# lvcreate -n test system --size 1g
  Logical volume "test" created
[root@dhcp-X reg]# qemu-img create -f raw /dev/system/test 500M
Formatting '/dev/system/test', fmt=raw, size=512000 kB
qemu-img: Error while formatting

Comment 23 Ayal Baron 2010-01-17 08:31:49 UTC
(In reply to comment #22)
> I may be missing something but I think this doesn't work
> 
> [root@dhcp-X reg]# rpm -qa kvm
> kvm-83-147.el5
> [root@dhcp-X reg]# lvcreate -n test system --size 1g
>   Logical volume "test" created
> [root@dhcp-X reg]# qemu-img create -f raw /dev/system/test 500M
> Formatting '/dev/system/test', fmt=raw, size=512000 kB
> qemu-img: Error while formatting    

I was indeed missing something (didn't update kvm-qemu-img).  Seems to work now.

Comment 24 Kevin Wolf 2010-01-20 13:26:27 UTC
*** Bug 540883 has been marked as a duplicate of this bug. ***

Comment 27 errata-xmlrpc 2010-03-30 07:52:40 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2010-0271.html


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