Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
+++ 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.
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
(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 #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
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