info:
[iyunv@node10 ~]# service nfs start
Starting NFS services: [ OK ]
Starting NFS quotas: [ 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
[ OK ]
Stopping RPC idmapd: [ OK ]
Starting RPC idmapd: [ OK ]
Starting NFS daemon: rpc.nfsd: unable to create inet6 TCP socket: errno 97 (Address family not supported by protocol)
[ OK ] analysis:
从上面的信息可以看出,nfs在启动的时候报错了。大致的意思是无法设置ipv6的套接字接口,其中这一句话很重要:
Address family not supported by protocol 。地址族不被nfs协议所支持。
到这里,就很奇怪了,nfs是支持ipv6协议的,而且系统就更不要说了,肯定支持ipv6协议。但是,在linux系统中一切功能都是模块组合而成,只不过可以将模块编译进内核或者编译成外挂式模块动态加载。因此,想到这里就提出一个问题,是不是ipv6的模块没有加载,接着就进行下面的检查:
[iyunv@node10 ~]# ifconfig eth0 | grep inet
inet addr:172.16.1.20 Bcast:172.16.1.255 Mask:255.255.255.0
[iyunv@node10 ~]#
从上面的信息反馈可见,没有出现inet6的地址信息,可以初步断定ipv6的模块并没有编译进内核,那就应该是动态加载,而此处没有信息,那就说明可能没有动态加载成功。
[iyunv@node10 ~]# cd /proc/sys/
[iyunv@node10 sys]# ls
abi crypto debug dev fs kernel net sunrpc vm
[iyunv@node10 sys]# cd net
[iyunv@node10 net]# ls
core ipv4 netfilter unix
[iyunv@node10 net]#
从上面的的信息可见,在/proc/sys/net/目录中没有出现ipv6的信息,再一次说明ipv6的模块加载确实出现了问题,因为如果成功加载,则在内核的信息中是可以看到有一个ipv6的目录存在
[iyunv@node10 net]# service nfs restart
Shutting down NFS daemon: [ OK ]
Shutting down NFS mountd: [ OK ]
Shutting down NFS quotas: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS mountd: [ OK ]
Stopping RPC idmapd: [ OK ]
Starting RPC idmapd: [ OK ]
Starting NFS daemon: [ OK ]
[iyunv@node10 net]#