AIX 上配置、使用NFS

尛樣兒發表於2010-01-06

Server端(dwetl:192.168.32.66)

1.修改/etc/hosts
加入
192.168.32.65 ods

2.建立nfs儲存:
建立一個jsf2的檔案系統,掛在到/dwetlNfs目錄下。

3.mount檔案系統:
mount /dwetlNfs
/dev/dwetl_nfslv /dwetlNfs        jfs2   Dec 01 17:04 rw,log=/dev/hd8

4.配置Server NFS(實際修改/etc/exports檔案,提供nfs服務):
smit mknfsexp

* Pathname of directory to export                     /dwetlNfs

* Version of exported directory to be changed         
  Anonymous UID                                      [-2]
  Public filesystem?                                 [no]  

* Change export now, system restart or both           both

  Pathname of alternate exports file                 []
  Allow access by NFS versions                       []
  External name of directory (NFS V4 access only)    []
  Referral locations (NFS V4 access only)            []
  Replica locations                                  []
  Ensure primary hostname in replica list             yes

  Allow delegations?                                 []
  Scatter                                             none                                                         

  Security method 1                                  [sys,krb5p,krb5i,krb5,dh]

      Mode to export directory                       [read-write]

      Hostname list. If exported read-mostly         [ods]
      Hosts & netgroups allowed client access        [ods]
      Hosts allowed root access                      [ods]

Client端配置(ods:192.168.32.65)

1.修改/etc/hosts
加入
dwetl 192.168.32.66

2.在檔案"/etc/filesystems"中新增如下內容(類似Linux中的fstab):

/dwetlNfs:
        dev                    = /dwetlNfs
        vfs                     = nfs
        nodename      = dwetl
        type                   = nfs3
        log                     = /tmp/dwetl_nfslog
        mount               = true
        options         = rw,bg,hard,intr,proto=tcp,vers=3,rsize=32768,wsize=32768,timeo=600
        account             = false

3.建立本地掛載節點:
mkdir /dwetlNfs

4.載入NFS檔案系統:
mount -o rw,bg,hard,intr,proto=tcp,vers=3,rsize=32768,wsize=32768,timeo=600 dwetl:/dwetlNfs /dwetlNfs

5.測試重啟是否能自動掛載:
umount /dwetlNfs
mount /dwetlNfs
mount(檢視是否掛載成功dwetlNfs nfs檔案系統)

至此,Client就可以正常備份Oracle資料到掛載上來的NFS(/dwetlNfs)了。

如果是11gR2的RAC環境,請參考如下引數完成NFS Client的配置:
/onfs:
        dev                    = /nfs
        vfs                     = nfs
        nodename      = racdb1
        type                   = nfs3
        log                     = /tmp/nfslog
        mount               = true
        options         = cio,rw,bg,hard,intr,rsize=32768,wsize=32768,vers=3,timeo=600,noac
        account             = false

參考文章:
   《Mount Options for Oracle files when used with NFS on NAS devices (文件 ID 359515.1)》:http://blog.itpub.net/23135684/viewspace-625315/

--end--

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/23135684/viewspace-624480/,如需轉載,請註明出處,否則將追究法律責任。

相關文章