When you run qemu-img you are essentially converting the qcow2 image to
the appropriate raw format during the conversion and import process to the
cluster.  When you use rbd import you are not doing a conversion, so the
image is being imported AS IS (you can validate this by looking at the
size of the image after importing).  In order to get to format 2 initially
you may need to convert the qcow2 to raw first, then import.
Unfortunately I don’t think qemu-img supports outputting to stdout, so
this will have to be a two-step process.



From: ceph-users [mailto:[email protected]] On Behalf Of
NEVEU Stephane
Sent: Friday, July 25, 2014 8:57 AM
To: NEVEU Stephane; [email protected]
Subject: Re: [ceph-users] RBD import format 1 & 2



I finally reconverted my only “format 1” image into format 2 so now
everything is in format 2, but I’m still confused, my vm disks are still
readonly (I’ve tried different images centos 6.5 with kernel 2.6.32 and
ubuntu with 3.13), do I have to modprobe rbd on the host ?







De : ceph-users [mailto:[email protected]] De la part de
NEVEU Stephane
Envoyé : vendredi 25 juillet 2014 13:45
À : [email protected]
Objet : [ceph-users] RBD import format 1 & 2





Hi all,



One quick question about image format 1 & 2 :



I’ve got a img.qcow2 and I want to convert it :



The first solution is qemu-img convert –f qcow2 –O rbd img.qcow2
rbd:/mypool/myimage



As far as I understood It will converted into format 1 which is the
default one so I won’t be able to clone my image.



Second solution is to import it directly into format 2 :

Rbd import –image-format 2 img.qcow2 mypool/myimage



But in this case, when I start my VM, my vm / filesystem turns readonly
with many buffer IO error on dm-0.



I’m running Ubuntu 14.04 for both kvm host and VMs so kernel version is
3.13.0-30



Any idea ?

Thx


NOTICE: Protect the information in this message in accordance with the 
company's security policies. If you received this message in error, immediately 
notify the sender and destroy all copies.

_______________________________________________
ceph-users mailing list
[email protected]
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to