Re: Ceph Snapshot Children not exists / children relation broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 31, 2020 at 8:10 AM Torsten Ennenbach
<tennenbach@xxxxxxxxxxxx> wrote:
>
> Hi Jason
>
> > Am 31.07.2020 um 14:08 schrieb Jason Dillaman <jdillama@xxxxxxxxxx>:
> >
> > rados
> > -p rbd listomapvals rbd_header.f907bc6b8b4567
>
> rados -p rbd listomapvals rbd_header.f907bc6b8b4567
> error getting omap keys rbd/rbd_header.f907bc6b8b4567: (2) No such file or directory

Ack. This can be fixed, but do you have any idea how the child image
was removed? The removal process should delete its link to the parent
before it's actually deleted (same w/ the flatten process). If there
is some bug allowing images to slip through, I would like to fix it.

First step to removing that link manually will be to get the image id
of the "delete-me-please" image via "rbd info". You can then run the
following to find the matching key entry for that image id (it's
buried in a binary blob):

(looking for 106e8126b1f2 in my example)
$ rados -p rbd listomapvals rbd_children
<..... snip ....>
key (32 bytes):
00000000  02 00 00 00 00 00 00 00  0c 00 00 00 31 30 36 65  |............106e|
00000010  38 31 32 36 62 31 66 32  04 00 00 00 00 00 00 00  |8126b1f2........|
00000020

value (19 bytes) :
00000000  01 00 00 00 0b 00 00 00  31 30 37 37 64 32 36 64  |........1077d26d|
00000010  38 66 64                                          |8fd|
00000013
< .... snip .... >

You will then need to use hexedit (or something similar) to create a
file w/ that exact binary key value that matches your image id. Below
I've tweaked the hex from above key to match the xxd import format:

$ cat <<EOF > key.txt
> 00000000: 02 00 00 00 00 00 00 00 0c 00 00 00 31 30 36 65  ............106e
> 00000010: 38 31 32 36 62 31 66 32 04 00 00 00 00 00 00 00  8126b1f2........
> EOF
$ xxd -r -g 1 key.txt key.bin
$ xxd -g 1  key.bin
00000000: 02 00 00 00 00 00 00 00 0c 00 00 00 31 30 36 65  ............106e
00000010: 38 31 32 36 62 31 66 32 04 00 00 00 00 00 00 00  8126b1f2........

You can now provide that binary key file to rados to remove the offending key:

$ rados -p rbd rmomapkey rbd_children --omap-key-file key.bin


>
> Torsten
> _______________________________________________
> ceph-users mailing list -- ceph-users@xxxxxxx
> To unsubscribe send an email to ceph-users-leave@xxxxxxx
>


-- 
Jason
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux