Unable to create a datastore on a newly presented LUN. ""Failed to create VMFS datastore <datastore_name>- Failed to update disk partitions for /vmfs/devices/disks/naa.###""
search cancel

Unable to create a datastore on a newly presented LUN. ""Failed to create VMFS datastore <datastore_name>- Failed to update disk partitions for /vmfs/devices/disks/naa.###""

book

Article ID: 388073

calendar_today

Updated On:

Products

VMware vCenter Server VMware vSphere ESXi

Issue/Introduction

While creating a VMFS datastore on a newly presented LUN, creation task fails with the following error on the vCenter GUI:

"Failed to create VMFS datastore <datastore_name>- Failed to update disk partitions for /vmfs/devices/disks/naa.###"

Environment

VMware vSphere ESXi 7.#
VMware vSphere ESXi 8.#

Cause

  • This error occurs if the newly presented LUN already has a partition on it. 

  • To obtain a list of partitions defined on a block disk device use the command:

    partedUtil getptbl "/vmfs/devices/disks/DeviceName"


    For example:
    partedUtil getptbl /vmfs/devices/disks/naa.<ID>

    You see output similar to:
    gpt
    32635 255 63 524288000
    1 2048 524287966 AA############################B8 vmfs 0

    The above output shows that the device has an existing VMFS partition. 

Resolution

Confirm if the LUN is supposed to be a raw LUN with no data on it. 

To resolve this issue we need to erase the existing partition on the LUN. There are three options:

    1. Erase the partition on the LUN from vCenter GUI. Reference KB: Clear a Device Partition Table in the VMware Host Client

    2. Delete the existing partition using partedUtil command:

      1. To obtain a list of partitions on the LUN:

        partedUtil getptbl "/vmfs/devices/disks/DeviceName"

      2. To delete the partition, run this command:

        partedUtil delete "/vmfs/devices/disks/DeviceName" PartitionNumber

        Reference KB: Using partedUtil command line disk partitioning utility on ESXi

    3. Erase the partition from the storage end:

        1. Un-present the LUN from the esxi host.

        2. Format the LUN from the storage end to clear the existing partition.

    4. Validate there is no partition on the LUN using command:

      partedUtil getptbl "/vmfs/devices/disks/DeviceName"


      For example:
      partedUtil getptbl /vmfs/devices/disks/naa.<ID>

      You see output similar to:
      unknown
      13054 255 63 209715200

You should now be able to create the VMFS datastore without issues.