ITPub博客

首页 > 数据库 > Oracle > 10g重建集群测试

10g重建集群测试

原创 Oracle 作者:liiinuuux 时间:2014-01-27 16:59:41 0 删除 编辑
干掉集群
dd ocr和vote disk。 votedisk损坏后,很快所有节点会重启。

重启后,将inittab里最后关于crs的注释掉,再重启,让它干净了。

重新配置CRS
1 检查各个节点的配置
/u01/app/oracle/product/10.2.0/crs_1/install/paramfile.crs和/u01/app/oracle/product/10.2.0/crs_1/install/rootconfig里的参数

2 在一个节点:
[root@rac10g1 install]# pwd
/u01/app/oracle/product/10.2.0/crs_1/install
[root@rac10g1 install]# ./rootdelete.sh
Shutting down Oracle Cluster Ready Services (CRS):
OCR initialization failed with invalid format: PROC-22: The OCR backend has an invalid format
Shutdown has begun. The daemons should exit soon.
Checking to see if Oracle CRS stack is down...
Oracle CRS stack is not running.
Oracle CRS stack is down now.
Removing script for Oracle Cluster Ready services
Updating ocr file for downgrade
Cleaning up SCR settings in '/etc/oracle/scls_scr'
[root@rac10g1 install]# ./rootconfig
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 '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
WARNING: directory '/u01/app' is not owned by root
WARNING: directory '/u01' is not owned by root
assigning default hostname rac10g1 for node 1.
assigning default hostname rac10g2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: rac10g1 rac10g1-priv rac10g1
node 2: rac10g2 rac10g2-priv rac10g2
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /dev/raw/raw2
Format of 1 voting devices complete.
Startup will be queued to init within 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
     rac10g1
CSS is inactive on these nodes.
     rac10g2
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.

3 在其它节点
[root@rac10g2 crs_1]# pwd
/u01/app/oracle/product/10.2.0/crs_1
[root@rac10g2 crs_1]# ./root.sh
WARNING: directory '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
WARNING: directory '/u01/app' is not owned by root
WARNING: directory '/u01' 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 '/u01/app/oracle/product/10.2.0' is not owned by root
WARNING: directory '/u01/app/oracle/product' is not owned by root
WARNING: directory '/u01/app/oracle' is not owned by root
WARNING: directory '/u01/app' is not owned by root
WARNING: directory '/u01' is not owned by root
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
assigning default hostname rac10g1 for node 1.
assigning default hostname rac10g2 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 1: rac10g1 rac10g1-priv rac10g1
node 2: rac10g2 rac10g2-priv rac10g2
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 90 seconds.
Adding daemons to inittab
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
     rac10g1
     rac10g2
CSS is active on all nodes.
Waiting for the Oracle CRSD and EVMD to start
Oracle CRS stack installed and running under init(1M)
Running vipca(silent) for configuring nodeapps
Error 0(Native: listNetInterfaces:[3])
  [Error 0(Native: listNetInterfaces:[3])]
报错是脚本静默执行vipca时出错:
$CH/bin/vipca -silent -nodelist $CRS_NODELIST -nodevips $CRS_NODEVIPS

4 重新配置资源
bin @rac10g1->pwd
/u01/app/oracle/product/10.2.0/crs_1/bin
~ @rac10g1->vipca
Error 0(Native: listNetInterfaces:[3])
  [Error 0(Native: listNetInterfaces:[3])]
~ @rac10g1->cd /u01/app/oracle/product/10.2.0/crs_1/bin/
bin @rac10g1->./oifcfg setif -global eth0/1.1.1.0:public
bin @rac10g1->./oifcfg setif -global eth1/2.2.2.0:cluster_interconnect
bin @rac10g1->./oifcfg getif
eth0  1.1.1.0  global  public
eth1  2.2.2.0  global  cluster_interconnect
[root@rac10g1 crs_1]# vipca
...
此时nodeapps已经注好了
[root@rac10g1 crs_1]# crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora....0g1.gsd application    ONLINE    ONLINE    rac10g1    
ora....0g1.ons application    ONLINE    ONLINE    rac10g1    
ora....0g1.vip application    ONLINE    ONLINE    rac10g1    
ora....0g2.gsd application    ONLINE    ONLINE    rac10g2    
ora....0g2.ons application    ONLINE    ONLINE    rac10g2    
ora....0g2.vip application    ONLINE    ONLINE    rac10g2     
5 注册数据库资源
~ @rac10g1->srvctl  add database -d orcl -o $ORACLE_HOME -n orcl
~ @rac10g1->srvctl  add instance -d orcl -i orcl1 -n rac10g1
~ @rac10g1->srvctl  add instance -d orcl -i orcl2 -n rac10g2
~ @rac10g1->srvctl  add asm  -i +ASM1 -n rac10g1 -o $ORACLE_HOME
~ @rac10g1->srvctl  add asm  -i +ASM2 -n rac10g2 -o $ORACLE_HOME
netca....

6 启动
admin @rac10g1->srvctl  start asm -n rac10g1
admin @rac10g1->srvctl  start asm -n rac10g2
admin @rac10g1->srvctl  start database -d orcl
admin @rac10g1->racstat
HA Resource                                   Target     State            
-----------                                   ------     -----            
ora.orcl.db                                   OFFLINE    OFFLINE          
ora.orcl.orcl1.inst                           ONLINE     ONLINE on rac10g1
ora.orcl.orcl2.inst                           ONLINE     ONLINE on rac10g2
ora.rac10g1.ASM1.asm                          ONLINE     ONLINE on rac10g1
ora.rac10g1.LISTENER_RAC10G1.lsnr             ONLINE     ONLINE on rac10g1
ora.rac10g1.gsd                               ONLINE     ONLINE on rac10g1
ora.rac10g1.ons                               ONLINE     ONLINE on rac10g1
ora.rac10g1.vip                               ONLINE     ONLINE on rac10g1
ora.rac10g2.ASM2.asm                          ONLINE     ONLINE on rac10g2
ora.rac10g2.LISTENER_RAC10G2.lsnr             ONLINE     ONLINE on rac10g2
ora.rac10g2.gsd                               ONLINE     ONLINE on rac10g2
ora.rac10g2.ons                               ONLINE     ONLINE on rac10g2
ora.rac10g2.vip                               ONLINE     ONLINE on rac10g2
 




















来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26239116/viewspace-1075978/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2012-11-12

  • 博文量
    94
  • 访问量
    309040