Bug 692426 - Large virtual disk (3TB) missing 2T when using ide-drive in windows guest
Summary: Large virtual disk (3TB) missing 2T when using ide-drive in windows guest
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: ---
Assignee: Vadim Rozenfeld
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-03-31 10:30 UTC by Shaolong Hu
Modified: 2013-01-09 23:43 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
There is a workaround for this problem: Using the guest's device manager: 1. Convert the disk to GPT, in order to see the 3TB. 2. Format the 3TB disk 3. Convert back to ide-drive, and you have a 3TB disk.
Clone Of:
Environment:
Last Closed: 2011-06-19 08:10:38 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Shaolong Hu 2011-03-31 10:30:18 UTC
Description of problem:
------------------------
Attach an additional 3TB disk to windows guest with -device ide-drive, in guest, only 1TB can be seen.


Version-Release number of selected component (if applicable):
--------------------------------------------------------------
host:
2.6.32-125.el6.x86_64
qemu-kvm-0.12.1.2-2.152.el6.x86_64

guest:
2003_r2_enterprise_x64_sp2


How reproducible:
------------------
100%


Steps to Reproduce:
-------------------
1. In host:
#qemu-img create -f qcow2 3TB.img 3T

2. Boot guest with
#qemu-kvm -M rhel6.1.0 -enable-kvm -m 4G -smp 4 -name win2003 -uuid `uuidgen` -drive file=win2003-64.qcow2,format=qcow2,if=none,cache=none,id=virtio-disk0,rerror=stop,werror=stop -device virtio-blk-pci,drive=virtio-disk0,id=virtio-disk0-device,bootindex=1 -netdev tap,script=/etc/qemu-ifup,vhost=on,id=net0 -device virtio-net-pci,netdev=net0 -monitor stdio -spice port=6000,disable-ticketing -boot dc -drive file=3TB.img,format=qcow2,id=ide-disk1,rerror=stop,werror=stop,cache=none,if=none -device ide-drive,drive=ide-disk1,id=ide-disk1-device,bootindex=2

3. In the guest, check disk information through device manager.
  

Actual results:
----------------
After step 3, only 1TB can been seen.


Expected results:
-----------------
There should be a disk which 2TB can be used, and 1TB cannot be used, and after convert to GPT disk, all 3TB can be used, as with -device virtio-blk-pci.


Additional info:
-----------------
1.When use -device virtio-blk-pci, there is a disk that 2TB can be used and 1TB cannot be used, after convert to GPT disk, all 3TB can be used.

2.Use -device virtio-blk-pci first, convert disk to GPT, get a 3TB disk, then switch to ide-drive, there is still only 1TB can be seen.

3.Use -device virtio-blk-pci first, convert disk to GPT, get a 3TB disk, format this 3TB disk, then switch to ide-drive, there is a 3TB disk which can be used correctly.

Comment 1 Shaolong Hu 2011-03-31 10:34:32 UTC
Find this when testing a case against bug 570162, for it does not specify how to attach this 3TB disk, i am not sure if this is a regression, file it anyway.

Comment 3 Dor Laor 2011-03-31 11:21:20 UTC
What's GTP disk?
What is going on with Linux guest?

Comment 4 Shaolong Hu 2011-03-31 11:47:14 UTC
(In reply to comment #3)
> What's GTP disk?

Hi Dor,

I think GPT stands for GUID Partition Table, is a standard for the layout of the partition table on a physical hard disk.

If boot guest with virtio-blk-pci, at default it's a MBR (Master Boot Record) disk, MBR disk is limited to 2TB, so the 3TB disk is split to 2TB usable and 1TB unusable, right click the disk icon in disk manager, choose "Convert to GPT", then a 3TB disk shows.

At this point, if you shut down guest without formating this disk, and switch to ide-drive, in guest there is still a 1TB disk, but it's GPT already.

Instead, if you format it, switch to ide-drive, you will get a 3TB disk which can be used.

> What is going on with Linux guest?

I will try it as soon as possible.

Comment 5 Vadim Rozenfeld 2011-03-31 12:34:08 UTC
Hi, Shaolong,

I'm trying to understand the situation,
so please help me to understand the problem.

You say you cannot create a huge (more than 2TB)
GTP partition on IDE.
But can use such kind of partition with IDE,
if was previously created and formatted 
on virtio. 
Am I right?

Thank you,
Vadim.

Comment 6 Shaolong Hu 2011-03-31 12:51:12 UTC
(In reply to comment #5)
> Hi, Shaolong,
> 
> I'm trying to understand the situation,
> so please help me to understand the problem.
> 
> You say you cannot create a huge (more than 2TB)
> GTP partition on IDE.

Hi Vadim,

With IDE, you can only see 1TB, but you can format this 1TB and use it, no matter if you boot with virtio first and convert the disk to GPT or let it MBR at default, as long as you don't convert to GPT meanwhile format it.

> But can use such kind of partition with IDE,
> if was previously created and formatted 
> on virtio. 
> Am I right?

Exactly.

> 
> Thank you,
> Vadim.

Comment 7 Vadim Rozenfeld 2011-03-31 13:18:29 UTC
(In reply to comment #6)
> (In reply to comment #5)
> > Hi, Shaolong,
> > 
> > I'm trying to understand the situation,
> > so please help me to understand the problem.
> > 
> > You say you cannot create a huge (more than 2TB)
> > GTP partition on IDE.
> 
> Hi Vadim,
> 
> With IDE, you can only see 1TB, but you can format this 1TB and use it, no
> matter if you boot with virtio first and convert the disk to GPT or let it MBR
> at default, as long as you don't convert to GPT meanwhile format it.
> 
> > But can use such kind of partition with IDE,
> > if was previously created and formatted 
> > on virtio. 
> > Am I right?
> 
> Exactly.
I see, thank you for clarifying the matter.
Vadim.

> 
> > 
> > Thank you,
> > Vadim.

Comment 8 Shaolong Hu 2011-04-01 03:29:04 UTC
(In reply to comment #3)
> What's GTP disk?
> What is going on with Linux guest?

3TB disk works fine in linux guest both with ide and virtio.

Comment 13 Ronen Hod 2011-06-19 08:10:38 UTC
Closed for the following reasons:
1. It only applies to 2003-R2 (and XP)
2. There is a workaround for the problem.
3. 3TB partitions are not very common.
The workaround is documented in the "Technical Notes".

Comment 14 Ronen Hod 2011-06-19 08:10:39 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
There is a workaround for this problem:
Using the guest's device manager:
1. Convert the disk to GPT, in order to see the 3TB. 
2. Format the 3TB disk
3. Convert back to ide-drive, and you have a 3TB disk.


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