I would like to start this blog post by wishing my readers a Happy New Year 2019!
While configuring a vSAN cluster, you might run into an issue where you do not see any disks that are available to be part of the vSAN cluster. This happens if the disks already have a partition on them. In my case, the previous configuration had failed but the partition was written into the disks.
How do you check if there is an existing partition on the disks that are attached to your ESXi hosts? You can do this using the vSphere web client UI or using the command line tools. On the vSphere UI, you can navigate to the
Host>Configure>Storage Devices>Select a disk from the list>All Actions>Erase Partitions.
This shows the current partitions and also gives you an option to format them but does not work most of the times.
When it comes to command line tools, you can either use the fdisk tool or the
partedUtil. I would suggest using the partedUtil tool as fdisk is deprecated. The command to be used :
partedUtil get /dev/disks/naa.5xxxxxxxx
You’ll see an output like this:
When you try to delete this partition with the command :
partedUtil delete “dev/disks/DeviceName” PartitionNumber
It returns the below error
Now to delete this partition, we will have to use the esxcli command line as shown in this KB Article. First run the list command
esxcli vsan storage list
Now, note down the VSAN Disk Group UUID details and use it in the below command.
esxcli vsan storage remove – u <VSAN Disk Group UUID>
This deletes the disk group and all the disks under that will be released back.
You can either recreate the disk group using the esxcli commands or go back to the UI and configure the vSAN cluster. The disks will be available now.