Hide Forgot
The I/O status feature allows a management application to known which block device is on an error state when the VM enters into io-error state. This feature was developed in conjunction with the VM state feature (bug 617889) and was supposed to be backported at the same time. However, due to upstream delay and other problems, it was forgotten. The I/O status feature is implemented by upstream (qemu.git) commits: 449c184ed23c6238da7fcc8b965c8fcc865d72a9..d2078cc238ae30956f9ec74e656323e701937b4e.
There are three possible status: BDRV_IOS_OK (no error), BDRV_IOS_ENOSPC (no space error) and BDRV_IOS_FAILED (any other error). Three types of interface: virtio-blk-pci, ide, virtio-scsi. QMP command: {"execute": "query-block"} Steps: {"execute": "query-block"} --- Reproduced with qemu-kvm-0.12.1.2-2.209.el6.x86_64 Actual Result: No "io-status" returned by query-block. {"return": [{"device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} --- Verified with qemu-kvm-0.12.1.2-2.269.el6.x86_64 virtio-blk-pci: --------------- 1. BDRV_IOS_OK {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 2. BDRV_IOS_ENOSPC {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 3. BDRV_IOS_FAILED {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} CLI: ... -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop -device virtio-blk-pci,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait ide-drive: ---------- 1. BDRV_IOS_OK {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 2. BDRV_IOS_ENOSPC {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 3. BDRV_IOS_FAILED {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} CLI: ... -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop -device ide-drive,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait virtio-scsi(scsi-block,scsi-hd,scsi-disk): ------------------------------------------ 1. BDRV_IOS_OK {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "raw", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 2. BDRV_IOS_ENOSPC {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 3. BDRV_IOS_FAILED {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "raw", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} CLI: ... -device virtio-scsi-pci,id=scsi-pci -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop -device scsi-hd,bus=scsi-pci.0,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait usb-storage: ------------- 1. BDRV_IOS_OK {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "ok", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 2. BDRV_IOS_ENOSPC {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "nospace", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} 3. BDRV_IOS_FAILED {"return": [{"io-status": "ok", "device": "drive-virtio-disk0", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/home/RHEL6.3_20120304.n.0_x86_64_0308.qcow2"}, "type": "unknown"}, {"io-status": "failed", "device": "drive-virtio-disk1", "locked": false, "removable": false, "inserted": {"ro": false, "drv": "qcow2", "encrypted": false, "file": "/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1"}, "type": "unknown"}]} CLI: ... -drive file=/dev/disk/by-path/ip-10.66.11.212:3260-iscsi-bz740504-lun-1,if=none,id=drive-virtio-disk1,format=qcow2,cache=none,aio=native,serial=e4977805-a8f6-4854-98a0-edbd1ee9ed58,werror=stop,rerror=stop -device usb-storage,drive=drive-virtio-disk1,id=virtio-disk1 -qmp unix:/opt/monitor,server,nowait --- Conclusion: As per above, this issue has been fixed.
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: No documentation needed.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2012-0746.html