How To Remove Vsan Datastore From Esxi Host
VMware vSAN provides an incredible technology that allows combining local storage from multiple ESXi hosts to form logical storage for both virtual machines and modernistic technologies such as containers. With VMware vSAN seven.0 Update ii, VMware has continued to button the envelope of what the engineering can practise with improvements across the board. In a domicile lab environment or fifty-fifty in production, you may find the demand to evacuate an ESXi host and get rid of the vSAN partitions on the local disks. I ran into an issue the other day with a disk failure on a lab host that did not permit getting rid of the disk group, etc. I wanted to walk through how yous tin can *easily* strength delete vSAN datastore from ESXi host which allows either reclaiming the disks for traditional VMFS datastores or re-adding the host back to the vSAN cluster. once more if you had issues with the disk group in general.
vSAN Deejay Grouping architecture
VMware vSAN architecture has two tiers of storage – a cache tier and a capacity tier. The caching tier is used for read caching and write buffering. The capacity tier is persistent storage, housing your virtual machine objects. This layout offers tremendous performance advantages and however maintains a resilient and robust storage infrastructure for your VMs.
1 of the logical components to understand with VMware vSAN compages is the concept of the deejay group. The deejay group's purpose is to manage the logical link betwixt the capacity and cache tiers. Understanding the diverse components of the disk group helps to sympathize the way vSAN storage and accesses the data. Consider the following:
- Every ESXi host in a vSAN-enabled vSphere cluster volition incorporate at to the lowest degree 1 disk group
- Disk groups have 1 cache device and upwardly to 7 capacity drives.
- vSAN hosts can have up to 5 disk groups with 7 capacity drives each which equals 35 capacity drives.
- In either the all-flash or hybrid configurations, the cache device must be a flash disk
- Hybrid configurations use the cache disk in a (seventy% read cache and 30% write cache allocation). In all-flash configurations, the cache deejay is a defended 100% write buffer.
Below is a expect at an ESXi host in a vSAN-enabled vSphere cluster and the Storage Devices installed.
To view the disk group configuration, you tin navigate to the properties of the vSAN cluster > Configure > vSAN > Disk Management. Then, click on the disk group for the item vSAN ESXi host you want to look at. The Disk Group properties does a good job of detailing and showing which disks are used for which purpose.
Delete vSAN Datastore from ESXi Host
You might recall that it would exist super easy to delete a vSAN datastore from an ESXi host. However, VMware has put safeguards in place that doesn't go far super straightforward to just but "right-click, delete" kind of operation. To demonstrate this. I have put a lab host into maintenance manner. I first went in and tried to erase partitions from the disks.
After placing a host into maintenance mode, I went to the host > configure > storage devices > erase partitions.
It asks to confirm the partitions erase.
Even in maintenance mode, the process errors out.
I didn't catch screenshots of this, but trying to delete the disk group for the particular host shows the disk group/host is in apply with a similar error to above. Let's meet if we can remove the host from the vSAN cluster if it is in maintenance mode.
This operation fails as well.
After rebooting the host, I was able to Remove from inventory.
Now, the vSAN ESXi host is removed from the cluster. I now but have the remaining two ESXi hosts in the cluster.
Now that we have the host removed from the vSAN cluster from vCenter, let's meet if we can simply erase the partitions on the vSAN disks. This is logged in straight to the ESXi host via the host UI. Click Storage > Actions > Clear segmentation table.
Yous will become the confirmation for erasing the partitions.
The operation fails to remove the partitions even in the host UI.
OK, let's get serious and go down to the command line. Even though we removed the ESXi host from vCenter, it all the same thinks it is joined to the vSAN cluster. The starting time thing I did was utilise the command:
esxcli vsan cluster leave esxcli vsan cluster become
This volition remove the host from thinking information technology is part of the vSAN cluster. The get command but validates it is no longer a part of a vSAN cluster.
However, after trying to delete the partitions afterward simply leaving the vSAN cluster through the esxcli command, erasing the partitions still fails. Let's remove the storage from the vSAN host. To see which storage is a part of the vSAN allocated storage on the host, yous can apply:
esxcli vsan storage listing
This shows the disks that are allocated to vSAN storage and the disk grouping they vest to.
Ok, you can remove vSAN storage by disk, ssd, or UUID. I chose to use the UUID of the deejay grouping. Just use the command:
esxcli vsan storage remove --uuid
Once the storage is deleted, I tried to erase vSAN partitions. Success! The Force Delete vSAN Datastore from ESXi Host is successful. The partitions delete successfully.
Now, when looking at the storage from the host UI, there are no datastores appearing. Before the vsandatastore was showing.
Adding the ESXi host dorsum to the vSAN Cluster
Wrapping Upwards
If you run into trouble trying to delete the vSAN datastore from an ESXi host that was part of a vSAN cluster, the ESXCLI command-line tool is your friend in this instance. There are many safeguards in identify that keep yous from simply deleting a host from vSAN or deleting the disk group, or even erasing partitions on a vSAN claimed disk. Notwithstanding, using esxcli vsan storage remove, you can Forcefulness Delete vSAN Datastore from ESXi Host and reclaim the host for other purposes.
Source: https://www.virtualizationhowto.com/2021/03/force-delete-vsan-datastore-from-esxi-host/
0 Response to "How To Remove Vsan Datastore From Esxi Host"
Post a Comment