Unmounting a datastore is done when you intend to preserve the data on a VMFS volume, but still remove access to the volume. Detaching is performed on a LUN device and it is done to make sure that the access to the LUN is gracefully removed. It is recommended you unmount a VMFS datastore and detach its corresponding LUN device, before the LUN backing it is unpresented from an ESXi host.
Unmounting and detaching VMFS volumes
Getting ready
Make a note of the NAA ID of the LUN corresponding to the VMFS volume. This can be done by selecting the datastore and navigating to Configure | Device Backing:
![](https://static.packt-cdn.com/products/9781787127418/graphics/assets/f4260696-5910-47ca-b349-1f5b165e4b09.png)
Alternatively, you can issue the command esxcli storage vmfs extent list:
![](https://static.packt-cdn.com/products/9781787127418/graphics/assets/5f130164-69a2-4d05-87a7-88738e834dfe.png)
It is advised that you take care of the following before...