Reuse Ex-vSAN Host, Remove vSAN configuration with esxcli

by Tommy Grot
2K views

Trying to re-use a previous VMware ESXi host, but the vSAN Disks are still claimed. No worries – Below we will walk you through how to remove the drives and get your disks back to rebuild your vSAN Cluster!

First run this command to check if the disks are apart of the vSAN Cluster

esxcli vsan storage list | grep naa

Once you run the esxcli vsan storage list | grep naa, then you will need to run the command below, to prevent that the automatic disk claim is disabled for this procedure.

esxcli vsan storage automode set --enabled false

Once the vSAN automatic disk claim command is completed, then you may remove vSAN Disk Group Names with the command below. Replace the (VSAN Disk Group Name) with your corresponding naa. ID.

esxcli vsan storage remove -s (VSAN Disk Group Name)

After all vSAN Drives have been removed from each ESXi host. Then you will want to verify that all the vSAN Disks no longer show up and you will want to run the same command as you did in the beginning.

If nothing shows up then you successful removed all vSAN Disks.

esxcli vsan storage list | grep naa

To finalize the removal of vSAN you will want the host to leave the vSAN Cluster so you will need to run this command.

esxcli vsan cluster leave

You will see a vSAN Clustering is not enabled on this host message.

Once you have completed all those steps, you will successfully see that all the SAS SSDs below are no longer claimed by vSAN. Now the ESXi host is ready for a fresh installation!

You may also like

2 comments

Dave March 16, 2022 - 1:51 PM

Issuing the command: esxcli vsan storage remove -s naa…
Results in: Unable to remove device: Disk mapping is not mounted on this host: naa….

Reply
Tommy Grot March 23, 2022 - 6:47 PM

Hi! What version of vSphere/vSAN are you running?

Have you tried:
esxcli vsan cluster leave
esxcli vsan cluster get

Then –
esxcli vsan storage remove –uuid

Reply

Leave a Comment