Bug 1315654

Summary: unable to create preallocated images with gluster native driver for qemu
Product: Red Hat Gluster Storage Reporter: SATHEESARAN <sasundar>
Component: glusterfs-develAssignee: Chris Wright <chrisw>
Status: CLOSED DEFERRED QA Contact: SATHEESARAN <sasundar>
Severity: high Docs Contact:
Priority: unspecified    
Version: rhgs-3.1CC: amukherj, nchilaka, nlevinki, rhs-bugs, sasundar, vbellur
Target Milestone: ---Keywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-17 07:40:18 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:

Description SATHEESARAN 2016-03-08 11:03:32 UTC
Description of problem:
-----------------------
qemu has got a gluster native driver implemented with gluster api.

When an attempt was made to create a preallocated image with qemu-img command,
the image creation happens but not preallocated.

version-Release number of selected component (if applicable):
------------------------------------------------------------
RHEL 6.7
RHGS 3.1.2

How reproducible:
-----------------
Always

Steps to Reproduce:
-------------------
1. Create a preallocated image using gluster native driver using qemu-img command

(i.e) qemu-img create -f qcow2 -o preallocation=full gluster://<gluster-server>/<volume>/vm1.img 10G

Actual results:
---------------
Image gets created but its not preallocated fully

Expected results:
-----------------
Image should get preallocated

Additional info:
----------------
[root@ ]# qemu-img create -f qcow2 -o preallocation=full gluster://localhost/rep3vol/vm1.img 5G
Formatting 'gluster://dhcp37-61.lab.eng.blr.redhat.com/rep3vol/newvm3.img', fmt=qcow2 size=3221225472 encryption=off cluster_size=65536 preallocation='full'
Unknown option 'preallocation'

I could inspect the image using qemu-img info, but still its not preallocated,

[root@ ]# qemu-img info newvm3.img
image: newvm3.img
file format: qcow2
virtual size: 3.0G (3221225472 bytes)
disk size: 588K
cluster_size: 65536