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 825144 - [virtio-win][viostor] fail to shrink the used data image size as we expected
Summary: [virtio-win][viostor] fail to shrink the used data image size as we expected
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:41 UTC by Sibiao Luo
Modified: 2012-07-17 14:14 UTC (History)
12 users (show)

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


Attachments (Terms of Use)
after the step 5, we can see the data image size was still 15G via "Disk Management" dialog. (200.14 KB, image/png)
2012-05-25 08:46 UTC, Sibiao Luo
no flags Details

Description Sibiao Luo 2012-05-25 08:41:46 UTC
Description of problem:
attach a data image to the guest, and initalize and format this data disk in "Disk Management" dialog. and then, shrink the data image size, reboot the guest to find that fail to shrink the data image size as we expected. I will attach the screenshot of the windows guest info later.

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 image and check the size info.
# qemu-img create -f raw my_data_disk.raw 15G
Formatting 'my_data_disk.raw', fmt=raw size=16106127360
# qemu-img info my_data_disk.raw
image: my_data_disk.raw
file format: raw
virtual size: 15G (16106127360 bytes)
disk size: 0
2.start a windows guest with this data image.
3.initalize and format this data image in Disk Management dialog.
4.(qemu) block_resize data_drive 10G
5.reboot the guest and check the data image size.
6.check the iamge size info via qemu-img.

Actual results:
after the step 5, we can see the data image size was still 15G via "Disk Management" dialog.
but after the step 6, the image size wa shrink to 10G
# qemu-img info my_data_disk.raw
image: my_data_disk.raw
file format: raw
virtual size: 10G (10737418240 bytes)
disk size: 86M

Expected results:
the data image size was shrink to 10G correctly.

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 Sibiao Luo 2012-05-25 08:46:42 UTC
Created attachment 586803 [details]
after the step 5, we can see the data image size was still 15G via "Disk Management" dialog.

Comment 2 Vadim Rozenfeld 2012-05-31 21:29:31 UTC
What happens if you shrink the corresponding volume with Disk Management dialog tools, between steps 3 and 4?

Comment 3 Sibiao Luo 2012-06-01 01:59:31 UTC
(In reply to comment #2)
> What happens if you shrink the corresponding volume with Disk Management
> dialog tools, between steps 3 and 4?

Hi Vadim,

   If i shrink the corresponding volum with the Disk Managerment dialog tools, shrink the data_disk to 0 and restart the guest to take effect for example, QEMU prompts some error, and the guest hang at "Shutting down...".

(qemu) block_resize data_drive 0G
(qemu) block I/O error in device 'data_drive': Input/output error (5)

(qemu) info status 
VM status: paused (io-error)

Comment 4 Sibiao Luo 2012-06-01 02:05:00 UTC
(In reply to comment #3)
> (In reply to comment #2)

> Hi Vadim,
> 
>    If i shrink the corresponding volum with the Disk Managerment dialog
> tools, shrink the data_disk to 0 and restart the guest to take effect for
> example, QEMU prompts some error, and the guest hang at "Shutting down...".
> 
> (qemu) block_resize data_drive 0G
> (qemu) block I/O error in device 'data_drive': Input/output error (5)
> 
> (qemu) info status 
> VM status: paused (io-error)

and fail to resume it via monitor.
(qemu) cont
(qemu) block I/O error in device 'data_drive': Input/output error (5)

(qemu) info status 
VM status: paused (io-error)

Comment 5 Ronen Hod 2012-07-17 09:41:43 UTC
Probably the same issue as https://bugzilla.redhat.com/show_bug.cgi?id=825131#c2

Comment 6 Sibiao Luo 2012-07-17 10:41:57 UTC
(In reply to comment #2)
> 
(In reply to comment #5)
> Probably the same issue as
> https://bugzilla.redhat.com/show_bug.cgi?id=825131#c2

Hi Vadim and Ronen,

   Just as you said, I add one step re-sizing volume in Windows guest between steps 3 and 4, 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


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