The C++ librados API uses STL strings so it can properly handle embedded NULLs. 
 You can make a backup copy of rbd_children using 'rados cp'.  However, if you 
don't care about the snapshots and you've already flattened the all the images, 
you could just delete the rbd_children object so that librbd no longer thinks 
any image is a child of another.

-- 

Jason Dillaman 
Red Hat 
dilla...@redhat.com 
http://www.redhat.com 


----- Original Message -----
From: "Matthew Monaco" <m...@monaco.cx>
To: "Jason Dillaman" <dilla...@redhat.com>
Cc: ceph-users@lists.ceph.com
Sent: Monday, April 13, 2015 8:02:38 PM
Subject: Re: [ceph-users] rbd: incorrect metadata

On 04/13/2015 03:17 PM, Jason Dillaman wrote:
> Yes, when you flatten an image, the snapshots will remain associated to the 
> original parent.  This is a side-effect from how librbd handles CoW with 
> clones.  There is an open RBD feature request to add support for flattening 
> snapshots as well.  
> 
> 

So, I see which key/val pairs to remove. But I'm hesitant because I don't want
to make a mistake. The docs for rados_omap_get_next() say that key is
NULL-terminated. However looking at the hex for listomapvals rbd_children I see:

key: (34 bytes):
0000 : 03 00 00 00 00 00 00 00 0e 00 00 00 63 65 31 62 : ............ce1b
0010 : 33 33 34 35 64 65 66 64 32 30 74 00 00 00 00 00 : 3345defd20t.....
0020 : 00 00                                           : ..

value: (22 bytes) :
0000 : 01 00 00 00 0e 00 00 00 31 63 63 30 35 61 31 33 : ........1cc05a13
0010 : 62 31 61 65 66 32                               : b1aef2

What am I missing?
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to