qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Re: Block device resize detection
       [not found] <Pine.LNX.4.64.1012060819300.4150@penha.inf.furb.br>
@ 2010-12-06 11:29 ` Alexander Graf
  2010-12-06 12:25   ` Vandeir Eduardo
  2010-12-06 13:12   ` Kevin Wolf
  0 siblings, 2 replies; 3+ messages in thread
From: Alexander Graf @ 2010-12-06 11:29 UTC (permalink / raw)
  To: Vandeir Eduardo; +Cc: Kevin Wolf, qemu-devel Developers, KVM list

Hi Vandeir,


On 06.12.2010, at 11:49, Vandeir Eduardo wrote:

> Hi guys,
> 
> 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.


Alex

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

* [Qemu-devel] Re: Block device resize detection
  2010-12-06 11:29 ` [Qemu-devel] Re: Block device resize detection Alexander Graf
@ 2010-12-06 12:25   ` Vandeir Eduardo
  2010-12-06 13:12   ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Vandeir Eduardo @ 2010-12-06 12:25 UTC (permalink / raw)
  To: Alexander Graf; +Cc: Kevin Wolf, qemu-devel Developers, KVM list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2066 bytes --]

Humm,

unfortunately I'm not a developer, only a sys admin, but this would
be a nice feature to avoid restarting vm guests.

I didn't want, but I think I will have to add another
software layer (LVM) inside the guest vm.
This way, when I need more space, I hot-add another device and
add it to the volume group of the guest vm.

Thanks.

On Mon, 6 Dec 2010, Alexander Graf wrote:

> Hi Vandeir,
> 
> 
> On 06.12.2010, at 11:49, Vandeir Eduardo wrote:
> 
> > Hi guys,
> > 
> > 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.
> 
> 
> Alex
> 
> 

__________________________________________
Vandeir Eduardo
(CCNA, LPIC-2, MCSA 2003 Server)
Laboratório de Computação e Informática (LCI) - Campus III
Fundacao Universidade Regional de Blumenau (FURB)
Rua São Paulo, 2171 - Sala A009 - CEP: 89.030-000
Blumenau, SC, Brasil.
Fone: +55 47 3321-7342

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

* [Qemu-devel] Re: Block device resize detection
  2010-12-06 11:29 ` [Qemu-devel] Re: Block device resize detection Alexander Graf
  2010-12-06 12:25   ` Vandeir Eduardo
@ 2010-12-06 13:12   ` Kevin Wolf
  1 sibling, 0 replies; 3+ messages in thread
From: Kevin Wolf @ 2010-12-06 13:12 UTC (permalink / raw)
  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:
>>
>> <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

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

end of thread, other threads:[~2010-12-06 13:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Pine.LNX.4.64.1012060819300.4150@penha.inf.furb.br>
2010-12-06 11:29 ` [Qemu-devel] Re: Block device resize detection Alexander Graf
2010-12-06 12:25   ` Vandeir Eduardo
2010-12-06 13:12   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).