nfs部署

准备条件:

master节点1台

slave节点1台

部署流程:

1、master/slave节点yum安装nfs服务

#yum -y install nfs-utils.x86_64 -y

2、在master节点上创建共享目录

#mkdir -p /data/mysql_nfs

3、配置exports文件存储目标和路径

#vim /etc/exports

[root@master test]# cat /etc/exports
/root/nfs_poc/data/ 192.168.0.0/24(rw,async,no_root_squash,no_all_squash)  //rw,赋予读写权限;no_root_squash,不做root用户的uid映射;no_all_squash,不做任何用户的uid映射;

注:#man exports  //可以通过查看权限手册查看内容

#systemctl restart rpcbind

#systemctl restart nfs

4、在slave节点上也安装nfs

#yum -y install nfs-utils.x86_64

在客户端上执行,查看nfs存储挂载情况

#showmount -e $masterip

原文地址:https://www.cnblogs.com/houjunjun437416/p/11934883.html