The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Error while creating diskgroup.
search cancel

The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Error while creating diskgroup.

book

Article ID: 326520

calendar_today

Updated On: 12-04-2024

Products

VMware vSAN

Issue/Introduction

Symptoms:

  • Erasing disk partitions via the web client for SSDs or HDDs fails with the error similar to error:

"Failed to retrieve data from the server" Unable to see the HDD or SSD while creating a diskgroup.

  • You will fail to add the drives to vSAN DG after Modifying the RAID configuration for HDD and SSD.

  • You will see the entries similar to:

partedUtil getptbl /vmfs/devices/disks/naa.6005076040ab39f01f3e8357120d0a8b

Error: The primary GPT table states that the backup GPT is located beyond the end of disk. This may happen if the disk has shrunk or partition table is corrupted. Fix, by writing backup table at the end? This will also fix the last usable sector appropriately as per the new reduced size. diskPath (/dev/disks/naa.6005076040ab39f01f3e8357120d0a8b) diskSize (936640512) AlternateLBA (937703087) LastUsableLBA (937703054)
Warning: The available space to /dev/disks/naa.6005076040ab39f01f3e8357120d0a8b appears to have shrunk. This may happen if the disk size has reduced. The space has been reduced by (1062576 blocks). You can fix the GPT to correct the available space or continue with the current settings ? This will also move the backup table at the end if it is not at the end already. diskSize (936640512) AlternateLBA (937703087) LastUsableLBA (937703054) NewLastUsableLBA (936640478)
Error: Can't have a partition outside the disk!
Unable to read partition table for device /vmfs/devices/disks/naa.6005076040ab39f01f3e8357120d0a8b

Note: The preceding log excerpts are only examples. Date, time, and environmental variables may vary depending on your environment.

Environment

VMware vSAN 7.0

VMware vSAN 8.0

Cause

This issue occurs if we have existing partitions on the drives or if the RAID0 pool created with two or more drives.

Resolution

NOTICE: The below steps would delete the existing partition table and format the drive. If you are experiencing this issue on a working vSAN cluster where the disk was in use, and If the above symptoms and issue matches, please contact Broadcom Support to investigate the issue. Please apply the below workaround ONLY if the host is brand new or empty and confirmed that the drive we are working on does not have any user data.

Workaround:

  1. Take putty session to ESXi host experiencing the disk issue.

  2. Put the host into maintenance mode using Ensure Accessibility.

  3. Identify and verify the drive with issues using the command below.

    partedUtil getptbl /vmfs/devices/disks/<naa.id>

    example: partedUtil getptbl /vmfs/devices/disks/naa.6005076040ab39f01f3e8357120d0a8b

  4. If the drive reports above symptoms, you can set the partition table to msdos using command below.

    partedUtil setptbl /vmfs/devices/disks/<naa id of affected drive> msdos

    example: partedUtil setptbl /vmfs/devices/disks/naa.5000c50023397a33 msdos

  5. Verify the drive partition table and make sure we do not see the errors which were observed earlier.

  6. Add the disk to disk group or create disk group using the drives.

Additional Information

Impact/Risks:

This process will delete the partition table, vSAN will no longer be able to access any of the data.
Be sure to follow VMware Data Safety Practices before proceeding.