1

I want make sure a CentOS7 machine can only be an NFS client and not an NFS server, if possible.

When I type mount I see-

nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

showmount -e reveals:

clnt_create: RPC: Port mapper failure - Unable to receive: errno 111 (Connection refused)

…so, I'm not sure if an NFS server is running or not.

chkconfig --list and systemctl list-unit-files | grep enabled also don't indicate an NFS server is running.

1
  • Have you enabled rpcbind and have you started it ? yum install nfs-utils yum install rpcbind systemctl enable nfs-server rpcbind ; systemctl start nfs-server rpcbind rpcinfo -p
    – user29443
    Dec 6, 2016 at 7:55

1 Answer 1

1

Try the following:

ps -ef | grep rpc 

A NFS server would be running processes such as rpc.nfsd, rpc.mountd, rpc.lockd, rpc.statd.

Also:

cat /etc/exports 

This shows the list of filesystems to be exported from a NFS server.

cat /var/lib/nfs/xtab 

This shows the list of exported filesystems.

cat /proc/fs/nfs/exports 

This prints the kernel export table for NFS.

If all the above commands report nothing, you don't have a NFS server running.

2
  • ps -ef | grep rpc shows rpciod and cat /proc/fs/nfs/exports shows two commented lines, # Version 1.1 and # Path Client(Flags) # IPs. Would statd and lockd be running for an NFSv4 server?
    – hotkarl
    Dec 6, 2016 at 20:26
  • rpciod, statd, and lockd are used by NFS clients. If there's no trace of the nfsd daemon and the two text files are empty, then you aren't running any NFS server.
    – dr_
    Dec 7, 2016 at 6:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .