现在有两台服务器,ip分别为:192.168.0.10、192.168.0.11
需要将192.168.0.10的/home/rims/test/Attachment/以及/home/rims/version/Attachment/ 挂载到
192.168.0.11的 /app/attachment上

共享目录

开启NFS服务

chkconfig --level 35 nfs on
service nfs start

在192.168.0.10的服务器端中编辑/etc/exports文件,添加如下内容:

/home/rims/test/Attachment/ 192.168.0.11(rw,no_root_squash,no_all_squash,sync)
/home/rims/version/Attachment/ 192.168.0.11(rw,no_root_squash,no_all_squash,sync)

service nfs restart

service rpcbind restart

source /etc/exports

在要挂载的服务器执行命令

查看挂载目录的情况

df -i

如果原有的不用了,卸载原有的

umount /app/attachment

在192.168.0.11执行

mount -t nfs 172.20.0.170:/home/rims/test/Attachment  /app/attachment

df -i 检查挂载成功!

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐