NFS配置文件

简介:

vim /etc/exports 


/mnt/directory01/ 10.0.0.1(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory02/ 10.0.0.2(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory03/ 10.0.0.3(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory04/ 10.0.0.4(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory05/ 10.0.0.5(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory06/ 10.0.0.6(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory07/ 10.0.0.7(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory08/ 10.0.0.8(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory09/ 10.0.0.9(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory10/ 10.0.0.10(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory11/ 10.0.0.11(rw,fsid=1,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory12/ 10.0.0.12(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory13/ 10.0.0.13(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory14/ 10.0.0.14(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)

/mnt/directory15/ 10.0.0.15(rw,fsid=0,insecure,no_subtree_check,sync,no_root_squash)



编辑完该文件后,使用该命令使之生效

# exportfs -rv


然后客户端直接使用mount命令挂载该NFS,或编辑/etc/fstab文件来挂载。

#NFS Mount

10.0.0.250:/mnt/directory1  /mnt/nfs   nfs      rw,sync,hard,intr  0     0












本文转自ting2junshui51CTO博客,原文链接:http://blog.51cto.com/ting2junshui/1729649 ,如需转载请自行联系原作者



相关文章
|
存储 网络协议 Linux
NFS服务配置
NFS会经常用到,用于在网络上共享存储。这样讲,你对NFS可能不太了解,举一个例子来说明一下NFS是用来做什么的。假如有三台机器A, B, C,它们需要访问同一个目录,目录中都是图片,传统的做法是把这些图片分别放到A, B, C. 但是使用NFS只需要放到A上,然后A共享给B和C即可。访问的时候,B和C是通过网络的方式去访问A上的那个目录的。
350 0
NFS服务配置
|
Unix Linux Windows
Linux系统配置(NFS)
NFS主机、安装NFS共享服务、编辑NFS主配置文件、启用服务、客户机、安装、查询和挂载、案例、NFS配置、验证
224 0
Linux系统配置(NFS)
|
数据安全/隐私保护 安全 Linux
|
网络协议 开发工具
|
Web App开发 网络协议 安全
|
开发工具