Re: [Openstack] Support for snapshot of LVM backend image
Current snapshot implementation for libvirt driver doesn't support snapshotting for everything except qcow2 (as i remember, because virDomainManagedSave will fail on everything except qcow2). So, maybe we can discuss it here. This for sure can be implemented for lvm using lvm snapshots but it will be unsafe doing snapshot on alive instance. LVM is much like raw right now and raw doesn't support snapshots with current logic too. 2012/7/16 Li Wang fox...@gmail.com hi, all As LVM backend image support was introduced in the trunk version of nova, is there any plan to support snapshot of the LVM backend image? I am using libvirt and Xen, with lvm as the instance image backend. There are two issues when creating snapshot. 1. when calling managedSave, libvirt complained there's no supported function by the driver. libvirtError: this function is not supported by the connection driver: virDomainManagedSave 2. when actually creating snapshot, libvirt calls qemu-img, which does not support lvm. As a result, snapshot status is always 'queue', and actually it's failed. For issue 1, it seems that libvirt does not support save or similar functions for xen, some modifications to the libvirt Xen driver maybe help? For issue 2, I think the snapshot action should call lvm related command but not qemu-img when using lvm. For example:lvcreate --snapshot .. Further discussions and replies are welcome. Thanks all Regards Wang Li ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Support for snapshot of LVM backend image
Does it make sense to shutdown instance before doing snaphotting, and then make a lvm snaphot of instance disk. This would be safe for instance though it‘s not some sort of 'live snaphot'. 2012/7/16 Boris Filippov bfilip...@griddynamics.com Current snapshot implementation for libvirt driver doesn't support snapshotting for everything except qcow2 (as i remember, because virDomainManagedSave will fail on everything except qcow2). So, maybe we can discuss it here. This for sure can be implemented for lvm using lvm snapshots but it will be unsafe doing snapshot on alive instance. LVM is much like raw right now and raw doesn't support snapshots with current logic too. 2012/7/16 Li Wang fox...@gmail.com hi, all As LVM backend image support was introduced in the trunk version of nova, is there any plan to support snapshot of the LVM backend image? I am using libvirt and Xen, with lvm as the instance image backend. There are two issues when creating snapshot. 1. when calling managedSave, libvirt complained there's no supported function by the driver. libvirtError: this function is not supported by the connection driver: virDomainManagedSave 2. when actually creating snapshot, libvirt calls qemu-img, which does not support lvm. As a result, snapshot status is always 'queue', and actually it's failed. For issue 1, it seems that libvirt does not support save or similar functions for xen, some modifications to the libvirt Xen driver maybe help? For issue 2, I think the snapshot action should call lvm related command but not qemu-img when using lvm. For example:lvcreate --snapshot .. Further discussions and replies are welcome. Thanks all Regards Wang Li ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Support for snapshot of LVM backend image
On Mon, 2012-07-16 at 15:20 +0400, Boris Filippov wrote: Current snapshot implementation for libvirt driver doesn't support snapshotting for everything except qcow2 (as i remember, because virDomainManagedSave will fail on everything except qcow2). Sheepdog also supports the save_vmstate/load_vmstate methods. But qemu can also write the vm state outside of the backend image, which should be usable with all image backends. ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Support for snapshot of LVM backend image
Well, according to http://libvirt.org/html/libvirt-libvirt.html#virDomainManagedSave domain will be suspended. After snapshotting there is new _create_domain call: if state == power_state.RUNNING: virt_dom.managedSave(0) ... snapshotting... finally: libvirt_utils.delete_snapshot(disk_path, snapshot_name) if state == power_state.RUNNING: self._create_domain(domain=virt_dom) So, Is this actually live snapshot right now? But qemu can also write the vm state outside of the backend image, which should be usable with all image backends. This can be exploited for saving VM states. There is blueprint for that: https://blueprints.launchpad.net/nova/+spec/live-snapshots ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Support for snapshot of LVM backend image
But qemu can also write the vm state outside of the backend image, which should be usable with all image backends. Use that instead managedSave? This should suffice. Save VM state, suspend domain - do snapshot - restore VM with previous state? ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp
Re: [Openstack] Support for snapshot of LVM backend image
Boris Filippov wrote: But qemu can also write the vm state outside of the backend image, which should be usable with all image backends. Use that instead managedSave? This should suffice. Save VM state, suspend domain - do snapshot - restore VM with previous state? For best results, I think you would need to retain the vm state, which contains the cache buffers, and use it in conjunction with the snapshot. Otherwise you only have a crash-consistent snapshot right? I suppose modern filesystems and databases can cope though. Regards, Jim ___ Mailing list: https://launchpad.net/~openstack Post to : openstack@lists.launchpad.net Unsubscribe : https://launchpad.net/~openstack More help : https://help.launchpad.net/ListHelp