Troubleshoot and Remove Inaccessible NFS Datastores - VMware vSphere
search cancel

Troubleshoot and Remove Inaccessible NFS Datastores - VMware vSphere

book

Article ID: 344470

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Address issues where NFS datastores remain in the vSphere inventory as "Inaccessible" or report "Unmount Filesystem Busy" errors. These states often persist if the NFS server share is disconnected, modified, or removed before the datastore is properly unmounted from the ESXi host.

 

Environment

VMware vSphere ESXi 7.0.x
VMware vSphere ESXi 8.0.x

Cause

An NFS datastore becomes inaccessible or produces a "Busy" error during removal when:

  • Objects (virtual machines, templates, or swap files) are registered on the datastore.
  • The NFS server share was removed without following proper unmount procedures.
  • Stale configuration files remain in the vCenter Server inventory.

Resolution

 Before proceeding, ensure that no virtual machines or templates are registered on the NFS share. Verify that the virtual machine swap file location is not configured to reside on the target datastore.

Remove NFS 3 Datastores:

  1. Log in to the ESXi host via SSH.
  2. List mounted datastores: esxcli storage nfs list
  3. Identify the datastore name and ensure the "Accessible" status is false.
  4. Remove the NFS mount: esxcli storage nfs remove -v <Datastore_Name>
  5. If the command returns an "Unable to Unmount: Busy" error, run: esxcfg-nas -d <Datastore_Name>

Remove NFS 4.1 Datastores:

  1. Log in to the ESXi host via SSH.
  2. List mounted datastores: esxcli storage nfs41 list
  3. Identify the datastore name.
  4. Remove the NFS mount: esxcli storage nfs41 remove -v <Datastore_Name>
  5. If the command returns an "Unable to Unmount: Busy" error, run: esxcfg-nas -d <Datastore_Name>

Add/Remount NFS Datastores:

  • Note: NFS server hostnames and mount points are case-sensitive. Use consistent naming conventions across all hosts.
  • NFS 3 Command: esxcli storage nfs add -H <Server_IP> -s <Share_Path> -v <Datastore_Name>
  • NFS 4.1 Command: esxcli storage nfs41 add -H <Server_IP> -s <Share_Path> -v <Datastore_Name>

Additional Information

If the datastore persists in the vSphere Client after CLI removal, restart the vCenter Server services or place the ESXi host into maintenance mode and reboot to clear stale UI entries.