[sheepdog-users] creating volume from snapshot with qemu-img is failed

Teruaki Ishizaki ishizaki.teruaki at lab.ntt.co.jp
Tue Jan 13 10:54:52 CET 2015


Hello,

I tried to create volume from snapshot with using qemu-img command.
But it was failed and error message was out "VDI is already locked".

Test commmand history is following.
Probably, when a snapshot was created, qemu-img command read a vdi
and locked with old vid "7c2b25", but unlocked new vid "7c2b26".

---
# rm -rf /sheepdog/*
# sheep --log level=debug /sheepdog/
# dog cluster format -c 1
using backend plain store
# ./git/qemu/qemu-img create sheepdog:test 10M
Formatting 'sheepdog:test', fmt=raw size=10485760
# dog vdi lock list
VDI | owner node
# dog vdi list
  Name        Id    Size    Used  Shared    Creation time   VDI id
Copies  Tag   Block Size Shift
  test         0   10 MB  0.0 MB  0.0 MB 2015-01-13 18:20   7c2b25
1                22
# grep ERROR /sheepdog/sheep.log
(no output)
# ./git/qemu/qemu-img snapshot -c testsnap sheepdog:test
WARNING: Image format was not specified for 'sheepdog:test' and probing
guessed raw.
         Automatically detecting the format is dangerous for raw images,
write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.
# dog vdi list
  Name        Id    Size    Used  Shared    Creation time   VDI id
Copies  Tag   Block Size Shift
s test         1   10 MB  0.0 MB  0.0 MB 2015-01-13 18:20   7c2b25
1      testsnap  22
  test         0   10 MB  0.0 MB  0.0 MB 2015-01-13 18:21   7c2b26
1                22
# dog vdi lock list
VDI | owner node
test | IPv4 ip:192.168.2.12 port:7000
# grep ERROR /sheepdog/sheep.log
Jan 13 18:21:48  ERROR [main] vdi_unlock(725) unlocking unlocked VDI: 7c2b26
# ./git/qemu/qemu-img create -b sheepdog:test:testsnap sheepdog:test2
qemu-img: sheepdog:test2: cannot get vdi info, VDI is already locked,
test 0 testsnap
# grep ERROR /sheepdog/sheep.log
Jan 13 18:21:48  ERROR [main] vdi_unlock(725) unlocking unlocked VDI: 7c2b26
Jan 13 18:22:56  ERROR [main] cluster_lock_vdi_main(1380) locking
7c2b25failed
---

Do you have any good ideas to solve the problem?

Best regards,

Teruaki Ishizaki



More information about the sheepdog-users mailing list