Troubleshooting a Unable read partition information from this disk error in the Add Storage wizard

Error:

  • Cannot use the Add Storage wizard to format a disk with a new VMFS Datastore.
  • The Wizard reports that it is unable to read the pre-existing partition table from the disk.
  • You receive the following error:

    Unable read partition information from this disk
Purpose:

This can be caused by an inability to read inforamtion from the start of the disk or because that information is in an unexpected format. This article deals with other pre-existing partition tables that ESX does not support.
There are several different partitioning schemes that can be used on a disk. Each has a corrosponding identifying disk label. Common labels include bsd, dvh, gpt, loop, mac, msdos, pc98 or sun. Of these, only the msdos label and partitioning scheme is used by ESX. This scheme allows for up to 4 Primary partitions or Extended partitions which contain Secondary partitions. The Add Storage wizard in the VI Client repartitions and formats a volume, but only if there is no other unsupported partitioning scheme already present on the disk.

The following is an example of a GUID Partition Table (GPT) as seen by ESX, when running fdisk in the Console operating system:

[root@esx root]# fdisk -l /dev/sdb

Disk /dev/sdb: 536 MB, 536870912 bytes
255 heads, 63 sectors/track, 65 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 66 524287+ ee EFI GPT

ESX neither removes or changes this partition table, as it is not in the understood msdos partition layout. To use this volume for VMFS, the partitioning scheme and disklabel needs to be changed to msdos. This removes the partitions, and all data on the volume is no longer be available.


Solution:

The command line utility parted can be used in the Console operating system to change the label and partitioning scheme.
Caution: This removes the pre-existing partition table, and any data on the volume is no longer be available. Ensure you are operating against the correct disk.
To change the label and partitioning scheme:
  1. Find the /dev/node for the disk from its vmhbaX:Y:Z notation on a given ESX host. Run the following command:

    [root@esx ~]# esxcfg-vmhbadevs -q
    On ESX 3.x: vmhba1:0:3 /dev/sdb
    On ESXi 3.x: vmhba1:0:3 /vmfs/devices/disks/naa.6001e4f02cc632001033b31a09de3611


  2. Start parted to analyze the existing partition. Print the existing partition information, taking note of the Partition Table, size, and name. Ensure this is the data intended to be removed. Run the following commands:

    [root@esx ~]# parted /dev/sdb
    GNU Parted 1.8.1
    Using /dev/sdb
    Welcome to GNU Parted! Type 'help' to view a list of commands.

    (parted) print
    Disk geometry for /dev/sdb: 0.000-512.000 megabytes
    Disk label type: gpt
    Number Start End Size File system Name Flags
    1 17.4kB 134MB 134MB Microsoft reserved partition msftres

  3. Change the partition table (disklabel) type to msdos. This deletes the pre-existing partitions. Print the partition table again to observe the changes. Quit parted. Run the following commands:

    (parted) mklabel msdos


    (parted) print
    Disk geometry for /dev/sdb: 0.000-512.000 megabytes
    Disk label type: msdos
    Minor Start End Type Filesystem Flags

    (parted) quit

  4. Return to the VI Client and use the Add Storage wizard again. Select the same LUN, create a new partition, and format it with a VMFS Datastore as normal.