Short tip: Reset VSAN cluster

Especially when playing around with multiple vCenter and VSAN versions in a lab, it might be necessary to rebuild a VSAN cluster. In this scenario, it is sometimes also necessary to also reset the SSD and HDD drives used by VSAN. In my lab I'm often resetting the whole VSAN cluster to have a clear starting point - without any VSAN storage upgrades or the like.

For this, shell access to the particular ESXi nodes is activated for a short time. The following commands are executed to list and remove VSAN storage:

1# esxcli vsan storage list
2naa.xxx
3 Device: naa.xxx
4   Display Name: naa.xxx
5   Is SSD: true
6   VSAN UUID: xxx
7...
8
9# esxcli vsan storage remove naa.xxx

The partition tables should be empty again:

1# partedUtil get /dev/disks/naa.xxx

Afterwards, the VSAN cluster can be left:

1# esxcli vsan cluster leave

By the way - if you try to remove partitions of a storage device claimed by VSAN, the following error message is shown:

1# partedUtil delete /dev/disks/naa.xxx 1
2Error: Read-only file system during write on /dev/disks/naa.xxx
3Unable to delete partition 1 from device /dev/disks/naa.xxx

Translations: