-捨棄RPC方式,大幅改進效能,NFS v4 工作在TCP 通信協定
nfs-utils – The nfs-utils package provides a daemon for the kernel NFS server and related tools, which provides a much higher level of performance than the traditional Linux NFS server used by most users.
portmap – The portmap package should be installed on any machine which acts as a server for protocols using RPC.
nfs4-acl-tools – This package contains commandline and GUI ACL utilities for the Linux NFSv4 client.
先看Server端安裝 NFS V4 server
yum install nfs-utils nfs4-acl-tools portmap
修改 /etc/exports (server端把/sales 開NFS分享)
vi /etc/exports
重新啟動 nfs service
service nfs restart
service portmap restart
service nfslock restart
或者使用下方指令將設定做重新發怖,所以不必重新啟動 nfs service
exportfs -rv
chkconfig nfs on
chkconfig portmap on
接下來先看 Client端 如何安裝與設定
Client端也安裝NFS V4 server
yum install nfs-utils nfs4-acl-tools portmap
秀出 NFS Server 分享出那些
showmount -e serverIP
nfsstat –all
掛載(把/sales 掛在到 /home/nfs)
mount -t nfs4 serverIP:/ /home/nfs
如果是用下面這個指令,會一直出現mount.nfs4 failed, reason given by server: No such file or directory
mount -t nfs4 serverIP:/sales /home/nfs

Tags: , , ,