[openstack-dev] Island: Local Storage Volume Support for Cinder

Vishvananda Ishaya vishvananda at gmail.com
Fri Nov 2 22:54:02 UTC 2012


On Nov 2, 2012, at 2:55 AM, Christoph Hellwig <hch at infradead.org> wrote:

> 
> In addition I have another question, although that might be more towards
> the nova gurus on the list:  What guarantees no I/O is pending when
> the create_snapshot method is called?  Just like in a driver I'm writing
> right now you call qem-u-img snapshot from the create_snapshot method,
> and I'm again worried about qemu accessing it concurrently.  The same
> issue also applied to the delete_snapshot method.  I've been trying to
> dig into this, but the API documentation for cinder seems severly
> lackingunfortunately.

So we dealt with this exact issue when doing snapshots for instances. According
to the libvirt folks, creating and/or deleting a snapshot using qemu-image while
a disk is in use is not safe. Unfortunately libvirt does not expose a
reasonable method for snapshotting and extracting data from a live disk,
so the only way to do this safely is to use qemu-monitor (or patch libvirt to
expose the right interface). This is why the instance snapshot command in kvm
is doing a managed save before snapshotting the vm. If we had a good way to do
this it would greatly help the instance snapshot code as well.

> 
> I'd suggest going there, as it means all format specific are hidden
> in qemu, this would also allow to support e.g. vhd or vmware images
> without changes to your openstack code.
> 
> You already need a qemu patch anyway so I don't think it's a huge issue.
> 
> Thinking about qemu I think your initial provisioning in the
> initialize_connection could also be greatly simplified by using the
> copy on read support in recent qemu.  This uses the qemu backing device
> support, but updates the overlay image not only on writes but pages in
> data on reads as well and thus gradually moves the data to be local.
> 

+1 Copy on read is sexy!

Vish


More information about the OpenStack-dev mailing list