記一次Oracle RAC一節點重啟後出現故障的處理
阿新 • • 發佈:2018-11-15
因為儲存的相關操作,客戶需要手動重啟rac節點,然而,這個重啟導致了接下來的事故。。。。
由於是遠端跟我溝通,我回復rac環境下可以重啟一個節點,客戶就自信重啟了,出現的故障如下所示:
[grid@hxdb01 ~]$ srvctl start nodeapps -n hxdb01
PRKH-1010 : 無法與 CRS 服務通訊。
PRKH-3003 : 嘗試與 CSS 守護程式通訊時失敗
[[email protected] ~]$ crsctl start cluster
CRS-2672: Attempting to start 'ora.gpnpd' on 'hxdb01'
CRS-5017: The resource action "ora.gpnpd start" encountered the following error:
Start action for daemon aborted. For details refer to "(:CLSN00107:)" in "/u01/app/grid/11.2/log/hxdb01/agent/ohasd/oraagent_grid//oraagent_grid.log".
CRS-2674: Start of 'ora.gpnpd' on 'hxdb01' failed
CRS-2679: Attempting to clean 'ora.gpnpd' on 'hxdb01'
CRS-2681: Clean of 'ora.gpnpd' on 'hxdb01' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'hxdb01'
CRS-5017: The resource action "ora.gpnpd start" encountered the following error:
Start action for daemon aborted. For details refer to "(:CLSN00107:)" in "/u01/app/grid/11.2/log/hxdb01/agent/ohasd/oraagent_grid//oraagent_grid.log" .
CRS-2674: Start of 'ora.gpnpd' on 'hxdb01' failed
CRS-2679: Attempting to clean 'ora.gpnpd' on 'hxdb01'
CRS-2681: Clean of 'ora.gpnpd' on 'hxdb01' succeeded
CRS-4000: Command Start failed, or completed with errors.
[[email protected] ~]$ crsctl query crs activeversion
Oracle Cluster Registry initialization failed accessing Oracle Cluster Registry device: PROC-26: Error while accessing the physical storage
ORA-29701: unable to connect to Cluster Synchronization Service
一開始發給我這樣的報錯以為是rac抉擇盤 或 ASM磁碟出現故障導致不能加入rac叢集,客戶那邊DBA通過各種查資料及搜尋問題,無果,因為這套rac環境是我做的,公司就派我到現場解決;
來到客戶現場,檢查過基礎環境確認沒問題,開始查報錯,看日誌,網路上相關的報錯解決非常詳細,但經過操作之後完全沒用,無奈,只能再次從日誌尋找疑點。
在gpnpd.log日誌中:有一條報錯引起了注意:/u01/app/grid/11.2/gpnp/init/hxdb01.pid 寫入失敗,如下圖所示:
既然是不能寫,第一時間想到檔案許可權,ll一下這個檔案,發現hxdb01.pid屬主為root,並且發現整個目錄的屬主都是root, 這絕對是認為修改的,於是想到了上次開發人員在上線導資料的時候誤改了oracle整個目錄的屬主為root,雖然後來還原了,但有關rac服務的部分目錄沒有改回來,直到現在是第一次重啟節點,導致rac相關服務不能對檔案作寫操作,以至於不能啟動叢集服務。
問題找到了,解決就簡單多了:
在 /u01/app/grid/11.2/gpnp/目錄下,
將 hxdb01 、 init 、 profiles 、 wallets 四個目錄的屬主由“root” 改為 “grid” ,
重啟伺服器後 rac恢復正常。