[Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread MORITA Kazutaka
Currently, we can take sheepdog snapshots of running VMs only from the
qemu monitor.  This series allows taking online snapshots from
qemu-img.

The first two patches prepare for the thrid patch.

MORITA Kazutaka (3):
  sheepdog: cleanup find_vdi_name
  sheepdog: add SD_RES_READONLY result code
  sheepdog: resend write requests when SD_RES_READONLY is received

 block/sheepdog.c |  115 ++
 1 files changed, 107 insertions(+), 8 deletions(-)

-- 
1.7.2.5





Re: [Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread Eric Blake
On 04/25/2013 04:37 AM, MORITA Kazutaka wrote:
 Currently, we can take sheepdog snapshots of running VMs only from the
 qemu monitor.  This series allows taking online snapshots from
 qemu-img.

Is that even safe?  We specifically recommend that users NOT use
qemu-img on any image that is in-use by a qemu process, and instead only
use qemu monitor commands; since qemu-img may see inconsistent state,
and worse, any writes that qemu-img do may cause qemu to see
inconsistent state and cause corruption to the running guest.

-- 
Eric Blake   eblake redhat com+1-919-301-3266
Libvirt virtualization library http://libvirt.org



signature.asc
Description: OpenPGP digital signature


Re: [Qemu-devel] [PATCH 0/3] sheepdog: support online snapshot from qemu-img

2013-04-25 Thread Stefan Hajnoczi
On Thu, Apr 25, 2013 at 07:44:29AM -0600, Eric Blake wrote:
 On 04/25/2013 04:37 AM, MORITA Kazutaka wrote:
  Currently, we can take sheepdog snapshots of running VMs only from the
  qemu monitor.  This series allows taking online snapshots from
  qemu-img.
 
 Is that even safe?  We specifically recommend that users NOT use
 qemu-img on any image that is in-use by a qemu process, and instead only
 use qemu monitor commands; since qemu-img may see inconsistent state,
 and worse, any writes that qemu-img do may cause qemu to see
 inconsistent state and cause corruption to the running guest.

It's safe in the same way that multiple hosts can access the same NFS
export.  All I/O is going through the same NFS server and is therefore
kind of consistent ;).

The problem that qcow2 has is that two programs would overwrite metadata
in the file, possibly stepping on each other's feet and corrupting the
image metadata.

Sheepdog can handle snapshot requests coming from different clients.

Users can still shoot themselves in the foot if they start doing things
like reading or writing image data while the guest is running.

Stefan