From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=53444 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PPar5-0006j1-9J for qemu-devel@nongnu.org; Mon, 06 Dec 2010 08:11:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PPar2-0004rR-P0 for qemu-devel@nongnu.org; Mon, 06 Dec 2010 08:11:47 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43961) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PPar2-0004rE-Fy for qemu-devel@nongnu.org; Mon, 06 Dec 2010 08:11:44 -0500 Message-ID: <4CFCE144.6050501@redhat.com> Date: Mon, 06 Dec 2010 14:12:36 +0100 From: Kevin Wolf MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: Block device resize detection List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Vandeir Eduardo , qemu-devel Developers , KVM list , Christoph Hellwig Am 06.12.2010 12:29, schrieb Alexander Graf: > On 06.12.2010, at 11:49, Vandeir Eduardo wrote: >> >> I have a KVM guest machine, lets name it VMTEST, >> using an iSCSI LUN as a virtio device. Something like this: >> >> >> >> > dev='/dev/disk/by-path/ip-w.x.y.z:3260-iscsi-iqn.2010-10.br.furb.inf:disk0-lun-4'/> >> >> >> >> On iSCSI server, if I resize this LUN, this resize is detected >> on KVM host, but not on the VMTEST. The device resize is only >> detected if I restart VMTEST. Is there a way to make VMTEST detect >> the /dev/vda resize without restarting it? >> >> On VMTEST I already tried commands like partprobe /dev/vda, >> hdparm -z /dev/vda and blockdev --rereadpt /dev/vda, but none of >> was capable to detect the block device (/dev/vda) resize. > > The probing of an image is only done at initialization time of the block backend driver, which in your case is the bootup. The only chance you have of reevaluating it would be to hot-add another virtio device with the resized image. > > Alternatively, you could also try to write a patch for reevaluation plumbing, so that the hba emulation layer can trigger reevaluation in the disk layer. This is basically online disk resizing, which we have discussed in the past and which I think we want to have for virtio-blk eventually, but currently it's supported neither in the host qemu nor in the guest kernel. Kevin