Solaris 10下遷移10G RAC (八)

space6212發表於2019-02-25
最近做了一個rac資料庫的遷移,中間涉及到很多部分內容,包括rac環境的搭建、ASM的設定、資料庫的遷移、升級等。
本文是這次遷移工作的第八部分:遷移過程中遇到的錯誤。

遇到的錯誤

錯誤

Crs我安裝了3遍,在其中一次重灌crs時,在最後執行指令碼時出錯:

bash-3.00# /oracle/app/oraInventory/orainstRoot.sh

Changing permissions of /oracle/app/oraInventory to 770.

Changing groupname of /oracle/app/oraInventory to oinstall.

The execution of the script is complete

在執行第二個指令碼時,停頓住了:

bash-3.00# /oracle/app/product/10.2/crs/root.sh

WARNING: directory '/oracle/app/product/10.2' is not owned by root

WARNING: directory '/oracle/app/product' is not owned by root

WARNING: directory '/oracle/app' is not owned by root

WARNING: directory '/oracle' is not owned by root

Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory

Setting up NS directories

Oracle Cluster Registry configuration upgraded successfully

WARNING: directory '/oracle/app/product/10.2' is not owned by root

WARNING: directory '/oracle/app/product' is not owned by root

WARNING: directory '/oracle/app' is not owned by root

WARNING: directory '/oracle' is not owned by root

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node :

node 1: pub-node1 priv-node1 pub-node1

node 2: pub-node2 priv-node2 pub-node2

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

Now formatting voting device: /dev/rdsk/c3t0d3s6

Format of 1 voting devices complete.

Startup will be queued to init within 30 seconds.

看了一下/tmp的資訊,發現有如下錯誤:

Failure in CSS initialization opening OCR.

查了一會資料,發現可能是因為hostname引起的,因為我當前的hostnamepre1,而我在配置cluster nodes時,寫的是pub-node1。解決方法是:

修改hostname為配置cluster nodes時的名稱:

hostname pub-node1

重新執行剛才出錯的指令碼:

bash-3.00# hostname pub-node1

bash-3.00# /oracle/app/product/10.2/crs/root.sh

WARNING: directory '/oracle/app/product/10.2' is not owned by root

WARNING: directory '/oracle/app/product' is not owned by root

WARNING: directory '/oracle/app' is not owned by root

WARNING: directory '/oracle' is not owned by root

Checking to see if Oracle CRS stack is already configured

Setting the permissions on OCR backup directory

Setting up NS directories

Oracle Cluster Registry configuration upgraded successfully

WARNING: directory '/oracle/app/product/10.2' is not owned by root

WARNING: directory '/oracle/app/product' is not owned by root

WARNING: directory '/oracle/app' is not owned by root

WARNING: directory '/oracle' is not owned by root

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node :

node 1: pub-node1 priv-node1 pub-node1

node 2: pub-node2 priv-node2 pub-node2

clscfg: Arguments check out successfully.

NO KEYS WERE WRITTEN. Supply -force parameter to override.

-force is destructive and will destroy any previous cluster

configuration.

Oracle Cluster Registry for cluster has already been initialized

Startup will be queued to init within 30 seconds.

Adding daemons to inittab

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

pub-node1

CSS is inactive on these nodes.

pub-node2

Local node checking complete.

Run root.sh on remaining nodes to start CRS daemons.

為了下次重啟後仍然生效,修改檔案:

/etc/hostname.ce0

/etc/nodename

/etc/inet/ipnodes

把這兩個檔案的內容中pre1都修改為pub-node1

在其他節點也做類似的操作。

安裝crs時不能修改節點名稱

在安裝crs時,在節點選擇時還是顯示之前安裝錯誤時的節點資訊,且不能修改節點名稱。這是因為沒有把之前的crs資訊刪除乾淨,把安裝crs時的inventory 目錄刪除就可以

網路驗證不透過

$ ./runcluvfy.sh comp nodecon -n pre1,pre2 -verbose

Verifying node connectivity

ERROR:

User equivalence unavailable on all the nodes.

Verification cannot proceed.

Verification of node connectivity was unsuccessful on all the nodes.

solaris下很容易遇到這個錯誤,這是因為Oracle在尋找sshscp命令時,去/usr/local/bin目錄下尋找,而ssh命令在/usr/bin目錄下。

相應的解決方法也很簡單,在/usr/local/bin目錄下建立一個指向/usr/bin/ssh的連結就可以了。

具體步驟是:

在需要執行cluvfy的節點上執行執行下面步驟:

root建立連結:

bash-3.00# mkdir -p /usr/local/bin

bash-3.00# ln -s -f /usr/bin/ssh /usr/local/bin/ssh

bash-3.00# ln -s -f /usr/bin/scp /usr/local/bin/scp

oracle使用者下再次新增ssh驗證:

$ exec /usr/bin/ssh-agent $SHELL

$ /usr/bin/ssh-add

Identity added: /export/home/oracle/.ssh/id_rsa (/export/home/oracle/.ssh/id_rsa)

Identity added: /export/home/oracle/.ssh/id_dsa (/export/home/oracle/.ssh/id_dsa)

再次執行驗證就可以成功了:

bash-3.00$ ./runcluvfy.sh comp nodecon -n pre1,pre2

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

相關文章