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 840458 - RFE - Virtio-scsi should support block_resize
Summary: RFE - Virtio-scsi should support block_resize
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kernel
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Paolo Bonzini
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 808660
Blocks: 833566
TreeView+ depends on / blocked
 
Reported: 2012-07-16 12:30 UTC by Paolo Bonzini
Modified: 2013-02-21 06:40 UTC (History)
13 users (show)

Fixed In Version: kernel-2.6.32-328.el6
Doc Type: Enhancement
Doc Text:
Clone Of: 808660
Environment:
Last Closed: 2013-02-21 06:40:15 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:0496 0 normal SHIPPED_LIVE Important: Red Hat Enterprise Linux 6 kernel update 2013-02-20 21:40:54 UTC

Description Paolo Bonzini 2012-07-16 12:30:42 UTC
+++ This bug was initially created as a clone of Bug #808660 +++

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:

--- Additional comment from pm-rhel on 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.

--- Additional comment from pm-rhel on 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 2 Jarod Wilson 2012-10-10 19:43:58 UTC
Patch(es) available on kernel-2.6.32-328.el6

Comment 5 Sibiao Luo 2012-10-11 08:31:19 UTC
I verify this issue on qemu-kvm-0.12.1.2-2.320.el6.x86_64 host.

host info:
# uname -r && rpm -q qemu-kvm
2.6.32-325.el6.x86_64
qemu-kvm-0.12.1.2-2.320.el6.x86_64

Steps:
1. create a RAW data image.
# qemu-img create -f raw my-data-disk.raw 5G
2. start guest with this image as data image.
<qemu-kvm-command-line>...-drive file=/home/my-data-disk.raw,if=none,id=data-disk,format=raw,cache=none,aio=native,media=disk,werror=stop,rerror=stop -device virtio-scsi-pci,id=scsi0 -device scsi-hd,bus=scsi0.0,drive=data-disk,id=sluo
3. enlarge the data disk to 10G.
(qemu) block_resize data-disk 10G
(QMP) {"execute": "qmp_capabilities"}
(QMP) { "execute": "block_resize", "arguments": { "device": "data-disk", "size": 10737418240 }}
4. check it in guest.
# echo 1 > /sys/block/sda/device/rescan
# fdisk -l | grep /dev/sda
Disk /dev/sda: 10.7 GB, 10737418240 bytes
5. shrink the data disk to 1G.
(qemu) block_resize data-disk 1G
(QMP) {"execute": "qmp_capabilities"}
(QMP) { "execute": "block_resize", "arguments": { "device": "data-disk", "size": 10737418240 }}
6. check it in guest.
# echo 1 > /sys/block/sda/device/rescan
# fdisk -l | grep /dev/sda

Results:
after the step 4,
# fdisk -l | grep /dev/sda
Disk /dev/sda: 10.7 GB, 10737418240 bytes
after the step 6,
# fdisk -l | grep /dev/sda
Disk /dev/sda: 1073 MB, 1073741824 bytes

Base on above, virtio-blk supports block_resize command, this issue has been fixed correctly. 

-----------------------------------------------------------------------

BTW,
(1).local file + virtio-scsi-pci + block_resize + 'echo 1 > /sys/block/sda/device/rescan' ---> 100% automatically discover for the guest, no need to reboot the guest.
(2).local file + virtio-blk-pci + block_resize ---> 100% automatically discover for the guest, no need to reboot the guest.

If didnot do 'echo 1 > /sys/block/sda/device/rescan' after block_resize, the guest cann't automatically discover the changes of disk at the most. 
But in my test, the guest will hang and cann't resume again form monitor, the QEMU will prompt that 'block I/O error in device 'data-disk': Input/output error (5)', the VM status: paused (io-error) from QEMU monitor.

Anyway, guest should not hang, i will open a new bug for tracking this issue. Please correct me if any mistake.

Best Regards.
sluo

Comment 6 Sibiao Luo 2012-10-11 08:35:18 UTC
(In reply to comment #5)
> I verify this issue on qemu-kvm-0.12.1.2-2.320.el6.x86_64 host.
> 
> host info:
> # uname -r && rpm -q qemu-kvm
> 2.6.32-325.el6.x86_64
> qemu-kvm-0.12.1.2-2.320.el6.x86_64
> 
Sorry, I will test this issue on the kernel-2.6.32-328.el6.

Comment 7 Sibiao Luo 2012-10-11 08:42:57 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > I verify this issue on qemu-kvm-0.12.1.2-2.320.el6.x86_64 host.
> > 
> > host info:
> > # uname -r && rpm -q qemu-kvm
> > 2.6.32-325.el6.x86_64
> > qemu-kvm-0.12.1.2-2.320.el6.x86_64
> > 
> Sorry, I will test this issue on the kernel-2.6.32-328.el6.

(In reply to comment #5)
> I verify this issue on qemu-kvm-0.12.1.2-2.320.el6.x86_64 host.
> 
> host info:
> # uname -r && rpm -q qemu-kvm
> 2.6.32-325.el6.x86_64
> qemu-kvm-0.12.1.2-2.320.el6.x86_64
> 
> Base on above, virtio-blk supports block_resize command, this issue has been
> fixed correctly. 

Please ignore my conclusion, this bug depends On: bug 808660. so, we should verify these bugs after both these bugs are fixed.

Best Regards.
sluo

Comment 8 Qunfang Zhang 2012-11-24 06:52:07 UTC
Verified pass according to: 
https://bugzilla.redhat.com/show_bug.cgi?id=808660#c7

Comment 10 errata-xmlrpc 2013-02-21 06:40:15 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.

http://rhn.redhat.com/errata/RHSA-2013-0496.html


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