[pve-devel] activate hotplug by default ?
Alexandre DERUMIER
aderumier at odiso.com
Tue Feb 19 18:53:12 CET 2013
>>hot-unplug looks dangerous for me anyways - maybe we should only allow hot-add for disks?
Yes, no problem for me.
Sure It's dangerous if your disks are mounted. (Maybe with guest-agent in the futur we could check if the disks are mounted or not).
It could be great to keep an option to activate disk hot-unplug for advanced users.
About the windows "bug":
I found a way, with calling drive_del after device_del.
windows acpi don't unplug the disk until it's mounted, so it's safe, and we keep access to disk
But on Linux that doesn't work, the device removal hang.
(Normal linux behaviour was to remove correctly the device, but of course, mount point is hanging)
I don't like too much this kind of trick which depend of the guest os.
(Anyway libvirt implement drive_del before device_del, to be sure that datas are correctly flushed)
So I think guest-agent is the only 100% safe way for removal.
----- Mail original -----
De: "Dietmar Maurer" <dietmar at proxmox.com>
À: "Alexandre DERUMIER" <aderumier at odiso.com>, "Martin Maurer" <martin at proxmox.com>
Cc: pve-devel at pve.proxmox.com
Envoyé: Mardi 19 Février 2013 18:07:41
Objet: RE: [pve-devel] activate hotplug by default ?
hot-unplug looks dangerous for me anyways - maybe we should only allow hot-add for disks?
> -----Original Message-----
> From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> bounces at pve.proxmox.com] On Behalf Of Alexandre DERUMIER
> Sent: Dienstag, 19. Februar 2013 16:34
> To: Martin Maurer
> Cc: pve-devel at pve.proxmox.com
> Subject: Re: [pve-devel] activate hotplug by default ?
>
> Ok,
>
> I can reproduce it:
>
> mount a drive as D:
> open a cmd.exe
> cd D:\
>
> now unplug.
>
> the cmd.exe will block the acpi unplug, I have an explicit error message in
> windows event viewer:
>
> "cmd.exe stopped the removal or ejection for the device...."
>
> I don't think it's possible to force removal, as device_del wait for the ack of
> acpi unplug from guest.
> I'll try to do a drive_add if this occur, maybe it'll give us access again to drive.
>
>
>
>
>
>
> ----- Mail original -----
>
> De: "Alexandre DERUMIER" <aderumier at odiso.com>
> À: "Martin Maurer" <martin at proxmox.com>
> Cc: pve-devel at pve.proxmox.com
> Envoyé: Mardi 19 Février 2013 15:20:04
> Objet: Re: [pve-devel] activate hotplug by default ?
>
> to be more exact
>
> >>1) drive_del (drive removal from controller = eject from windows)
> remove the block part, "info block" should show device removed
>
> >>2) device_del (remove the controller)
> "info pci" should see controller removed.
>
>
> I don't wait between 1) and 2), so maybe the bug is here.
>
> I'll investigate this afternoon.
>
>
> ----- Mail original -----
>
> De: "Alexandre DERUMIER" <aderumier at odiso.com>
> À: "Martin Maurer" <martin at proxmox.com>
> Cc: pve-devel at pve.proxmox.com
> Envoyé: Mardi 19 Février 2013 14:23:14
> Objet: Re: [pve-devel] activate hotplug by default ?
>
> Hi Martin,
>
> The unplug works in 2 parts :
>
> 1) drive_del (drive removal from controller = eject from windows)
> 2) device_del (remove the controller)
>
> they are async, and I check the device list after removal a loop for 5 seconds.
>
>
> Can you post a "info pci" result from monitor after 1min by example, to see if
> the drive is not remove too late.
>
> What was the usage of the disk you remove ? (heavy read/write access ?)
>
>
> I'll redo test
>
> ----- Mail original -----
>
> De: "Martin Maurer" <martin at proxmox.com>
> À: pve-devel at pve.proxmox.com
> Envoyé: Mardi 19 Février 2013 13:26:16
> Objet: Re: [pve-devel] activate hotplug by default ?
>
> > -----Original Message-----
> > From: pve-devel-bounces at pve.proxmox.com [mailto:pve-devel-
> > bounces at pve.proxmox.com] On Behalf Of Alexandre DERUMIER
> > Sent: Dienstag, 19. Februar 2013 06:26
> > To: pve-devel at pve.proxmox.com
> > Subject: [pve-devel] activate hotplug by default ?
> >
> > Hi,
> >
> > hotplug code is pretty stable (I'm using it since more 1 year),
> >
> > Maybe is it time to activate it by default ?
> >
> > For windows (xp,w7,w8,2003,2008,2012) it's working out of the box.
>
> As soon as I remove (hot-unplug) now a disk (e.g. from a win2008r2), I see
> the following error on the gui (after timeout):
>
> "error hot-unplug virtio2 at /usr/share/perl5/PVE/API2/Qemu.pm line 659.
> (500)"
>
> the monitor shows the disk as removed, the config is still with the disk and
> the windows box is on trouble (still shows the disk, but hang and display I/O
> device errors)
>
> It works, if I "eject" the disk inside windows before I remove it.
>
> As most user will just click remove (without eject it inside win), we will need
> to fix the problem and/or improve the user experience here.
>
> Any idea?
>
> Martin
>
>
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
More information about the pve-devel
mailing list