Delete a vSAN Datastore after a failed VCSA Bootstrap Installation

So, I was recently deploying vCenter server appliance VCSA 6.7 while bootstrapping the installation onto one of the ESXi hosts. I faced an issue with the VCSA installation which left me with a vSAN datastore created on the target ESXi host. I wanted to delete the datastore prior attempting to re-install the VCSA appliance again but I couldn’t do that from the ESXi host UI.

In this post I want to show you how to delete a vSAN datastore if you face such scenario.

If you logon to the ESXi host, you can notice that the option to delete the vSAN datastore is dimmed out. CLI comes into rescue in this case.

SSH into your target ESXi host and list all the disk groups owned by this host by issuing this command “esxcli vsan storage list“.

Record the UUIDs for all the disk groups as you will use them to delete the disk groups by issuing this command ” esxcli vsan storage remove -u <VSAN Disk Group UUID> “.

As you see in the below screenshot, my ESXi host has 2 disk groups which I removed with this CLI command.

Issue “esxcli vsan storage list” command again to make sure all disk groups have been removed successfully.

At this stage, if you logon to the ESXi host UI again, you will see that the vSAN datastore has been removed.

Finally SSH into your ESXi host and issue the command “esxcli vsan cluster leave” so that the ESXi host will leave the vSAN cluster.

As we have cleaned the vSAN datastore and all the associated configuration on the ESXi host, you can try again to bootstrap the VCSA installation onto that host.

Hope this post is informative,

Mohamad Alhussein

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

8 thoughts

  1. This quickly solved my problem after a failed VCSA install attempt left behind a datastore on a host server. That host server refused to join a cluster, and I couldn’t delete the datastore using vSphere web client. The above CLI syntax did the trick. Thank you!

Comments are closed.