Permanently Unpresent a LUN in ESXi 5.x and Equallogic – 6 Simple steps

The following is a quick tutorial on removing a VMFS datastore from an ESXi host

1) Do the pre-requsite checks
Ensure :
– The datastore is not part of the Datastore Monitoring (HA).
– SIOC is disabled on the datastore.
– The datastore is not part of a SDRS cluster OR part of a datastore cluster.
– No Virtual Machines/Snapshots/Templates are present on the datastore.

Note: ESXi 5.x will do a verification check of all these before you are able to unmount anyway.

 

 

2) Umount Datastore
Select ESXi Host -> Configuation. In the Datastores right click the datastore and select Unmount (You can go to Home -> Inventory -> Datastores and Datastore Clusters and unmount the datastore from all hosts but in this case (measure twice, cut once!) I have done each host individually. The datastore should appear greyed out now.

Note: Before unmounting get the NAA ID of LUN select the properties of the datastore.

 

3) Detach LUN

When we have the NAA ID select devices & and locate the corresponding identifier. Right click the device and then select Detach.

The device should be greyed out now.

Note: Esxi 5.x does the check for you again.

 

4) Remove LUN from Equallogic
I normally like to just take the LUN offline for a period of time just to be sure!

Log into the Equallogic Group Manager -> Select the Volumes section -> Highlight the LUN (internal-lun1 in my case) and click Set Offline. I will destroy this at a later date.


Note: As of Equallogic firmare 6.0.x the LUN is placed in a recycle bin and can be recovered. Very handy.
5) Rescan all ESXi Hosts in cluster.
This should remove the greyed out entries

 

6) Permanently remove the the LUN from the ESXi hosts.

Log into the host(s) via SSH

List the detached devices
# esxcli storage core device detached list

Remove the device permanently
# esxcli storage core device detached remove naa.xxxxxxxxxxxxxxxxxxxxxxxxx75

For full ESXi removal instructions view: KB2004065