RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 802752 - [virtio-scsi] after hot-unplug a virtio-scsi disk rescan scsi bus qemu reports I/O error
Summary: [virtio-scsi] after hot-unplug a virtio-scsi disk rescan scsi bus qemu repor...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: x86_64
OS: Linux
medium
high
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 769712 857935 889075
TreeView+ depends on / blocked
 
Reported: 2012-03-13 12:45 UTC by daiwei
Modified: 2013-01-10 00:46 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-19 03:53:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description daiwei 2012-03-13 12:45:34 UTC
Description of problem:

Boot guest with a data disk,then remove this data disk.Reboot guest or rescan scsi bus in guest, qemu will report "block I/O error in device '': No medium found (123)"


Version-Release number of selected component (if applicable):
# uname -r;rpm -q qemu-kvm
2.6.32-250.el6.x86_64
qemu-kvm-0.12.1.2-2.241.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.boot guest with a data disk
/usr/libexec/qemu-kvm -M rhel6.3.0 -enable-kvm -name RHEL-Server-6.3-64 -smp 2 -m 4G -uuid 4bbfae8f-0d08-41ad-926a-c7a7568d50f7 -boot menu=on -drive file=/home/rhel6.3-64.raw,if=none,id=drive-virtio-disk0,format=raw,cache=none,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=virtio-scsi-pci0,bus=pci.0,addr=0x5 -device scsi-hd,drive=drive-virtio-disk0,logical_block_size=512,physical_block_size=4096,scsi-id=0,lun=0,bootindex=1 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=44:37:E6:5E:A3:F2,bus=pci.0,addr=0x4,id=net0 -vnc :1 -balloon none -monitor stdio -usb -usbdevice tablet -drive file=/home/test.raw,if=none,id=testdisk -device virtio-scsi-pci,id=databus -device scsi-hd,drive=testdisk,scsi-id=0,lun=1
2.remove the data disk 
(qemu) __com.redhat_drive_del testdisk
3.reboot guest or rescan scsi bus in guest
  
Actual results:
1.qemu report block I/O error:
(qemu) block I/O error in device '': No medium found (123)
block I/O error in device '': No medium found (123)
block I/O error in device '': No medium found (123)
block I/O error in device '': No medium found (123)

2.in guest
# cat /var/log/messages |grep -i error|grep sdb
Mar 13 20:10:35 localhost kernel: end_request: I/O error, dev sdb, sector 0
Mar 13 20:10:35 localhost kernel: Buffer I/O error on device sdb, logical block 0
Mar 13 20:10:35 localhost kernel: end_request: I/O error, dev sdb, sector 0
Mar 13 20:10:35 localhost kernel: Buffer I/O error on device sdb, logical block 0


Expected results:
qemu should not report error
no error in guest's /var/log/messages

Additional info:
1.Data disk on different target/controller have the same results.
2.Remove controller(virtio-scsi-pci) no this issue.
  (qemu) device_del databus

Comment 2 Paolo Bonzini 2012-03-16 18:02:13 UTC
This is not a bug, the same happens if you do drive_del with an IDE or even virtio disk for example.  You also need to do device_del on the scsi-hd device.

Please test that libvirt does unplug correctly, however.

Comment 3 daiwei 2012-03-19 03:53:46 UTC
"-device scsi-hd,drive=testdisk,scsi-id=0,lun=1" also should have a ID like "-device scsi-hd,drive=testdisk,scsi-id=0,lun=1,id=datadisk",then can use device_del to delete scsi-hd device.

Thanks Paolo.


Note You need to log in before you can comment on or make changes to this bug.