Bug 540883

Summary: qemu-img: create snapshot on block device.
Product: Red Hat Enterprise Linux 5 Reporter: Igor Lvovsky <ilvovsky>
Component: kvmAssignee: Kevin Wolf <kwolf>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 5.4.zCC: abaron, lpeer, virt-maint, ykaul
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-01-20 13:26:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Igor Lvovsky 2009-11-24 13:08:09 UTC
Description of problem:

As you remember, according to new qemu approach we need to use 'host_device' as volume format during creation preallocate volume on block device. 
But, after that I can create snapshot from this volume when I send 'raw' format as backing-file format to qemu-img (I can do it also with 'host_device' format as backing-file format).
So, I think we have some inconsistency here. If we decided to use 'host_device' as format option for preallocate block volume we shouldn't allow create snapshots of this volume with backing-file format 'raw'


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


How reproducible:
>  qemu-img create -f host_device /dev/16430fb2-c720-4581-9632-a77f9aa804e5/1234 100M

Formatting '/dev/16430fb2-c720-4581-9632-a77f9aa804e5/1234', fmt=host_device, size=102400 kB

>  qemu-img create -f qcow2 -F raw -b /dev/16430fb2-c720-4581-9632-a77f9aa804e5/1234 /dev/16430fb2-c720-4581-9632-a77f9aa804e5/3456

Formatting '/dev/16430fb2-c720-4581-9632-a77f9aa804e5/3456', fmt=qcow2, backing_file=/dev/16430fb2-c720-4581-9632-a77f9aa804e5/1234, backing_fmt=raw, size=1048576 kB


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Kevin Wolf 2009-11-24 13:23:52 UTC
So what you are requesting is that opening a host device as raw should fail?

I agree that there is some inconsistency, but is this really a problem that needs to be addressed in RHEL 5 instead of being resolved upstream? If I understand it right this doesn't cause breakage but just means that something additional works that strictly speaking shouldn't be working in this version.

Comment 2 Ayal Baron 2009-11-24 15:07:28 UTC
You understood perfectly well and seeing as we do not use this path at all then there is no reason to do this upstream or not at all, as you see fit.

Comment 3 Igor Lvovsky 2009-11-24 15:21:55 UTC
  Hi Kevin,
You right it doesn't break anything.
I mentioned above that IMHO it just inconsistency.

Comment 5 Kevin Wolf 2010-01-20 13:26:27 UTC
The related discussion took place in bug 537655. Behaviour is consistent again now that the fix for it is applied. Closing as a duplicate.

*** This bug has been marked as a duplicate of bug 537655 ***