NFS是文件系统,在网络中起到了很重要的作用。下面我们就来介绍一下NFS配置的具体代码。希望文中介绍的内容面,能让大家对NFS文件系统(nfs file system )的配置有所了解。
相应NFS配置文件
[1] /etc/dfs/dfstab;(nfs server)
例如:
- # vi /etc/dfs/dfstab
- share -F nfs -o rw=engineering -d "home dirs" /export/home
- share -F nfs -o ro -d "app dirs" /export/app
- share -F nfs -o ro -d "man dirs" /usr/share/man
- [2] /etc/vfstab;(nfs client)
- # vi /etc/vfstab
- i2:/export/home - /export/home nfs - yes soft,bg
- i2:/export/app - /export/app nfs - yes soft,bg
- i2:/usr/share/man - /usr/share/man nfs - yes soft,bg
- rw|ro,bg|fg, soft|hard, intr|nointr,suid|nosuid, timeo=n
- default=11x.1sec, retry=n 1k.
相应系统进程
- [1] mountd
- [2] nfsd
- [3] statd
- [4] lockd
NFS配置相关命令
[1] share,
例如:
- # share -F nfs /export/home
- # share -F nfs -o ro /usr/share/man
- [2] unshare,
- [3] shareall,
- [4] unshareall;
- [5] mount
例如:
- # mount nfsserver:/export/home /export/home
- # mount nfsserver:/export/app /export/app
- # mount nfsserver:/usr/share/man /usr/share/man
- [6] umount,
- [7] mountall,
- [8] umountall,
- [9] dfshares host,
- [10] dfmounts
- [11] /etc/init.d/nfs.server; /etc/init.d/nfs.client
例如:
- # /etc/init.d/nfs.server start