Network File System
来源:互联网 发布:linux root初始密码 编辑:程序博客网 时间:2024/05/16 05:30
Network File System
NFS 是由SUN公司发展, 并於1984年推出, NFS是一个RPC service ,它使我们能够达到档案的共享, 它的设计是为了在不同的系统间使用, 所以它的通讯协定设计与主机及作业系统无关.当使用者想用远端档案时只要用"mount"就可把remote档案系统挂接在自己的档案系统之下,使得远端的档案使用上和local机器的档案没两样.
machine A machine B
/ /
bin etc usr bin etc usr
man man share local
假如我们在机器A上, 要把机器B上的 /usr/man 挂接到machine A 的/usr/man只要下mount machine_name:/usr/man /usr/home
就可mount过来.而我们不只是可以mount目录,就是一个档也是可以的.在挂接之后我们只能对档案做reading (or writing) 的动作,而不能在remote machie上把此档或目录move,delete掉 , 但须注意的是如我们mount /usr 后 , 不能再mount /usr底下的目录, 否则会发生错误
□ Servers & Clients
NFS就是促使Servers上的档案能被其他的机器mount,而达到资源共享,享用这些档案的机器就可称为Client,一个client可以从server上mount一个档或是一个层次的目录(file hierarchies) . 然而事实上任何一台机器都可以做NFS server or NFS client ,甚至同时为NFS server and NFS client 也可以.
□ Servers Exporting & Clients Mounting
NFS server 所export 出来的档案或目录都记录在 /etc/exports 这一个档中,当我们启动NFS server 时 在 /etc/rc.local 的这一个script会自动的启动 exportfs 这一个程式 , 搜寻 /etc/exports 这一个档是否存在, 并且赋予正确的权限给所有export出去的 file hierarchies .
但须注意的是,只有server所export出去的路径,NFS client才能够mount, 同样的当启动client时 , 系统会自动去mount所有server export的路径,而mount到的所有路径都会记录在 /etc/fstab 下 , 类似如下的fstab档
/dev/sd0a / 4.2 rw 1 1
/dev/sd0h /tmp 4.2 rw 1 3
/dev/sd0g /usr 4.2 rw 1 2
/dev/fd0 /pcfs pcfs rw,noauto 0 0
sparc20:/swap /swap nfs rw,intr,bg,soft 0 0
sparc17:/home /home nfs rw,intr,bg,soft 0 0
sparc17:/home3 /home3 nfs rw,intr,bg,soft 0 0
sparc14:/home4 /home4 nfs rw,intr,bg,soft 0 0
sparc20:/home2 /home2 nfs rw,intr,bg,soft 0 0
sparc20:/var/spool/mail /var/spool/mail nfs rw,intr,bg,soft 0 0
rs970:/home1 /home1 nfs rw,intr,bg,soft 0 0
★ Noted :
当client mount 到一个路径,绝对不是说copy server上的这一个路径到local的机器上,我们可以用 cd 进入这一个mount到的路径,就如同是使用local directory一样
□ Setting Up a NFS Server
1. 定义机器为 NFS file server
2. 划分servers disk ,定义哪一些partitions 是要提供出来作为
NFS 是由SUN公司发展, 并於1984年推出, NFS是一个RPC service ,它使我们能够达到档案的共享, 它的设计是为了在不同的系统间使用, 所以它的通讯协定设计与主机及作业系统无关.当使用者想用远端档案时只要用"mount"就可把remote档案系统挂接在自己的档案系统之下,使得远端的档案使用上和local机器的档案没两样.
machine A machine B
/ /
bin etc usr bin etc usr
man man share local
假如我们在机器A上, 要把机器B上的 /usr/man 挂接到machine A 的/usr/man只要下mount machine_name:/usr/man /usr/home
就可mount过来.而我们不只是可以mount目录,就是一个档也是可以的.在挂接之后我们只能对档案做reading (or writing) 的动作,而不能在remote machie上把此档或目录move,delete掉 , 但须注意的是如我们mount /usr 后 , 不能再mount /usr底下的目录, 否则会发生错误
□ Servers & Clients
NFS就是促使Servers上的档案能被其他的机器mount,而达到资源共享,享用这些档案的机器就可称为Client,一个client可以从server上mount一个档或是一个层次的目录(file hierarchies) . 然而事实上任何一台机器都可以做NFS server or NFS client ,甚至同时为NFS server and NFS client 也可以.
□ Servers Exporting & Clients Mounting
NFS server 所export 出来的档案或目录都记录在 /etc/exports 这一个档中,当我们启动NFS server 时 在 /etc/rc.local 的这一个script会自动的启动 exportfs 这一个程式 , 搜寻 /etc/exports 这一个档是否存在, 并且赋予正确的权限给所有export出去的 file hierarchies .
但须注意的是,只有server所export出去的路径,NFS client才能够mount, 同样的当启动client时 , 系统会自动去mount所有server export的路径,而mount到的所有路径都会记录在 /etc/fstab 下 , 类似如下的fstab档
/dev/sd0a / 4.2 rw 1 1
/dev/sd0h /tmp 4.2 rw 1 3
/dev/sd0g /usr 4.2 rw 1 2
/dev/fd0 /pcfs pcfs rw,noauto 0 0
sparc20:/swap /swap nfs rw,intr,bg,soft 0 0
sparc17:/home /home nfs rw,intr,bg,soft 0 0
sparc17:/home3 /home3 nfs rw,intr,bg,soft 0 0
sparc14:/home4 /home4 nfs rw,intr,bg,soft 0 0
sparc20:/home2 /home2 nfs rw,intr,bg,soft 0 0
sparc20:/var/spool/mail /var/spool/mail nfs rw,intr,bg,soft 0 0
rs970:/home1 /home1 nfs rw,intr,bg,soft 0 0
★ Noted :
当client mount 到一个路径,绝对不是说copy server上的这一个路径到local的机器上,我们可以用 cd 进入这一个mount到的路径,就如同是使用local directory一样
□ Setting Up a NFS Server
1. 定义机器为 NFS file server
2. 划分servers disk ,定义哪一些partitions 是要提供出来作为
- Network File System
- network file system
- NFS, Network File System
- Install NFS(network file system)
- NFS服务器----Network File System
- NFS(Network File System) Configuration
- 网络文件系统(Network File System)简介
- [分布式文件系统] Sun's Network File System
- linux --NFS-network file system,环境变量
- Redhat Network File System (NFS) Guide
- 设置网络文件系统(NFS—Network File System)
- ubuntu11.10下nfs(Network File System)配置
- NFS(network file system,网络文件系统)搭建配置
- NFS (Network File System) 服务器共享多个目录
- Design and Implementation of the Sun Network File System
- NFS(Network File System) 服务的配置与应用
- NFS(network file system)网络文件系统1
- ubuntu 安装nsf(Network File System)与配置服务
- 让Ghost下岗:解析Windows Vista备份和还原中心
- 如何在jsp中引用标签库 转帖
- Seam - 无缝集成 JSF,第 1 部分: 为 JSF 量身定做的应用程序框架
- Silverlight揭秘
- JDK环境变量的配置
- Network File System
- SQL 语句的优化策略
- subclass QDialog
- Seam - 无缝集成 JSF,第 2 部分: 借助 Seam 进行对话
- 软件著作归谁所有
- 十分钟内让你看懂中国经济形势,房价为何上涨
- Java术语表
- 关于数据库附加不上的错误处理方式
- linux下暴风影音安装方法