Oracle 10g RAC 加入新节点

1、在一台裸机上安装Linux系统c3,准备让其加入c1,c2两节点的rac环境

要有两个网卡eth0,eth1

(略)

2、调整/etc/hosts文件

将三个节点都变成如下

127.0.0.1localhost

192.168.33.101c1
192.168.33.201c1-vip
10.0.0.2c1-priv

192.168.33.102c2
192.168.33.202c2-vip
10.0.0.3c2-priv

192.168.33.103c3
192.168.33.203c3-vip
10.0.0.4c3-priv

10.0.0.1san


3、配置hangcheck-timer:用于监视 Linux 内核是否挂起
vim /etc/modprobe.conf


options hangcheck-timer hangcheck_tick=30 hangcheck_margin=180

4、自动加载hangcheck-timer 模块/u01/app/oracle/product/10.2.0/db_1
vim /etc/rc.local
modprobe hangcheck-timer
检查hangcheck-timer模块是否已经加载:
lsmod | grep hangcheck_timer


5、创建组dba & oinstall,创建用户oracle
groupadd oinstall

groupadd dba

usreadd -g oinstall -G dba oracle

6、配置集群互信
在新节点创建key:
su - oracle
ssh-keygen -t rsa
ssh-keygen -t dsa
cd .ssh
cat *.pub >> authorized_keys

然后三个节点进行轮流追加(略)

7、c3配置ntp

vim /etc/ntp.conf
--------------------------------------
server 192.168.0.253
restrict 192.168.0.253 mask 255.255.255.255 nomodify notrap noquery

crontab -e

*/5 * * * * /usr/sbin/ntpdate san

8、导入san存储

yum install iscsi-initiator-utils -y
service iscsid start
iscsiadm -m discovery -t st -p san
service iscsi start
chkconfig iscsid on
chkconfig iscsi on

9、用udev进行绑定

vim /etc/udev/rules.d/60-raw.rules

ACTION=="add", KERNEL=="sdf1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdg1", RUN+="/bin/raw /dev/raw/raw2 %N"

KERNEL=="raw1", OWNER="oracle", GROUP="oinstall", MODE="660"
KERNEL=="raw2", OWNER="oracle", GROUP="oinstall", MODE="660"

然后启动udev

start_udev

9.5、为了将来在c3上开启实例方便

可以直接拷贝c1的

/etc/sysctl.conf

/etc/security/limits.conf

/home/oracle/.bashrc

然后进行相应的修改

10、检查集群节点

cd /soft/clusterware/cluvfy/
./runcluvfy.sh stage -pre crsinst -n c1,c2,c3 -verbose

11、添加clusterware

从老节点启动添加节点向导:

cd /u01/crs_1/oui/bin/

./addNode.sh

在Specify Cluster Nodes to Add to Installation页

加入c3,c3-priv,c3-vip信息

执行三个脚本

c3上执行

/u01/app/oracle/oraInventory/orainstRoot.sh

c1上执行

/u01/crs_1/install/rootaddnode.sh

c3上执行

/u01/crs_1/root.sh

12、添加数据库软件

cd /u01/app/oracle/produt/10.2.0/db1/oui/bin/

./addNode.sh

在Specify Cluster Nodes to Add to Installation页

勾选c3

执行一个脚本

在c3上执行

/u01/app/oracle/product/10.2.0/db_1/root.sh

13、配置监听

在老节点c1启动netca

选择Cluster configuration

选择c3节点

Listener configuration

Add

LISTENER

TCP

Use the standard port number of 1521

14、扫描ASM磁盘

在c3安装oracleasmlib、oracleasm、oracle-support包

/etc/init.d/oracleasm configure

/etc/init.d/oracleasm scandisks

15、启动dbca配置ASM实例

Configure Automatic Storage Management

选择c1和c3(c1是自动选择的)

16、添加实例

还是使用dbca

Instance Management

Add Instance

确认左侧的Database Services是一个服务,

右侧的实例是三个,都选择Preferred,TAF选择Basic

完成

17、启动新实例

在16步完成后可能会无法启动实例3,下面需要这样几步来修改

在c1实例上

ALETR SYSTEM SET CLUSETER_DATABASE_INSTANCES=3 SCOPE=SPFILE;

CREATE PFILE='/tmp/init.ora' FROM SPFILE;

把pfile拷贝到c3上

scp /tmp/init.ora c3:/tmp/init.ora

在c3主机上

修改内容

kdata1.__db_cache_size=352321536
kdata2.__db_cache_size=356515840
kdata3.__db_cache_size=352321536
kdata2.__java_pool_size=4194304
kdata1.__java_pool_size=4194304
kdata3.__java_pool_size=4194304
kdata2.__large_pool_size=4194304
kdata1.__large_pool_size=4194304
kdata3.__large_pool_size=4194304
kdata1.__shared_pool_size=230686720
kdata2.__shared_pool_size=226492416
kdata3.__shared_pool_size=226492416
kdata2.__streams_pool_size=0
kdata1.__streams_pool_size=0
kdata3.__streams_pool_size=0
*.audit_file_dest='/u01/app/oracle/admin/kdata/adump'
*.background_dump_dest='/u01/app/oracle/admin/kdata/bdump'
*.cluster_database_instances=3
*.cluster_database=true
*.compatible='10.2.0.1.0'
*.control_files='+AS/kdata/controlfile/current.268.803056777'#Restore Controlfile
*.core_dump_dest='/u01/app/oracle/admin/kdata/cdump'
*.db_block_size=8192
*.db_create_file_dest='+AS'
*.db_create_online_log_dest_1='+AS'
*.db_domain=''
*.db_file_multiblock_read_count=16
*.db_name='kdata'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=kdataXDB)'
kdata1.instance_number=1
kdata2.instance_number=2
kdata3.instance_number=3

*.job_queue_processes=10
*.log_archive_dest='+AS'
*.open_cursors=300
*.pga_aggregate_target=199229440
*.processes=150
*.remote_listener='LISTENERS_kdata'
*.remote_login_passwordfile='exclusive'
*.sga_target=599785472
kdata2.thread=2
kdata1.thread=1
kdata3.thread=3
*.undo_management='AUTO'
kdata1.undo_tablespace='UNDOTBS1'
kdata2.undo_tablespace='UNDOTBS2'
kdata3.undo_tablespace='UNDOTBS3'
*.user_dump_dest='/u01/app/oracle/admin/kdata/udump'

在c3上

STARTUP PFILE='/tmp/init.ora'

在c3上

CREATE SPFILE='+AS/KDATA/spfilekdata.ora' FROM PFILE='/tmp/init.ora';

在c3上修改initkdata3.ora

SPFILE='+AS/KDATA/spfilekdata.ora'

至此,所有的部分都修改完毕。


你可能感兴趣的:(ASM,oracle,RAC,新节点)