[sheepdog-users] [CAUTION] please be careful about recycling VDI names
Hitoshi Mitake
mitake.hitoshi at gmail.com
Tue Jun 3 11:24:12 CEST 2014
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
More information about the sheepdog-users
mailing list