最近新装CentOS 7,发现原先CentOS 6.3下可用的一块ARM Dev board不能用了,表现为VFS mount挂载rootfs失败。
使用WireShark发现,服务器对client发来的NFS RPC返回reply "Can't support version #2" (在reply的verifier字段中)。
man nfsd告诉我们,可通过向rpc.nfsd传递参数来控制nfsd支持的协议版本。
CentOS 7使用systemctl管理服务,对这个不熟悉,于是使用下列命令查找可能的配置文件:
# find /etc -name "*nfs*"
在找到的多个文件中,最终确认sysconfig/nfs控制nfsd支持的版本。修改该文件中的一行:
RPCNFSDARGS="-V2 -V3 -V4"
[另一个解决办法(网传未验证):启动参数设置nfs server版本:nfsroot=...,nfsvers=3]