在服务器上设置 NFS 后,rpcinfo -p servername
客户端返回错误消息
rpcinfo: couldn't find a suitable transport
连接良好,已用 进行检查tcpdump
。服务器上hosts.allow
包含必要的条目。/etc/netconfig
包含以下内容
# This config file is part of some non-installed packages (like nfs-utils)
#
# In case you install a tool that requires this file, please comment out the following lines:
#
# from https://highon.coffee/blog/security-harden-centos-7/
#
# udp6 tpi_clts v inet6 udp - -
# tcp6 tpi_cots_ord v inet6 tcp - -
udp tpi_clts v inet udp - -
tcp tpi_cots_ord v inet tcp - -
#udp6 tpi_clts v inet6 udp - -
#tcp6 tpi_cots_ord v inet6 tcp - -
rawip tpi_raw - inet - - -
local tpi_cots_ord - loopback - - -
unix tpi_cots_ord - loopback - - -
有任何想法吗?
答案1
不管你信不信,这个问题是由文件中主注释块后的空行引起的/etc/netconfig
。删除空行后,挂载就可以正常工作了。