Bug 840458
Summary: | RFE - Virtio-scsi should support block_resize | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Paolo Bonzini <pbonzini> |
Component: | kernel | Assignee: | Paolo Bonzini <pbonzini> |
Status: | CLOSED ERRATA | QA Contact: | Virtualization Bugs <virt-bugs> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.3 | CC: | acathrow, areis, bsarathy, dyasny, juzhang, michen, mkenneth, pbonzini, qzhang, shuang, sluo, virt-maint, wdai |
Target Milestone: | rc | Keywords: | FutureFeature |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | kernel-2.6.32-328.el6 | Doc Type: | Enhancement |
Doc Text: | Story Points: | --- | |
Clone Of: | 808660 | Environment: | |
Last Closed: | 2013-02-21 06:40:15 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 808660 | ||
Bug Blocks: | 833566 |
Description
Paolo Bonzini
2012-07-16 12:30:42 UTC
Patch(es) available on kernel-2.6.32-328.el6 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 Verified pass according to: https://bugzilla.redhat.com/show_bug.cgi?id=808660#c7 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 |