Delete a Persistent vSAN Datastore using CLI

Leave the Custer

Login to your ESXi Host Client > click Host > then navigate to “Actions”

Services > select “Enable Secure Shell (SSH)”

You will get this notification…

You may now SSH to your ESXi Host…

Login with your “root” credentials…
(if this is the first time you login using CLI, you will need to accept the certificate)

COMMANDS:


[root@host~] esxcli --help
[root@host~] esxcli vsan cluster list  (copy value of "Sub-Cluster Master UUID")
[root@host~] esxcli vsan cluster leave -u (value of "Sub-Cluster Master UUID")


EXAMPLE:
[root@host~] esxcli vsan cluster list
Cluster Information of 5220bfbf-0141-c043-994e-013253e50e9e
   Enabled: true
   Current Local Time: 2023-12-18T02:42:49Z
   Local Node UUID: 3a5037ac-1fa3-72ac-cf95-44a842375105
   Local Node Type: NORMAL
   Local Node State: MASTER
   Local Node Health State: HEALTHY
   Sub-Cluster Master UUID: 3a5037ac-1fa3-72ac-cf95-44a842375105
   Sub-Cluster Backup UUID: 
   Sub-Cluster UUID: 5220bfbf-0141-c043-994e-013253e50e9e
   Sub-Cluster Membership Entry Revision: 0
   Sub-Cluster Member Count: 1
   Sub-Cluster Member UUIDs: 3a5037ac-1fa3-72ac-cf95-44a842375105
   Sub-Cluster Member HostNames: peR530-ESXi70.DatsNet.local
   Sub-Cluster Membership UUID: 73ad7f65-78fe-f4f9-760b-44a842375105
   Unicast Mode Enabled: true
   Maintenance Mode State: OFF
   Config Generation: None 0 0.0
[root@host~] 
[root@host~] esxcli vsan cluster leave -u 3a5037ac-1fa3-72ac-cf95-44a842375105
[root@host~] 

VERIFY Cluster

[root@host~] esxcli vsan cluster list
vSAN Clustering is not enabled on this host
[root@host~] 

Remove vSAN Partition(s)

COMMANDS:


[root@host~] esxcli --help
[root@host~] esxcli vsan storage list  (copy value of "VSAN Disk Group UUID")
[root@host~] esxcli vsan storage remove -u (value of "VSAN Disk Group UUID UUID")

EXAMPLE:
[root@host~] esxcli vsan storage list
naa.5000c50040bd7737
   Device: naa.5000c50040bd7737
   Display Name: naa.5000c50040bd7737
   Is SSD: false
   VSAN UUID: 52843787-c574-7c96-cef3-b4942e4d226e
   VSAN Disk Group UUID: 529fe853-7064-7eca-f174-b44c2be9575d
   VSAN Disk Group Name: naa.5000c5007a8178fd
   Used by this host: false
   In CMMDS: false
   On-disk format version: 15
   Deduplication: false
   Compression: false
   Checksum: 9980338788011345835
   Checksum OK: true
   Is Capacity Tier: true
   Encryption Metadata Checksum OK: true
   Encryption: false
   DiskKeyLoaded: false
   Is Mounted: true
   Creation Time: Mon Dec 18 01:11:12 2023

naa.5000c5007a8178fd
   Device: naa.5000c5007a8178fd
   Display Name: naa.5000c5007a8178fd
   Is SSD: true
   VSAN UUID: 529fe853-7064-7eca-f174-b44c2be9575d
   VSAN Disk Group UUID: 529fe853-7064-7eca-f174-b44c2be9575d
   VSAN Disk Group Name: naa.5000c5007a8178fd
   Used by this host: false
   In CMMDS: false
   On-disk format version: 15
   Deduplication: false
   Compression: false
   Checksum: 11439835918306441380
   Checksum OK: true
   Is Capacity Tier: false
   Encryption Metadata Checksum OK: true
   Encryption: false
   DiskKeyLoaded: false
   Is Mounted: true
   Creation Time: Mon Dec 18 01:11:12 2023
[root@host~] 
[root@host~] esxcli vsan storage remove -u naa.5000c5007a8178fd
[root@host~] 

[root@host~] esxcli vsan cluster list
vSAN Clustering is not enabled on this host
[root@host~] 

VERIFY Storage

[root@host~] esxcli vsan storage list
[root@host~]               <== nothing is return

Go back to Host > Action > Services — “Disable Secure Shell (SSH)

YOU MAY NOW RE-USE YOUR STORAGE