[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: Block device resize detection
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] Re: Block device resize detection |
Date: |
Mon, 06 Dec 2010 14:12:36 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10 |
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:
>>
>> <disk type='block' device='disk'>
>> <driver name='qemu' type='raw' cache='none'/>
>> <source
>> dev='/dev/disk/by-path/ip-w.x.y.z:3260-iscsi-iqn.2010-10.br.furb.inf:disk0-lun-4'/>
>> <target dev='vda' bus='virtio'/>
>> </disk>
>>
>> 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