* [Qemu-devel] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug [not found] <52062D34.1050804@linux.vnet.ibm.com> @ 2013-08-16 13:22 ` Deepak C Shetty 2013-08-20 14:43 ` Stefan Hajnoczi 0 siblings, 1 reply; 5+ messages in thread From: Deepak C Shetty @ 2013-08-16 13:22 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 6217 bytes --] Hi List, Below is the mail I sent to libvirt list, but didn't get much response. Trying here to see if someone can help provide suggestions on why "Invalid Argument" is recd for /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 while doing the disk hotplug ? Appreciate some response thanx, deepak -------- Original Message -------- Subject: [libvirt] virDomainAttachDevice error during disk hotplug Date: Sat, 10 Aug 2013 17:38:20 +0530 From: Deepak C Shetty <deepakcs@linux.vnet.ibm.com> Organization: IBM India Pvt. Ltd. To: libvir-list@redhat.com Hi All, I am trying to do a hotplug of a disk from VDSM (which uses libvirt to get things done). I hit the below error "operation failed: open disk image file failed" comign from virDomainAttachDevice. Some background: 1) The qemu-img create cmd I use (inside vdsm) to create the file being hotplugged is /usr/bin/qemu-img create -f qcow2 -F qcow2 -b /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399' (cwd /var/run/vdsm) I even tried using the rel. backing path instead of abs. path as below.. /usr/bin/qemu-img create -f qcow2 -F qcow2 -b ../../../rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399' (cwd /var/run/vdsm) but hit the same error during hotplug operation 2) qemu-img info /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 image: /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 file format: qcow2 virtual size: 3.8G (4096000000 bytes) disk size: 196K cluster_size: 65536 backing file: /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 backing file format: qcow2 3) ls -l /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 -r--r-----. 1 vdsm kvm 197120 Aug 10 11:59 /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 4) libvirtd.log snippets: 2013-08-10 11:19:41.766+0000: 1103: debug : virDomainAttachDevice:9820 : dom=0x7f92f4003f20, (VM: name=dpk_BR_vm, uuid=9999017d-1278-4bfb-8129-62bded257399), xml=<disk device="disk" snapshot="no" type="file"> <source file="/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399"/> <target bus="virtio" dev="vdb"/> <serial>22224c45-6504-4ea1-bd24-12340017dd32</serial> <driver cache="none" error_policy="stop" io="threads" name="qemu" type="qcow2"/> </disk> 2013-08-10 11:19:41.766+0000: 1103: debug : qemuDomainObjBeginJobInternal:958 : Starting job: modify (async=none) 2013-08-10 11:19:41.766+0000: 1103: debug : virStorageFileGetMetadata:1007 : path=/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 format=9 uid=107 gid=107 probe=0 2013-08-10 11:19:41.766+0000: 1103: debug : virStorageFileGetMetadataRecurse:939 : path=/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 format=9 uid=107 gid=107 probe=0 2013-08-10 11:19:41.767+0000: 1103: debug : virStorageFileGetMetadataInternal:687 : path=/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399, fd=25, format=9 2013-08-10 11:19:41.770+0000: 1103: debug : virStorageFileGetMetadataRecurse:939 : path=/home/dpkshetty/libSM_disk/localstoragedomain/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 format=9 uid=107 gid=107 probe=0 2013-08-10 11:19:41.770+0000: 1103: debug : virStorageFileGetMetadataInternal:687 : path=/home/dpkshetty/libSM_disk/localstoragedomain/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399, fd=25, format=9 2013-08-10 11:19:41.770+0000: 1103: debug : qemuDomainPCIAddressGetNextSlot:1826 : Found free PCI slot 0000:00:05 2013-08-10 11:19:41.770+0000: 1103: debug : qemuDomainPCIAddressReserveSlot:1710 : Reserving PCI slot 0000:00:05.0 2013-08-10 11:19:41.770+0000: 1103: debug : qemuMonitorAddDrive:2756 : mon=0x7f92f0007830 drive=file=/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399,if=none,id=drive-virtio-disk1,format=qcow2,serial=22224c45-6504-4ea1-bd24-12340017dd32,cache=none,werror=stop,rerror=stop,aio=threads 2013-08-10 11:19:41.770+0000: 1103: debug : qemuMonitorSend:887 : QEMU_MONITOR_SEND_MSG: mon=0x7f92f0007830 msg={"execute":"human-monitor-command","arguments":{"command-line":"drive_add dummy file=/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399,if=none,id=drive-virtio-disk1,format=qcow2,serial=22224c45-6504-4ea1-bd24-12340017dd32,cache=none,werror=stop,rerror=stop,aio=threads"},"id":"libvirt-67"}^M fd=-1 2013-08-10 11:19:41.771+0000: 1091: debug : qemuMonitorIOWrite:453 : QEMU_MONITOR_IO_WRITE: mon=0x7f92f0007830 buf={"execute":"human-monitor-command","arguments":{"command-line":"drive_add dummy file=/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399,if=none,id=drive-virtio-disk1,format=qcow2,serial=22224c45-6504-4ea1-bd24-12340017dd32,cache=none,werror=stop,rerror=stop,aio=threads"},"id":"libvirt-67"}^M len=292 ret=292 errno=11 2013-08-10 11:19:41.772+0000: 1091: debug : qemuMonitorIOProcess:345 : QEMU_MONITOR_IO_PROCESS: mon=0x7f92f0007830 buf={"return": "could not open disk image /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399: Invalid argument\r\n", "id": "libvirt-67"}^M len=134 2013-08-10 11:19:41.772+0000: 1103: error : qemuMonitorTextAddDrive:2697 : operation failed: open disk image file failed 2013-08-10 11:19:41.773+0000: 1103: debug : qemuDomainObjEndJob:1070 : Stopping job: modify (async=none) --------------- Any hints on what could be the issues will help. I can try out few things, if someone could provide suggestions. thanx, deepak -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list [-- Attachment #2: Type: text/html, Size: 7849 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug 2013-08-16 13:22 ` [Qemu-devel] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug Deepak C Shetty @ 2013-08-20 14:43 ` Stefan Hajnoczi 2013-08-20 14:57 ` Daniel P. Berrange 0 siblings, 1 reply; 5+ messages in thread From: Stefan Hajnoczi @ 2013-08-20 14:43 UTC (permalink / raw) To: Deepak C Shetty; +Cc: qemu-devel On Fri, Aug 16, 2013 at 06:52:32PM +0530, Deepak C Shetty wrote: > 2) qemu-img info /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > image: /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > file format: qcow2 > virtual size: 3.8G (4096000000 bytes) > disk size: 196K > cluster_size: 65536 > backing file: > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > backing file format: qcow2 Good, QEMU can parse and read the file. > 3) ls -l > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > -r--r-----. 1 vdsm kvm 197120 Aug 10 11:59 > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 Read-only? > 4) libvirtd.log snippets: > > 2013-08-10 11:19:41.766+0000: 1103: debug : virDomainAttachDevice:9820 : > dom=0x7f92f4003f20, (VM: name=dpk_BR_vm, > uuid=9999017d-1278-4bfb-8129-62bded257399), xml=<disk device="disk" > snapshot="no" type="file"> > <source file="/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399"/> > <target bus="virtio" dev="vdb"/> > <serial>22224c45-6504-4ea1-bd24-12340017dd32</serial> > <driver cache="none" error_policy="stop" io="threads" > name="qemu" type="qcow2"/> > </disk> I see no read-only option. Does it work if you make the file read-write instead? ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug 2013-08-20 14:43 ` Stefan Hajnoczi @ 2013-08-20 14:57 ` Daniel P. Berrange 2013-08-21 9:03 ` Stefan Hajnoczi 0 siblings, 1 reply; 5+ messages in thread From: Daniel P. Berrange @ 2013-08-20 14:57 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Deepak C Shetty, qemu-devel On Tue, Aug 20, 2013 at 04:43:48PM +0200, Stefan Hajnoczi wrote: > On Fri, Aug 16, 2013 at 06:52:32PM +0530, Deepak C Shetty wrote: > > 2) qemu-img info /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > > image: /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > > file format: qcow2 > > virtual size: 3.8G (4096000000 bytes) > > disk size: 196K > > cluster_size: 65536 > > backing file: > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > backing file format: qcow2 > > Good, QEMU can parse and read the file. > > > 3) ls -l > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > -r--r-----. 1 vdsm kvm 197120 Aug 10 11:59 > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > Read-only? > > > 4) libvirtd.log snippets: > > > > 2013-08-10 11:19:41.766+0000: 1103: debug : virDomainAttachDevice:9820 : > > dom=0x7f92f4003f20, (VM: name=dpk_BR_vm, > > uuid=9999017d-1278-4bfb-8129-62bded257399), xml=<disk device="disk" > > snapshot="no" type="file"> > > <source file="/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399"/> > > <target bus="virtio" dev="vdb"/> > > <serial>22224c45-6504-4ea1-bd24-12340017dd32</serial> > > <driver cache="none" error_policy="stop" io="threads" > > name="qemu" type="qcow2"/> > > </disk> > > I see no read-only option. > > Does it work if you make the file read-write instead? FYI this was solved in libvir-list. The image file was on tmpfs, which does not support cache=none. We hit this so often it would be a huge help if QEMU reported a clearer error message then "Invalid Argument" when trying cache=none on tmpfs. 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] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug 2013-08-20 14:57 ` Daniel P. Berrange @ 2013-08-21 9:03 ` Stefan Hajnoczi 2013-08-21 9:08 ` Daniel P. Berrange 0 siblings, 1 reply; 5+ messages in thread From: Stefan Hajnoczi @ 2013-08-21 9:03 UTC (permalink / raw) To: Daniel P. Berrange; +Cc: Deepak C Shetty, qemu-devel On Tue, Aug 20, 2013 at 03:57:40PM +0100, Daniel P. Berrange wrote: > On Tue, Aug 20, 2013 at 04:43:48PM +0200, Stefan Hajnoczi wrote: > > On Fri, Aug 16, 2013 at 06:52:32PM +0530, Deepak C Shetty wrote: > > > 2) qemu-img info /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > > > image: /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > > > file format: qcow2 > > > virtual size: 3.8G (4096000000 bytes) > > > disk size: 196K > > > cluster_size: 65536 > > > backing file: > > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > > backing file format: qcow2 > > > > Good, QEMU can parse and read the file. > > > > > 3) ls -l > > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > > -r--r-----. 1 vdsm kvm 197120 Aug 10 11:59 > > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > > > Read-only? > > > > > 4) libvirtd.log snippets: > > > > > > 2013-08-10 11:19:41.766+0000: 1103: debug : virDomainAttachDevice:9820 : > > > dom=0x7f92f4003f20, (VM: name=dpk_BR_vm, > > > uuid=9999017d-1278-4bfb-8129-62bded257399), xml=<disk device="disk" > > > snapshot="no" type="file"> > > > <source file="/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399"/> > > > <target bus="virtio" dev="vdb"/> > > > <serial>22224c45-6504-4ea1-bd24-12340017dd32</serial> > > > <driver cache="none" error_policy="stop" io="threads" > > > name="qemu" type="qcow2"/> > > > </disk> > > > > I see no read-only option. > > > > Does it work if you make the file read-write instead? > > FYI this was solved in libvir-list. > > The image file was on tmpfs, which does not support cache=none. > > We hit this so often it would be a huge help if QEMU reported a > clearer error message then "Invalid Argument" when trying cache=none > on tmpfs. The kernel only tells us EINVAL but if this is a common issue we could add a tmpfs check and print advice (note that it's only advice because future kernel versions might lift this limitation of tmpfs). Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug 2013-08-21 9:03 ` Stefan Hajnoczi @ 2013-08-21 9:08 ` Daniel P. Berrange 0 siblings, 0 replies; 5+ messages in thread From: Daniel P. Berrange @ 2013-08-21 9:08 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Deepak C Shetty, qemu-devel On Wed, Aug 21, 2013 at 11:03:49AM +0200, Stefan Hajnoczi wrote: > On Tue, Aug 20, 2013 at 03:57:40PM +0100, Daniel P. Berrange wrote: > > On Tue, Aug 20, 2013 at 04:43:48PM +0200, Stefan Hajnoczi wrote: > > > On Fri, Aug 16, 2013 at 06:52:32PM +0530, Deepak C Shetty wrote: > > > > 2) qemu-img info /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > > > > image: /var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399 > > > > file format: qcow2 > > > > virtual size: 3.8G (4096000000 bytes) > > > > disk size: 196K > > > > cluster_size: 65536 > > > > backing file: > > > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > > > backing file format: qcow2 > > > > > > Good, QEMU can parse and read the file. > > > > > > > 3) ls -l > > > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > > > -r--r-----. 1 vdsm kvm 197120 Aug 10 11:59 > > > > /rhev/data-center/000065de-04b8-42e2-986c-2de664708be7/11112d24-4cda-4200-8f6d-a1d8362c70fd/images/22224c45-6504-4ea1-bd24-12340017dd32/3333017d-1278-4bfb-8129-62bded257399 > > > > > > Read-only? > > > > > > > 4) libvirtd.log snippets: > > > > > > > > 2013-08-10 11:19:41.766+0000: 1103: debug : virDomainAttachDevice:9820 : > > > > dom=0x7f92f4003f20, (VM: name=dpk_BR_vm, > > > > uuid=9999017d-1278-4bfb-8129-62bded257399), xml=<disk device="disk" > > > > snapshot="no" type="file"> > > > > <source file="/var/run/vdsm/3333017d-1278-4bfb-8129-62bded257399"/> > > > > <target bus="virtio" dev="vdb"/> > > > > <serial>22224c45-6504-4ea1-bd24-12340017dd32</serial> > > > > <driver cache="none" error_policy="stop" io="threads" > > > > name="qemu" type="qcow2"/> > > > > </disk> > > > > > > I see no read-only option. > > > > > > Does it work if you make the file read-write instead? > > > > FYI this was solved in libvir-list. > > > > The image file was on tmpfs, which does not support cache=none. > > > > We hit this so often it would be a huge help if QEMU reported a > > clearer error message then "Invalid Argument" when trying cache=none > > on tmpfs. > > The kernel only tells us EINVAL but if this is a common issue we could > add a tmpfs check and print advice (note that it's only advice because > future kernel versions might lift this limitation of tmpfs). Rather than checking for tmpfs, you could simply re-try the open() call without O_DIRECT. If that passes, then you can safely issue an error message saying that the filesystem doesn't support O_DIRECT. This will make it robust to other future filesystems which may also not do O_DIRECT 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
end of thread, other threads:[~2013-08-21 9:10 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <52062D34.1050804@linux.vnet.ibm.com> 2013-08-16 13:22 ` [Qemu-devel] Fwd: [libvirt] virDomainAttachDevice error during disk hotplug Deepak C Shetty 2013-08-20 14:43 ` Stefan Hajnoczi 2013-08-20 14:57 ` Daniel P. Berrange 2013-08-21 9:03 ` Stefan Hajnoczi 2013-08-21 9:08 ` Daniel P. Berrange
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).