在 Solaris 上,我使用这些选项启用 nfs4
vim /etc/default/nfs
# Sets the minimum version of the NFS protocol that will be registered
# and offered by the server. The default is 2.
NFS_SERVER_VERSMIN=4
# Sets the maximum version of the NFS protocol that will be registered
# and offered by the server. The default is 4.
NFS_SERVER_VERSMAX=4
我在 Linux 上尝试了同样的操作(语法不同)
RPC_NFSD_OPTS="-N 2 -N 3"
Nfs mount 在所有主机上都有效。但是 rpc 发生了非常奇怪的事情
在 Linux 上
rpcinfo -t 192.168.0.2 nfs
192.168.0.2: RPC: Program not registered
在 Solaris 上
rpcinfo -t 192.168.201.3 nfs
program 100003 version 4 ready and waiting
为什么 rpc 没有在 Linux 上注册 nfs4?Linux 发行版是 Slackware 15.0 内核版本 6.11.10