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配置过程:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

然后到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 = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1          13      104391   83  Linux

/dev/sda2              14        5221    41833260   8e  Linux LVM

Disk /dev/dm-0: 39.5 GB, 39594229760 bytes

255 heads, 63 sectors/track, 4813 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 3221 MB, 3221225472 bytes

255 heads, 63 sectors/track, 391 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/sdb: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdb1               1        1011     1048376+  83  Linux

Disk /dev/sdc: 1073 MB, 1073741824 bytes

34 heads, 61 sectors/track, 1011 cylinders

Units = cylinders of 2074 * 512 = 1061888 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdc1               1        1011     1048376+  83  Linux

Disk /dev/sdd: 10.7 GB, 10737418240 bytes

64 heads, 32 sectors/track, 10240 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdd1               1       10240    10485744   83  Linux

Disk /dev/sde: 10.7 GB, 10737418240 bytes

64 heads, 32 sectors/track, 10240 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sde1               1       10240    10485744   83  Linux

Disk /dev/sdf: 10.7 GB, 10737418240 bytes

64 heads, 32 sectors/track, 10240 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Device Boot      Start         End      Blocks   Id  System

/dev/sdf1               1       10240    10485744   83  Linux

挂载成功之后。配置设备固定化:

[root@rac3 ~]# raw /dev/raw/raw1 /dev/sdb1

/dev/raw/raw1:  bound to major 8, minor 17

[root@rac3 ~]# raw /dev/raw/raw2 /dev/sdc1

/dev/raw/raw2:  bound to major 8, minor 33

[root@rac3 ~]# raw /dev/raw/raw3 /dev/sdd1

/dev/raw/raw3:  bound to major 8, minor 49

[root@rac3 ~]# raw /dev/raw/raw4 /dev/sde1

/dev/raw/raw4:  bound to major 8, minor 65

[root@rac3 ~]# raw /dev/raw/raw5 /dev/sdf1

/dev/raw/raw5:  bound to major 8, minor 81

[root@rac3 ~]# vi /etc/udev/rules.d/60-raw.rules

添加下面内容:

ACTION=="add", KERNEL=="/dev/sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="17", RUN+="/bin/raw /dev/raw/raw1 %M %m"

ACTION=="add", KERNEL=="/dev/sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="33", RUN+="/bin/raw /dev/raw/raw2 %M %m"

ACTION=="add", KERNEL=="/dev/sdd1", RUN+="/bin/raw /dev/raw/raw3 %N"

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="49", RUN+="/bin/raw /dev/raw/raw3 %M %m"

ACTION=="add", KERNEL=="/dev/sde1", RUN+="/bin/raw /dev/raw/raw4 %N"

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="65", RUN+="/bin/raw /dev/raw/raw4 %M %m"

ACTION=="add", KERNEL=="/dev/sdf1", RUN+="/bin/raw /dev/raw/raw5 %N"

ACTION=="add", ENV{MAJOR}=="8", ENV{MINOR}=="81", RUN+="/bin/raw /dev/raw/raw5 %M %m"

KERNEL=="raw[1-5]", OWNER="oracle", GROUP="oinstall", MODE="640"

ASMLib配置:

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

Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library

driver.  The following questions will determine whether the driver is

loaded on boot and what permissions it will have.  The current values

will be shown in brackets ('[]').  Hitting <ENTER> without typing an

answer will keep that current value.  Ctrl-C will abort.

Default user to own the driver interface []: oracle

Default group to own the driver interface []: dba

Start Oracle ASM library driver on boot (y/n) [n]: y

Scan for Oracle ASM disks on boot (y/n) [y]: y

Writing Oracle ASM library driver configuration: done

Initializing the Oracle ASMLib driver:                     [  OK  ]

Scanning the system for Oracle ASMLib disks:               [  OK  ]

[root@rac3 ~]# /etc/init.d/oracleasm listdisks

ASM01

ASM02

ASM03

rac3节点上创建/u01文件夹,并授予oracle:

[root@rac3 ~]# mkdir /u01

[root@rac3 ~]# chown oracle:oinstall /u01

节点一:

[oracle@rac1 ~]$ cd $CRS_HOME/oui/bin/

[oracle@rac1 bin]$ ls

addLangs.sh  lsnodes   resource      runInstaller

addNode.sh   ouica.sh  runConfig.sh  runInstaller.sh

[oracle@rac1 bin]$ sh addNode.sh

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

[root@rac3 ~]# /u01/app/oracle/oraInventory/orainstRoot.sh

Changing permissions of /u01/app/oracle/oraInventory to 770.

Changing groupname of /u01/app/oracle/oraInventory to oinstall.

The execution of the script is complete

[root@rac1 ~]# /u01/app/oracle/product/10.2.0/db_1/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 <nodenumber>: <nodename> <private interconnect name> <hostname>

node 3: rac3 rac3-priv rac3

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

/u01/app/oracle/product/10.2.0/db_1/bin/srvctl add nodeapps -n rac3 -A rac3-vip/255.255.255.0/eth0 -o /u01/app/oracle/product/10.2.0/db_1

[root@rac3 ~]# /u01/app/oracle/product/10.2.0/db_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

/etc/oracle does not exist. Creating it now.

OCR LOCATIONS =  /dev/raw/raw1

OCR backup directory '/u01/app/oracle/product/10.2.0/db_1/cdata/crs' does not exist. Creating now

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 rac1 for node 1.

assigning default hostname rac2 for node 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node <nodenumber>: <nodename> <private interconnect name> <hostname>

node 1: rac1 rac1-priv rac1

node 2: rac2 rac2-priv rac2

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.

rac1

rac2

rac3

CSS is active on all nodes.

Waiting for the Oracle CRSD and EVMD to start

Waiting for the Oracle CRSD and EVMD to start

Oracle CRS stack installed and running under init(1M)

Running vipca(silent) for configuring nodeapps

/u01/app/oracle/product/10.2.0/db_1/jdk/jre//bin/java: error while loading shared libraries: libpthread.so.0: cannot open shared object file: No such file or directory

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

rac3节点安装数据库软件:

rac1节点上上使用oracle用户运行$ORACLE_HOME/oui/bin/addNode.sh

[root@rac3 ~]# /u01/app/oracle/product/10.2.0/db_2/root.sh

Running Oracle10 root.sh script...

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /u01/app/oracle/product/10.2.0/db_2

Enter the full pathname of the local bin directory: [/usr/local/bin]:

Copying dbhome to /usr/local/bin ...

Copying oraenv to /usr/local/bin ...

Copying coraenv to /usr/local/bin ...

Creating /etc/oratab file...

Entries will be added to the /etc/oratab file as needed by

Database Configuration Assistant when a database is created

Finished running generic part of root.sh script.

Now product-specific root actions will be performed.

然后在rac1节点上使用dbca加入instance:

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvYmFkbHk5/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="">

至此节点加入完成:

[oracle@rac1 crsd]$ crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora....B1.inst application    ONLINE    ONLINE    rac1

ora....B2.inst application    ONLINE    ONLINE    rac2

ora....B3.inst application    ONLINE    ONLINE    rac3

ora.RACDB.db   application    ONLINE    ONLINE    rac2

ora....SM1.asm application    ONLINE    ONLINE    rac1

ora....C1.lsnr application    ONLINE    ONLINE    rac1

ora.rac1.gsd   application    ONLINE    ONLINE    rac1

ora.rac1.ons   application    ONLINE    ONLINE    rac1

ora.rac1.vip   application    ONLINE    ONLINE    rac1

ora....SM2.asm application    ONLINE    ONLINE    rac2

ora....C2.lsnr application    ONLINE    ONLINE    rac2

ora.rac2.gsd   application    ONLINE    ONLINE    rac2

ora.rac2.ons   application    ONLINE    ONLINE    rac2

ora.rac2.vip   application    ONLINE    ONLINE    rac2

ora....SM3.asm application    ONLINE    ONLINE    rac3

ora....C3.lsnr application    ONLINE    ONLINE    rac3

ora.rac3.gsd   application    ONLINE    ONLINE    rac3

ora.rac3.ons   application    ONLINE    ONLINE    rac3

ora.rac3.vip   application    ONLINE    ONLINE    rac3

【Oracle】RAC添加新节点的更多相关文章

  1. Oracle 11g rac 添加新节点测试

    [转]https://blog.csdn.net/shiyu1157758655/article/details/60877076 前期准备: 操作系统设置OS版本必须相同,检查内核参数,系统内存.C ...

  2. rac添加新节点的步骤与方法2

    上一篇文章,把节点删除了.这次新增加一个节点 .新增加的节点是host03.如下: #Public IP192.168.16.45 racdb1192.168.16.46 racdb2192.168. ...

  3. rac添加新节点的步骤与方法

    [转载] https://www.cnblogs.com/hankyoon/p/5174465.html OS: [root@rac ~]# more /etc/oracle-releaseOracl ...

  4. rac添加新节点的步骤与方法(官方步骤与自我测试)

    Extending the Oracle Grid Infrastructure Home to the New NodeNow that the new node has been configur ...

  5. 使用percona xtradb cluster的IST方式添加新节点

    使用percona xtradb cluster的IST(Incremental State Transfer)特性添加新节点,防止新节点加入时使用SST(State SnapShop Transfe ...

  6. Hadoop集群添加新节点步骤

    1.在新节点中进行操作系统配置,包括主机名.网络.防火墙和无密码登录等. 2.在所有节点/etc/host文件中添加新节点 3.把namenode的有关配置文件复制到该节点 4.修改master节点s ...

  7. 大数据实操3 - hadoop集群添加新节点

    hadoop集群支持动态扩展,不需要停止原有集群节点就可以实现新节点的加入. 我是使用docker搭建的进群环境,制作了镜像文件,这里以我的工作基础为例子介绍集群中添加集群的方法 一.制作一个新节点 ...

  8. Hadoop-HBASE 热添加新节点

    Hadoop-HBASE 热添加新节点 环境:192.168.137.101 hd1192.168.137.102 hd2192.168.137.103 hd3192.168.137.104 hd4四 ...

  9. my35_MGR添加新节点

    MGR添加节点主要涉及以下两个参数 group_replication_group_seeds    #可以动态修改 group_replication_ip_whitelist      #需要关闭 ...

随机推荐

  1. linux select函数 shutdown函数

    #include<sys/select.h> #include<sys/time.h> int select(int maxfdp1,fd_set *readset,fd_se ...

  2. 4.java.lang.NumberFormatException(数据类型转换异常)

    字符串转换为数字异常 当试图将一个String转换为指定的数字类型,而该字符串确不满足数字类型要求的格式时,抛出该异常.如现在讲字符型的数据“123456”转换为数值型数据时,是允许的. 但是如果字符 ...

  3. ODI中删除数据的处理

    ODI中删除数据的处理 一.前提知识:数据从源数据库向数据仓库抽取时,一般采用以下几种方式: 全抽取模式如果表的数据量较小,则可以采取全表抽取方式,以TRUNCATE/INSERT方式进行数据抽取. ...

  4. (15)Visual Studio中使用PCL项目加入WCF WebService参考

    原文 Visual Studio中使用PCL项目加入WCF WebService参考 Visual Studio中使用PCL项目加入WCF WebService参考 作者:Steven Chang 2 ...

  5. 原来ipad的浏览器也可以直接clip到evernote

    今天才发现是有方法通过邮件方式保存ipad上浏览的内容到evernote,之前以为要反复切换app来做到. 只要在toread.cc登记evernote对应帐号的邮箱,就可以根据toread返回到ev ...

  6. 新iPhone开售现场:土豪金火了

    今日苹果在全球范围内开始正式发售iPhone 5s与5c手机.在中国王府井苹果零售店,首位购机者李先生在今早4点50分便在此等候. 现场未发现黄牛 本次苹果在中国大陆的自有零售店渠道首批iPhone ...

  7. python之lambda表达式

    lambda函数小结 1.lambda表达式: 以前看人家写一个长式子就能干一件我写一个函数干的事情觉得好帅,现在通过学习知道了lambda表达式其原理就是一个函数,而且是一个只能处理简单功能的函数. ...

  8. Class constructor

     // example: class constructor #include <iostream> using namespace std; class Rectangle { in ...

  9. Process Node.js 进程

    Process 进程 process.argv 是命令行参数数组,第一个元素是node,第二个元素是脚本文件名,从第三个元素开始每个元素是一个运行参数. process.stdout 标准输出流 co ...

  10. .net 资源

    基于.net构架的留言板项目大全源码 http://down.51cto.com/zt/70 ASP.net和C#.net通用权限系统组件功能教程 http://down.51cto.com/zt/1 ...