當(dāng)centos 系統(tǒng)禁用IPV6 之后,開啟NFS 是會(huì)提示以下錯(cuò)誤:
# /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS mountd: rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
[FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: address family inet6 not supported by protocol TCP
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
根據(jù)啟動(dòng)提示可以獲知合武,inet6地址不被支持临梗,原因是當(dāng)前主機(jī)沒有加載ipv6的模塊,可以重新加載一遍ipv6模塊解決這個(gè)問(wèn)題稼跳。
由于我的系統(tǒng)不需要ipv6的支持盟庞,可以通過(guò)下面的操作,取消NFS的ipv6調(diào)用: 注掉 udp6,tcp6后重啟nfs汤善。
# cat /etc/netconfig
#
# The network configuration file. This file is currently only used in
# conjunction with the TI-RPC code in the libtirpc library.
#
# Entries consist of:
#
# <network_id> <semantics> <flags> <protofamily> <protoname> \
# <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
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 - - -
啟動(dòng)之后還是報(bào)錯(cuò):
# /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS mountd: [FAILED]
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
啟動(dòng)rpcbin:
# /etc/init.d/rpcbind restart
Stopping rpcbind: [FAILED]
Starting rpcbind: [ OK
再啟動(dòng)NFS :
# /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ]
Starting RPC idmapd: [ OK ]