All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] QEMU online guest disk resize wrt host block devices
@ 2011-09-01 13:27 Daniel P. Berrange
  2011-09-01 14:05 ` Christoph Hellwig
  2011-09-01 14:27 ` [Qemu-devel] QEMU online guest disk resize wrt host block devices Daniel P. Berrange
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel P. Berrange @ 2011-09-01 13:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: hch

We want to support online resize of guest disks in the libvirt API for
QEMU, and had intended to use the fairly recently added 'block_resize'
command:

  commit db97ee6a976bacbb0d18818e951cfc41b39269a7
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Mon Jan 24 13:32:41 2011 +0100
 
    block: tell drivers about an image resize

  commit 6d4a2b3a47959f02e7f307f50396e70e8464f95e
  Author: Christoph Hellwig <hch@lst.de>
  Date:   Mon Jan 24 13:32:33 2011 +0100

    block: add block_resize monitor command

There is unfortunately a problem with the design of this monitor command
because it has tied the task of resizing the host backing file for the
virtual disk, together with the task of notifying the guest device of the
block resize. This means that we can only use 'block_resize' for disks
that are backed by image files (raw, qcow2, etc) that QEMU can actually
resize.

To be able to support online resize of virtual disks backed by host
block devices, LVM volumes, SCSI LUNs, iSCSI LUNs, etc we need to be
able to decouple these tasks. The resize of the block device needs to
be done outside QEMU, either by privileged tools on the host, or by a
remote SAN administrator, or a combo of both.

IOW, we need a way to tell QEMU to merely re-read the host file/block
size to detect an externally performed resize, and then just notify
the guest. While this would also be sufficient for raw file images,
obviously we don't want todo this with any of the magic formats where
QEMU has to remain in charge of updating metadata while active.

I see two likely approaches:

 1. Add a parameter to the existing 'block_resize' command
    'refreshonly=true|false'

 2. Add a separate command  'block_refresh'

Both of these options would internally just re-read the capacity of the
BlockDriver image, and then notify the guest device.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-09-09  9:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 13:27 [Qemu-devel] QEMU online guest disk resize wrt host block devices Daniel P. Berrange
2011-09-01 14:05 ` Christoph Hellwig
2011-09-01 14:30   ` Daniel P. Berrange
2011-09-01 15:55     ` Christoph Hellwig
2011-09-02 15:00       ` Daniel P. Berrange
2011-09-07 11:02       ` [Qemu-devel] [PATCH] block: allow resizing of images residing on host devices Christoph Hellwig
2011-09-09  9:37         ` Kevin Wolf
2011-09-01 14:27 ` [Qemu-devel] QEMU online guest disk resize wrt host block devices Daniel P. Berrange
2011-09-01 15:56   ` Christoph Hellwig
2011-09-05 13:03     ` Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.