Bug 858525 - [virtio-win][scsi] windows guest fail to automatically detect the new partition after online resize
[virtio-win][scsi] windows guest fail to automatically detect the new partiti...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: virtio-win (Show other bugs)
6.4
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Vadim Rozenfeld
Virtualization Bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-18 22:40 EDT by Sibiao Luo
Modified: 2013-11-21 18:59 EST (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Do not document. This is not a bug, but expected behaviour. For more information please see comment in Devel Whiteboard field.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-21 18:59:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sibiao Luo 2012-09-18 22:40:26 EDT
Description of problem:
this bug was separated from bug 824814. do live resize with virtio-scsi-pci on non-system disk, 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 data disk. 

Version-Release number of selected component (if applicable):
host info:
# uname -r && rpm -q qemu-kvm-rhev
2.6.32-303.el6.x86_64
qemu-kvm-rhev-0.12.1.2-2.311.el6.x86_64
guest info:
win7-64bit guest
virtio-win-prewhql-0.1-35

How reproducible:
100%

Steps to Reproduce:
1.create a rar format disk.
# qemu-img create -f raw my-data-disk.raw 5G
2.start a windows guest with this data disk on virtio-scsi-pci interface.
eg: <qemu-kvm-command-line>...-device virtio-scsi-pci,bus=pci.0,addr=0x6,id=scsi0 -drive file=/home/my-data-disk.raw,format=raw,if=none,id=scsi-disk,cache=none,werror=stop,rerror=stop,aio=native -device scsi-hd,drive=scsi-disk,bus=scsi0.0,id=hd-scsi
3.(qemu) block_resize scsi-disk 10G
4.check the data disk whether it increased via device manager.
5.reboot the guest and check it.
  
Actual results:
after the step 4,
it fail to automatically detect the new "Unallocated Partition" in 'Computer management -> Disk Management dialog' without reboot guest.
after the step 5,
we can see the new "Unallocated Partition" in 'Computer management -> Disk Management dialog', and we can enlarge the data disk partition manually via 'Extend Volume' successfully.

Expected results:
the windows guest can detect the new "Unallocated Partition" in 'Computer management -> Disk Management dialog' automatically without reboot the windows guest after resize the data disk.

Additional info:
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.
Comment 2 Ronen Hod 2012-10-02 06:36:39 EDT
SCSI does not support resize yet. Moving to 6.5.
Comment 3 Sibiao Luo 2012-10-12 07:42:58 EDT
Hi vrozenfe,

   This issue moving to 6.5, I donot know when the virtio-scsi support block_resize for virtio-win component? there are existing 'RFE - Virtio-scsi should support block_resize' bug for QEMU-KVM and kernel components, and just in ON_QA and POST status. Just as i disuse with Paolo in IRC that want to ask you whether need to open a RFE bug for virtio-win component for tracing the progress ?

Best wishes.
sluo
Comment 4 Vadim Rozenfeld 2012-10-12 09:22:30 EDT
(In reply to comment #3)
> Hi vrozenfe,
> 
>    This issue moving to 6.5, I donot know when the virtio-scsi support
> block_resize for virtio-win component? there are existing 'RFE - Virtio-scsi
> should support block_resize' bug for QEMU-KVM and kernel components, and
> just in ON_QA and POST status. Just as i disuse with Paolo in IRC that want
> to ask you whether need to open a RFE bug for virtio-win component for
> tracing the progress ?
> 
> Best wishes.
> sluo

I don't think we need to create another one bug. 824814 was a viostor (virtio blk) problem only, but now it is fixed and verified. The current bug was created to track Windows virtio-scsi driver problem, which is a separate issue, and not related to 824814.

Kind regards,
Vadim.
Comment 6 Vadim Rozenfeld 2013-03-31 09:17:12 EDT
should be fixed in build 58 
http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-prewhql-0.1.zip
Comment 7 Mike Cao 2013-04-01 02:22:04 EDT
(In reply to comment #6)
> should be fixed in build 58 
> http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> prewhql-0.1.zip

Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this issue
Comment 8 Mike Cao 2013-04-01 04:20:51 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > should be fixed in build 58 
> > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > prewhql-0.1.zip
> 
> Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> issue

Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)

Actual Results:
After block_resize ,We still need manually rescan to detect new partition

Based on above ,this issue does not be fixed already
Comment 9 Vadim Rozenfeld 2013-04-01 05:50:33 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > (In reply to comment #6)
> > > should be fixed in build 58 
> > > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > > prewhql-0.1.zip
> > 
> > Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> > issue
> 
> Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)
> 
> Actual Results:
> After block_resize ,We still need manually rescan to detect new partition
> 
> Based on above ,this issue does not be fixed already

Hi Mike
Do you mean that you cannot see changes in Disk Management dialog without rescan?
But if you rescan, or close and then open the Disk Management dialog, you can see the changes without reboot. If so, it is not a bug, Disk Management cannot detect a volume size change event automatically.
Comment 10 Mike Cao 2013-04-01 06:03:02 EDT
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> > > (In reply to comment #6)
> > > > should be fixed in build 58 
> > > > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > > > prewhql-0.1.zip
> > > 
> > > Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> > > issue
> > 
> > Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)
> > 
> > Actual Results:
> > After block_resize ,We still need manually rescan to detect new partition
> > 
> > Based on above ,this issue does not be fixed already
> 
> Hi Mike
> Do you mean that you cannot see changes in Disk Management dialog without
> rescan?
Yes .
> But if you rescan, or close and then open the Disk Management dialog, you
> can see the changes without reboot. If so, it is not a bug, Disk Management
> cannot detect a volume size change event automatically.
OK

BTW Do we support to shrink a FAT format disk ?
Comment 11 Vadim Rozenfeld 2013-04-01 06:21:29 EDT
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #8)
> > > (In reply to comment #7)
> > > > (In reply to comment #6)
> > > > > should be fixed in build 58 
> > > > > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > > > > prewhql-0.1.zip
> > > > 
> > > > Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> > > > issue
> > > 
> > > Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)
> > > 
> > > Actual Results:
> > > After block_resize ,We still need manually rescan to detect new partition
> > > 
> > > Based on above ,this issue does not be fixed already
> > 
> > Hi Mike
> > Do you mean that you cannot see changes in Disk Management dialog without
> > rescan?
> Yes .
> > But if you rescan, or close and then open the Disk Management dialog, you
> > can see the changes without reboot. If so, it is not a bug, Disk Management
> > cannot detect a volume size change event automatically.
> OK
> 
> BTW Do we support to shrink a FAT format disk ?

Hi Mike, 
As I said I'm not sure about shrinking. I remember I checked it once ans it worked. But now it seems to be blocked in QEMU (I'm trying to shrink 64G volume)


(qemu) info version 
0.12.1(qemu-kvm-devel)
(qemu) block_resize drive-scsi0-0-0 62G
this feature or command is not currently supported
(qemu) 

But enlarging a FAT formatted volume should work.

Best regards,
Vadim.
Comment 12 Mike Cao 2013-04-01 06:56:17 EDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #9)
> > > (In reply to comment #8)
> > > > (In reply to comment #7)
> > > > > (In reply to comment #6)
> > > > > > should be fixed in build 58 
> > > > > > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > > > > > prewhql-0.1.zip
> > > > > 
> > > > > Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> > > > > issue
> > > > 
> > > > Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)
> > > > 
> > > > Actual Results:
> > > > After block_resize ,We still need manually rescan to detect new partition
> > > > 
> > > > Based on above ,this issue does not be fixed already
> > > 
> > > Hi Mike
> > > Do you mean that you cannot see changes in Disk Management dialog without
> > > rescan?
> > Yes .
> > > But if you rescan, or close and then open the Disk Management dialog, you
> > > can see the changes without reboot. If so, it is not a bug, Disk Management
> > > cannot detect a volume size change event automatically.
> > OK
> > 
> > BTW Do we support to shrink a FAT format disk ?
> 
> Hi Mike, 
> As I said I'm not sure about shrinking. I remember I checked it once ans it
> worked. But now it seems to be blocked in QEMU (I'm trying to shrink 64G
> volume)
> 
> 
> (qemu) info version 
> 0.12.1(qemu-kvm-devel)
> (qemu) block_resize drive-scsi0-0-0 62G
> this feature or command is not currently supported
> (qemu) 
> 
> But enlarging a FAT formatted volume should work.
> 
> Best regards,
> Vadim.

Hi, Vadim
you must use qcow2 format image which only support extending 
Raw format image support both extending and shrinking .
I tried Raw disk w/o format it in the guest ,it shrinking successfully
Raw disk format w/ NFTS ,it shriking successfully ,but It can not use until format it 
Raw disk format as FAT ,it shrink failed 

Mike
Comment 13 Vadim Rozenfeld 2013-04-01 07:32:28 EDT
(In reply to comment #12)
> (In reply to comment #11)
> > (In reply to comment #10)
> > > (In reply to comment #9)
> > > > (In reply to comment #8)
> > > > > (In reply to comment #7)
> > > > > > (In reply to comment #6)
> > > > > > > should be fixed in build 58 
> > > > > > > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > > > > > > prewhql-0.1.zip
> > > > > > 
> > > > > > Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> > > > > > issue
> > > > > 
> > > > > Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)
> > > > > 
> > > > > Actual Results:
> > > > > After block_resize ,We still need manually rescan to detect new partition
> > > > > 
> > > > > Based on above ,this issue does not be fixed already
> > > > 
> > > > Hi Mike
> > > > Do you mean that you cannot see changes in Disk Management dialog without
> > > > rescan?
> > > Yes .
> > > > But if you rescan, or close and then open the Disk Management dialog, you
> > > > can see the changes without reboot. If so, it is not a bug, Disk Management
> > > > cannot detect a volume size change event automatically.
> > > OK
> > > 
> > > BTW Do we support to shrink a FAT format disk ?
> > 
> > Hi Mike, 
> > As I said I'm not sure about shrinking. I remember I checked it once ans it
> > worked. But now it seems to be blocked in QEMU (I'm trying to shrink 64G
> > volume)
> > 
> > 
> > (qemu) info version 
> > 0.12.1(qemu-kvm-devel)
> > (qemu) block_resize drive-scsi0-0-0 62G
> > this feature or command is not currently supported
> > (qemu) 
> > 
> > But enlarging a FAT formatted volume should work.
> > 
> > Best regards,
> > Vadim.
> 
> Hi, Vadim
> you must use qcow2 format image which only support extending 
> Raw format image support both extending and shrinking .

You must be right. It was raw.

> I tried Raw disk w/o format it in the guest ,it shrinking successfully
> Raw disk format w/ NFTS ,it shriking successfully ,but It can not use until
> format it 
Try defrag and shrink the volume first and only resize the disk itself.
Also, make that the volume size is not bigger than the new disk size. 
> Raw disk format as FAT ,it shrink failed 
> 

Is it a BSOD? What is the bugcheck code?

> Mike
Comment 14 Mike Cao 2013-04-01 08:33:58 EDT
(In reply to comment #13)
> (In reply to comment #12)
> > (In reply to comment #11)
> > > (In reply to comment #10)
> > > > (In reply to comment #9)
> > > > > (In reply to comment #8)
> > > > > > (In reply to comment #7)
> > > > > > > (In reply to comment #6)
> > > > > > > > should be fixed in build 58 
> > > > > > > > http://download.devel.redhat.com/brewroot/work/tasks/6819/5586819/virtio-win-
> > > > > > > > prewhql-0.1.zip
> > > > > > > 
> > > > > > > Failed to install virtio scsi driver in win2k8-32 guest ,Re-assigned this
> > > > > > > issue
> > > > > > 
> > > > > > Test this issue on virtio-win-prewhql-58 with qcow2 image (guest NTFS format)
> > > > > > 
> > > > > > Actual Results:
> > > > > > After block_resize ,We still need manually rescan to detect new partition
> > > > > > 
> > > > > > Based on above ,this issue does not be fixed already
> > > > > 
> > > > > Hi Mike
> > > > > Do you mean that you cannot see changes in Disk Management dialog without
> > > > > rescan?
> > > > Yes .
> > > > > But if you rescan, or close and then open the Disk Management dialog, you
> > > > > can see the changes without reboot. If so, it is not a bug, Disk Management
> > > > > cannot detect a volume size change event automatically.
> > > > OK
> > > > 
> > > > BTW Do we support to shrink a FAT format disk ?
> > > 
> > > Hi Mike, 
> > > As I said I'm not sure about shrinking. I remember I checked it once ans it
> > > worked. But now it seems to be blocked in QEMU (I'm trying to shrink 64G
> > > volume)
> > > 
> > > 
> > > (qemu) info version 
> > > 0.12.1(qemu-kvm-devel)
> > > (qemu) block_resize drive-scsi0-0-0 62G
> > > this feature or command is not currently supported
> > > (qemu) 
> > > 
> > > But enlarging a FAT formatted volume should work.
> > > 
> > > Best regards,
> > > Vadim.
> > 
> > Hi, Vadim
> > you must use qcow2 format image which only support extending 
> > Raw format image support both extending and shrinking .
> 
> You must be right. It was raw.
> 
> > I tried Raw disk w/o format it in the guest ,it shrinking successfully
> > Raw disk format w/ NFTS ,it shriking successfully ,but It can not use until
> > format it 
> Try defrag and shrink the volume first and only resize the disk itself.
> Also, make that the volume size is not bigger than the new disk size. 
> > Raw disk format as FAT ,it shrink failed 
> > 
> 
> Is it a BSOD? What is the bugcheck code?

No. it is a 4GB data image with FAT format ,I shrink it to 3GB size .
Tried qemu-img info test.img ,it shows the disk size is 3GB, but in the guest E:\(which is the partition of data image_ still shows 4GB), I copy 3.6GB file to E:\ when it reached 3GB ,in qemu-kvm monitor ,it should drive-ide-1-0 i/o error ,but guest still in running status (due to I did not add werror&rerror option),and at last I can finished the copying ,it shows the used size is 3.6GB and free size is 400MB
> 
> > Mike
Comment 15 Ronen Hod 2013-07-29 05:18:38 EDT
QE,
We suspect that FAT does not support resise. Can you check,
Postponing to 6.6
Comment 16 Mike Cao 2013-08-01 04:48:07 EDT
(In reply to Ronen Hod from comment #15)
> QE,
> We suspect that FAT does not support resise. Can you check,
> Postponing to 6.6

Hi,Ronen

it is supported .
Retest it on virtio-win-prewhql-66 with Raw format ,format it to FAT format then enlarge to 6GB in qemu monitor .We can see 2GB Unallocated Disk size in disk manager.

Tried to shrink disks to 2GB ,We can see the disk shrinked to 2GB in disk manager but the disk can *not* format 

Based on above there is some bugs in disk shrinking.I prefer to close this bug as fixed and report new bugs for the disk shrinking 

Based on above ,Move status to VERIFIED.
Comment 17 Vadim Rozenfeld 2013-10-22 04:21:44 EDT
moving to 6.6 since we still have unresolved build problem.
Comment 19 errata-xmlrpc 2013-11-21 18:59:39 EST
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-1729.html

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