星期四, 3月 21, 2013

Oracle 10g RAC -- node 1 毀損重新加入之步驟

0.Prerequisite:
 Configure /etc/hosts
 Configure ssh : 設定ssh 對等性
 Install OCFS rpm
 Configure /etc/fstab : OCFS filesystem
 Configure IP/Network : 網卡bonding ... etc
 Configure OS kernel : /etc/sysctl.conf

1.Create user , group
2.Verify if db1 env is ok
  執行cluvfy 工具
  ./cluvfy stage -pre -n db1 -r 10gR2 -verbose
3.如果有ASM,刪除ASM instance,
  $srvctl remove asm -n db1;
4.移除clusterware resource
   srvctl stop nodeapps -n db1
   srvctl remove nodeapps -n db1
5.db2上執行updateNodeList script 更新DB資訊
  /oracle/db102/oui/bin/runInstaller -updateNodeList -noClusterEnabled ORACLE_HOME=/oracle/db102 CLUSTER_NODES=db2 CRS=false "INVENTORY_LOCATION=/oracle/oraInventory" LOCAL_NODE=db2

6.db2上執行updateNodeList script更新CRS資訊
/oracle/crs102/oui/bin/runInstaller -updateNodeList -noClusterEnabled ORACLE_HOME=/oracle/crs102 "CLUSTER_NODES=db2" CRS=TRUE "INVENTORY_LOCATION=/oracle/oraInventory" LOCAL_NODE=db2

7.db2上執行rootdeletenode.sh script
  /oracle/crs102/bin/olsnodes -n -i
  As root :
      /oracle/crs102/install/rootdeletenode.sh db1,1;

8.檢查是否已刪除Clusterware resource
  As root:
  [root@db2 bin]# ./crs_stat  |grep -i db1
  NAME=ora.db1.LISTENER_db1.lsnr
  NAME=ora.db1.vip
  [root@db2 bin]# ./crs_unregister ora.db1.LISTENER_db1.lsnr
  [root@db2 bin]# ./crs_unregister ora.db1.vip
  [root@db2 bin]# ./crs_stat  |grep -i db1

  檢查DB節點資訊
  As root:
  /oracle/crs102/bin/olsnodes -n

9.在任意保留節點中執行racgons命令,刪除ONS設定:
  [oracle@db2 orcl]$ /oracle/crs102/bin/racgons remove_config db1:6200
  racgons: Existing key value on db1 = 6200.
  racgons: db1:6200 removed from OCR.

10.Clone CRS HOME
   db2,oracle用戶進入$CRS_HOME/oui/bin目錄,執行addNode.sh
  
12.Configure the New ONS
  cd /oracle/crs102/bin
  ./racgons add_config db1:6200 db2:6200

13.Clone ORA_HOME
  db2,oracle用戶進入$ORACLE_HOME/oui/bin目錄,執行addNode.sh

14.新增db1 listener
  db1上運行netca,選擇cluster database,按步驟設定

15.db2上新增新的instance
  先選擇Cluster database...然後instance management然後add an instance然後...

最後檢查
[oracle@db1 log]$ olsnodes -n
db2  2
db1  3

As Oracle:
crs_stat -t 查詢resource 狀態 , 確定皆已online.

沒有留言:

LinkWithin-相關文件

Related Posts Plugin for WordPress, Blogger...