Bug 1232570

Summary: Qcow2 preallocation options Falloc, full missing in RHEL7.1 qemu-kvm-rhev
Product: Red Hat Enterprise Linux 7 Reporter: Pradeep Kumar Surisetty <psuriset>
Component: qemu-kvm-rhevAssignee: Hanna Czenczek <hreitz>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.1CC: areis, atheurer, gklein, huding, juzhang, knoel, psuriset, qiguo, srao, virt-maint, xfu
Target Milestone: pre-dev-freeze   
Target Release: 7.2   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 2.3.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-04 16:47:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pradeep Kumar Surisetty 2015-06-17 04:56:17 UTC
Description of problem:

With RHEL7,1 qemu-kvm : Qcow2 image creation supports preallocation=off, metadata, falloc, full. 


With rhel7.1 qemu-kvm-rhev:  Qcow2 image creation supports only preallocation=off, metada.  falloc, full options are missing.


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

qemu-kvm-rhev-2.1.2-23.el7_1.3.x86_64

How reproducible:


Steps to Reproduce:
1.check qemu-img man page. Or create image using metadata or falloc

Image creation with different options: 
----------

Preallocation=off

 qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=off 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='off' lazy_refcounts=off 

preallocation=metadata:

qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=metadata 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off 

Preallocation=falloc:

 qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=falloc 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='falloc' lazy_refcounts=off 

qemu-img: /tmp/test.qcow2: Invalid preallocation mode: 'falloc'

Preallocation=full

 qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=full 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='full' lazy_refcounts=off 
qemu-img: /tmp/test.qcow2: Invalid preallocation mode: 'full'

---


Actual results:

image creation fails with these options.  

Expected results:

Should be able to create qcow2 image with preallocate=falloc, full options.

Comment 7 Qian Guo 2015-07-01 07:51:23 UTC
Reproduced with qemu-kvm-rhev-2.1.2-23.el7.x86_64

#  qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=off 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='off' lazy_refcounts=off 
# qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=metadata 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off 
#  qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=falloc 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='falloc' lazy_refcounts=off 
qemu-img: /tmp/test.qcow2: Invalid preallocation mode: 'falloc'
#  qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=full 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='full' lazy_refcounts=off 
qemu-img: /tmp/test.qcow2: Invalid preallocation mode: 'full'


Can not create img by "full", "falloc" preallocateion mode, so this bug is reproduced.

Verified with qemu-kvm-rhev-2.3.0-6.el7.x86_64
#  qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=off 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='off' lazy_refcounts=off refcount_bits=16
# qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=metadata 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='metadata' lazy_refcounts=off refcount_bits=16
#  qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=falloc 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='falloc' lazy_refcounts=off refcount_bits=16
#  qemu-img create -f qcow2 /tmp/test.qcow2 -o preallocation=full 1G
Formatting '/tmp/test.qcow2', fmt=qcow2 size=1073741824 encryption=off cluster_size=65536 preallocation='full' lazy_refcounts=off refcount_bits=16

So this bug is fixed.

Comment 12 errata-xmlrpc 2015-12-04 16:47:24 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-2546.html