nfs4协议察看以及配置

nfs server 配置允许的网络协议。 nfs4 必须需要tcp 协议

default to nfs2, nfs3, nfs4, both network protocol udp/tcp are supported by them.
see more details by “man rpc.nfsd”

simplely, first , find below line in this file “/etc/init.d/nfs”:

daemon rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT

Then , to support tcp only, change it as below and restart nfs service.

daemon rpc.nfsd -U $RPCNFSDARGS $RPCNFSDCOUNT (#comment: -u means no udp protocol)

to support udp only , change it as below and restart nfs service.

daemon rpc.nfsd -T $RPCNFSDARGS $RPCNFSDCOUNT (#comment: -u means no tcp protocol)

Then to look up the what protocol are supported.

# rpcinfo | grep nfs

program vers proto port

100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
We can see that from output , we got nfs2,nfs3,nfs4 in this nfs server. and support the tcp udp protocol.

Note:

nfs require the tcp protocol.
so we can’t use the only -T parameter in starting nfs4.

此篇文章已被阅读2209 次

Add a Comment

邮箱地址不会被公开。 必填项已用*标注