关于ubuntu mount nfs

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/shaobingj126/article/details/52067758
将一台服务器的目录挂载另一台服务器,需要安装nfs
服务器端
apt-get install nfs-kernel-server
cat /etc/exports (将nfsdata目录共享出来)
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/nfsdata *(rw,async,no_root_squash,no_subtree_check,no_wdelay)

/etc/init.d/nfs-kernel-server start (重启服务)


客户端
10.255.255.20:/nfsdata/abc /data/nfs_m nfs rw,defaults 0 0 --->加到cat /etc/fstab


最后mount -a

猜你喜欢

转载自blog.csdn.net/shaobingj126/article/details/52067758
今日推荐