How to do it...

The following procedure will help unmount a VMFS volume and detach its corresponding LUN device:

  1. Log in to the vCenter Server using the vSphere web client and use the key combination Ctrl + Alt + 4 to switch to the storage view.
  2. Right-click on the desired datastore and click Unmount Datastore...:
  1. On the Unmount Datastore... window, select all the ESXi hosts to unmount the datastores from, and click OK:
  1. The Recent Tasks pane should list an Unmount Datastore task complete successfully for each of the ESXi hosts. And the VMFS datastore will be marked as Inactive.
  2. Use the key combination Ctrl + Alt + 2 to switch to the Host and Clusters view.
  3. Select an ESXi host, navigate to Configure | Storage Devices, select the LUN corresponding to the unmounted datastore and click on the icon  to detach the LUN:
  1. On the Detach Device dialog box, click OK to confirm the operation:
  1. The Recent Tasks pane should list a Detach SCSI LUN task complete successfully. Also, the LUN device should now be listed as Detached: