sitemap

RSS地图

收藏本站

设为首页

Oracle研究中心

当前位置:Oracle研究中心 > 产品DBA > Oracle RAC >

案例讲解 OracleRAC11g增加节点 操作过程与注意事项

时间:2016-03-25 21:28   来源:Oracle研究中心   作者:网络   点击:

天萃荷净

 集群中增加节点大致分为4个步骤:


        前期准备阶段、新节点加入集群(安装GI软件)、新节点安装DB软件、给新节点分配实例。

  一. 前期准备阶段

  IP配置、系统内核配置、安装RPM包、SHELL限制、分配用户和组、配置用户环境变量、目录创建及授权、配置互信等等一些前期环境准。

  [root@enmoedu2 ~]# mkdir -p/u01/app/grid

  [root@enmoedu2 ~]# mkdir -p/u01/app/11.2.0/grid

  [root@enmoedu2 ~]# mkdir -p/u01/app/oracle

  [root@enmoedu2 ~]# chown -Roracle:oinstall /u01

  [root@enmoedu2 ~]# chown -Rgrid:oinstall /u01/app/grid

  [root@enmoedu2 ~]# chown -Rgrid:oinstall /u01/app/11.2.0

  [root@enmoedu2 ~]# chmod -R 775/u01

  二.新节点加入集群(安装GI软件)

  step1. 对新节点做安装前的检查

  [grid@enmoedu1 ~]$ cluvfy stage -prenodeadd -n enmoedu2 -verbose

  Performing pre-checks for nodeaddition

  Checking node reachability...

  Check: Node reachability from node "enmoedu1"

  Destination Node Reachable?

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

  enmoedu2 yes

  Result: Node reachability check passed from node"enmoedu1"

  .

  .

  Pre-check for node addition wassuccessful.

  step2. 检查集群内节点状态

  [grid@enmoedu1 ~]$ olsnodes-t

  enmoedu1 Unpinned

  step3. 给新的节点安装GI软件

  [grid@enmoedu1 ~]$/u01/app/11.2.0/grid/oui/bin/addNode.sh -silent "CLUSTER_NEW_NODES={enmoedu2}""CLUSTER_NEW_VIRTUAL_HOSTNAMES={enmoedu2-vip}"

  Performing pre-checks for nodeaddition

  Checking node reachability...

  Node reachability check passed from node "enmoedu1"

  Checking user equivalence...

  User equivalence check passed for user "grid"

  Checking CRS integrity...

  Clusterware version consistency passed

  CRS integrity check passed

  Checking shared resources...

  Checking CRS home location...

  "/u01/app/11.2.0/grid" is shared

  Shared resources check for node addition passed

  Checking node connectivity...

  Checking hosts config file...

  Verification of the hosts config file successful

  Check: Node connectivity for interface "eth2"

  Node connectivity passed for interface "eth2"

  TCP connectivity check passed for subnet "10.0.10.0"

  Check: Node connectivity for interface "eth3"

  Node connectivity passed for interface "eth3"

  TCP connectivity check passed for subnet "192.168.0.0"

  Check: Node connectivity for interface "bond0"

  Checking subnet mask consistency...

  Subnet mask consistency check passed for subnet"10.0.10.0".

  Subnet mask consistency check passed for subnet"192.168.0.0".

  Subnet mask consistency check passed.

  Node connectivity check passed

  Checking multicast communication...

  Checking subnet "10.0.10.0" for multicast communication withmulticast group "230.0.1.0"...

  Check of subnet "10.0.10.0" for multicast communication withmulticast group "230.0.1.0" passed.

  Checking subnet "192.168.0.0" for multicast communication withmulticast group "230.0.1.0"...

  Check of subnet "192.168.0.0" for multicast communication withmulticast group "230.0.1.0" passed.

  .

  .

  .

  The Cluster Node Addition of /u01/app/11.2.0/grid wassuccessful.

  Please check '/tmp/silentInstall.log' for more details.

  step4. 节点添加后的检查

  [grid@enmoedu1 ~]$ cluvfy stage -postnodeadd -n enmoedu2 -verbose

  Performing post-checks for nodeaddition

  Checking node reachability...

  Check: Node reachability from node "enmoedu1"

  Destination Node Reachable?

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

  enmoedu2 yes

  Result: Node reachability check passed from node"enmoedu1"

  Checking user equivalence...

  Check: User equivalence for user "grid"

  Node Name Status

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

  enmoedu2 passed

  Result: User equivalence check passed for user "grid"

  .

  .

  .

  Time Server ".LOCL." has time offsets that are withinpermissible limits for nodes "[enmoedu2]".

  Clock time offset check passed

  Result: Clock synchronization check using Network TimeProtocol(NTP) passed

  Oracle Cluster Time Synchronization Services checkpassed

  Post-check for node addition wassuccessful.

  step5. 检查集群内节点状态

  [grid@enmoedu1 ~]$ olsnodes-t

  enmoedu1 Unpinned

  enmoedu2 Unpinned

  step6. 检查集群资源状态

  [grid@enmoedu1 ~]$ crsctl status resource -t

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

  NAME TARGET STATE SERVER STATE_DETAILS

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

  Local Resources

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

  ora.DATA.dg

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.FRA.dg

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.LISTENER.lsnr

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.OCR.dg

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.asm

  ONLINE ONLINE enmoedu1 Started

  ONLINE ONLINE enmoedu2 Started

  ora.gsd

  OFFLINE OFFLINE enmoedu1

  OFFLINE OFFLINE enmoedu2

  ora.net1.network

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.ons

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

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

  Cluster Resources

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

  ora.LISTENER_SCAN1.lsnr

  1 ONLINE ONLINE enmoedu2

  ora.LISTENER_SCAN2.lsnr

  1 ONLINE ONLINE enmoedu1

  ora.LISTENER_SCAN3.lsnr

  1 ONLINE ONLINE enmoedu1

  ora.cvu

  1 ONLINE ONLINE enmoedu1

  ora.enmoedu1.vip

  1 ONLINE ONLINE enmoedu1

  ora.enmoedu2.vip

  1 ONLINE ONLINE enmoedu2

  ora.oc4j

  1 ONLINE ONLINE enmoedu1

  ora.prod.db

  1 ONLINE ONLINE enmoedu1 Open

  ora.scan1.vip

  1 ONLINE ONLINE enmoedu2

  ora.scan2.vip

  1 ONLINE ONLINE enmoedu1

  ora.scan3.vip

  1 ONLINE ONLINE enmoedu1

  三.新节点安装DB软件

  [oracle@enmoedu1 ~]$$ORACLE_HOME/oui/bin/addNode.sh -silent"CLUSTER_NEW_NODES={enmoedu2}"

  Performing pre-checks for nodeaddition

  Checking node reachability...

  Node reachability check passed from node "enmoedu1"

  Checking user equivalence...

  User equivalence check passed for user "oracle"

  WARNING:

  Node "enmoedu2" already appears to be part of cluster

  Pre-check for node addition wassuccessful.

  Starting Oracle Universal Installer...

  .

  .

  .

  The Cluster Node Addition of/u01/app/oracle/product/11.2.0/db_1 was successful.

  Please check '/tmp/silentInstall.log' for more details.

  四. 给新节点分配实例

  step1. 检查RAC下所有实例状态

  [oracle@enmoedu1 ~]$ srvctl statusdatabase -d PROD -f

  Instance PROD1 is running on node enmoedu1

  [oracle@enmoedu1 ~]$ srvctl configdatabase -d PROD -a

  Database unique name: PROD

  Database name: PROD

  Oracle home: /u01/app/oracle/product/11.2.0/db_1

  Oracle user: oracle

  Spfile: +DATA/PROD/spfilePROD.ora

  Domain: us.oracle.com

  Start options: open

  Stop options: immediate

  Database role: PRIMARY

  Management policy: AUTOMATIC

  Server pools: PROD

  Database instances: PROD1

  Disk Groups: DATA,FRA

  Mount point paths:

  Services:

  Type: RAC

  Database is enabled

  Database is administrator managed

  step2. 为新增节点分配实例

  [oracle@enmoedu1 ~]$ dbca -silent-addInstance -gdbName PROD -nodelist enmoedu2 -instanceName PROD2-sysDBAUserName sys -sysDBAPasswordoracle

  Adding instance

  1% complete

  2% complete

  6% complete

  13% complete

  20% complete

  26% complete

  33% complete

  40% complete

  46% complete

  53% complete

  66% complete

  Completing instance management.

  76% complete

  100% complete

  Look at the log file"/u01/app/oracle/cfgtoollogs/dbca/PROD/PROD.log" for furtherdetails.

  step3. 检查RAC下所有实例状态

  [oracle@enmoedu1 ~]$ srvctl statusdatabase -d PROD -f

  Instance PROD1 is running on node enmoedu1

  Instance PROD2 is running on node enmoedu2

  [oracle@enmoedu1 ~]$ srvctl configdatabase -d PROD -a

  Database unique name: PROD

  Database name: PROD

  Oracle home: /u01/app/oracle/product/11.2.0/db_1

  Oracle user: oracle

  Spfile: +DATA/PROD/spfilePROD.ora

  Domain: us.oracle.com

  Start options: open

  Stop options: immediate

  Database role: PRIMARY

  Management policy: AUTOMATIC

  Server pools: PROD

  Database instances: PROD1,PROD2

  Disk Groups: DATA,FRA

  Mount point paths:

  Services:

  Type: RAC

  Database is enabled

  Database is administrator managed

  step4. 检查集群资源状态

  [grid@enmoedu1 ~]$ crsctl statusresource -t

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

  NAME TARGET STATE SERVER STATE_DETAILS

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

  Local Resources

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

  ora.DATA.dg

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.FRA.dg

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.LISTENER.lsnr

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.OCR.dg

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.asm

  ONLINE ONLINE enmoedu1 Started

  ONLINE ONLINE enmoedu2 Started

  ora.gsd

  OFFLINE OFFLINE enmoedu1

  OFFLINE OFFLINE enmoedu2

  ora.net1.network

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

  ora.ons

  ONLINE ONLINE enmoedu1

  ONLINE ONLINE enmoedu2

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

  Cluster Resources

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

  ora.LISTENER_SCAN1.lsnr

  1 ONLINE ONLINE enmoedu2

  ora.LISTENER_SCAN2.lsnr

  1 ONLINE ONLINE enmoedu1

  ora.LISTENER_SCAN3.lsnr

  1 ONLINE ONLINE enmoedu1

  ora.cvu

  1 ONLINE ONLINE enmoedu1

  ora.enmoedu1.vip

  1 ONLINE ONLINE enmoedu1

  ora.enmoedu2.vip

  1 ONLINE ONLINE enmoedu2

  ora.oc4j

  1 ONLINE ONLINE enmoedu1

  ora.prod.db

  1 ONLINE ONLINE enmoedu1 Open

  2 ONLINE ONLINE enmoedu2 Open

  ora.scan1.vip

  1 ONLINE ONLINE enmoedu2

  ora.scan2.vip

  1 ONLINE ONLINE enmoedu1

  ora.scan3.vip

  1 ONLINE ONLINE enmoedu1


-----------------温馨提示--------------------
操作有风险,动手需谨慎
Oracle研究中心 www.oracleplus.net
本文由大师惜分飞分享,转载请尽量保留本站网址。


--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之案例讲解 OracleRAC11g增加节点 操作过程与注意事项

本文由大师惜分飞原创分享,网址:http://www.oracleplus.net/arch/22.html

Oracle研究中心

关键词:

案例讲解

OracleRAC11g增加节点