Search the VMware Knowledge Base (KB)
View by Article ID

How to manually remove and recreate a vSAN disk group using esxcli (2150567)

  • 0 Ratings


This article provides steps to manually remove and recreate a vSAN disk group using the ESX Command Line Interface (esxcli). This is applicable when vCenter Server is inaccessible or an error in the vSphere Web Client prevents your from accessing disk group management.


To remove and recreate a disk group using esxcli commands:

Note: These steps can be data destructive if not followed carefully.
  1. Log in to the ESXi host that owns the disk group as the root user using SSH.
  2. Run this one of these commands to put the host in Maintenance mode. There are 3 options:

    : VMware recommends using the ensureObjectAccessibility option. Failure to use this ensureObjectAccessibility mode or evacuateAllData mode may result in data loss.

    • Recommended:
      • Ensure accessibility of data:
        esxcli system maintenanceMode set --enable true -m ensureObjectAccessibility
      • Evacuate data:
        esxcli system maintenanceMode set --enable true -m evacuateAllData 

    • Not recommended
      • Don't evacuate data:
        esxcli system maintenanceMode set --enable true -m noAction 

  3. Record the cache and capacity disk ids in the existing group by running this command:
    esxcli vsan storage list

    Example output of a capacity tier device:
       Device: naa.123456XXXXXXXXXXX
       Display Name: naa.123456XXXXXXXXXXX
       Is SSD: true
       VSAN UUID: 52164f1b-668b-ec68-b293-919b04e78fa3
       VSAN Disk Group UUID: 52ab175f-17c6-6f42-e10a-ca86fc1d008e
       VSAN Disk Group Name: naa.50000XXXXX1245
       Used by this host: true
       In CMMDS: true
       On-disk format version: 5
       Deduplication: true
       Compression: true
       Checksum: 5356031598619392290
       Checksum OK: true
       Is Capacity Tier: true
       Encryption: false
       DiskKeyLoaded: false 

    Note: For a cache disk:
    • the VSAN UUID and VSAN Disk Group UUID fields will match 
    • Output will report: Is Capacity Tier: false

  4. Then remove the disk group

    esxcli vsan storage remove -u uuid

    Note: Always double check the disk group UUID with the command:
    esxcli vsan storage list

  5. If you have replaced physical disks, see the Additional Information section.

  6. Create the disk group, using this command:
    esxcli vsan storage add -s naa.xxxxxx -d naa.xxxxxxx -d naa.xxxxxxxxxx -d naa.xxxxxxxxxxxx

    Where naa.xxxxxx is the NAA ID of the disk device and the disk devices are identified as per these options:

    • -s indicates an SSD.
    • -d indicates a capacity  disk.

  7. Run the esxcli vsan storage list command to see the new disk group and verify that all disks are reporting True in CMMDS output.

Additional Information

If you are replacing physical disks, these additional steps are required:
  1. Add the disk back to the disk group and power on the host again, either physically or through a management console.

    When you adding a new disk to disk group you must reboot the host so that the HBA scans and presents the disk for use.

    • Ensure the host is in maintenance mode as detailed in the Resolution section step 2, before triggering a power off or performing any host maintenance
    • vSAN disks are not hot swappable. Before shutting down the host, add the drive physically and run this command:
      esxcli system shutdown poweroff -r Scheduled

  2. Log in to the host a root user using SSH.
  3. Verify that all disks are presented through the controller by running this command:

    vdq -q

    Lists all the disks naa.xxxxx and tags for the SSD disk and capacity disk.

  4. Tag the disk for the appropriate new capacity disk by running this command:
    esxcli vsan storage tag add -d naa.xxxxxx 

  5. Tag the SSD disk as Cache disk by running this command.
    esxcli vsan storage tag add -s t10.NVMe____INTEL_SSDPEDMD800G4_____ 
    Note: Make a note of exact name from the vdq -q command output

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.


  • 0 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)

Please enter the Captcha code before clicking Submit.
  • 0 Ratings