nfs 服务简单搭建
环境:centos7
服务端
yum install -y nfs-utils rpcbind
创建共享目录:
mkdir -p /test/test
chmod -R 666 /test/test
编辑配置文件:
vim /etc/exports
/test/test *(rw,sync,no_root_squash)
不重启刷新exports文件
exportfs [-aruv]
-a 全部mount或umount文件/etc/exports中的内容
-r 重新mount文件/etc/exports中的共享内容
-u umount目录
-v 在export的时候,将详细的信息输出到屏幕上
exportfs -rv
启动rpcbind,nfs
systemctl start rpcbind
systemctl start nfs
客户端
yum install -y nfs-utils
创建挂载目录
mkdir test
chmod 755 test
挂载
mount -t nfs 192.168.1.1:/test/test    /test
df -Th查看
挂载出问题后,使用后 umount -f 挂载目录 出现驱动busy的现象时,df -Th 无反应时,使用以下命令解决问题
umont -lf 挂载的目录
参数相关:


 
                
            
         浙公网安备 33010602011771号
浙公网安备 33010602011771号