On 06/09/2014 02:00 PM, Ignazio Cassano wrote:
Many thanks...
Can I create a format 2 image (with support for linear snapshot)  using
qemu-img command ?

Yes:

qemu-img create -f raw rbd:rbd/image1:rbd_default_format=2 10G

'rbd_default_format' is a Ceph setting which is passed down to librbd directly.

Wido



2014-06-09 13:05 GMT+02:00 Ilya Dryomov <ilya.dryo...@inktank.com
<mailto:ilya.dryo...@inktank.com>>:

    On Mon, Jun 9, 2014 at 3:01 PM, Ignazio Cassano
    <ignaziocass...@gmail.com <mailto:ignaziocass...@gmail.com>> wrote:
     > Hi all,
     > I installed cep firefly and now I am playing with rbd snapshot.
     > I created a pool (libvirt-pool) with two images:
     >
     > libvirtimage1 (format 1)
     > image2 (format 2).
     >
     > When I try to protect the first image:
     >
     > rbd --pool libvirt-pool snap protect --image libvirtimage1 --snap
     > libvirt-snap
     >
     > it gives me an error because the image is in format 1:
     >
     > image must support layering.
     >
     > This is correct because libvirtimage1 is in format 1.
     >
     > But If I try with the second image:
     > rbd --pool libvirt-pool snap protect --image image2  --snap
    image2-snap
     >
     > it gives the following:
     >
     > snap failed (2) No such file or directory
     >
     >
     > Image2 exists infact I can see it :
     >
     > rbd -p libvirt-pool ls
     >
     > libvirtimage1
     > image2
     >
     >
     > Could someone help me, please ?

    You have to create the snapshot first:

    rbd --pool libvirt-pool snap create --image image2  --snap image2-snap
    rbd --pool libvirt-pool snap protect --image image2  --snap image2-snap

    Thanks,

                     Ilya




_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



--
Wido den Hollander
42on B.V.
Ceph trainer and consultant

Phone: +31 (0)20 700 9902
Skype: contact42on
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to