使用NFS服务的好处在于:
1,允许多台计算机使用相同的文件,因为网络上的所有用户都可以访问相同的数据
2,通过共享应用程序的方式来降低存储成本
3,保证了数据的一致性和可靠性
4,支持不同的使用环境
5,减少了系统管理费用
NFS环境包含NFS服务器和NFS客户程序两个组成部分
NFS服务器
简单的来说NFS服务器就是物理上拥有共享文件和目录的主机。
NFS客户
就是使用共享文件和目录的主机。
配置及管理NFS服务器可以通过使用NFS服务器文件,NFS服务器程序和NFS 服务器命令来进行
NFS服务器文件
和NFS服务器相关联的一些重要文件:
1、/etc/dfs/dfstab
2、/etc/dfs/sharetab
3、/etc/dfs/fstypes
4、/etc/rmtab
5、/etc/nfs/nfslog.conf
6、/etc/default/nfslogd
1、/etc/dfs/dfstab
/etc/dfs/dfstab
这个文件是用来包含每次系统启动的共享的本地资源,每一行包含一个share命令。
# cat /etc/dfs/dfstab # Place share(1M) commands here for automatic execution # on entering init state 3. # # Issue the command 'svcadm enable network/nfs/server' to # run the NFS daemon processes and the share commands, after adding # the very first entry to this file. # # share [-F fstype] [ -o options] [-d ""] [resource] # .e.g, # share -F nfs -o rw=engineering -d "home dirs" /export/home2 |
如果nfs.server脚本在这个文件里面没有发现任何共享命令,那么就不启动NFS后台程序。在以下情况才读/etc/dfs/dfstab文件里面的内容:
1,系统运行级别是3
2,超级用户运行shareall命令
3,超级用户运行#/etc/init.d/nfs.server start
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/222350/viewspace-925971/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/222350/viewspace-925971/