Bug 824814

Summary: [virtio-win][viostor]Online enlarging data image size does not work
Product: Red Hat Enterprise Linux 6 Reporter: Sibiao Luo <sluo>
Component: virtio-winAssignee: Vadim Rozenfeld <vrozenfe>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.3CC: acathrow, bcao, bsarathy, chayang, dawu, dyasny, fyang, juzhang, michen, mkenneth, pbonzini, shu, sluo, virt-maint
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In the previous versions viostor driver didn't handle configuration change event properly. Which leads to the situation, when the fact that the relevant image was resized on-line left unattended by the driver. In the current version, the configuration change interrupt leads to bus reset sequence. And as a result, driver can recognize that media has been resized, and report this fact to the OS.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-21 10:38:43 UTC Type: Bug
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:    
Attachments:
Description Flags
Screenshot of Extend Volume. none

Description Sibiao Luo 2012-05-24 10:44:26 UTC
Description of problem:
we can do live resize raw/qcow2 formats(only for virtio block) non-system drive size on-line without reboot guest. but it fails for windows guest, every time we must reboot the windows guest, it should can automatically detect without reboot.

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_2008_r2_sp1_x64
# rpm -qa | grep virtio
virtio-win-1.5.1-1.el6.noarch

How reproducible:
100%

Steps to Reproduce:
1.create a rar format disk.
# qemu-img create -f raw my_data_disk.raw 15G
2.start a windows guest with this data disk.
# /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_x64 -uuid `uuidgen` -drive file=windows_2008_r2_sp1_x64.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 -vnc :1 -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=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
3.(qemu) block_resize data_drive 20G
4.check the data disk whether it increased via device manager.
5.reboot the guest and then check the data disk whether it increased.

Actual results:
after the step 4,
we cann't see the data disk size increase, where the guest fail to detect it automatically.
after the step 5,
we can see the data disk increased to 20G.

Expected results:
the guest can detect data disk size increased automatically without reboot guest.

Additional info:
I have tested this issue with the RHEL-6.3-Snapshot-5-20120523.1-x86_64 guest, it can detect data disk size increased automatically without reboot.

Comment 2 Vadim Rozenfeld 2012-05-24 12:02:22 UTC
Could you please check it on Win7?

I checked it on Win7/32 and didn't see any problem. After step 4 I can clearly see a new "Unallocated Partition" in Computer management -> Disk Management dialog. And then I can right-click on volume D in this dialog and extend disk volume.

Comment 3 Sibiao Luo 2012-05-25 05:24:33 UTC
(In reply to comment #2)
> Could you please check it on Win7?
> 
Hi Vadim,
 
   I have check it on indows_7_sp1_x64 and windows_7_sp1_x86, both of them cann't detect data disk size increased automatically,I didn't see the new "Unallocated Partition" in Computer management -> Disk Management dialog after i resize the disk. It must reboot the guest can take effect and can a new "Unallocated Partition". BTW, I have tested the rhel guest that it didn't have this issue.

Best wishes.
sluo

Comment 7 Sibiao Luo 2012-09-18 11:57:00 UTC
Created attachment 613989 [details]
Screenshot of Extend Volume.

Comment 8 Sibiao Luo 2012-09-18 11:59:37 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)

Hi Vadim,

It also hit this issue with virtio-scsi data disk interface, every time we must reboot the windows guest, it fail to automatically detect the new "Unallocated Partition" in 'Computer management -> Disk Management dialog' without reboot guest after resize the disk. 

When right hit the 'Extend Volume', but there is no any disk to be selected for extending the volume, you can refer to the attachment 613989 [details] for details.

BTW, for the rhel guest:

1.local file + virtio-blk-pci + block_resize---> 100% automatically discover by the linux guest with 'fdisk -l', no need to reboot the guest.

2.local file + virtio-scsi-pci + block_resize + 'echo 1 > /sys/block/sdX/device/rescan' ---> 100% automatically discover by the rhel guest with 'fdisk -l', no need to reboot the guest.

Best Regards.
sluo

Comment 10 Vadim Rozenfeld 2012-09-18 12:34:43 UTC
(In reply to comment #8)
> (In reply to comment #4)
> > (In reply to comment #3)
> > > (In reply to comment #2)
> 
> Hi Vadim,
> 
> It also hit this issue with virtio-scsi data disk interface, every time we
> must reboot the windows guest, it fail to automatically detect the new
> "Unallocated Partition" in 'Computer management -> Disk Management dialog'
> without reboot guest after resize the disk. 

Windows virtio-scsi driver doesn't have this mechanism at the moment.
You are welcome to open a new bug for virtio-scsi in RHEL 6.5 

> 
> When right hit the 'Extend Volume', but there is no any disk to be selected
> for extending the volume, you can refer to the attachment 613989 [details]
> for details.
> 
> BTW, for the rhel guest:
> 
> 1.local file + virtio-blk-pci + block_resize---> 100% automatically discover
> by the linux guest with 'fdisk -l', no need to reboot the guest.
> 
> 2.local file + virtio-scsi-pci + block_resize + 'echo 1 >
> /sys/block/sdX/device/rescan' ---> 100% automatically discover by the rhel
> guest with 'fdisk -l', no need to reboot the guest.
> 
I wish it works like that in Windows. We can re-size a disk on-line. But you need to enlarge or shrink the relevant partition manually.

Thank you, and
best regards,
Vadim.
  
> Best Regards.
> sluo

Comment 11 Mike Cao 2012-09-18 15:32:38 UTC
(In reply to comment #10)
> (In reply to comment #8)
> > (In reply to comment #4)
> > > (In reply to comment #3)
> > > > (In reply to comment #2)
> > 
> > Hi Vadim,
> > 
> > It also hit this issue with virtio-scsi data disk interface, every time we
> > must reboot the windows guest, it fail to automatically detect the new
> > "Unallocated Partition" in 'Computer management -> Disk Management dialog'
> > without reboot guest after resize the disk. 
> 
> Windows virtio-scsi driver doesn't have this mechanism at the moment.
> You are welcome to open a new bug for virtio-scsi in RHEL 6.5 
> 

+1 
sluo ,never use one bug to track two issues ,pls reopen new bug to track the new bug you found 

Mike

Comment 12 Sibiao Luo 2012-09-19 02:45:29 UTC
(In reply to comment #9)
> Which partition was re-sized - C:\ or E:\ ?
'E:\', just resize the data disk.
> What is the black stripe just after partition C:\ ?
the black stripe just after partition 'C:\' was a unallocated  partition(718M).

(In reply to comment #10)
(In reply to comment #11)
> > 
> > It also hit this issue with virtio-scsi data disk interface, every time we
> > must reboot the windows guest, it fail to automatically detect the new
> > "Unallocated Partition" in 'Computer management -> Disk Management dialog'
> > without reboot guest after resize the disk. 
> 
> Windows virtio-scsi driver doesn't have this mechanism at the moment.
> You are welcome to open a new bug for virtio-scsi in RHEL 6.5 
> 
> +1 
> sluo ,never use one bug to track two issues ,pls reopen new bug to track the
> new bug you found 
> 
Yes, new bug 858525, thanks for your kindly reminds.

> > 
> > When right hit the 'Extend Volume', but there is no any disk to be selected
> > for extending the volume, you can refer to the attachment 613989 [details]
> > for details.
> > 
> > BTW, for the rhel guest:
> > 
> > 1.local file + virtio-blk-pci + block_resize---> 100% automatically discover
> > by the linux guest with 'fdisk -l', no need to reboot the guest.
> > 
> > 2.local file + virtio-scsi-pci + block_resize + 'echo 1 >
> > /sys/block/sdX/device/rescan' ---> 100% automatically discover by the rhel
> > guest with 'fdisk -l', no need to reboot the guest.
> > 
> I wish it works like that in Windows. We can re-size a disk on-line. But you
> need to enlarge or shrink the relevant partition manually.
> 
yes, but the windows fail to automatically detect the new partition after online resize. when right hit the 'Extend Volume' trying to resize it manually, but there is no any disk to be selected for extending the volume.

Best Regards.
sluo

Comment 13 Vadim Rozenfeld 2012-10-09 08:32:03 UTC
Please try the latest drivers from build-40
http://download.devel.redhat.com/brewroot/packages/virtio-win-prewhql/0.1/40/win/virtio-win-prewhql-0.1.zip

Thank you,
Vadim.

Comment 14 Mike Cao 2012-10-12 07:59:20 UTC
sibiao luo

Pls help to verify this bug on the latest virtio-win-prewhql build 

Thanks,
Mike

Comment 15 Sibiao Luo 2012-10-12 08:07:24 UTC
(In reply to comment #14)
> sibiao luo
> 
> Pls help to verify this bug on the latest virtio-win-prewhql build 
> 

ok, no problem. I will do it as quicker as possible and update here.

Comment 16 Sibiao Luo 2012-10-12 09:11:17 UTC
I verify this issue with the same steps as Comment #0.

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

guest info:
guest name: windows_7_x64
virtio-win-prewhql-0.1-41

Steps:
1.create a raw format disk.
# qemu-img create -f raw my-data-disk.raw 5G
Formatting 'my-data-disk.raw', fmt=raw size=5368709120
2.start a windows guest with this data disk.
3.(qemu) block_resize data_drive 10G
4.check the data disk whether it increased via device manager.
5.extend the volume in guest manually.
6.shrink the disk and check it in host.
(qemu) block_resize data_drive 8G
# qemu-img info my-data-disk.raw
7.shrink the volume in guest manually.

Results:
after the step 4,
we can see a new unallocated disk (5.00GB), guest detect it automatically.
after the step 5,
Extend Volume...----> Selected the 5120MB disk1---->10GB Disk.
after the step 6,
# qemu-img info my-data-disk.raw
image: my-data-disk.raw
file format: raw
virtual size: 8.0G (8589934592 bytes)
after the step 7,
Shrink Volume...----> Enter the amount of space to shrink in MB: 2048---->Shrink---->8GB Disk

Base on above, this issue has been fixed correctly.

Best Regards.
sluo

Comment 17 Mike Cao 2012-10-12 09:35:35 UTC
Based on comment #16 ,move status to verified

Comment 19 errata-xmlrpc 2013-02-21 10:38:43 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/RHBA-2013-0441.html