* Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view [not found] ` <1378114724-1748-4-git-send-email-gren@redhat.com> @ 2013-09-02 12:57 ` Daniel P. Berrange 2013-09-03 3:26 ` Guannan Ren 2013-09-03 7:51 ` Gerd Hoffmann 0 siblings, 2 replies; 5+ messages in thread From: Daniel P. Berrange @ 2013-09-02 12:57 UTC (permalink / raw) To: Guannan Ren; +Cc: libvir-list, qemu-devel On Mon, Sep 02, 2013 at 05:38:42PM +0800, Guannan Ren wrote: > usb-bot only supports 16 luns(0~15) and they must be contiguous, > (using lun 0 and 2 without 1 doesn't work). In this case qemu > doesn't throw an error, we can not find the lun 2 in guests. So > Adding a checking function in libvirt to prevent from this case. Hmm, this seems like a problematic restriction. How does this work if we start off a guest with 3 disks attached to the usb-bot SCSI controller. Then hot-unplug the 2nd disk. Next time we need will need to start with with LUNs 0 and 2 populated only, otherwise we have ABI change upon migrate or save/restore. I think this restriction about contiguous luns must be removed if this device is to be usable with multiple luns. 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] 5+ messages in thread
* Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view 2013-09-02 12:57 ` [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view Daniel P. Berrange @ 2013-09-03 3:26 ` Guannan Ren 2013-09-03 7:51 ` Gerd Hoffmann 1 sibling, 0 replies; 5+ messages in thread From: Guannan Ren @ 2013-09-03 3:26 UTC (permalink / raw) To: Daniel P. Berrange; +Cc: libvir-list, qemu-devel On 09/02/2013 08:57 PM, Daniel P. Berrange wrote: > On Mon, Sep 02, 2013 at 05:38:42PM +0800, Guannan Ren wrote: >> usb-bot only supports 16 luns(0~15) and they must be contiguous, >> (using lun 0 and 2 without 1 doesn't work). In this case qemu >> doesn't throw an error, we can not find the lun 2 in guests. So >> Adding a checking function in libvirt to prevent from this case. > Hmm, this seems like a problematic restriction. > > How does this work if we start off a guest with 3 disks > attached to the usb-bot SCSI controller. Then hot-unplug > the 2nd disk. Currently, the qemu will throw out an error when I hot-unplug any of disks attached to usb-bot controller. { "execute": "device_del", "arguments": { "id": "scsi1-0-0-1"}} {"error": {"class": "GenericError", "desc": "Bus 'scsi1.0' does not support hotplugging"}} Libvirt will report an error: # virsh detach-disk rhel64qcow2 sdd --current error: Failed to detach disk error: internal error: unable to execute QEMU command 'device_del': Bus 'scsi1.0' does not support hotplugging > Next time we need will need to start with with LUNs 0 > and 2 populated only, otherwise we have ABI change upon > migrate or save/restore. > > I think this restriction about contiguous luns must be > removed if this device is to be usable with multiple luns. > > Daniel ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view 2013-09-02 12:57 ` [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view Daniel P. Berrange 2013-09-03 3:26 ` Guannan Ren @ 2013-09-03 7:51 ` Gerd Hoffmann 2013-09-03 9:32 ` Daniel P. Berrange 1 sibling, 1 reply; 5+ messages in thread From: Gerd Hoffmann @ 2013-09-03 7:51 UTC (permalink / raw) To: Daniel P. Berrange; +Cc: libvir-list, Guannan Ren, qemu-devel On Mo, 2013-09-02 at 13:57 +0100, Daniel P. Berrange wrote: > On Mon, Sep 02, 2013 at 05:38:42PM +0800, Guannan Ren wrote: > > usb-bot only supports 16 luns(0~15) and they must be contiguous, > > (using lun 0 and 2 without 1 doesn't work). In this case qemu > > doesn't throw an error, we can not find the lun 2 in guests. So > > Adding a checking function in libvirt to prevent from this case. > > Hmm, this seems like a problematic restriction. It's how the hardware works. > How does this work if we start off a guest with 3 disks > attached to the usb-bot SCSI controller. Then hot-unplug > the 2nd disk. You can't hotplug individual luns anyway. cheers, Gerd ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view 2013-09-03 7:51 ` Gerd Hoffmann @ 2013-09-03 9:32 ` Daniel P. Berrange 2013-09-03 12:06 ` Gerd Hoffmann 0 siblings, 1 reply; 5+ messages in thread From: Daniel P. Berrange @ 2013-09-03 9:32 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: libvir-list, Guannan Ren, qemu-devel On Tue, Sep 03, 2013 at 09:51:52AM +0200, Gerd Hoffmann wrote: > On Mo, 2013-09-02 at 13:57 +0100, Daniel P. Berrange wrote: > > On Mon, Sep 02, 2013 at 05:38:42PM +0800, Guannan Ren wrote: > > > usb-bot only supports 16 luns(0~15) and they must be contiguous, > > > (using lun 0 and 2 without 1 doesn't work). In this case qemu > > > doesn't throw an error, we can not find the lun 2 in guests. So > > > Adding a checking function in libvirt to prevent from this case. > > > > Hmm, this seems like a problematic restriction. > > It's how the hardware works. > > > How does this work if we start off a guest with 3 disks > > attached to the usb-bot SCSI controller. Then hot-unplug > > the 2nd disk. > > You can't hotplug individual luns anyway. How does hotplug/unplug work in the context of usb-bot ? AFAIK we need to be able to run device_add usb_bot drive_add file... device_add scsi-hd And the reverse, to unplug it, if we're to have feature parity with usb-storage. 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] 5+ messages in thread
* Re: [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view 2013-09-03 9:32 ` Daniel P. Berrange @ 2013-09-03 12:06 ` Gerd Hoffmann 0 siblings, 0 replies; 5+ messages in thread From: Gerd Hoffmann @ 2013-09-03 12:06 UTC (permalink / raw) To: Daniel P. Berrange; +Cc: libvir-list, Guannan Ren, qemu-devel Hi, > > > How does this work if we start off a guest with 3 disks > > > attached to the usb-bot SCSI controller. Then hot-unplug > > > the 2nd disk. > > > > You can't hotplug individual luns anyway. > > How does hotplug/unplug work in the context of usb-bot ? > > AFAIK we need to be able to run > > device_add usb_bot > drive_add file... > device_add scsi-hd > > And the reverse, to unplug it, if we're to have feature parity with > usb-storage. Hot-unplug is easy. You can remove the usb-bot device which will also remove all child devices. Hot-plug doesn't work at the moment, and I don't see any obvious way to fix that properly :-( We need some way to hotplug a *group* of devices (usb-bot + all children) as usb-bot itself is hotpluggable but the individual scsi devices connected to it are not. I could allow hotplug on usb-bot as workaround, then you can do stop device_add usb_bot device_add scsi-{hd,cd,whatever} cont but that would be more a gross hack than a solution ... cheers, Gerd ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-09-03 12:07 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <1378114724-1748-1-git-send-email-gren@redhat.com> [not found] ` <1378114724-1748-4-git-send-email-gren@redhat.com> 2013-09-02 12:57 ` [Qemu-devel] [libvirt] [PATCH 3/5] qemu: add usb-bot support from disks points of view Daniel P. Berrange 2013-09-03 3:26 ` Guannan Ren 2013-09-03 7:51 ` Gerd Hoffmann 2013-09-03 9:32 ` Daniel P. Berrange 2013-09-03 12:06 ` Gerd Hoffmann
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).