1、安装服务
# yum install -y rpc-bind nfs-utils
 
2、服务配置
# vi /etc/exports
添加如下内容
/data/www/gmf_oms/storage/logs 192.168.0.20(ro,sync,no_root_squash,subtree_check)
/data/www/gmf_ipb/storage/logs 192.168.0.20(ro,sync,no_root_squash,subtree_check)
/data/www/xc-uds/storage/logs 192.168.0.20(ro,sync,no_root_squash,subtree_check)
 
3、客户端mount
分别执行以下操作:
# mount.nfs 192.168.0.150:/data/www/xc-uds/storage/logs /TEST-log/150_uds
# mount.nfs 192.168.0.150:/data/www/gmf_ipb/storage/logs /TEST-log/150_ipb
# mount.nfs 192.168.0.150:/data/www/gmf_oms/storage/logs /TEST-log/150_oms
 
可以添加到自动启动/etc/rc.local中
 
或者/etc/fstab挂载
 
4、查看挂载
# mount
总结:对于这种挂载,NFS共享式挂载很容易引起负载过高,原因是挂载的源路径异常,例如源路径的服务器系统进行了一次重启操作等。
 
5、添加服务
firewall-cmd –permanent –zone=public –add-service=nfs
firewall-cmd –permanent –zone=public –add-service=rpc-bind
firewall-cmd –permanent –zone=public –add-service=mountd
 
firewall-cmd –reload
firewall-cmd –list-all
# systemctl restart nfs        //重启服务
 
6、写入/etc/fstab中
192.168.0.176:/data/web/MicroServicePlatform/regitry-server/logs /TEST-log/176_Platform-regitry-server nfs defaults 0 0
192.168.0.176:/data/web/MicroServicePlatform/user-service/logs /TEST-log/176_Platform-user-service nfs defaults 0 0

最后修改日期: 2019年9月1日

作者

留言

撰写回覆或留言

发布留言必须填写的电子邮件地址不会公开。