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 825131 - [virtio-win][viostor] Online shrink used data image size cause guest hang
Summary: [virtio-win][viostor] Online shrink used data image size cause guest hang
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-05-25 08:14 UTC by Sibiao Luo
Modified: 2012-07-18 08:10 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-07-17 14:15:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sibiao Luo 2012-05-25 08:14:05 UTC
Description of problem:
After increase the data image size, online shrink the used data image size cause guest hang. If the QMEU couldn't support re-size for the image which has been made file system, we need to handle this issue more gracefully, the QMEU can give some warning prompts. But the guest hang is not unacceptable, so i five a bug for this issue.

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-274.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
guest info:
guest name: windows_7_sp1_x86
WHQL driver: virtio-win-1.5.1-1

How reproducible:
100%

Steps to Reproduce:
1.create a raw format disk.
# qemu-img create -f raw my_data_disk.raw 15G
2.start a guest with this data disk.
3.initalize and format this data disk in Disk Management dialog.
4.(qemu) block_resize data_drive 20G
5.reboot the guest to take step 4 effect.
6.initalize and format the new "Unallocated Partition".
7.(qemu) block_resize data_drive 16G
 
Actual results:
after the step 7, the guest hang and QMEU prompts some error,
(qemu) block I/O error in device 'data_drive': Input/output error (5)
handle_dev_stop: stop
(qemu) info status 
VM status: paused (io-error)

Expected results:
The guest not hang, and the QMEU should give some warning prompts.

Additional info:
CLI: # /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu SandyBridge -enable-kvm -smp 2 -m 2G -usb -device usb-tablet,id=input0 -name windows_7_sp1_x86 -uuid `uuidgen` -drive file=windows_7_sp1_x86.qcow2,if=none,id=hd,format=qcow2,aio=native,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=hd,id=blk_image,scsi=off,bootindex=1 -netdev tap,script=/etc/qemu-ifup,id=netdev0 -device virtio-net-pci,netdev=netdev0,id=device-net0 -spice disable-ticketing,port=5931 -balloon none -device sga -chardev socket,id=serial0,path=/var/sluo,server,nowait -device isa-serial,chardev=serial0 -monitor unix:/tmp/monitor2,server,nowait -monitor stdio -drive file=/usr/share/virtio-win/virtio-win-1.5.1.iso,if=none,id=drive-ide0-0-3,werror=stop,rerror=stop,cache=none,format=raw,media=cdrom,readonly=on -device ide-drive,drive=drive-ide0-0-3,id=ide0-0-3,bus=ide.1,unit=1 -drive file=/usr/share/virtio-win/virtio-win-1.5.1.vfd,if=none,id=f1,format=raw,cache=none -global isa-fdc.driveA=f1 -drive file=my_data_disk.raw,if=none,id=data_drive,format=raw,aio=native,cache=none,werror=stop,rerror=stop -device virtio-blk-pci,drive=data_drive,id=blk_data

Comment 1 Vadim Rozenfeld 2012-07-10 08:13:56 UTC
(In reply to comment #0)
> Description of problem:
> After increase the data image size, online shrink the used data image size
> cause guest hang. If the QMEU couldn't support re-size for the image which
> has been made file system, we need to handle this issue more gracefully, the
> QMEU can give some warning prompts. But the guest hang is not unacceptable,
> so i five a bug for this issue.
> 
> Version-Release number of selected component (if applicable):
> host info:
> # uname -r && rpm -q qemu-kvm-rhev
> 2.6.32-274.el6.x86_64
> qemu-kvm-rhev-0.12.1.2-2.295.el6.x86_64
> guest info:
> guest name: windows_7_sp1_x86
> WHQL driver: virtio-win-1.5.1-1
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1.create a raw format disk.
> # qemu-img create -f raw my_data_disk.raw 15G
> 2.start a guest with this data disk.
> 3.initalize and format this data disk in Disk Management dialog.
> 4.(qemu) block_resize data_drive 20G
> 5.reboot the guest to take step 4 effect.
> 6.initalize and format the new "Unallocated Partition".
> 7.(qemu) block_resize data_drive 16G
>  
> Actual results:
> after the step 7, the guest hang and QMEU prompts some error,
> (qemu) block I/O error in device 'data_drive': Input/output error (5)
> handle_dev_stop: stop
> (qemu) info status 
> VM status: paused (io-error)
> 
> Expected results:
> The guest not hang, and the QMEU should give some warning prompts.
> 
> Additional info:
> CLI: # /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu SandyBridge -enable-kvm -smp
> 2 -m 2G -usb -device usb-tablet,id=input0 -name windows_7_sp1_x86 -uuid
> `uuidgen` -drive
> file=windows_7_sp1_x86.qcow2,if=none,id=hd,format=qcow2,aio=native,
> cache=none,werror=stop,rerror=stop -device
> virtio-blk-pci,drive=hd,id=blk_image,scsi=off,bootindex=1 -netdev
> tap,script=/etc/qemu-ifup,id=netdev0 -device
> virtio-net-pci,netdev=netdev0,id=device-net0 -spice
> disable-ticketing,port=5931 -balloon none -device sga -chardev
> socket,id=serial0,path=/var/sluo,server,nowait -device
> isa-serial,chardev=serial0 -monitor unix:/tmp/monitor2,server,nowait
> -monitor stdio -drive
> file=/usr/share/virtio-win/virtio-win-1.5.1.iso,if=none,id=drive-ide0-0-3,
> werror=stop,rerror=stop,cache=none,format=raw,media=cdrom,readonly=on
> -device ide-drive,drive=drive-ide0-0-3,id=ide0-0-3,bus=ide.1,unit=1 -drive
> file=/usr/share/virtio-win/virtio-win-1.5.1.vfd,if=none,id=f1,format=raw,
> cache=none -global isa-fdc.driveA=f1 -drive
> file=my_data_disk.raw,if=none,id=data_drive,format=raw,aio=native,cache=none,
> werror=stop,rerror=stop -device virtio-blk-pci,drive=data_drive,id=blk_data

we cannot shrink drive without shrinking volume first.
please try resizing volume between steps 6 and 7.

Comment 2 Ronen Hod 2012-07-17 09:40:39 UTC
Please do the following:
1. Shrink the partition and volume in Windows, and check that everything works
2. block_resize in qemu (but not bellow the volume size)
This is probably the same issue with bug 825144

Comment 3 Sibiao Luo 2012-07-17 10:39:53 UTC
(In reply to comment #1)
> (In reply to comment #0)
> we cannot shrink drive without shrinking volume first.
> please try resizing volume between steps 6 and 7.
(In reply to comment #2)
> Please do the following:
> 1. Shrink the partition and volume in Windows, and check that everything
> works
> 2. block_resize in qemu (but not bellow the volume size)
> This is probably the same issue with bug 825144

Hi Vadim and Ronen,

   Just as you said, I add one step re-sizing volume in Windows guest between steps 6 and 7, and check that everything works well, then block_resize in QEMU (but not bellow the volume size), it has no problem, the data image size can be online shrunk correctly. 

   Thanks for your kindly reminds.

Best wishes.
sluo

Comment 4 Vadim Rozenfeld 2012-07-18 08:10:58 UTC
Thank you, sluo.

I think that the above sequence is not so obvious and 
should be properly documented.

Cheers,
Vadim.


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