Reclaiming old VSAN disks from disk groups

This was a surprise “how-to” I wanted to figure out because I’m lazy.

I had a few lab VSAN nested hosts that I wanted to repurpose rather than rebuild.  I disabled VSAN and removed the fake SSDs, but couldn’t reformat the other disks into a local datastore.

I thought at first was a claim rule, but a showing of those from ESXCLI came up with just defaults.
In the vSphere Client, I found my answer in the Storage -> Devices section:

Note the "Capacity" section.

Error under capacity: “PartitionType.0xfa not found.”  New one on me – now how to clear it or fix?

To clear the partition data, you can use partedUtil through SSH.  Note that the command is case-sensitive to execute!

First, get the device ID from the above and run this command to enumerate the partition data:

~ # partedUtil get /vmfs/devices/disks/mpx.vmhba1:C0:T2:L0
39162 255 63 629145600
1 2048 6143 0 0
2 6144 629145566 0 0

Not much there, it essentially matches what’s in the client. But then you can try another command:

~ # partedUtil getptbl /vmfs/devices/disks/mpx.vmhba1\:C0\:T2:L0
39162 255 63 629145600
1 2048 6143 381CFCCC728811E092EE000C2911D0B2 vsan 0
2 6144 629145566 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

Ding!  Partition 1 is tagged as VSAN still.  It makes sense that the client would report inability to see it, as it isn’t designed to manage VSAN.

So what does the Web Client say?


Oh.  It doesn’t even recognize itself anymore!

You can try to fix it with partedUtil fixGpt <disk>,  detach the LUN and re-attach.  If that doesn’t work, you can delete the partition in question.

~ # partedUtil delete /vmfs/devices/disks/mpx.vmhba1\:C0\:T2:L0 1

Now, check the device table…

~ # partedUtil getptbl /vmfs/devices/disks/mpx.vmhba1\:C0\:T2:L0
39162 255 63 629145600
2 6144 629145566 AA31E02A400F11DB9590000C2911D1B8 vmfs 0

That looks (relatively) better – now to verify things, you will have to detach the LUN and re-attach.


You can now go to Add Datastore, and reformat the disk for usage.

Hopefully someone will find this useful for home setups or leading you down the path to partition tools that you can use to recover one that has failed!