Using VMware vSphere On-disk Metadata Analyzer to re-create missing partition tables on VMware ESXi
search cancel

Using VMware vSphere On-disk Metadata Analyzer to re-create missing partition tables on VMware ESXi

book

Article ID: 345233

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

This article explains steps to use the vSphere On-disk Metadata Analyzer (VOMA) to assist in the resolution of missing partition tables on devices which contain VMFS filesystems.

Note: The VOMA functionality detailed here is added to ESXi 5.5 in patch 04.

For more information on VMware ESXi 5.5 patch 04, see VMware ESXi 5.5, Patch Release ESXi550-201501001 (2099265).


Environment

VMware vSphere ESXi 6.5
VMware vSphere ESXi 5.5
VMware vSphere ESXi 6.0

Resolution

To analyze an existing storage device and recreate the partition table on an ESXi 5.5 patch 04 or later host:
 
  1. Run this voma command to analyze the storage device:

    # voma -m ptbl -f check -d <device>

    Note: The ESXi 5.5 P04 or later host must have access to the device(s) in question.

    You see output similar to:

    Running Partition table checker version 0.1 in check mode
    Phase 1: Checking device for valid primary GPT
    Phase 2: Checking device for a valid backup GPT
    Phase 3: Checking device for valid MBR table
    Phase 4: Searching for valid file system headers
    Detected valid LVM headers at offset 2097152
    Detected VMFS file system (labeled:'ACME') with UUID:xxxxxxxx-yyyyyyyy-zzzz-aaaaaaaaaaaa, Version 5:60
    Newly formatted VMFS5 file system detected
    Disk should have a GPT partition table with VMFS partition, start sector : 2048, end sector : 4294967262


    The key information in the preceding output are:

    Detected valid LVM headers at offset 2097152
    Detected VMFS file system (labeled:'ACME') with UUID:xxxxxxxx-yyyyyyyy-zzzz-aaaaaaaaaaaa, Version 5:60


    Note: Before you proceed, ensure that VOMA has detected a filesystem. Also, ensure the returned value matches the expected label (name) and UUID (if known).

    The next important information is:

    Disk should have a GPT partition table with VMFS partition, start sector : 2048, end sector : 4294967262

    VOMA assumes the partition looks like the preceding partition. You can then use the preceding start / end sector values to build your partedUtil command. For details on using partedUtil, see Using the partedUtil command line utility on ESXi and ESX (1036609).
     
  2. Create the partedUtil command to recreate the missing partition table:
    For example, with the preceding information this is the partedUtil command you create:

    # partedUtil setptbl "<device>" gpt "1 2048 4294967262 AA31E02A400F11DB9590000C2911D1B8 0"

    This creates a partition on the specified device.
    NOTE: Using VOMA to fix partition table issues is not a standard practice. Partition issues are addressed only through partedUtil   . 
  3. Use the partedUtil getptbl command to confirm that the new partition table state is reflected:

    # partedUtil getptbl <device>

    gpt
    #### ### ## #######
    1 2048 4294967262 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

     
  4. Rescan the storage subsystem to prompt ESXi to look for new filesystems. For details, see Performing a rescan of the storage on an ESX/ESXi host (1003988).


Additional Information

For related information, see Using vSphere On-disk Metadata Analyzer (VOMA) to check VMFS metadata consistency (2036767)
Performing a rescan of the storage on an ESX/ESXi host
Using the partedUtil command line utility on ESXi and ESX
Using vSphere On-disk Metadata Analyzer (VOMA) to check VMFS metadata consistency
使用 VMware vSphere On-disk Metadata Analyzer 重新创建 VMware ESXi 上缺失的分区表