NFS服务端部署流程:
yum install -y nfs-utils rpcbind
echo '/data 172.16.1.0/24(rw,sync)' >/etc/exports
mkdir /data
chown -R nfsnobody.nfsnobody /data
/etc/init.d/rpcbind start && /etc/init.d/nfs start
服务配置检查
rpcinfo -p 172.16.1.31
showmount -e 10.0.0.31
Export list for 10.0.0.31:
/data 172.16.1.0/24
NFS客户端部署流程:
yum install -y nfs-utils rpcbind
mount -t nfs 172.16.1.31:/data /mnt
df -h
Filesystem Size Used Avail Use% Mounted on
172.16.1.31:/data 8.6G 1.9G 6.4G 23% /mnt