VMware Cloud Community
bernard666
Contributor
Contributor

Physical 3TB GPT RDM corruption

ESXi 5.1

1x2TB physical disk

2x3TB physical disks

I have created a physical RDM mappings for each disk...

In Vsphere Configuration - Storage - Devices view, the 3 devices are listed, if I click on an entry the details are all correct - Parttiton format shows as GPT and a legacy MBR partition is shown in the partition list.

I fire up a server 2012 VM and attach the 3 disks to it - in Storage pools the 2TB disk shows fine, the 3TB disks show a capacity of 512b and 16.0EB of unaloccated space (EB is not a typo!)

now if I look at the disks in Vsphere again, the partition format for the 3TB disks shows as 'unknown' and there are no partitions shown.

checking the disks with gdisk shows that the gpt table has been corrupted.

I have zapped and recreated the partiton tables with gdisk, and checked with gparted that they work. I have also tried the same with partition magic on a windows machine, but same outcome, as soon as the virtual windows machine tries to access them, they corrupt.

If I delete and recreate a blank GPT table and mount the disks on a real win 2012 machine everything works fine, its only breaking when used with the RDM.

I reused the RDM file that I had working fine before, i have also made a new ESXi server amd recreated the RDM files, but still the same outcome.

I did have this working before, so I know that it should all work.

8 Replies
ssastry
VMware Employee
VMware Employee

Hi bernard666 ,

Thanks for reporting this issue. We are working on this issue.

We trying to reproduce the issue in-house with our setup.

What we have observed was all the RDM ( added in passthrough mode ) were partitioned into legacy MBR, with the partition format as GPT for the RDM before adding it to the VM. This happened with all the 3 RDM's.

Then we added the RDM's to the VM and checked the Output from UI as well backend.

As for now we are not able to reproduce the issue.

We are trying out with other options as well.

I had some queries,  It would be great if you can  help us in understanding the issue.

-> Which ESX release was used? Any update version?

-> What are the exact reproduction steps.

-> Was RAW Disk Partition done inside the VM(using disk management tool)  or In ESX( using partedUtil)  or both?

-> if Partition was done in ESX, then  When was the partition done before adding the RDM disk or after adding

-> If you can provide some error messages, or Screenshots then that would be helpful as well

We will revert back once we get any results.

0 Kudos
Drumboy444
Contributor
Contributor

I had the same problems, this is what I found, and how I got it to work partially.

I am using ESXI 5.1 and windows 2003 as my guest OS.  ( I want to be able to eventually purchase 2012 but for the moment all I have is 2003).  My 3TB drive is for my virtualized windows file server.  I successfully created a physical RDM for this disk.  ESXI sees the 3T disk just fine.  My guest was not seeing the drive with any available space, and if I booted the guest into gparted then I got the same issue as described above where I only had 512b and 16.0EB of unaloccated space.  If I booted into server 2003 I had 0b of available space.

I have got it to work somewhat.

I had to create GPT partitions instead of MBR.  Check out the following site

GPT vs MBR Disk Comparison

MBR partitions have a max size of 2TB.  My current 2TB drive I am using in the server is seen just fine in the guest OS.  It has multiple partitions of < 2TB and all show up just fine on the server and I can create new partitions at will.  As for my 3TB drive it was not seen by the Guest OS until I was able to create three GPT partitions.  I couldn't boot the Guest into gparted (had unallocated space error from above)  I had to boot the Host server into gparted before it would recognize the 3TB (actually about 2.78 TB).  Once I created those partitions, ESXI now in configuration -> Storage now does not show the 3TB anymore it says "unknown" for the partition type and does not show any of my partitions anymore.

Server 2003 (my guest) now sees the three partitions and their correct sizes.  Booting into gparted (from guest only) still does not see the partitions I can only see the partitions in gparted if I boot into it from the Host.  I am limited though.  I can't create new partitions from within server 2003 it does not see the full capacity of the drive so it only shows the usable partitions (the ones I created), I can't see the rest of the unpartitioned drive.  I have to create new partitions after booting the host into gparted.  I also cannot create an extended partition in any of the primary ones.

Maybe this has something to do with the fact that the guest boots according to BIOS and not UEFI, but EFI may only matter if it's a boot drive and not if it's a storage drive so I am not sure about this.

this might work if I can put files on those partitions remove the drive and plug it into another physical machine and have those partitions with files still show up then this setup will work for me at least until this problem is fixed or something else comes along.

http://www.petri.co.il/gpt-vs-mbr-based-disks.htm

0 Kudos
Digian
Contributor
Contributor

Hi, im battling almost an identical problem but with newer Esxi v5.5

Server 2012 R2 showing my 3 TB raw device map disk lun as 512 b capacity 16.0 eb unallocated.  I am already using GPT format so the 2 TB problem should be irrelevant (My disk is formatted as GPT single NTFS partition 2.73 TB) yet problem still exists.

Please see my post for screenshots. ESXi 5.5 rdm local storage 2tb limit ?

I think VMware really has a problem to fix here because lun capacity and allocated data are not being correctly returned from the disk.

I am not willing to risk corrupting all my data, would prefer raw device mapping to the slower alternative of wiping all my data, converting to vmdk and then re-formatting as NTFS anyway.  Raw device map ntfs should be faster than vmdk/ntfs if workable.

A painful experience so far ...

0 Kudos
colin1983
Contributor
Contributor

In esxi 5.5 u1 with the follow steps, i have the problem.

1.create a rdm physical mode vmdk file for 3T disk.

2.add the vmdk file to vm1.

3.power on vm1 , and the size is correct. then shutdown it.

4.add the same vmdk file to vm2.

then both in vm1 and vm2, the size is incorrect. even if recreate rdm vmdk file.

0 Kudos
michel1980
Contributor
Contributor

Hi,

I have encountered this problem also in the past.

Which device name are you using to map to your vmdk file?

When you list the disks with ls /dev/disks/ -l. You must use the vm1.xxxxxxx name and not the t.10ATA_____.


So your command will be:


vmkfstools -r /vmfs/devices/disks/vm1.0100000000202020202057442d5743433445324e5432443334574443205744 RDM-01.vmdk -a lsilogic


Michel.

0 Kudos
colin1983
Contributor
Contributor

It seems that vsphere 6 had resolve these problem.

0 Kudos
sludgeheaddf
Contributor
Contributor

The resolution is to upgrade VM hardware version to 10 (ESXi 5.5), add a SATA controller (limited to HW v10), add the raw device map to the SATA controller rather than the default LSI SAS. There appears to be some difference between manufacturers firmware and how the 512b sector emulation works.

coolspot18
Contributor
Contributor

sludgeheaddf​ Your suggest worked on ESXi 6.5 as well ... A 3TB SATA drive that was being mapped as a local RDM was only being displayed as ~748GB in Windows using the LSI SAS controller. Switching to the SATA controller shows the correct size.

Thanks!

0 Kudos