Troubleshooting the Add Storage Wizard error: Unable to read partition information from this disk
search cancel

Troubleshooting the Add Storage Wizard error: Unable to read partition information from this disk

book

Article ID: 308976

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction



Symptoms:
  • The vSphere Client or VI Client's Add Storage Wizard:

    • Fails to format a disk with a new VMFS Datastore.
    • Displays a blank value for the free space column in the list of available devices.
    • Times out while obtaining a list of available devices.

  • Rescan and host boot operations experience long delays (40 - 120 seconds) for each LUN with an EFI GPT partition.

  • You see one of these errors:

    • Unable to read partition information from this disk
    • The hard disk is blank.
    • Error during the configuration of the host: Failed to update disk partition information.

  • Adding a LUN using the Add Storage wizard fails with the error:

    Call "HostDatastoreSystem.QueryVmfsDatastoreCreateOptions" for object "datastoreSystem-xxxx" on vCenter Server "VC FQDN" failed.

  • In the hostd management agent logs, you see entries similar to:

    'Partitionsvc' 21990320 info] InvokePartedUtil /sbin/partedUtil

    'Partitionsvc' 21990320 warning] Unable to get partition information for /vmfs/devices/disks/vml.0200030000600508b30093fcf0a05b5b8cc739002f4d5341313531

    'Partitionsvc' 21990320 warning] Status : 255
    Output:
    Error : Warning: /vmfs/devices/disks/vml.0200030000600508b30093fcf0a05b5b8cc739002f4d5341313531 contains GPT signatures, indicating that it has a GPT table. However, it does not have a valid fake msdos partition table, as it should. Perhaps it was corrupted - possibly by a program that doesn't understand GPT partition tables. Or perhaps you deleted the GPT table, and are now using an msdos partition table. Is this a GPT partition table?
    Error: The primary GPT table is corrupt, but the backup appears ok, so that will be used.
    A bug has been detected in GNU parted. Please email a bug report [email protected] version (1.6.3) and the following message:Assertion (last_usable <= disk->dev->length) at disk_gpt.c:480 in function _parse_header() failed.

    Unable to read partition table for device /vmfs/devices/disks/vml.0200030000600508b30093fcf0a05b5b8cc739002f4d5341313531

  • Running the fdisk -lu /vmfs/devices/disks/DeviceName command fails with the error:

    Disk /vmfs/devices/disks/DeviceName doesn't contain a valid partition table

  • In the hostd.log file, you see entries similar to:

    [2013-01-25 13:23:08.868 FFBF1EF0 info 'Partitionsvc' opID=9E5C7F98-0000046B-31] Error Stream from partedUtil while getting partitions for /vmfs/devices/disks/naa.60000970000292601341533030433233: Warning: The disk CHS geometry (33234,255,63) reported by the operating system does not match the geometry stored on the disk label (34760,120,128).

  • Running the partedUtil get /vmfs/devices/disks/DeviceName command reports the warning:

    Warning: The disk CHS geometry (33234,255,63) reported by the operating system does not match the geometry stored on the disk label (34760,120,128).
    34760 120 128 533913600


Environment

VMware ESXi 4.1.x Embedded
VMware vSphere ESXi 5.5
VMware ESX Server 3.5.x
VMware ESX 4.0.x
VMware ESX Server 3.0.x
VMware vSphere ESXi 5.1
VMware ESXi 4.0.x Embedded
VMware ESX 4.1.x
VMware ESXi 4.1.x Installable
VMware ESXi 3.5.x Installable
VMware vSphere ESXi 5.0
VMware ESXi 4.0.x Installable
VMware ESXi 3.5.x Embedded

Cause

This issue is caused when the ESX/ESXi host is unable to create a datastore due to the LUN containing an existing non-msdos partition table (that is, the LUN is being reused).

There are several different partitioning schemes that can be created. Each has a corresponding 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/ESXi. Trying to create a volume using the Add Storage wizard fails unless the volume contains an msdos partition table, or if there is no partition table at all. Any other kind of partition is left unchanged.

Notes:

  • Similar symptoms have been observed when a LUN which is greater than 2 terabytes is presented to an ESX/ESXi host. For more information, see ESX/ESXi 3.x/4.x hosts do not support 2-terabyte LUNs (3371739).
  • If the LUN was used by another operating system, such as Windows or Linux, ensure that the LUN is being presented correctly for an ESX/ESXi 4.x host.

Resolution

Checking for non-msdos disklabels and non-GPT partition table layouts

To validate whether the target disk device contains an unsupported partition table layout:

  1. Open a console to the ESX or ESXi host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

  2. Identify the disk device in question from the log messages. For more information, see Identifying disks when working with VMware ESX (1014953).

    For example:

    /vmfs/devices/disks/vml.0200030000600508b30093fcf0a05b5b8cc739002f4d5341313531

  3. Use the fdisk command to display the current partition table on the device.

    Note: In ESXi 5.x, you must use partedUtil to get partition information. For more information, see Using the partedUtil command line utility on ESXi and ESX (1036609)

    Using fdisk, run the command:

    # fdisk -l "/vmfs/devices/disks/DeviceName"

    The output appears similar to:

    Disk /vmfs/devices/disks/DeviceName: 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
    /vmfs/devices/disks/DeviceName 1 66 524287+ ee EFI GPT


  4. Make note of the Id and System values (highlighted in red). Depending on the value of these fields, the ESX/ESXi host may not be able to understand the contents of the disk device, and refuse to make any changes. To allow the host to make any modifications to this volume, the volume must have an msdos partition or no partition at all.

Changing the partition type in the ESX Service Console using the parted utility

The command line utility parted can be used in the ESX Service Console to change the disk label and partitioning scheme for a specific device.

Warning: This process will destroy data on the target device. The steps outlined here are potentially hazardous for your environment if they are not followed exactly. If you are not comfortable performing these steps, contact VMware Technical Support and work with them to resolve the issue.

To change the label and partitioning scheme using parted:

  1. Open a console to the ESX or ESXi host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

  2. Identify the disk device in question from the log messages. For more information, see Identifying disks when working with VMware ESX (1014953). For example:

    /vmfs/devices/disks/vml.0200030000600508b30093fcf0a05b5b8cc739002f4d5341313531
  3. Start the parted utility, specifying the disk device to be modified from step 2, using the command:

    Note: In ESXi 5.x, you must use partedUtil to get partition information. For more information, see Using the partedUtil command line utility on ESXi and ESX (1036609).

    # parted "/vmfs/devices/disks/DeviceName"

  4. At the (parted) prompt, display the current partition contents:

    print

    The output appears similar to:

    Disk label type: gpt
    Number Start End Size File system Name Flags
    1 17.4kB 134MB 134MB Microsoft reserved partition msftres


  5. Review the output from the parted print command. Ensure that the disk device does not contain important information, either used by an ESX/ESXi host, a virtual machine as an RDM, or a physical server.

  6. To destroy all pre-existing partitions on the device and change the disk label, run the command:

    mklabel

    Caution: This operation deletes all pre-existing partitions on the device. The changes take effect immediately. This results in data loss and cannot be reverted.
  7. At the "New disk label type? [label]" prompt, enter the label:

    msdos

  8. Repeat step 4 to validate that the partition table is blank, and the disk label has been changed to msdos.

  9. Exit parted using the command:

    quit
  10. Retry the storage operation that was failing initially. If this method fails, use the dd utility instead.

Clearing partitioning information in ESXi using the DD utility

Due to differences between ESX classic and ESXi, the parted utility is not available in ESXi. These steps describe how to clear partitioning information for a LUN under ESXi.

Warning: This process will destroy data on the target device. The steps outlined here are potentially hazardous for your environment if they are not followed exactly. If you are not comfortable performing these steps, contact VMware Technical Support and work with them to resolve the issue.

  1. Open a console to the ESX or ESXi host. For more information, see Unable to connect to an ESX host using Secure Shell (SSH) (1003807) or Using Tech Support Mode in ESXi 4.1 and ESXi 5.x (1017910).

  2. Identify the disk device in question from the log messages. For more information, see Identifying disks when working with VMware ESX (1014953). For example:

    /vmfs/devices/disks/vml.0200030000600508b30093fcf0a05b5b8cc739002f4d5341313531
  3. Use the fdisk command to obtain the exact size of the target disk device in bytes:

    Note: In ESXi 5.x, you must use partedUtil to get partition information. For more information, see Using the partedUtil command line utility on ESXi and ESX (1036609).

    # fdisk -l "/vmfs/devices/disks/DeviceName"

    The output appears similar to:

    Disk /vmfs/devices/disks/DeviceName: 536 MB, 429491220480 bytes
    255 heads, 63 sectors/track, 52216 cylinders, total 838850040 sectors
    Units = sectors of 1 * 512 = 512 bytes

    Device Boot Start End Blocks Id System
    /vmfs/devices/disks/DeviceName 1 128838850039 419424956 ee EFI GPT

  4. Use the dd command to erase the first 34 sectors (34x512 bytes) of the disk device with zeros:

    # dd if=/dev/zero of="/vmfs/devices/disks/DeviceName" bs=512 count=34 conv=notrunc

    Caution: This operation deletes the partition table and master boot record on the disk device. The changes take effect immediately. This results in data loss and cannot be reverted.
  5. The GPT partition scheme stores a backup of the partition table at the end of the disk device. Erase the last 34 sectors of the device as well:

    1. Determine the offset at which the last 34 sectors begins:

      (SizeInBytes / 512) - 34 = SeekOffset

      For example, using the values in step 3:

      (429491220480 / 512) - 34 = 838850006

    2. Use the dd command to erase the last 34 sectors of the disk, starting at the offset found in step 5a:

      # dd if=/dev/zero of="/vmfs/devices/disks/DeviceName" bs=512 count=34 seek=SeekOffset conv=notrunc

      Caution: This operation deletes the partition table and master boot record on the disk device. The changes take effect immediately. This results in data loss and cannot be reverted.

  6. Depending on the original contents of the disk device, it may be necessary to erase a larger amount of data on the disk.

  7. Retry the storage operation.

Note: If your problem still exists after trying the steps in this article:

See also:



Additional Information

“THE CONTENT OF THIS ARTICLE IS PROVIDED "AS‐IS," AND TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, VMWARE DISCLAIMS ALL OTHER REPRESENTATIONS AND WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS CONTENT, INCLUDING THEIR FITNESS FOR A PARTICULAR PURPOSE, THEIR MERCHANTABILITY, OR THEIR NONINFRINGEMENT. VMWARE SHALL NOT BE LIABLE FOR ANY DAMAGES ARISING OUT OF OR IN CONNECTION WITH THE USE OF THIS CONTENT, INCLUDING DIRECT, INDIRECT, CONSEQUENTIAL DAMAGES, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF VMWARE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES."
Collecting diagnostic information in a VMware Virtual Infrastructure Environment
Unable to connect to an ESX host using Secure Shell (SSH)
Identifying disks when working with VMware ESXi/ESX
Using Tech Support Mode in ESXi 4.1, ESXi 5.x, and ESXi 6.x
Using the partedUtil command line utility on ESXi and ESX
Formatting a new LUN in ESXi 5.x fails with the error: No Implementation: Support for adding partitions to AIX disk labels is not implemented yet
Solución del error del asistente para agregar almacenamiento: Unable to read partition information from this disk
对“添加存储”向导的错误进行故障排除:无法读取此磁盘中的分区信息
次のストレージの追加ウィザード エラーのトラブルシューティング:このディスクからパーティション情報を読み取れません
ESX/ESXi 3.x/4.x hosts do not support 2-terabyte LUNs