错误信息说明需求的nfs版本或传输协议不支持,意思是服务器端的nfs版本和客户端的nfs版本不同,百度发现网上都说该错误是内核配置有问题引发的,说是内核配置没有启用nfs导致。但是始终没有找到网上所说的修改内核配置的方法。
服务端
[root@nfs01 ~]# nfsstat -s 查看版本信息
Server rpc stats:
calls badcalls badclnt badauth xdrcall
8 48 0 48 0
Server nfs v4:
null compound
8 100% 0 0%
Server nfs v4 operations:
op0-unused op1-unused op2-future access close commit
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
create delegpurge delegreturn getattr getfh link
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
lock lockt locku lookup lookup_root nverify
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
open openattr open_conf open_dgrd putfh putpubfh
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
putrootfh read readdir readlink remove rename
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
renew restorefh savefh secinfo setattr setcltid
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
setcltidconf verify write rellockowner bc_ctl bind_conn
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
exchange_id create_ses destroy_ses free_stateid getdirdeleg getdevinfo
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
getdevlist layoutcommit layoutget layoutreturn secinfononam sequence
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
set_ssv test_stateid want_deleg destroy_clid reclaim_comp
0 0% 0 0% 0 0% 0 0% 0 0%
[root@nfs01 ~]#
[root@nfs01 ~]#
[root@nfs01 ~]# cat /etc/exports
/data 172.16.1.8(rw)
[root@nfs01 ~]# ll -d /data/
drwxr-xr-x 2 nfsnobody nobody 6 Jan 10 04:00 /data/
[root@nfs01 ~]# id nfsnobody
uid=65534(nfsnobody) gid=65534(nfsnobody) groups=65534(nfsnobody)
[root@nfs01 ~]# rpm -qa nfs-utils
nfs-utils-1.3.0-0.65.el7.x86_64
客户端
[root@localhost ~]# mount -t nfs 172.16.1.31:/data /mnt
mount.nfs: requested NFS version or transport protocol is not supported
[root@localhost ~]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/centos-root xfs 47G 1.4G 46G 3% /
devtmpfs devtmpfs 475M 0 475M 0% /dev
tmpfs tmpfs 487M 0 487M 0% /dev/shm
tmpfs tmpfs 487M 7.6M 479M 2% /run
tmpfs tmpfs 487M 0 487M 0% /sys/fs/cgroup
/dev/sda1 xfs 1014M 133M 882M 14% /boot
tmpfs tmpfs 98M 0 98M 0% /run/user/0
[root@localhost ~]#
[root@localhost ~]#
[root@localhost ~]# nfsstat -s 查看版本信息
Error: No Server Stats (/proc/net/rpc/nfsd: No such file or directory).
[root@localhost ~]# nfsstat -c
Client rpc stats:
calls retrans authrefrsh
24 32 24
Client nfs v4:
null read write commit open open_conf
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
open_noat open_dgrd close setattr fsinfo renew
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
setclntid confirm lock lockt locku access
12 75% 0 0% 0 0% 0 0% 0 0% 0 0%
getattr lookup lookup_root remove rename link
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
symlink create pathconf statfs readlink readdir
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
server_caps delegreturn getacl setacl fs_locations rel_lkowner
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
secinfo exchange_id create_ses destroy_ses sequence get_lease_t
0 0% 0 0% 4 25% 0 0% 0 0% 0 0%
reclaim_comp layoutget getdevinfo layoutcommit layoutreturn getdevlist
0 0% 0 0% 0 0% 0 0% 0 0% 0 0%
(null)
0 0%
[root@localhost ~]# mount -t nfs 172.16.1.31:/data /mnt
mount.nfs: requested NFS version or transport protocol is not supported
[root@localhost ~]# rpm -qa nfs-utils
nfs-utils-1.3.0-0.65.el7.x86_64
最后对比软件包都是一样的,报错还是说传输协议版本不对应。
来源:CSDN
作者:半夜西风半身影
链接:https://blog.csdn.net/weixin_42506599/article/details/103927821