≡ Menu

Find out if NFS Service Running On Linux / Unix Server

How do I find out if NFS server or service is running or not on my Linux or Unix based server?

You need to check for following two unix daemons:

[1] rpc.nfsd or nfsd - The rpc.nfsd/nfs program implements the user level part of the NFS service. The main functionality is handled by the nfsd kernel module.

[2] portmap - It is a server that converts RPC program numbers into DARPA protocol port numbers. It must be running in order to make RPC calls. This is required for NFSv3 and earlier.

[3] rpc.mountd or mountd - This daemon implements the server side of the NFS MOUNT protocol, an NFS side protocol used by NFS version 2 and 3.

You need to use the following commands to find out if nfs is running or not on the server.

Generic command for Linux / Unix users

Type the following command:
# ps aux | grep nfsd
Sample outputs:

root      6674  0.0  0.0      0     0 ?        S    Oct23   0:00 [nfsd4]
root      6675  0.0  0.0      0     0 ?        S    Oct23   0:37 [nfsd]
root      6676  0.0  0.0      0     0 ?        S    Oct23   0:34 [nfsd]
root      6677  0.0  0.0      0     0 ?        S    Oct23   0:32 [nfsd]
root      6678  0.0  0.0      0     0 ?        S    Oct23   0:36 [nfsd]

On older system (NFSv3 and older), you also need to make sure portmap service is running:
# ps aux | grep 'portman'
Sample outputs:

root     10446  0.0  0.0   2980   300 pts/0    S+   00:11   0:00 grep portman

Also make sure mountd is running:
# ps aux | grep 'mountd'
Sample outputs:

root      7859  0.0  0.0  24916   768 ?        Ss   Jun23   1:37 rpc.mountd

Debian / Ubuntu Linux user

Type the following commands:
# /etc/init.d/nfs-kernel-server status
OR
# service nfs-kernel-server status
Sample outputs:

nfsd running

On older system (NFSv3 and older), you also need to make sure portmap service is running:
# /etc/init.d/portmap status
OR
# service portmap status
Sample outputs:

portmap is running.

RHEL / CentOS / Fedora Linux user

Type the following command:
# service nfs status
# service portmap status ## <-- required for nfsv3 and earlier only

Sample outputs:

rpc.svcgssd is stopped
rpc.mountd (pid 7859) is running...
nfsd (pid 7924 7923 7922 7921 7920 7919 7918 7917) is running...
rpc.rquotad (pid 7855) is running...

FreeBSD Unix users

Type the following commands to make sure all required 3 services are running on the FreeBSD:
# ps aux | egrep 'rpcbind|mountd|nfsd'

{ 2 comments… add one }
  • K Thangamariappan August 31, 2014, 10:50 am

    [root@server ~]# rpcinfo -p localhost <— Available version for nfs (4,3 and 2)
    program vers proto port service
    100000 4 tcp 111 portmapper
    100000 3 tcp 111 portmapper
    100000 2 tcp 111 portmapper
    100000 4 udp 111 portmapper
    100000 3 udp 111 portmapper
    100000 2 udp 111 portmapper

  • karthik September 14, 2015, 1:33 pm

    Hi
    How can check the nfs server is exporting the dirctory from server side .
    checking from /var/lib/nfs/etab and /var/lib/nfs/mtab any other commands is their to know the status Whether its is exporting or not …
    apart from nfs service. any command is that to know better information .

Leave a Comment


   Tagged with: , , , , , , ,