[libvirt] Storage Backend - buildVolFrom Semantics

Ján Tomko jtomko at redhat.com
Mon Mar 14 13:53:52 UTC 2016


On Tue, Mar 01, 2016 at 09:22:12PM -0600, Richard Laager wrote:
> storage_backend_rbd.c uses an RBD clone operation to implement buildVolFrom.
> 
> If I'm understanding the RBD documentation correctly, you cannot delete 
> the parent until the clone has been deleted:
> http://docs.ceph.com/docs/master/dev/rbd-layering/
> "Before cloning a snapshot, you must mark it as protected, to prevent it 
> from being deleted while child images refer to it:"
> &
> "To delete the parent, you must first mark it unprotected, which checks 
> that there are no children left:"
> 
> Is libvirt okay with those semantics for volumes? That is, if you clone 
> a volume, is it acceptable that you cannot delete the parent until you 
> delete the clone?
> 

I think that's strange behaviour.

virStorageVolCreateXMLFrom should create an independent volume and copy
the data from the original volume.

virStorageVolCreateXML with the original volume specified as the
<backingStore> should create snapshots depending on the parent.

Jan

> The answer to this affects how I'll write a patch to implement 
> buildVolFrom for storage_backend_zfs.c.
> 
> -- 
> Richard
> 
> --
> libvir-list mailing list
> libvir-list at redhat.com
> https://www.redhat.com/mailman/listinfo/libvir-list




More information about the libvir-list mailing list