Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3322043
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类: Oracle

2017-01-13 11:14:20

1、删除失败节点的相关信息

--在存活节点上删除失败节点注册

[root@dbrac2 bin]# ./srvctl remove nodeapps -n dbrac1
[root@dbrac2 bin]# ./crs_unregister ora.dbrac.dbrac1.inst
[root@dbrac2 bin]# ./crs_unregister ora.dbrac1.ASM1.asm
[root@dbrac2 bin]# ./crs_unregister ora.dbrac1.LISTENER_DBRAC1.lsnr
[root@dbrac2 bin]# ./crs_unregister ora.dbrac1.vip
[root@dbrac2 bin]# ./racgons remove_config dbrac1:6200

网上有一种方法,但我没验证,如下:
/*
1 cat /oracle/product/10.2.0/crs_1//opmn/conf/ons.config 获得remoteport
2 /oracle/product/10.2.0/crs_1/bin/racgons remove_config rac1:6200
2 srvctl remove instance -d dbrac -i dbrac11 (rac1上的service也自动删除)
3 srvctl remove asm -n dbrac1
4 如果是10.2.0.4 可以 srvctl remove listener -n rac1 -i LISTENER_RAC1
        10.2.0.4以下的用netca删除listener  */


--更新oracle inventory

[oracle@dbrac2 bin]$ pwd
/u01/oracle/product/10.2.0/db_1/oui/bin
[oracle@dbrac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=$ORACLE_HOME "CLUSTER_NODES=dbrac2,dbrac3"  如果有多个则为:"CLUSTER_NODES=dbrac2,dbrac3"

[oracle@dbrac2 bin]$ pwd
/u01/oracle/product/10.2.0/crs/oui/bin

[oracle@dbrac2 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u01/oracle/product/10.2.0/crs "CLUSTER_NODES=dbrac2,dbrac3" 

注意,这里是目录,一个是crs,一个是db

--删除其它的一些注册

[root@dbrac2 install]# pwd
/u01/oracle/product/10.2.0/crs/install
[root@dbrac2 install]# ./rootdeletenode.sh dbrac1,1

--最后确认成功
[oracle@dbrac2 bin]$ ./olsnodes -n
dbrac2  2

2、添加节点,一台机器全新安装后的添加

--首先安装操作系统,保证与第一个节点版本一样,包括asm的几个包等

--确保,共享存储能够识别,并用用raw绑定

--配置参数

--建相应的目录

安装及绑定磁盘等,如果存储方面出重启磁盘乱序,请绑定ssid,详细步骤,请参阅《linux系统 重启盘符错乱问题

--建立集群信任

[oracle@dbrac3 ~]$ mkdir ~/.ssh

[oracle@dbrac3 ~]$ chmod 700 ~/.ssh

[oracle@dbrac3 ~]$ ssh-keygen -t rsa

[oracle@dbrac3 ~]$ ssh-keygen -t dsa

[oracle@dbrac2 ~]$ scp ~/.ssh/authorized_keys dbrac3:~/.ssh/authorized_keys

从其它节点拷贝这个文件到新加节点去了

[oracle@dbrac3 .ssh]$ cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
[oracle@dbrac3 .ssh]$ cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys
[oracle@dbrac3 .ssh]$ scp ~/.ssh/authorized_keys dbrac2:~/.ssh/authorized_keys

同时拷贝回其它节点去,从上面的情况看,是拷贝到dbrac2这个节点,如果其它地方有,也要拷贝过去

--配置asm

[root@dbrac3 ~]# /etc/init.d/oracleasm configure

[root@dbrac3 init.d]# ./oracleasm listdisks
ASMD1
ASMD2
ASMD3
[root@dbrac3 init.d]# ./oracleasm scandisks
Scanning the system for Oracle ASMLib disks: [  OK  ]

[root@dbrac3 init.d]# raw -qa
/dev/raw/raw1:  bound to major 8, minor 17
/dev/raw/raw2:  bound to major 8, minor 33
/dev/raw/raw3:  bound to major 8, minor 49
/dev/raw/raw4:  bound to major 8, minor 65
/dev/raw/raw5:  bound to major 8, minor 81
/dev/raw/raw6:  bound to major 8, minor 97
/dev/raw/raw7:  bound to major 8, minor 113
/dev/raw/raw8:  bound to major 8, minor 129

注意,raw的绑定,要配置!

用集群软件检查:

[oracle@dbrac3 .ssh]$ /u02/database/cluvfy/runcluvfy.sh stage -pre crsinst -n dbrac3 -verbose

检查合格后,便可以安装了

3、增加节点

--复制集群软件
[oracle@dbrac2 bin]$ pwd
/u01/oracle/product/10.2.0/crs/oui/bin
[oracle@dbrac2 bin]$ export DISPLAY=192.168.104.212:0.0
[oracle@dbrac2 bin]$ ls -lrt
total 224
-rwxrwxr-x 1 oracle oinstall  35634 Jun 22  2005 lsnodes
-rwxrwxr-x 1 oracle oinstall 163185 Jun 22  2005 runInstaller
drwxrwx--- 2 oracle oinstall   4096 Oct 12 15:26 resource
-rwxrwxr-x 1 oracle oinstall     70 Oct 12 15:27 runInstaller.sh
-rwxrwxr-x 1 oracle oinstall    952 Oct 12 15:27 runConfig.sh
-rwxr-xr-x 1 oracle oinstall    488 Oct 12 15:27 ouica.sh
-rwxrwxr-x 1 oracle oinstall     93 Oct 12 15:27 addNode.sh
-rwxrwxr-x 1 oracle oinstall    180 Oct 12 15:27 addLangs.sh
[oracle@dbrac2 bin]$ ./addNode.sh

在下一步中,添加节点的信息,基本上按提示操作就行了

最后运行几个脚本,注意机器位置,看清楚

--在新加节点执行
[root@dbrac3 init.d]# sh /u01/oracle/oraInventory/orainstRoot.sh
Changing permissions of /u01/oracle/oraInventory to 770.
Changing groupname of /u01/oracle/oraInventory to oinstall.
The execution of the script is complete

--在存活节点执行
[root@dbrac2 ~]# sh /u01/oracle/product/10.2.0/crs/install/rootaddnode.sh
clscfg: EXISTING configuration version 3 detected.
clscfg: version 3 is 10G Release 2.
Attempting to add 1 new nodes to the configuration
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node :
node 3: dbrac3 priv3 dbrac3
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
/u01/oracle/product/10.2.0/crs/bin/srvctl add nodeapps -n dbrac3 -A virt3/255.255.255.0/eth0 -o /u01/oracle/product/10.2.0/crs

--在新加节点执行
[root@dbrac3 init.d]# sh /u01/oracle/product/10.2.0/crs/root.sh

直接回车就可以了!

--增加rdbms软件
[oracle@dbrac2 bin]$ pwd
/u01/oracle/product/10.2.0/db1/oui/bin
[oracle@dbrac2 bin]$ ./addNode.sh
Starting Oracle Universal Installer...

No pre-requisite checks found in oraparam.ini, no system pre-requisite checks will be executed.
Oracle Universal Installer, Version 10.2.0.1.0 Production
Copyright (C) 1999, 2005, Oracle. All rights reserved.

到最后的时候,仍然要运行一下root.sh

[root@dbrac3 init.d]# sh /u01/oracle/product/10.2.0/db1/root.sh

4、配置监听
[oracle@dbrac2 bin]$ netca

通过图形界面选择,集群,然后进行配置,如果提示存在,可以用reconfig选项,基本上没问题


5、添加实例

注意,在现在存活的节点上执行,也就是有实例的节点进行,本例中只且一个dbrac2

[oracle@dbrac2 admin]$ dbca

注意,我在实际处理过程中,出现了一个失败节点的错误,最后我只重新配置crs解决,详细说明请参阅《oracle10g rac 表决盘损坏、ocr损坏处理》,再进行dbca时,完全通过!
关键步骤如下:
--选择Oracle Real Application clusters database
--选择instance management
--选择add an instance

后面选择文件、日志这些都可以完全通过,不影响!在开始的时候,1%的时候,要确定extend asm!

阅读(1389) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~