挂在远程磁盘

磁盘端
yum -y install nfs*
rpm -qa |grep nfs
rpm -qa |grep rpcbind
开机启动
systemctl start nfs
systemctl start rpcbind
systemctl enable nfs
systemclt enable rpcbind
showmount -e localhost
数据端
mkdir /mnt/nfs01
vim /etc/exports
/mnt/nfs01 10.10.10.0/24 (rw,no_root_squash,no_all_squash,sync)
权限修改
chmod -R 777 /mnt/
配置信息
vim /etc/exports
/home/soft     10.254.254.0/24(rw,insecure,sync,all_squash)
/home/ssd/share    10.254.254.0/24(rw,insecure,sync,all_squash)
/home/ssd/AlgorithmLib      10.254.254.0/24(rw,insecure,sync,all_squash)
/mnt/disk1/data *(rw,insecure,sync,all_squash)
重启
service nfs restart
查看是否共享成功
showmount -e nfs服务端IP
showmount -e localhost
=====================================
磁盘端
yum -y install nfs*
rpm -qa |grep nfs
rpm -qa |grep rpcbind
开机启动
systemctl start nfs
systemctl start rpcbind
systemctl enable nfs
systemclt enable rpcbind
showmount -e localhost
创建挂在目录
mkdir /data/nfsone
测试是否可以共享
showmount -e nfs服务端IP
showmount -e 10.10.20.212
客户端
mount -t nfs -o nolock 服务端IP:共享目录绝对路径 本地挂载目录
mount -t nfs -o nolock 10.10.20.212:/mnt/nfs01 /data/nfsone
df -Th
与卸载本地挂载相同
umount /data/nfsone
umount 10.10.20.212:/mnt/nfs01

你可能感兴趣的:(file)