首页 | 编程语言 | 网站建设 | 游戏天堂 | 冲浪宝典 | 网络安全 | 操作系统 | 软件时空 | 硬件指南 | 病毒相关 | IT 认证
软讯网络 > 操作系统 > 其他操作系统 > NFS基本概念及其配置
【标  题】:NFS基本概念及其配置
【关键字】:NFS
【来  源】:http://www.cublog.cn/u/17046/showart.php?id=124374

NFS基本概念及其配置

 

 

第一、概念

1、  Nfs依赖的2种协议,包括表示层的XDR和会话层的RPC(呵呵,就是在冲击波风波中出了名的家伙)。

2、  nfs 守候进程和它们的子系统。

序号

进程全路径

子系统名

组名

1

/usr/sbin/portmap

portmap

portmap

2

/usr/sbin/nfsd

nfsd

nfs

3

/usr/sbin/biod

biod

nfs

4

/usr/sbin/rpc.lockd

rpc.lockd

nfs

5

/usr/sbin/rpc.statd

rpc.statd

nfs

6

/usr/sbin/rpc.mountd

rpc.mountd

nfs

323成对完成预读后写功能。保证系统响应速度。

445配对,完成文件锁定功能。

5、服务端需要126进程;客户端需要1345进程。

第二、服务器配置

PS:在配置NFS 的第一步是在服务器和客户机两端启动NFS服务。NFS服务由/etc/rc.nfs命令文件来启动的。

1、启动NFS服务 mknfs or smit mknfs

# mknfs -N

0513-029 The portmap Subsystem is already active.

Multiple instances are not supported.

Starting NFS services:

0513-029 The biod Subsystem is already active.

Multiple instances are not supported.

0513-029 The rpc.statd Subsystem is already active.

Multiple instances are not supported.

0513-029 The rpc.lockd Subsystem is already active.

Multiple instances are not supported.

Completed NFS services.

2、关闭NFS服务。rmnfs or smit rmnfs

3、如果没有/etc/exports文件,使用mknfs命令之后,nfsdrpc.exportd进程不会启动,需要添加一个空的此文件。(试验已经证明)另外如果单独使用startssrc命令来单独启动这2个进程,这个进程可以正常启动,但是可否正常使用。就不可而知了。

4、服务器端配置过程

a.运行mknfs

b.导出nfs目录,smitty mknfsexp

[TOP]                                                   [Entry Fields]

* Pathname of directory to export                    []                       /

  Anonymous UID                                      [-2]

  Public filesystem?                                  no                     +

* Export directory now, system restart or both        both                   +

  Pathname of alternate exports file                 []

  Allow access by NFS versions                       []                      +

  External name of directory (NFS V4 access only)    []

* Security method                                    [sys,krb5p,krb5i,krb5,> +

*     Mode to export directory                        read-write             +

      Hostname list. If exported read-mostly         []

      Hosts & netgroups allowed client access        []

      Hosts allowed root access                      []

  Security method                                    []                      +

      Mode to export directory                       []                      +

[MORE...18]

主要需要指定导出的目录就可以了。而这个工具最终会修改/etc/exports文件。这个文件的内容很简单的。当然是否导出也只是这个文件在控制。

/home/nfs -sec=sys:krb5p:krb5i:krb5:dh:none,rw

/home/kk -sec=sys;krb5p:krb5i:krb5:dh:none,ro

可以看出来这个nfs已经导出2个目录,留意这个所谓导出的目录,需要是本地本地系统存在的目录,意思是这些目录里面的内容可以供客户端读取(写入),否则会出现导出失败的报错。如果手工修改这个文件,执行

# exportfs

/home/nfs -sec=sys:krb5p:krb5i:krb5:dh:none,rw

/home/kk  -sec=sys:krb5p:krb5i:krb5:dh:none,ro

来重新读取这个文件,使之生效即可。

5、客户端配置

[TOP]                                                   [Entry Fields]

* Pathname of mount point                            []                       /

* Pathname of remote directory                       []

* Host where remote directory resides                []

  Mount type name                                    []

* Security method                                    []                      +

* Mount now, add entry to /etc/filesystems or both?   now                    +

* /etc/filesystems entry will mount the directory     no                     +

   on system restart.

* Mode for this NFS file system                       read-write             +

* Attempt mount in foreground or background           background             +

  Number of times to attempt mount                   []                       #

  Buffer size for read                               []                       #

  Buffer size for writes                             []                       #

  NFS timeout. In tenths of a second                 []                       #

  NFS version for this NFS filesystem                 any                    +

  Transport protocol to use                           any                    +

输入安装点,远程安装点,主机名等信息就会在/etc/filesystems中生产这个fs的信息。然后可以直接访问之。

Moving Physical Resources Between Domains:【上一篇】
AIX 用户的系统资源使用限制:【下一篇】
【相关文章】
  • 目标板使用nfs来共享文件
  • Tru64两台DS15机器之间打开NFS文件很慢的解决!
  • sun nfs server
  • 什么是NFS文件系统 - 转载
  • lINUX NFS的配置
  • NFS文件系统共享文件的基本操作
  • FC5中设置NFS目录
  • NFS文档
  • FTP server,NFS server或HTTP server 哪个文件传输效率更高
  • NFS配置(unfinished)
  • 【随机文章】
  • php环境配置 php5 mysql5 apache2 phpmyadmin安装与配置
  • 推荐一本书《罗伯特议事规则(Robert's Rules of Order) 》,也许对于想要参与管理的技术人员来说是很有用的
  • 使硬盘长寿的维护十五招
  • 两个凡是
  • .Net 1.1 sp1 没有安装导致的MagicAjax无法正常运行
  • Windows 2000 用网页设置动态桌面
  • 一分钟学会编写XP风格界面的程序!
  • 构造函数的初始化列表
  • VB.Net to C#实践
  • 我好痛苦!
  • 【相关评论】
    没有相关评论
    【发表评论】
    姓名:
    邮件:
    随机码*
    评论*
          
    |  首 页  |  版权声明  |  联系我们   |  网站地图  |
    CopyRight © 2004-2007 软讯网络 All Rigths Reserved.