Bug 1336310

Summary: virtio-scsi data-plane does not support block management QMP commands
Product: Red Hat Enterprise Linux 7 Reporter: Pei Zhang <pezhang>
Component: qemu-kvm-rhevAssignee: Fam Zheng <famz>
Status: CLOSED ERRATA QA Contact: FuXiangChun <xfu>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 7.3CC: chayang, juzhang, knoel, michen, pbonzini, virt-maint, xfu
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: qemu-kvm-rhev-2.6.0-10.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-07 21:09:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1339498    

Description Pei Zhang 2016-05-16 07:13:43 UTC
Description of problem:
virtio-scsi data-plane does not support block_resize.

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1.Boot guest with a data-plane disk
/usr/libexec/qemu-kvm -name rhel7.3 -machine pc-i440fx-rhel7.2.0,accel=kvm \
-cpu SandyBridge -m 2G -numa node \
-smp 4,sockets=2,cores=2,threads=1 \
-netdev tap,id=hostnet0 \
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=12:54:00:5c:88:61 \
-device qxl-vga,id=video0,ram_size=67108864,vram_size=67108864,vgamem_mb=16 \
-spice port=5901,addr=,disable-ticketing,image-compression=off,seamless-migration=on \
-monitor stdio \
-serial unix:/tmp/monitor,server,nowait \
-qmp tcp:0:5555,server,nowait \
-object iothread,id=iothread0 \
-drive file=/home/RHEL-Server-7.3-64-virtio-scsi.qcow2,if=none,id=drive-scsi-disk0,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi0,iothread=iothread0 \
-device scsi-hd,drive=drive-scsi-disk0,bus=scsi0.0,scsi-id=0,lun=0,id=scsi-disk0 \

2. Resize this disk, qemu prompt 'Device 'drive-scsi-disk1' is in use' .
{ "execute": "block_resize", "arguments": { "device": "drive-scsi-disk1", "size": 1073741824 } }
{"error": {"class": "GenericError", "desc": "Device 'drive-scsi-disk1' is in use"}}

Actual results:
{"error": {"class": "GenericError", "desc": "Device 'drive-scsi-disk1' is in use"}}

Expected results:
The disk with data-plan should be resized.

Additional info:

Comment 1 Pei Zhang 2016-05-16 07:18:56 UTC
Correction of step1(I missed the second data disk in the qemu commend line):  
-drive file=/home/data,if=none,id=drive-scsi-disk1,format=qcow2,cache=none,werror=stop,rerror=stop \
-device virtio-scsi-pci,id=scsi1,iothread=iothread0 \
-device scsi-hd,drive=drive-scsi-disk1,bus=scsi1.0,scsi-id=0,lun=0,id=scsi-disk1 \

Comment 2 Pei Zhang 2016-05-16 07:51:19 UTC
More info:
1. Can not find data-plane information from qemu help .
# /usr/libexec/qemu-kvm -device virtio-scsi,?

2. Can not find data-plane information of disk from qtree info. 
(qemu) info qtree

Comment 4 Fam Zheng 2016-05-18 09:15:14 UTC
This is about the op blockers that should be removed from virtio-scsi. Upstream patches:


Comment 6 Miroslav Rezanina 2016-06-28 13:00:15 UTC
Fix included in qemu-kvm-rhev-2.6.0-10.el7

Comment 8 Pei Zhang 2016-07-03 00:47:54 UTC

1.Boot guest with a data-plane disk(Same with step 1 in Description and Comment 1)

2. Check disk size before resize
# qemu-img info data
image: data
file format: qcow2
virtual size: 100M (104857600 bytes)
disk size: 196K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

3. Resize data disk
{ "execute": "block_resize", "arguments": { "device": "drive-scsi-disk1", "size": 1073741824 } }
{"return": {}}

# qemu-img info data
image: data
file format: qcow2
virtual size: 1.0G (1073741824 bytes)
disk size: 200K
cluster_size: 65536
Format specific information:
    compat: 1.1
    lazy refcounts: false
    refcount bits: 16
    corrupt: false

So this bug has been fixed well. Thank you.

Comment 10 errata-xmlrpc 2016-11-07 21:09:02 UTC
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.