Bug 1345720

Summary: resize spapr-vscsi can't take effect without reboot guest
Product: Red Hat Enterprise Linux 7 Reporter: mazhang <mazhang>
Component: qemu-kvm-rhevAssignee: David Gibson <dgibson>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 7.3CC: knoel, mazhang, michen, qzhang, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-14 03:12:20 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:
Embargoed:

Description mazhang 2016-06-13 03:26:06 UTC
Description of problem:


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

Host:
3.10.0-422.el7.ppc64le
qemu-kvm-rhev-2.6.0-5.el7.ppc64le

Guest:
3.10.0-422.el7.ppc64le

How reproducible:
100%

Steps to Reproduce:
1. Create a data image.
qemu-img create -f qcow2 /usr/share/avocado/data/avocado-vt/images/stg.qcow2 10G

2. Boot guest:
/usr/libexec/qemu-kvm \
    -S  \
    -name 'avocado-vt-vm1'  \
    -sandbox off  \
    -machine pseries  \
    -nodefaults  \
    -vga std  \
    -chardev socket,id=qmp_id_qmpmonitor1,path=/var/tmp/avocado_C5WmRT/monitor-qmpmonitor1-20160612-224056-umwCjQbc,server,nowait \
    -mon chardev=qmp_id_qmpmonitor1,mode=control  \
    -chardev socket,id=qmp_id_catch_monitor,path=/var/tmp/avocado_C5WmRT/monitor-catch_monitor-20160612-224056-umwCjQbc,server,nowait \
    -mon chardev=qmp_id_catch_monitor,mode=control  \
    -chardev socket,id=serial_id_serial0,path=/var/tmp/avocado_C5WmRT/serial-serial0-20160612-224056-umwCjQbc,server,nowait \
    -device spapr-vty,reg=0x30000000,chardev=serial_id_serial0 \
    -device pci-ohci,id=usb1,bus=pci.0,addr=03 \
    -device spapr-vscsi,id=spapr_vscsi0 \
    -drive id=drive_image1,if=none,cache=none,snapshot=on,aio=threads,format=qcow2,file=/usr/share/avocado/data/avocado-vt/images/RHEL-Server-7.3-ppc64le.qcow2 \
    -device scsi-hd,id=image1,bus=spapr_vscsi0.0,drive=drive_image1 \
    -drive id=drive_stg,if=none,cache=none,snapshot=off,aio=native,format=qcow2,file=/usr/share/avocado/data/avocado-vt/images/stg.qcow2 \
    -device scsi-hd,id=stg,bus=spapr_vscsi0.0,drive=drive_stg,serial=TARGET_DISK0 \
    -device spapr-vlan,mac=9a:18:19:1a:1b:1c,id=idYicXEO,netdev=idgVafY3  \
    -netdev tap,id=idgVafY3 \
    -m 8192  \
    -smp 8,maxcpus=8,cores=4,threads=1,sockets=2 \
    -device usb-tablet,id=usb-tablet1,bus=usb1.0,port=1  \
    -vnc :0  \
    -rtc base=utc,clock=host  \
    -boot order=cdn,once=c,menu=off,strict=off \
    -enable-kvm \
    -monitor stdio \

3. Resize the data image.
{"QMP": {"version": {"qemu": {"micro": 0, "minor": 6, "major": 2}, "package": " (qemu-kvm-rhev-2.6.0-5.el7)"}, "capabilities": []}}
{"execute":"qmp_capabilities"}
{"return": {}}
{'execute': 'block_resize', 'arguments': {'device': 'drive_stg', 'size': 16106127360}, 'id': 'VBzqQMZY'}
{"return": {}, "id": "VBzqQMZY"}

4. Check the size of 'drive_stg' in guest.
# fdisk -l

Disk /dev/sdb: 10.7 GB, 10737418240 bytes, 20971520 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Actual results:
The size of 'drive_stg' in guest not update.
Reboot guest, the size will updated.

Disk /dev/sdb: 16.1 GB, 16106127360 bytes, 31457280 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Since spapr-vscsi is different from virtio, so not sure if this is a bug.
If this is expected, please help close this bug, we will update the test script, thanks!

Expected results:


Additional info:

Comment 2 David Gibson 2016-06-14 03:12:20 UTC
This looks like a duplicate of bug 1276985.

*** This bug has been marked as a duplicate of bug 1276985 ***