當前位置:
首頁 > 最新 > Exadata無法掛載AIX上的NFS目錄

Exadata無法掛載AIX上的NFS目錄

作者簡介

石雲華,現就職於北京海天起點,oracle技術二線專家成員,Exadata部門負責人。擁有十餘年電信、保險、稅務行業核心系統ORACLE資料庫運維經驗,持有11gOCM、Exadata、Goldengate等證書。擅長於oracle/goldengate/exadata方面的故障診斷及疑難問題處理。

一客戶需要在Exadata的計算節點掛載一個NFS文件系統來進行數據備份,當客戶在一台AIX主機上配置好NFS Server後,在Exadata計算節點掛載目錄時報錯,具體報錯信息如下:

[root@ht01db01 ~]# mount -t nfs ***.***.10.136:/orabak /orabak

mount: ***.***.10.136:/orabak failed, reason given by server: unknown nfs status return value: -1

從這個錯誤信息可以看出,Exadata計算節點(NFS的客戶端)無法獲取NFS伺服器端的NFS狀態。

根據錯誤信息,在網路上可以找到相同的案例,給出的解決方案是在NFS Server端的/etc/hosts文件中添加到NFS Client端的解析。具體如下:

AIX是NFS的服務端,另外一台是linux,想掛載AIX上的NFS服務,但提示標題所示的錯誤,查了下資料,原來需要在AIX機子上修改 /etc/hosts文件,增加linux那台機子的ip和hostname,至於hostname的話可以在linux上直接敲hostname就可以看到,保存hosts文件後可以馬上生效。

客戶按照這個方法在NFS Server端的/etc/hosts文件中添加了到NFS Client端的解析之後,再次掛載NFS時,仍然報相同的錯誤。

(1)、於是VPN連接到客戶環境,檢查Server端和Client端的hosts解析:

—Client端:

[root@ht01db01 ~]# more /etc/hosts

……略……

***.***.10.136 P650

[root@ht01db01 ~]# hostname

ht01db01.sidm.com

—Server端:

# more /etc/hosts

……略……

***.***.18.21 ht01db01.sidm.comht01db01

#

# hostname

P650

從Server端和Client端的/etc/hosts文件可以看出,已經添加了各自IP和主機名解析。但似乎網路上的解決方案不起作用。

(2)、既然如此,那隻能進行一一排查了,首先檢查NFS Server配置是否正確:

# lssrc -g nfs

Subsystem Group PID Status

biod nfs 1376280 active

nfsd nfs 459766 active

rpc.mountd nfs 1377214 active

rpc.statd nfs 1901028 active

rpc.lockd nfs 984044 active

nfsrgyd nfs inoperative

gssd nfs inoperative

#

# lssrc -g portmap

Subsystem Group PID Status

portmap portmap 1180306 active

#

# showmount -e P650

export list for P650:

/orabak (everyone)

#

可見,NFSServer的配置沒有任何問題。

(3)、既然NFS Server配置正常,那懷疑是不是Server端和Client端開啟了防火牆?

[root@ht01db01 ~]# service iptables status

Firewall is stopped.

Client端檢查可知,未開啟防火牆,Server端同樣也未開啟。

(4)、此時,客戶反饋,他們用其他的AIX主機或Linux主機當作NFS Client端,都可以成功掛載NFS Server的目錄,唯獨這台Exadata的計算節點無法掛載。唯一的區別是Exadata與NFS Server端主機不屬於同一個網段,而測試的另外兩台NFS Client端主機(AIX和Linux)與NFS Server端主機屬於同一個網段。

The NFS client in has received a status code of -1 from AIX; it cannot deal with the status code correctly.

To avoid the AIX server sending this -1, ensure the AIX server can resolve the IP address of the client into a hostname. For example, insert the IP address and hostname into the /etc/hosts file on the AIX NFS server.

IBM AIX has been known to set -1 MOUNT reply status (which is not included in the MOUNT protocol possible responses) if it cannot resolve the client』s hostname from the IP address within the client』s request.

(6)、問題看似無解,下面只能進行嘗試了。為什麼其他的NFS Client端主機(AIX和Linux)都可以成功掛載,而Exadata上的計算節點卻不行?此時我仍懷疑是否Exadata端與NFS Server端的網路層面有什麼問題。於是查看Exadata計算節點到NFS Server端的路由情況:

[root@ht01db01 ~]# traceroute P650

traceroute to P650 (***.***.10.136), 30 hops max, 40 byte packets

1 (***.***.12.251) 0.843 ms 0.943 ms 0.985 ms

2 P650 (***.***.10.136) 0.741 ms 0.784 ms 0.824 ms

從路由表情況可以看出,Exadata的計算節點經過了***.***.12.251,然後到了NFS Server端主機P650 (***.***.10.136)。

而Exadata計算節點的路由配置如下:

[root@ht01db01 ~]# route -n

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

***.***.18.20 ***.***.12.254 255.255.255.255 UGH 0 0 0 bondeth0

***.***.18.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0

***.***.12.0 0.0.0.0 255.255.255.0 U 0 0 0 bondeth0

192.168.8.0 0.0.0.0 255.255.252.0 U 0 0 0 bondib0

169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 bondib0

0.0.0.0 ***.***.12.254 0.0.0.0 UG 0 0 0 bondeth0

可以看出Exadata計算節點的默認網關介面為bondeth0網卡,而不是eth0網卡。而對於Exadata而言,eth0網卡上的IP地址對應的解析名為主機名(hostname),而從traceroute命令的輸出可以看出,Exadata計算節點到NFS Server端主機是經過bondeth0網卡路由出去的。

於是,在AIXNFS server主機做了如下嘗試:

# more /etc/hosts

……略……

# ***.***..18.21 ht01db01.sidm.com ht01db01

***.***.12.21 ht0101.sidm.com ht0101

#

將Exadata計算節點的eth0網卡對應的IP和解析名這個條目注釋掉,重新添加bondeth0網卡對應的IP和解析名這個條目。

再次進行掛載測試:

[root@ht01db01 ~]# mount -t nfs ***.***.10.136:/orabak /orabak

[root@ht01db01 ~]# df -k

Filesystem 1K-blocks Used Available Use% Mounted on

/dev/mapper/VGExaDb-LVDbSys1

/dev/sda1 126427 26945 93058 23% /boot

/dev/mapper/VGExaDb-LVDbOra1

tmpfs 84132864 19551268 64581596 24% /dev/shm

/dev/mapper/VGExaDb-lvfs1

201585632 132327400 59018232 70% /goldengate

可見,此時已經掛載成功。

原創文章,版權歸本文作者所有,如需轉載請註明出處

喜歡本文請長按下方的二維碼訂閱Oracle一體機用戶組


喜歡這篇文章嗎?立刻分享出去讓更多人知道吧!

本站內容充實豐富,博大精深,小編精選每日熱門資訊,隨時更新,點擊「搶先收到最新資訊」瀏覽吧!


請您繼續閱讀更多來自 Oracle一體機用戶組 的精彩文章:

TAG:Oracle一體機用戶組 |