
Rpcinfo command shows each RPC-based service locally or on a remote Linux machine. In this tutorial, I will show you a couple of commands to troubleshoot NFS related issues.
Check NFS service status
Issue the following command on the NFS client to make sure the server is running all the NFS server processes:
/usr/bin/rpcinfo -p servername
The rpcinfo command should display the following processes:
rpcbind
nfs
mountd
status
nlockmgr
llockmgr
RPC Mount Status
Issue the following command on the NFS client to make sure the rpc.mountd processed on the NFS server is available and responding to RPC requests:
/usr/bin/rpcinfo -u servername mountd
Issue the following command on the NFS client to check that the NFS server is exporting the directory you want to mount:
/usr/sbin/showmount -e server_name
If You Receive a “Device Busy” Message
If you receive the “device busy” message while attempting to mount a directory, try to access the mounted directory. If you can access it, then it is already mounted.
If you receive the device busy message while attempting to unmount a directory, a user or process is currently using the directory. Wait until the process completes, or follow these steps:
Issue the following command to determine who is using the mounted directory,
/usr/sbin/fuser -cu local_mount_point
The fuser (1M) command will return a list of process IDs and user names that are currently using the directory mounted under local_mount_point. This will help you decide whether to kill the processes or wait for them to complete.
To kill all processes using the mounted directory, issue the following command:
/usr/sbin/fuser -ck local_mount_point
Try again to unmount the directory.