Bug 808660 - RFE - Virtio-scsi should support block_resize
RFE - Virtio-scsi should support block_resize
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm (Show other bugs)
6.3
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Paolo Bonzini
Virtualization Bugs
: FutureFeature
Depends On:
Blocks: 824814 833566 840458
  Show dependency treegraph
 
Reported: 2012-03-31 00:56 EDT by daiwei
Modified: 2013-02-21 02:33 EST (History)
12 users (show)

See Also:
Fixed In Version: qemu-kvm-0.12.1.2-2.325.el6
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 840458 (view as bug list)
Environment:
Last Closed: 2013-02-21 02:33:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description daiwei 2012-03-31 00:56:14 EDT
Description of problem:

block_resize is a useful command and virtio-blk supports this command. So, We QE think virtio-scsi also should support block_resize.


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


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 RHEL Product and Program Management 2012-07-10 04:14:31 EDT
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 2 RHEL Product and Program Management 2012-07-10 22:04:53 EDT
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
Comment 5 Shaolong Hu 2012-10-26 01:53:10 EDT
Verified on :

1. boot guest with:

/usr/libexec/qemu-kvm -enable-kvm -M rhel6.4.0 -m 4G -name rhel6.3-64 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=00:24:7E:11:22:33 -boot order=cd -monitor stdio -usb -device usb-tablet,id=input0 -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -vnc :10 -monitor tcp::1234,server,nowait -qmp tcp:0:5555,server,nowait -chardev socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/qmp,server,nowait -mon chardev=qmp_monitor_id_qmpmonitor1,mode=control -drive file=disk,if=none,format=qcow2,id=disk1   -device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=disk1,id=scsi1 -drive file=RHEL-Server-6.4-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0,bootindex=1

2. disk1 is a 10G qcow2 file, in guest "fdisk -l" shows /dev/sda size is 10G.

3. in qemu monitor:

(qemu) block_resize disk1 20G

4. reboot guest, "fdisk -l" shows /dev/sda size is 20G, on host, "qemu-img info disk1" shows disk1 virtual size is 20G.
Comment 6 Paolo Bonzini 2012-10-26 10:48:21 EDT
Not verified.  To verify this, ensure the guest has a recent-enough kernel (kernel-2.6.32-328.el6 or newer), and check that the resize appears in dmesg *as soon as block_resize completes*.

This will let you verify both this bug and bug 840458.
Comment 7 Qunfang Zhang 2012-11-24 01:49:59 EST
Reproduced on a rhel6.3 released host and guest.
kernel-2.6.32-279.el6.x86_64
qemu-kvm-0.12.1.2-2.295.el6.x86_64

1.Boot a guest with an virtio-scsi disk.
 /usr/libexec/qemu-kvm -enable-kvm -M rhel6.3.0 -m 2G -smp 2 -name rhel6.3-64 -rtc base=utc,clock=host,driftfix=slew -no-kvm-pit-reinjection -uuid 3f2ea5cd-3d29-48ff-aab2-23df1b6ae213 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0,mac=00:24:7E:11:22:33 -boot order=cd -monitor stdio -usb -device usb-tablet,id=input0 -chardev socket,id=s1,path=/tmp/s1,server,nowait -device isa-serial,chardev=s1 -vnc :10 -monitor tcp::1234,server,nowait -qmp tcp:0:5555,server,nowait -chardev socket,id=qmp_monitor_id_qmpmonitor1,path=/tmp/qmp,server,nowait -mon chardev=qmp_monitor_id_qmpmonitor1,mode=control -drive file=disk.qcow2,if=none,format=qcow2,id=disk1   -device virtio-scsi-pci,bus=pci.0,addr=0x5,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=disk1,id=scsi1 -drive file=RHEL-Server-6.3-64-virtio.qcow2,cache=none,if=none,rerror=stop,werror=stop,id=drive-virtio-disk0,format=qcow2 -device virtio-blk-pci,drive=drive-virtio-disk0,id=device-virtio-disk0,bootindex=1

2. (qemu)block_resize disk1 20G

Result: 
(1) fdisk -l inside guest shows no change. 
(2) dmesg in guest: no block resize related message appear.

Verified on: kernel-2.6.32-342.el6.x86_64 (both host and guest)
qemu-kvm-0.12.1.2-2.331.el6.x86_64

Result: 
After the above step 2:

[root@unused ~]# dmesg 
sd 2:0:0:0: [sda] 41943040 512-byte logical blocks: (21.4 GB/20.0 GiB)
sda: detected capacity change from 10737418240 to 21474836480
[root@unused ~]# 
[root@unused ~]# fdisk -l
.....
Disk /dev/sda: 21.5 GB, 21474836480 bytes
64 heads, 32 sectors/track, 20480 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Tested both raw and qcow2 format, both passed. 
So this bug is fixed.
Comment 9 errata-xmlrpc 2013-02-21 02:33:42 EST
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-2013-0527.html

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