Get list of nfs datastores
esxcli storage nfs list
or
esxcli storage nfs41 list
Volume Name Host(s) Share Accessible Mounted Read-Only Security isPE Hardware Acceleration ---------------- ----------- ---------- ---------- ------- --------- -------- ----- --------------------- nfs_lq2_vmbak 172.16.0.25 /VMbak true true false AUTH_SYS false Not Supported nfs_lq1_vmlab4 172.16.0.5 /vm_lab4 true true false AUTH_SYS false Not Supported nfs_lq1_vmlab3 172.16.0.5 /vm_lab3 true true false AUTH_SYS false Not Supported nfs_lq1_vmlab2 172.16.0.5 /vm_lab2 true true false AUTH_SYS false Not Supported nfs_lq1_vmlab5 172.16.0.5 vm_lab5 true true false AUTH_SYS false Not Supported nfs_lq1_vmlab0 172.16.0.5 /vm_lab0 true true false AUTH_SYS false Not Supported nfs_lq1_repos 172.16.0.5 /repos true true false AUTH_SYS false Not Supported nfs_lq1_esxilab0 172.16.0.5 /esxi_lab0 true true false AUTH_SYS false Not Supported nfs_lq1_vmlab1 172.16.0.5 /vm_lab1 true true false AUTH_SYS false Not Supported
Now remove the datastore:
esxcli storage nfs remove -v NFS_Datastore_Name
After that you can add the storage again:
esxcli storage nfs add -H NFS_IP|NFS_HOSTNAME -s Share_mount_point_on_the_NFS -v DatastoreName