VxRail: How to manually remove and re-create a vSAN disk group using esxcli commands
Summary: How to manually remove and re-create a vSAN disk group using esxcli.
Instructions
-
Log in to the ESXi host that owns the disk group as the root user using SSH.
-
Run one of these commands to put the host in Maintenance mode. There are three options:
Note: 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
- Ensure accessibility of data:
- Not recommended:
- Do not evacuate data:
esxcli system maintenanceMode set --enable true -m noAction
- Do not evacuate data:
- Recommended:
-
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:
naa.123456XXXXXXXXXXX: 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 match
- Output reports:
Is Capacity Tier: false
-
Then remove the disk group
esxcli vsan storage remove -u <VSAN Disk Group UUID>
Note: Always double check the disk group UUID with the command:
esxcli vsan storage list -
If you have replaced hard drives, see the Additional Information section.
-
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.xxxxxxis the NAA ID of the disk device, and the disk devices are identified as per these options:-sindicates an SSD.-dindicates a capacity disk.
-
Run the
esxcli vsan storage listcommand to see the new disk group and verify that all disks are reportingTruein the "in CMMDS:" field output.
Additional Information
Related VMware KB article:
https://knowledge.broadcom.com/external/article?legacyId=2150567
See this video: