redhat – NFSv4和rpcbind

前端之家收集整理的这篇文章主要介绍了redhat – NFSv4和rpcbind前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
根据 Red Hat docs‘rpcbind’不再需要:

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.

但是当’rpcbind’服务没有运行时,我无法启动NFS恶魔:

# 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]

我已禁用NFS v2和v3:

# grep -v "^#" /etc/sysconfig/nfs
MOUNTD_NFS_V2="no"
MOUNTD_NFS_V3="no"
RPCNFSDARGS="-N 2 -N 3"

您能否确认下面列出的服务器和客户端需要/必要的服务(基本上我想禁用不需要的服务):

# 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

解决方法

这是NFS服务器内核模块中的一个错误.它于2013年12月修补.

从内核3.14开始,不再需要rpcbind来运行内核NFS服务器.

(假设服务器配置为仅使用NFSv4及更高版本)

http://lxr.free-electrons.com/source/net/sunrpc/svc.c?v=3.14#L966

您可以在此主题中找到有关该更改的更多信息:

http://www.spinics.net/lists/linux-nfs/msg41053.html

因此,您的配置:

MOUNTD_NFS_V2="no"
MOUNTD_NFS_V3="no"
RPCNFSDARGS="-N 2 -N 3"

现在应该没有rpcbind工作.

仅使用NFSv4时,不需要以下任何服务:

/etc/rc.d/init.d/nfslock
/etc/rc.d/init.d/rpcgssd
/etc/rc.d/init.d/rpcidmapd
/etc/rc.d/init.d/rpcsvcgssd
原文链接:https://www.f2er.com/linux/400669.html

猜你在找的Linux相关文章