自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

詳解AIX 5L NFS Server的建設(shè)

網(wǎng)絡(luò) 網(wǎng)絡(luò)管理
在AIX 5L中配置NFS服務(wù)器。那么具體的代碼命令我們已經(jīng)做了介紹。這里我們從NFS Server的一些建設(shè)來講解,之后對于NFS Client的內(nèi)容再做一下解析。

對于AIX大家應(yīng)該有所了解。那么現(xiàn)在我們主要講解一下NFS服務(wù)器的大家,那么我們的平臺則是AIX 5L。那么具體的在AIX 5L上配置NFS Server/Client的過程我們就來詳細介紹一下。

一、配置AIX 5L NFS Server 

首先需要啟動NFS Server,可以通過smit nfs–> Network File System (NFS) –>Configure NFS on This System啟動或者停止nfs服務(wù)組。

可以通過lssrc -g nfs查看nfs的服務(wù)情況

  1. #lssrc -g nfs  
  2.  
  3.     Subsystem         Group            PID          Status  
  4.      biod             nfs              712706       active  
  5.      nfsd             nfs              635260       active  
  6.      rpc.mountd       nfs              462932       active  
  7.      rpc.lockd        nfs              639418       active  
  8.      rpc.statd        nfs              757914       active  
  9.      nfsrgyd          nfs                           inoperative  
  10.      gssd             nfs                           inoperative 

當然,以上也可以通過startsrc -g nfs與stopsrc -g nfs啟動與停止該服務(wù)組子系統(tǒng)。每當系統(tǒng)啟動時,/etc/rc.nfs運行exportfs命令來讀取服務(wù)器上的/etc/exports文件,然后告訴內(nèi)核要導(dǎo)出哪些目錄與對應(yīng)的權(quán)限。然后rpc.mountd和以上守護進程由/etc/rc.nfs啟動。

/etc/exports指定了AIX 5L nfs server要導(dǎo)出的目錄與權(quán)限,該文件內(nèi)容如下,如

  1. #more /etc/exports  
  2. /u01/logs -sec=sys:krb5p:krb5i:krb5:dh:none,rw,access=host_name 

注意:這里的access一定要寫機器名,其機器名對應(yīng)的ip在/etc/hosts中體現(xiàn)出來

用exportfs可以導(dǎo)出該目錄,如:

  1. #/usr/sbin/exportfs -a  
  2. #/usr/sbin/exportfs  
  3. /u01/logs -sec=sys:krb5p:krb5i:krb5:dh:none,rw,access=host_name 

關(guān)于更多的exportfs的用法,可以查看相關(guān)幫助,另外,/etc/xtab則與/ext/exports有一樣的格式,運行exportfs的時候,/etc/xtab將被更新,這樣可以臨時導(dǎo)出一個目錄而不更新exports文件。

關(guān)于/etc/exports的更新,也可以用smit nfs–>Network File System (NFS) –>Add a Directory to Exports List或者是Change / Show Attributes of an Exported Directory來實現(xiàn),如

  1. #smit chnfsexp  
  2.  
  3.     * Pathname of directory to export                     /u01/logs  
  4.       Anonymous UID                                      [-2]  
  5.       Public filesystem?                                 [no]  
  6.     * Change export now, system restart or both           both  
  7.       Pathname of alternate exports file                 []  
  8.       Allow access by NFS versions                       []  
  9.       External name of directory (NFS V4 access only)    []  
  10.       Referral locations (NFS V4 access only)            []  
  11.       Replica locations                                  []  
  12.       Ensure primary hostname in replica list             yes  
  13.       Allow delegations?                                 []  
  14.       Security method                                    [sys,krb5p,krb5i,krb5,dh,none]  
  15.           Mode to export directory                       [read-write]  
  16.           Hostname list. If exported read-mostly         []  
  17.           Hosts & netgroups allowed client access        [host_name1,host_name2]  
  18.           Hosts allowed root access                      [] 

驗證服務(wù)器中上的 /etc/exports 文件是否列出客戶機要安裝的文件系統(tǒng)名稱以及該文件系統(tǒng)是否已導(dǎo)出。輸入以下命令進行操作:

  1. #showmount -e server_name 

該命令在AIX 5L NFS Server/client上都可以正常運行,列出了由 server_name 當前導(dǎo)出的所有文件系統(tǒng)。 #p#

二、配置AIX 5L NFS Client

nfs的client配置比較簡單,需要portmap服務(wù)正常即可。

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


關(guān)于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指定了服務(wù)器的名字,其對應(yīng)的ip在/etc/hosts中體現(xiàn),dev指定了服務(wù)器的export出來的目錄。

關(guān)于更多的options的設(shè)置,可以查閱更多的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 服務(wù)器上運行,請在客戶機 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  

如果守護程序在服務(wù)器運行,會返回以下響應(yīng):

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

程序號分別與命令對應(yīng),如前例中所示。如果沒有返回類似的響應(yīng),請在服務(wù)器控制臺上登錄服務(wù)器并按照獲取 NFS 守護程序的當前狀態(tài)中的指示信息檢查守護程序的狀態(tài)。

  1. #showmount -e server_name 

該命令列出了由 server_name 當前導(dǎo)出的所有文件系統(tǒng)。

注意:如果在AIX上mount linux的nfs文件系統(tǒng),可能需要特殊執(zhí)行:

  1. #nfso -o nfs_use_reserved_ports=1 

 

責任編輯:佟健 來源: 服務(wù)器在線
相關(guān)推薦

2010-08-03 10:58:25

NFS Server

2010-08-04 17:04:20

AIXNFS

2010-08-05 14:50:42

AIX NFS

2010-08-04 13:02:30

NFS服務(wù)

2010-07-27 10:38:02

NFS ServerNFS Client

2010-07-27 16:25:50

2010-08-03 16:22:51

NFS SERVER

2011-08-01 18:14:21

AIX5LOracle 9i

2009-09-03 10:29:15

思科VPN詳解

2010-08-03 17:07:55

NFS服務(wù)器

2010-08-05 09:36:03

NFS服務(wù)

2009-09-08 15:06:45

NFS服務(wù)器

2010-08-03 13:54:00

2010-07-27 16:08:16

NFS Server

2010-08-06 12:34:15

NFS ServerClient

2010-07-27 13:07:23

NFS Server

2009-09-10 11:24:16

NFS服務(wù)器

2009-09-16 08:55:07

2010-08-06 13:28:01

NFS Server

2010-04-26 10:19:01

Aix調(diào)制
點贊
收藏

51CTO技術(shù)棧公眾號