二、配置AIX 5L NFS Client

nfs的client配置比较简单,需要portmap服务正常即可。

  1. #lssrc -s portmap  
  2.  
  3.     Subsystem         Group            PID          Status  
  4.      portmap          portmap          225506       active 


关于mount的信息,是写在/etc/filesystems中的,如

  1. #more /etc/filesystems  
  2.  
  3.     ......  
  4.     /mydisk:  
  5.         dev             = "/disk1" 
  6.         vfs             = nfs 
  7.         nodename        = dbbak 
  8.         mount           = false 
  9.         type            = nfs3 
  10.         options         = soft,intr,retry=2,rsize=32768,wsize=32768,timeo=300,proto=tcp 
  11.         account         = false 
  12.     ...... 

其中nodename指定了服务器的名字,其对应的ip在/etc/hosts中体现,dev指定了服务器的export出来的目录。

关于更多的options的设置,可以查阅更多的nfs的文档。

其详细信息,也可以在smit中获得,如smit nfs–>Network File System (NFS) –>Add a File System for Mounting或者是Change / Show Attributes of an NFS File System。如

  1. #smit chnfsmnt  
  2.  
  3.     * PATHNAME of mount point                             /mydisk  
  4.     * PATHNAME of Remote Directory                       [/disk1]  
  5.     * HOST where remote directory resides                [dbbak]  
  6.       Mount type NAME                                    [nfs3]  
  7.     * Use SECURE mount option?                            no  
  8.     * Remount file system now,                            both  
  9.        update /etc/filesystems or both?  
  10.     * /etc/filesystems entry will mount the directory     no  
  11.        on system RESTART.  
  12.     * MODE for this NFS file system                       read-write  
  13.     * ATTEMPT mount in background or foreground?          foreground  
  14.       NUMBER of times to attempt mount                   [2]  
  15.       Buffer SIZE for read                               [32768]  
  16.       Buffer SIZE for writes                             [32768]  
  17.       NFS TIMEOUT. In tenths of a second                 [300]  
  18.       NFS version for this NFS file system                any  
  19.       Transport protocol to use                           tcp  
  20.       Internet port NUMBER for server                    []  
  21.     * Allow execution of SUID and sgid programs           yes  
  22.        in this file system?  
  23.     * Allow DEVICE access via this mount?                 yes  
  24.     * Server supports long DEVICE NUMBERS?                yes  
  25.     * Mount file system soft or hard                      soft 

验证 mountd、portmap 和 nfsd 守护程序正在 NFS 服务器上运行,请在客户机 shell 提示符下输入以下命令:

  1. #/usr/bin/rpcinfo -u server_name mount  
  2. #/usr/bin/rpcinfo -u server_name portmap  
  3. #/usr/bin/rpcinfo -u server_name nfs  

如果守护程序在服务器运行,会返回以下响应:

  1. program  100005  version  1  ready  and  waiting  
  2. program  100000  version  2  ready  and  waiting  
  3. program  100003  version  2  ready  and  waiting 

程序号分别与命令对应,如前例中所示。如果没有返回类似的响应,请在服务器控制台上登录服务器并按照获取 NFS 守护程序的当前状态中的指示信息检查守护程序的状态。

  1. #showmount -e server_name 

该命令列出了由 server_name 当前导出的所有文件系统。

注意:如果在AIX上mount linux的nfs文件系统,可能需要特殊执行:

  1. #nfso -o nfs_use_reserved_ports=1 


相关内容