In a previous article I discussed the steps to take when removing a LUN from an ESXi server. It’s very important to first complete some verification steps on your ESXi host, before you actually remove the LUN from ESXi and your storage solution. Check the article for more information on this procedure.
Now I’ve got this question if the same counts for NFS datastores. If you want to unmount an NFS datastore, first verify:
- No virtual machines reside on the datastore.
- The datastore is not part of a datastore cluster.
- The datastore is not managed by Storage DRS.
- Storage I/O control is disabled for this datastore.
- The datastore is not used for vSphere HA heartbeating.
If everything is ok you can just remove the datastore using the unmount command (right mouse button>unmount). The next step is to remove the datastore from your storage array.
If you’ve accidentally removed the NFS datastore from storage array before unmounting it from the ESXi server, you have a challenge (of course you first completed the verification steps;): the NFS datastore will appear in disconnected state on your ESXi server. The following steps will help you to remove the NFS datastore using esxcli or esxcfg-nas:
ESXi 4.x: # esxcfg-nas -d vol_nfs ESXi 5.0: # esxcli storage nfs remove -v vol_nfs
Both esxcfg-nas (ESXi 4.0) esxcli (ESXi 5.0) are available through the ESXi busybox or the vMA.
Related KB articles are: