[sheepdog-users] sheepdog vdi restore from backup

Maxim Terletskiy terletskiy at emu.ru
Fri Jun 27 16:03:20 CEST 2014


I tried delete vdis and create new with the same name, but after that 
"qemu-img convert" stuck. We're using 0.8.0 still and I think that there 
are bug with name recycling. I saw this message some time ago, maybe 
this is the same issue:

"

Hi sheepdog users,

The recent reported problem
(https://bugs.launchpad.net/sheepdog-project/+bug/1317755) revealed a
serious bug in a way of managing VDI ID of sheep process. It can
causes data loss of cloned VDIs.

The problem can happen when you recycle VDI name. e.g. you can
reproduce the problem with a sequence like below:

mitake at salers05:~% dog vdi create test 16M
mitake at salers05:~% dog vdi snapshot test
mitake at salers05:~% dog vdi clone test -s 1 test-cloned
mitake at salers05:~% dog vdi list
   Name        Id    Size    Used  Shared    Creation time   VDI id
   Copies  Tag
s test         1   16 MB  0.0 MB  0.0 MB 2014-06-03 18:11   7c2b25
3
   test         0   16 MB  0.0 MB  0.0 MB 2014-06-03 18:11   7c2b26
   3
c test-cloned     0   16 MB  0.0 MB  0.0 MB 2014-06-03 18:11   ec1be3
3
mitake at salers05:~% dog vdi delete test
mitake at salers05:~% dog vdi delete test -s 1
mitake at salers05:~% dog vdi create test 16M
mitake at salers05:~% dog vdi list
   Name        Id    Size    Used  Shared    Creation time   VDI id
   Copies  Tag
   test         0   16 MB  0.0 MB  0.0 MB 2014-06-03 18:11   7c2b25
   3
c test-cloned     0   16 MB  0.0 MB  0.0 MB 2014-06-03 18:11   ec1be3
3

As you can see in the output of second "dog vdi list", the VDI ID
0x7c2b25 is recycled. If a VM writes data to the new "test" VDI, the
data which is pointed by test-cloned can be overwritten and lost.

The easiest way of avoiding this problem is stopping to recycle VDI
names which is already used.

The problem can be avoided by a patch submitted in a thread entitled
"[PATCH] sheep: don't recycle VDI ID", which is under review. I'll
release stable versions ASAP. Sorry for inconvenience.

Thanks,
Hitoshi"

27.06.2014 17:48, Valerio Pachera ?????:
>
>
>
> 2014-06-27 14:44 GMT+02:00 Maxim Terletskiy <terletskiy at emu.ru 
> <mailto:terletskiy at emu.ru>>:
>
>     Sorry, I forgot to write that I need to restore data to vdi with
>     exactly same name.
>
>
> Why don't you delete the existing vdi then?
>
>
>     Maybe qemu-img have some options to rewrite data in vdi?
>
>
> I don't think so.
>
>
>
>

-- 
? ?????????,
????????? ??????
??? "??"
+7(499)917-0115
http://www.emu.ru

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog-users/attachments/20140627/7532b693/attachment-0005.html>


More information about the sheepdog-users mailing list