Rancher使用NFS存储文件

Rancher使用NFS存储文件

1. 安装 NSF Server

想在Rancher中使用NFS存储类,首先需要选择一台服务器作为服务端,安装NFS服务。

#安装nfs服务
yum install -y nfs-utils rpcbind
 
#新建文件
vi /etc/exports
 
#输入以下内容
/nfsdata *(rw,no_root_squash,no_all_squash,sync)

2. 在服务端创建对应的目录和赋予权限

#创建文件夹
mkdir /nfsdata
 
#赋予权限
chmod 777 /nfsdata

3. 启动rpcbind和nfs服务

systemctl start rpcbind && systemctl enable rpcbind
systemctl start nfs && systemctl enable nfs

4. 在需要使用NFS服务的客户机上安装NFS服务(否则不能正常使用NFS)

 yum install -y nfs-utils 

5. 每个node查询NFS服务器

showmount -e nfs-ip
© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容