[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] libvirtd and LVM snapshots

Daniel P. Berrange:
> http://libvirt.org/formatstorage.html#StorageVolBacking
> This is currently support for Cow, QCow, QCow2, VMDK and LVM storage
> types. Some of these allow for the underling backing store to be 
> writable, others require that its readonly.

I tried the following under libvirt 0.6.0:

	vol = pool.createXML("""<volume type="block">
	<name>hurgle</name> <capacity>2147483648</capacity>
	<backingStore> <path>/dev/VMs/test-disk</path>
	<format>raw</format> </backingStore> </volume>""", 0)

It promptly created a volume, but not as a copy-on-write snapshot:
"dmsetup ls --target snapshot" shows nothing, and the image has none of
the data from the test-disk volume.

The pool I used to create these volumes is clearly LVM:

	virsh # pool-dumpxml VMs
	<pool type='logical'>
	    <format type='lvm2'/>

You mentioned some constraints about permissions earlier, but I would
have expected that to raise an exception--vol is a valid volume object
and I can query it and mkfs it and so forth.  The test-disk volume is
completely quiescent and unmounted.  Do I need to prepare it in some
other way to make it suitable for livirt to use as the base of a

(Just for sanity's sake, I verified that libvirt.getVersion() returns

"Forget the damned motor car                          Nick Moffitt
and build cities for lovers and friends."            nick zork net
       -- Lewis Mumford

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]