NFS网络存储
192.168.11.10上安装nfs的server端:
yum install rpcbind nfs-utils
mkdir /data/
cd /data/
mkdir vo1 vol2 vol3
chmod -R 777 /data #给/data目录开发所有权限
#启动服务
service nfs start 或者systemctl start nfs #启动nfs服务
service rpcbind start 或者systemctl start rpcbind #启动rpc服务
#设置开机自启动
chkconfig nfs on 或者 systemctl enable nfs
chkconfig rpcbind on 或者systemctl enable rpcbind
vi /etc/exports,内容如下:
/data/vol1 192.168.11.0/24(rw,no_root_squash)
/data/vol2 192.168.11.0/24(rw,no_root_squash)
/data/vol3 192.168.11.0/24(rw,no_root_squash)
service nfs restart #重启服务
ps aux|grep rpc|grep -v grep # 查看rpc进程
showmount -e 192.168.11.10 #查看共享盘
------------------------------
192.168.11.23作为nfs的客户端;
yum install nfs-utils rpcbind
showmount -e 192.168.11.10 #查看共享盘
mkdir /vol1
#挂载nfs远程磁盘
mount 192.168.11.10:/data/vol1 /vo1 或者
mount -o rw 192.168.11.10:/data/vol1 /vol1
卸载挂载网盘
umount /vol1


阅读排行


Copyright © 叮叮声的奶酪 版权所有
备案号:鄂ICP备17018671号-1