The following procedure will help unmount a VMFS volume and detach its corresponding LUN device:
- 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.
- Right-click on the desired datastore and click Unmount Datastore...:

- On the Unmount Datastore... window, select all the ESXi hosts to unmount the datastores from, and click OK:

- 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.
- Use the key combination Ctrl + Alt + 2 to switch to the Host and Clusters view.
- 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:

- On the Detach Device dialog box, click OK to confirm the operation:

- The Recent Tasks pane should list a Detach SCSI LUN task complete successfully. Also, the LUN device should now be listed as Detached:
