运行RHEL7.9并尝试在LAN上的几个服务器之间执行nfs。我总是把nfs v3作为挂载。有什么方法可以让nfs的最新版本发生,根据/etc/nfs.conf
的说法是4.2吗?
在我看到的另一个局域网上的一个服务器上
mount | grep bkup
bkupserver:/bkup on /bkup type nfs4 (rw,nosuid,noexec,relatime,vers=4.1,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.2,local_lock=none,addr=192.168.1.1)
但我不知道为什么是vers=4.1,而不是4.2。
但我真正的问题是我的其他服务器,它总是说vers=3,我不知道为什么。
我注意到我的服务器之间唯一不同的地方是nfsv4工作的服务器有/etc/exports
作为/bkup *(rw,no_root_squash) versus my nfsv3 servers having
/etc/exportsas
/bkup *(rw、异步、no_root_squash)。
导出选项会导致或阻止nfs版本的发生吗?
下面是我的'/etc/nfs.conf‘以供参考,在这里我一直都在获取nfs v3。我编辑的/etc/sysconfig/nfs
仅与端口号匹配,如下所示。刚注意到在我的服务器上执行vers=4.1时,它的'/etc/nfs.conf‘是不动的,我只编辑了/etc/sysconfig/nfs
来声明端口号,这样我就可以在firewalld中打开。
# This is a general configuration for the
# NFS daemons and tools; this is /etc/nfs.conf in RHEL 7.9
#
#[general]
# pipefs-directory=/var/lib/nfs/rpc_pipefs
#
#[exportfs]
# debug=0
#
#[gssd]
# verbosity=0
# rpc-verbosity=0
# use-memcache=0
# use-machine-creds=1
# avoid-dns=1
# limit-to-legacy-enctypes=0
# context-timeout=0
# rpc-timeout=5
# keytab-file=/etc/krb5.keytab
# cred-cache-directory=
# preferred-realm=
#
[lockd]
port=4001
udp-port=4001
#
#[mountd]
# debug=0
# manage-gids=n
# descriptors=0
port=4002
threads=8
# reverse-lookup=n
# state-directory-path=/var/lib/nfs
# ha-callout=
#
#[nfsdcltrack]
# debug=0
# storagedir=/var/lib/nfs/nfsdcltrack
#
[nfsd]
# debug=0
threads=8
# host=
port=4003
# grace-time=90
# lease-time=90
udp=y
tcp=y
# vers2=n
vers3=y
vers4=y
vers4.0=y
vers4.1=y
vers4.2=y
rdma=y
#
#[statd]
# debug=0
port=4004
outgoing-port=4005
# name=
# state-directory-path=/var/lib/nfs/statd
# ha-callout=
# no-notify=0
#
[sm-notify]
# debug=0
# force=0
# retry-time=900
outgoing-port=4006
# outgoing-addr=
# lift-grace=y
发布于 2022-02-04 14:22:34
#mount -t nfs4 -o vers=4.2,rw,no_root_squash bkupserver:/bkup /bkup
#firewall-cmd --permanent --add-service=nfs
#filewall-cmd --permanent --add-service=rpc-bind
#firewall-cmd --reload
为了完整性,如上所述,您需要确保启用v4.2版本。
https://unix.stackexchange.com/questions/688901
复制相似问题