Manager NFS volumes on Esxi

I. Method 1:

- Run this command to list the mounted datastores:

esxcli storage filesystem list 

 - Run this command to unmount the NFS datastore:

Unmount the datastore by running this command:

esxcli storage filesystem unmount [-u UUID | -l label | -p path ]

For example, use one of these commands to unmount the LUN01 datastore:

esxcli storage filesystem unmount -l LUN01
esxcli storage filesystem unmount -u 4e414917-a8d75514-6bae-0019b9f1ecf4
esxcli storage filesystem unmount -p /vmfs/volumes/4e414917-a8d75514-6bae-0019b9f1ecf4

II. Method 2:

- Run this command to list the mounted datastores:

esxcli storage nfs list  

- Run this command to unmount the NFS datastore:

esxcli storage nfs remove -v NFS1

exam: NFS1 is datastore

After running the esxcli storage nfs remove -v NFS1 command and it fails with this error similar to:

Unable to complete Sysinfo operation. Please see the VMkernel log file for more details.: Sysinfo error: BusySee VMkernel log for details.

- To resolve this issue: 

Isolate the UUID of the NFS mount by running this command:

vmkfstools -Ph -v10 /vmfs/volumes/NFS1

Example: 

vmkfstools -Ph -v10 /vmfs/volumes/NFS1/ 
 
 

NFS-1.00 (Raw Major Version: 0) file system spanning 1 partitions.
File system label (if any): NFS1
Mode: public
Capacity 86.5 GB, 86.5 GB available, file block size 4 KB, max supported file size 16777216 TB
Disk Block Size: 512/512/0
UUID: 003e96eb-9f51034a-0000-000000000000
Logical device: 192.168.10.120 /mnt/Prod/NFS1
Partitions spanned (on "notDCS"):
        nfs:003e96eb-9f51034a -----> UUID 
NAS VAAI Supported: NO
Is Native Snapshot Capable: NO
OBJLIB-LIB: ObjLib cleanup done.
WORKER: asyncOps=0 maxActiveOps=0 maxPending=0 maxCompleted=0

  1. List out the open files under this UUID by running this command:

    lsof | grep 003e96eb-9f51034a

    Example:

    lsof | grep 003e96eb-9f51034a
    2101956     sh                    cwd                        -1   

     
  2. Stop the process by running this command:

    kill -9 PID

    Example:

    kill -9 2101956
     
  3. You should now be able to remove the NFS mount successfully.

  

Post a Comment