Update:
Finally for me, is the easiest way to delete vSAN disk groups BEFORE the esx host will be removed from the cluster.
If it was not correctly completed, I use SSH and kill vSAN partitions for my MICRON NVMEs so:
1) Check your SSDs:
vdq -qH | egrep -o -B2 'Ineligible' | grep 'Name:' | grep 'Micron_7450'
2) Kill vSAN partition #2:
for x in $(vdq -qH | egrep -o -B2 'Ineligible' | grep 'Name:' | grep 'Micron_7450' | awk '{print $NF}'); do partedUtil delete /vmfs/devices/disks/$x 2; done
3) Kill vSAN partition #1:
for x in $(vdq -qH | egrep -o -B2 'Ineligible' | grep 'Name:' | grep 'Micron_7450' | awk '{print $NF}'); do partedUtil delete /vmfs/devices/disks/$x 1; done
Maybe it helps someone...
-------------------------------------------
Original Message:
Sent: Nov 03, 2025 11:27 AM
From: vCop2
Subject: Clear VSAN partitions with PowerCLI
Hello guys,
I am trying to delete old vSAN OSA partition using your script above. But get this error:
Following vSAN disk groups found :
VSANDiskGroupUUID : 52832df6-2448-1288-ee80-7471a45e3d22
VSANDiskGroupUUID : 52dadad5-6ad4-a3ae-b904-c2ca57af05bb
Start removing disk groups with UUID: 52832df6-2448-1288-ee80-7471a45e3d22 ?
Press Enter to continue...:
Unable to remove device: Disk mapping is not mounted on this host: t10.NVMe____Micron_7450_MTFDKCB3T2TFS_______________031D8A480175A000
At \GIT\vcf\Host\Clear-vSAN-Partitions-on-ESX.ps1:28 char:5
+ $esxcli.vsan.storage.remove.Invoke($remVSAN)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], ViError
+ FullyQualifiedErrorId : VMware.VimAutomation.Sdk.Types.V1.ErrorHandling.VimException.ViError
I have tried to do it directly on host:
[root@en02-esx014:~] esxcli vsan storage remove -s t10.NVMe____Micron_7450_MTFDKCB3T2TFS_______________B3AD20420175A000
Unable to remove device: Disk mapping is not mounted on this host: t10.NVMe____Micron_7450_MTFDKCB3T2TFS_______________B3AD20420175A000
[root@en02-esx:~] esxcli vsan storage automode set --enabled false
[root@en02-esx:~] esxcli vsan storage diskgroup mount -s t10.NVMe____Micron_7450_MTFDKCB3T2TFS_______________B3AD20420175A000
Unable to mount: Failed to load dek for encrypted disk on encryption off host
Is the ecryption on vSAN the reason for this issue?
Do you have any hints for me?
Thank you in advance!
Regards,
Cop
Original Message:
Sent: May 14, 2023 05:12 AM
From: LucD
Subject: Clear VSAN partitions with PowerCLI
Strange, that seems to work indeed.
One learns something new every day