How to delete a VSAN partition using partedUtil tool


Recently, after some testing on the new VSAN on my whiteboxes, I wanted to reinstall the whiteboxes back to my older build of ESXi. One of the key problems that I’ve hit like most of the people may have experienced is not able to format the VSAN’ed partitions. There are a few ways to do this typically:

  • Boot up to 3rd party tools eg GParted to delete the partitions or;
  • Use native PartedUtil in ESXi to delete the partitions

I chose the 2nd method as I do not want to have the hassle of creating a CD or putting it on PXE server to do this. Using the following commands to check my partitions’ details.

cd /dev/disks

For my disks information this is roughly what returns on the screen:


By doing a partedUtil getptbl <device> will return with more information about that particular device like partition type, the sectors used etc. So for me I know that my device is the Intel SSD device in this host so I did partedUtil getptbl <Intel SSD device> and this is what came up.


The next step is really to delete the partition. The command to do this:

partedUtil delete t10.ATA_____INTEL_SSDSC2BW240A4_____________________BTDA331402JU2403GN__ 1
partedUtil delete t10.ATA_____INTEL_SSDSC2BW240A4_____________________BTDA331402JU2403GN__ 2

where the breakdown of the command is as such: partedUtil delete <device> <partition number>

This is where I hit the problem of the partitions in read-only mode. See below:


According to Comac Hogan’s blog, there are 2 ways to do this. 1 is the supported method and 2 is obviously unsupported.

  1. First method is to issue this command to leave the VSAN cluster: esxcli vsan cluster leave. After this to execute the delete command. Unfortunately this did not help for my situation so, onto the next method.
  2. Second method is to stop the respective VSAN related modules. This sort of did it for me but the commands issued are in the reverse order as given in Comac’s blog

vmkload_mod -u vsan
vmkload_mod -u plog
vmkload_mod -u lsomcommon

Execute the partedUtil delete command and it worked for me.


After this ensure the modules are started again by issuing these commands:

vmkload_mod lsomcommon
vmkload_mod plog
vmkload_mod vsan


Hope this post will help someone who faced the same situation as me! 🙂


Leave a Reply

* Copy This Password *

* Type Or Paste Password Here *

20,581 Spam Comments Blocked so far by Spam Free Wordpress