AIX 上使用NFS實現(xiàn)AIX之間文件網(wǎng)絡(luò)共享
十余年的澠池網(wǎng)站建設(shè)經(jīng)驗,針對設(shè)計、前端、開發(fā)、售后、文案、推廣等六對一服務(wù),響應(yīng)快,48小時及時工作處理。營銷型網(wǎng)站的優(yōu)勢是能夠根據(jù)用戶設(shè)備顯示端的尺寸不同,自動調(diào)整澠池建站的顯示方式,使網(wǎng)站能夠適用不同顯示終端,在瀏覽器中調(diào)整網(wǎng)站的寬度,無論在任何一種瀏覽器上瀏覽網(wǎng)站,都能展現(xiàn)優(yōu)雅布局與設(shè)計,從而大程度地提升瀏覽體驗。創(chuàng)新互聯(lián)從事“澠池網(wǎng)站設(shè)計”,“澠池網(wǎng)站推廣”以來,每個客戶項目都認真落實執(zhí)行。
AIX 可以使用NFS在AIX之間實現(xiàn)類似window共享文件夾功能,在多臺aix上安裝系統(tǒng)補丁的時候比較有用只需要在一臺服務(wù)器上FTP上傳,其他AIX通過共享訪問(注意不要多臺一起訪問可能會由于I/O繁忙帶有問題)
注意:
1. 多臺AIX之前在同一個局域網(wǎng)子網(wǎng)段中沒有問題,若跨網(wǎng)段請確認網(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目錄中存放一個文件temp.txt內(nèi)容如下,后面可以用這個驗證共享成功
# cat temp.txt SBMJOB CMD(STROBJCVN LIB(*ALLUSR)) LOG(4 0 *SECLVL)
S6564E5B 定時任務(wù) DAILY4 HOLD
磁帶機中磁帶 卷標 001176推入磁帶機TAP07
Opt Queue Manager Port HHT 1417
MQM HHT
Opt Queue Manager Port HHT 1414 HHT 1417 |
A機器上運行# 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確認目錄之前沒有被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 []
|
運行完成之后如下提示
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 第二部分在另外一臺服務(wù)器B上
運行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機器上選擇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機上mount點
Pathname of remote directory填A(yù)機上路徑
Host where remote directory resides填A(yù)機主機名(在A機器上運行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機器上/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.
|
若有如下錯誤可能網(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機上smit mount中 List all能看到mount上文件驗證,并訪問共享文件內(nèi)容確認可以訪問
l 卸載
取消在B機上可以用smit umount指定上面B機上mount點可以在B機器上取消該NFS
在A機器上卸載,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)限
我兩臺機器都是用root賬戶訪問權(quán)限兩臺都是如下一樣
# 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ù)定期放到運行AIX操作系統(tǒng)的6000小機的 磁帶機上備份,做了幾個這樣的案例 Share一下:)
1、下載SFU
SFU是微軟的一款與UNIX系統(tǒng)進行文件共享的軟件 100M左右。可在Windows端模擬NFS Server 或者使 Windows成為NFS Client。他是免費的。下載時需要.net帳戶(msn的就行)
2、在Windows端安裝SFU軟件。選擇作為NFS Client。安裝時間較長。安裝結(jié)束后可以在網(wǎng)上鄰居中發(fā)現(xiàn)新增加了一個叫做SFU的 工作組(好像是這個名字)
在上面點擊右鍵選擇添加,將6000的IP地址加入。在6000一端開啟NFS服務(wù)。刷新后就可看到該服務(wù)器了
3、身分認證:在兩端建立相同帳號,需要在6000上編輯/etc/hosts文件。將需要訪問NFS路徑的服務(wù)器IP地址與機器名稱加入。這是 在PC Server端就可以訪問該共享文件夾了。在上面還可進行權(quán)限的管理 有興趣的自己實驗吧。
網(wǎng)站名稱:AIX上使用NFS實現(xiàn)AIX之間文件網(wǎng)絡(luò)共享
文章網(wǎng)址:http://chinadenli.net/article38/gogjsp.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站、網(wǎng)站內(nèi)鏈、商城網(wǎng)站、網(wǎng)站營銷、網(wǎng)站制作、網(wǎng)站建設(shè)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)