【Oracle】RAC增加新节点(一)

2014-11-24 12:37:04 · 作者: · 浏览: 4

RAC增加节点:

环境:

OS:OEL5.6

RAC:10.2.0.1.0

原有rac1,rac2两个节点,现在要增加rac3节点:

操作过程:

修改三个节点上的/etc/hosts文件

192.168.90.2 rac1

192.168.90.5 rac2

192.168.90.6 rac3

192.168.91.3 rac1-priv

192.168.91.6 rac2-priv

192.168.91.7 rac3-priv

192.168.90.3 rac1-vip

192.168.90.4 rac2-vip

192.168.90.7 rac3-vip

rac3节点上安装需要的rpm包,本实验环境使用的是OEL系统,所以使用oracle-validated。

[root@rac3 ~]# mount /dev/cdrom /mnt

mount: block device /dev/cdrom is write-protected, mounting read-only

[root@rac3 ~]# vi /etc/yum.repos.d/public-yum-el5.repo

[oel5]

name = Enterprise Linux 5.6 DVD

baseurl=file:///mnt/Server/

gpgcheck=0

enabled=1

[root@rac3 ~]# yum install oracle-validated

Loaded plugins: rhnplugin, security

This system is not registered with ULN.

ULN support will be disabled.

......略

安装ASMLib包:

[root@rac3 ~]# cd /mnt/Server

[root@rac3 Server]# rpm -ivh oracleasm-support-2.1.4-1.el5.i386.rpm

warning: oracleasm-support-2.1.4-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

1:oracleasm-support ########################################### [100%]

[root@rac3 Server]# rpm -ivh oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm

warning: oracleasm-2.6.18-238.el5-2.0.5-1.el5.i686.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

1:oracleasm-2.6.18-238.el########################################### [100%]

配置3节点和1,2节点间的互信:

3节点:

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

Generating public/private rsa key pair.

Enter file in which to save the key (/home/oracle/.ssh/id_rsa):

Enter passphrase (empty for no passphrase):

Enter same passphrase again:

Your identification has been saved in /home/oracle/.ssh/id_rsa.

Your public key has been saved in /home/oracle/.ssh/id_rsa.pub.

The key fingerprint is:

18:d5:6a:94:4c:12:90:8a:19:ca:96:4d:97:cc:fe:f0 oracle@rac3

1节点:

[oracle@rac1 .ssh]$ ssh 192.168.90.6 cat ~/.ssh/*.pub >> authorized_keys

oracle@192.168.90.6's password:

[oracle@rac1 .ssh]$ scp authorized_keys 192.168.90.6:~/.ssh/.

oracle@192.168.90.6's password:

authorized_keys 100% 1780 1.7KB/s 00:00

[oracle@rac1 .ssh]$ scp authorized_keys 192.168.90.5:~/.ssh/.

authorized_keys 100% 1780 1.7KB/s 00:00

各个节点执行以下脚本测试oracle用户的互信:

ssh rac1 date

ssh rac2 date

ssh rac3 date

ssh rac1-priv date

ssh rac2-priv date

ssh rac3-priv date

配置时间同步:

[root@rac3 Server]# ntpdate 192.168.90.2

22 Aug 10:45:31 ntpdate[9511]: adjust time server 192.168.90.2 offset -0.109663 sec

[root@rac3 Server]# crontab -e

* * * * * /usr/sbin/ntpdate 192.168.90.2 >> /ntp.log

由于使用的是openfiler作为存储,这里添加openfiler配置过程:

\

\

\

\

然后到rac3节点上配置:

[root@rac3 ~]# vi /etc/iscsi/initiatorname.iscsi

#InitiatorName=iqn.1988-12.com.oracle:48354521e5f2

InitiatorName=rac3

[root@rac3 ~]# iscsiadm -m discovery -t st -p 192.168.90.8

192.168.90.8:3260,1 rac3

[root@rac3 ~]# service iscsi restart

Stopping iSCSI daemon:

iscsid is stopped [ OK ]

Starting iSCSI daemon: [ OK ]

[ OK ]

Setting up iSCSI targets: Logging in to [iface: default, target: rac3, portal: 192.168.90.8,3260]

Login to [iface: default, target: rac3, portal: 192.168.90.8,3260] successful.

[ OK ]

然后看一下磁盘是否挂载成功:

[root@rac3 ~]# fdisk -l

Disk /dev/sda: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylin