天天看点

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 ,如需转载请自行联系原作者