实验环境:
1台nfs-ganesha节点,使用vfs共享目录
1台proxy节点,进行nfs代理
1台客户端,进行nfs挂载使用
1.nfs-ganesha节点部署
https://blog.csdn.net/hxj3315/article/details/111180369
2.proxy节点部署
dnf install centos-release-nfs-ganesha30.noarch -y
dnf install nfs-ganesha-proxy -y
cat /etc/ganesha/ganesha.conf
EXPORT
{
# Export Id (mandatory, each EXPORT must have a unique Export_Id)
Export_Id = 77;
# Exported path (mandatory, path to export on the remote server)
Path = /data_pseudo;
# Pseudo Path (required for NFS v4)
Pseudo = /vfs_data;
Access_Type = RW;
Squash = no_root_squash;
# Exporting FSAL
FSAL {
Name = PROXY;
Srv_Addr = ${nfs-ganesha_ip};
Use_Privileged_Client_Port = true;
}
}
systemctl restart nfs-ganesha
3.客户端挂载测试
mount -t nfs4 ${proxy_ip}:/vfs_data /mnt/
df -h #看到挂载成功则完成