To remove and recreate a disk group using esxcli commands:
- 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.
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:
- 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 will match
- Output will report: 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
- 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.
- Run the esxcli vsan storage list command to see the new disk group and verify that all disks are reporting True in the “in CMMDS:” field output.