One of the primary challenges when trying re-purpose existing storage devices is ensuring that all data and existing partitions have been completely removed. Often times, customers end up resorting to third-party tools like GParted which requires you to boot your server into the LiveCD before you can remove the existing partitions. This is less than ideal, especially if you need to perform this operation across multiple systems.
For customers who wish to re-purpose their existing storage devices for other use, including VSAN, there is now a new UI option in the vSphere Web Client introduced in vSphere 6.0 Update 1 to help assist with this procedure. I had not seen anyone talk about this feature yet and figure I would share some details as this is something I have heard customers ask for in the past. You can find this new option (icon with disk and eraser) by clicking onto a specific ESXi host and then selecting the Manage->Storage Adapters and then highlighting the specific storage device you wish to erase as seen in the screenshot below.
Once the erase partition icon or action is selected, you will then be presented with a summary of the existing partitions on the disk and then prompted to confirm that you wish to delete ALL partitions on the disk.
After the operation has successfully completed, you can now re-purpose the storage device for other use like VSAN!
For those of you who are interested from an Automation standpoint, this UI operation actually makes use of an existing vSphere API that has been for quite some time called updateDiskPartitions() under the StorageSystem manager of an ESXi host. To erase all partitions, you simply pass in an empty spec to the API method.
In addition, I also want to quickly mention that you will also have the ability to edit and erase existing disk partitions using the ESXi Embedded Host Client Fling which will be available in a future update. Below is a quick screenshot on what that would look like.
Is this format a DOD disk delete, overwriting the sectors or just a removal of the files? IE.. is this a secure delete or just ye old format of a volume?
No, this is just a regular partition delete and not any special type of secure delete.
Can I do this through vsphere client somehow? I have a new build exsi 6 but the drives have linux ubuntu and I want to format them as easily as possible and have several machines.
Hi William, is there a way to remove partitions from PowerCli ?
Yes, as mentioned in the article the API that you need to use is UpdateDiskPartions() which can be called from variety of tools including PowerCLI
Any idea what all those extra partitions are for? Any downside if I click 'use entire disk' and just have one giant partition for my VMs datastore? (VMFS)
With ESXi 6.7 the web client crashes when trying to click on a storage adapter. It is therefore impossible to overwrite the partitions on the disk.
I tested Chrome, Firefox and Edge with the same results.
Any ideas?
Didier
I got an error when trying to erase the disk, what did work for me is running the following from the ESXi ssh:
partedUtil mklabel /dev/disks/{device-id} msdos
Here you can find detailed steps: https://www.petenetlive.com/KB/Article/0001565
right after that I erased the disk and claimed it.