According to Red Hat docs 'rpcbind' is not required any more:
Because protocol support has been incorporated into the v4 protocol, NFSv4 has no interaction with the portmap, rpc.lockd, and rpc.statd daemons. NFSv4 listens on the well-known TCP port 2049, which eliminates the need for portmap interaction. The mounting and locking protocols have been incorporated into the V4 protocol which eliminates the need for interaction with rpc.lockd and rpc.statd. The rpc.mountd daemon is still required on the server, but is not involved in any over-the-wire operations.
however I'm not able to start NFS demon when 'rpcbind' service is not running:
# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: Cannot register service: RPC: Unable to receive; errno = Connection refused
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
[FAILED]
Starting NFS mountd: [ OK ]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
I've disabled NFS v2 and v3:
# grep -v "^#" /etc/sysconfig/nfs
MOUNTD_NFS_V2="no"
MOUNTD_NFS_V3="no"
RPCNFSDARGS="-N 2 -N 3"
Could you please confirm what services are required/essential on server and client from these listed below (basically I would like to disable services which are not needed):
# rpm -ql nfs-utils | grep 'init.d'
/etc/rc.d/init.d/nfs
/etc/rc.d/init.d/nfslock
/etc/rc.d/init.d/rpcgssd
/etc/rc.d/init.d/rpcidmapd
/etc/rc.d/init.d/rpcsvcgssd
This was a bug in NFS server kernel module. It was patched in December 2013.
Starting with kernel 3.14,
rpcbind
is no longer required to run in-kernel NFS server.(assuming that server is configured to use only NFSv4 and higher)
http://lxr.free-electrons.com/source/net/sunrpc/svc.c?v=3.14#L966
You can find more information about that change in this thread:
http://www.spinics.net/lists/linux-nfs/msg41053.html
Therefore, your configuration:
should now work without
rpcbind
.When you use only NFSv4, none of these services are required:
The quoted documentation from RedHat was wrong and got fixed by Bug 521215:
rpc.mountd
still must be used to setup NFSv4, but strictly speaking it is not required to be running after that.nfs
: Server for all versions of NFS: v2, v3, v4, v4.1rpcbind
/portmapper
: Server, strictly only for NFS <= v3. But also for NFS v4 as the Linux Kernel NFS server tries to register itself and fails to start ifrpcbind
is not running.rpc.mountd
: Server, strictly only for NFS <=3. But also for NFS v4 as the Linux Kernel uses it to check, if the connecting client is allowed to connect.nfslock
: Server only for NFS <= v3rpc.idmapd
: Optional Server (and older Clients) for NFS v4rpc.quotad
: Server for using disk quotarpc.statd
: Server only for NFS <= v3When using Kerberos (
sec=krb
/krb5i
/krb5p
) the following services are required:rpc.gssd
: Clientrpc.svcgssd
: ServerPlease note that even they carry
rpc.
in their name, they use the Linux kernel internal mechanismrpc_pipef
for communication between the Linux kernel and the user space helper; sorpcbind
AKAportmapper
is not needed for them.Check rpcbind service. If it stopped working start and then try starting nfs service.