溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

AIX 上使用NFS實(shí)現(xiàn)AIX之間文件網(wǎng)絡(luò)共享

發(fā)布時(shí)間:2020-07-20 22:24:58 來源:網(wǎng)絡(luò) 閱讀:1086 作者:Mr_sheng 欄目:建站服務(wù)器

AIX 上使用NFS實(shí)現(xiàn)AIX之間文件網(wǎng)絡(luò)共享

       AIX 可以使用NFS在AIX之間實(shí)現(xiàn)類似window共享文件夾功能,在多臺(tái)aix上安裝系統(tǒng)補(bǔ)丁的時(shí)候比較有用只需要在一臺(tái)服務(wù)器上FTP上傳,其他AIX通過共享訪問(注意不要多臺(tái)一起訪問可能會(huì)由于I/O繁忙帶有問題)

注意:

1.         多臺(tái)AIX之前在同一個(gè)局域網(wǎng)子網(wǎng)段中沒有問題,若跨網(wǎng)段請(qǐng)確認(rèn)網(wǎng)絡(luò)開通NFS端口

2.         下面我都是用root賬戶登錄操作

3.         要在A,B兩端的/etc/hosts里互相都加上彼此的IP地址和hostname(若不用DNS都通過hosts表里name

 

l  第一部分在AIX服務(wù)器A 上面建里要通過NFS共享的目錄比如:根目錄下/test目錄

# ls -l

total 8

-rw-r-----    1 root     system          543 Jul 24 03:39 temp.txt

/test目錄中存放一個(gè)文件temp.txt內(nèi)容如下,后面可以用這個(gè)驗(yàn)證共享成功

# cat temp.txt

SBMJOB CMD(STROBJCVN LIB(*ALLUSR))

       LOG(4 0 *SECLVL)            

 

 

 

S6564E5B

定時(shí)任務(wù) DAILY4  HOLD

 

磁帶機(jī)中磁帶 卷標(biāo) 001176推入磁帶機(jī)TAP07

 

Opt  Queue Manager                                     Port 

     HHT                                                1417

                                                            

 

MQM HHT

 

 

Opt  Queue Manager                                     Port   

     HHT                                                1414  

     HHT                                                1417  

A機(jī)器上運(yùn)行# smit nfs

先選擇Network File System (NFS)

 

                                                              NFS

 

Move cursor to desired item and press Enter.

 

  Configure TCP/IP (If Not Already Configured)

  Network File System (NFS)

  Network Information Service (NIS)

  Configure Secure NFS & NIS

 

再選擇Add a Directory to Exports List(先Change / Show Attributes of an Exported Directory確認(rèn)目錄之前沒有被Exported

                                                  Network File System (NFS)

 

Move cursor to desired item and press Enter.

 

  Configure NFS on This System

  Add a Directory to Exports List

  Change / Show Attributes of an Exported Directory

  Remove a Directory from Exports List

  Add a File System for Mounting

  Change / Show Attributes of an NFS File System

  Remove an NFS File System

  Flush NFS V4 Translation Cache

  Add NFSv4 File System FSID Options

  Change / Show NFSv4 File System FSID Options

  Reset NFSv4 File System FSID Options

下面畫面中* Pathname of directory to export 輸入導(dǎo)出目錄路徑和名稱    [/test]

 

                                               Add a Directory to Exports List

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

[TOP]                                                   [Entry Fields]

* Pathname of directory to export                    [/test]                  

  Anonymous UID                                      [-2]

  Public filesystem?                                  no                       

* Export directory now, system restart or both        both                    

       []                       

 

 

運(yùn)行完成之后如下提示

                                                       COMMAND STATUS

 

Command: running       stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 

0513-059 The nfsd Subsystem has been started. Subsystem PID is 5505044.

0513-059 The rpc.mountd Subsystem has been started. Subsystem PID is 7077952.

 

l  第二部分在另外一臺(tái)服務(wù)器B上

運(yùn)行smitty nfs選擇Network File System (NFS)

                                                             NFS

 

Move cursor to desired item and press Enter.

 

  Configure TCP/IP (If Not Already Configured)

  Network File System (NFS)

  Network Information Service (NIS)

  Configure Secure NFS & NIS

B機(jī)器上選擇Add a File System for Mounting

                                                  Network File System (NFS)

 

Move cursor to desired item and press Enter.

 

  Configure NFS on This System

  Add a Directory to Exports List

  Change / Show Attributes of an Exported Directory

  Remove a Directory from Exports List

  Add a File System for Mounting

  Change / Show Attributes of an NFS File System

  Remove an NFS File System

  Flush NFS V4 Translation Cache

  Add NFSv4 File System FSID Options

  Change / Show NFSv4 File System FSID Options

  Reset NFSv4 File System FSID Options

Pathname of mount point 填B機(jī)上mount點(diǎn)

Pathname of remote directory填A(yù)機(jī)上路徑

Host where remote directory resides填A(yù)機(jī)主機(jī)名(在A機(jī)器上運(yùn)行hostname獲得)

                                               Add a File System for Mounting

 

Type or select values in entry fields.

Press Enter AFTER making all desired changes.

 

[TOP]                                                   [Entry Fields]

* Pathname of mount point                           [/tmp/test/]                  

* Pathname of remote directory                       [/test]

* Host where remote directory resides                [svr05427]

  Mount type name                                    []

* Security method                                    [sys]                         

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

* /etc/filesystems entry will mount the directory     no                           

   on system restart.

 

 

注意: 要在A,B兩端的/etc/hosts里互相都加上彼此的IP地址和hostname

若提示not in hosts database 需要修改B機(jī)器上/etc/hosts文件增加A服務(wù)器的IP地址和hostname

 

                                                       COMMAND STATUS

 

Command: failed        stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 

mount: 1831-009 svr05427 not in hosts database

mount: 1831- 008 giving up on:

svr05427:/test

A route to the remote host is not available.

 

若有如下錯(cuò)誤可能網(wǎng)絡(luò)上沒有開放NFS需要的端口

                                                       COMMAND STATUS

 

Command: failed        stdout: yes           stderr: no

 

Before command completion, additional instructions may appear below.

 

nfsmnthelp: 1831-019 svr05427: System call error number -1.

 

mount: 1831- 008 giving up on:

svr05427:/test

System call error number -1.

成功之后可以在B機(jī)上smit mount中 List all能看到mount上文件驗(yàn)證,并訪問共享文件內(nèi)容確認(rèn)可以訪問


l  卸載

取消在B機(jī)上可以用smit umount指定上面B機(jī)上mount點(diǎn)可以在B機(jī)器上取消該NFS

在A機(jī)器上卸載,smit nfs選擇Remove a Directory from Exports List 輸入路徑

 

                                                  Network File System (NFS)

 

Move cursor to desired item and press Enter.

 

  Configure NFS on This System

  Add a Directory to Exports List                      

  Change / Show Attributes of an Exported Directory  

  Remove a Directory from Exports List

  Add a File System for Mounting

  Change / Show Attributes of an NFS File System     

  Remove an NFS File System

  Flush NFS V4 Translation Cache

  Add NFSv4 File System FSID Options

  Change / Show NFSv4 File System FSID Options

  Reset NFSv4 File System FSID Options

 

l  權(quán)限

我兩臺(tái)機(jī)器都是用root賬戶訪問權(quán)限兩臺(tái)都是如下一樣

# ls -l

total 8

-rw-r-----    1 root     system          543 Jul 24 06:10 temp.txt

l  附錄

l  windows端也能訪問AIX NFS ,也有建議window訪問aix文件系統(tǒng)SAMBA比NFS好

比如:http://www.chinaunix.net/jh/9/503373.html

經(jīng)常碰到一些客戶需要將PC Server的數(shù)據(jù)定期放到運(yùn)行AIX操作系統(tǒng)的6000小機(jī)的 磁帶機(jī)上備份,做了幾個(gè)這樣的案例 Share一下:) 
1、下載SFU 
     SFU是微軟的一款與UNIX系統(tǒng)進(jìn)行文件共享的軟件 100M左右??稍赪indows端模擬NFS Server 或者使 Windows成為NFS Client。他是免費(fèi)的。下載時(shí)需要.net帳戶(msn的就行) 
2、在Windows端安裝SFU軟件。選擇作為NFS Client。安裝時(shí)間較長(zhǎng)。安裝結(jié)束后可以在網(wǎng)上鄰居中發(fā)現(xiàn)新增加了一個(gè)叫做SFU的 工作組(好像是這個(gè)名字) 
在上面點(diǎn)擊右鍵選擇添加,將6000的IP地址加入。在6000一端開啟NFS服務(wù)。刷新后就可看到該服務(wù)器了 
3、身分認(rèn)證:在兩端建立相同帳號(hào),需要在6000上編輯/etc/hosts文件。將需要訪問NFS路徑的服務(wù)器IP地址與機(jī)器名稱加入。這是 在PC Server端就可以訪問該共享文件夾了。在上面還可進(jìn)行權(quán)限的管理 有興趣的自己實(shí)驗(yàn)吧。 


向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI