oracle升级grid,grid版本升级,11.2.0.1.0到11.2.0.3

4  升级

4.1  检查

先读metalink上的1363369.1按照步骤检查

4.1.1 Run CVU pre-upgrade check tool

节点一操作:

$ ls

doc           readme.html   rpm           runcluvfy.sh  stage

install       response      runInstaller  sshsetup      welcome.html

$ pwd

/home/grid/p10404530/grid

$ ./runcluvfy.sh stage -pre crsinst -upgrade -n NONE1,NODE2  -rolling -src_crshome /u01/grid -dest_crshome /u01/grid -dest_version 11.2.0.3.0 -fixup -fixupdir /tmp –verbose

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

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

Checking Oracle Cluster Voting Disk configuration...

ASM Running check passed. ASM is running on all specified nodes

Oracle Cluster Voting Disk configuration check passed

Clusterware version consistency passed

Checking settings of device file "/dev/async"

Node Name     Available                 Comment

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

NODE2      yes                       failed (incorrect setting for minor number.)

NONE1      yes                       failed (incorrect setting for minor number.)

Result: Check for settings of device file "/dev/async" failed.

Fixup information has been generated for following node(s):

NONE1,NODE2

Please run the following script on each node as "root" user to execute the fixups:

'/tmp/CVU_11.2.0.3.0_grid/runfixup.sh'

Pre-check for cluster services setup was unsuccessful.

Checks did not pass for the following node(s):

NODE2,NONE1

这里报错

解决方法:

NONE1[/]#rm /dev/async

NONE1[/]#/sbin/mknod /dev/async c 101 0x4

NONE1[/]#chmod 666 /dev/async

NODE2[/]#rm /dev/async

NODE2[/]#/sbin/mknod /dev/async c 101 0x4

NODE2[/]#chmod 666 /dev/async

再检查

成功:

Checking settings of device file "/dev/async"

Node Name     Available                 Comment

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

NODE2      yes                       passed

NONE1      yes                       passed

Result: Check for settings of device file "/dev/async" passed.

Fixup information has been generated for following node(s):

NONE1,NODE2

Please run the following script on each node as "root" user to execute the fixups:

'/tmp/CVU_11.2.0.3.0_grid/runfixup.sh'

Pre-check for cluster services setup was successful.

4.1.2 Ensure consistent network setting

这里我没做过多的检查

4.1.3 Mandatory/Recommended patches for upgrade

这里就是说我们之前打的那个补丁9706490

4.1.4 ASM memory_max_target and memory_target

4.1.4.1 更改asm参数

$ sqlplus / as sysasm

SQL> show parameter mem

NAME                                 TYPE        VALUE

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

memory_max_target                    big integer 272M

memory_target                        big integer 272M

SQL> alter system set memory_max_target=4096m scope=spfile;

System altered.

SQL> alter system set memory_target=1536m scope=spfile;

System altered.

4.1.4.2 关闭节点一的数据库

4.1.4.3 关闭节点一的cluster

4.1.4.4 启动节点一的cluster

4.1.4.5 查看asm参数生效

SQL> show parameter mem

NAME                                 TYPE        VALUE

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

memory_max_target                    big integer 4G

memory_target                        big integer 1536M

4.1.4.6 将4.1.4的操作在节点二重做一遍

4.1.4.7 将节点二的数据库启动

备注:这里节点一的数据库不需要启动,我们只要启动一个节点的数据库对外提供服务就可以了

4.2  图形界面升级

4.2.1 登录

用xmanager软件,以grid用户链接节点一

4.2.2 执行runInstaller

选择升级节点,这里只能选择2个节点一起升级:

选择grid的新的CRS_HOME,先执行:

#chmod 777 /pmsdb

检查,这里不用管警告的东西,点击ignore all,然后next:

选择:是

点击install:

执行root脚本了:

4.2.3 执行root脚本

4.2.3.1 节点一执行root脚本

NONE1[/]#cd /pmsdb/11*/grid

NONE1[/pmsdb/11.2.0/grid]#ls rootup*

rootupgrade.sh

NONE1[/pmsdb/11.2.0/grid]#./rootupgrade.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME=  /pmsdb/11.2.0/grid

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

The contents of "dbhome" have not changed. No need to overwrite.

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]: y

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

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]: y

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

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /pmsdb/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

ASM upgrade has started on first node.

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'NONE1'

CRS-2673: Attempting to stop 'ora.crsd' on 'NONE1'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'NONE1'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'NONE1'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'NONE1'

CRS-2673: Attempting to stop 'ora.DATA_ZKF.dg' on 'NONE1'

CRS-2673: Attempting to stop 'ora.OCR_ZKF.dg' on 'NONE1'

CRS-2673: Attempting to stop 'ora.REDO_ZKF.dg' on 'NONE1'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.NONE1.vip' on 'NONE1'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.scan1.vip' on 'NONE1'

CRS-2677: Stop of 'ora.NONE1.vip' on 'NONE1' succeeded

CRS-2672: Attempting to start 'ora.NONE1.vip' on 'node2'

CRS-2677: Stop of 'ora.scan1.vip' on 'NONE1' succeeded

CRS-2672: Attempting to start 'ora.scan1.vip' on 'node2'

CRS-2677: Stop of 'ora.DATA_ZKF.dg' on 'NONE1' succeeded

CRS-2676: Start of 'ora.scan1.vip' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'node2'

CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'node2' succeeded

CRS-2677: Stop of 'ora.OCR_ZKF.dg' on 'NONE1' succeeded

CRS-2676: Start of 'ora.NONE1.vip' on 'node2' succeeded

CRS-2677: Stop of 'ora.REDO_ZKF.dg' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'NONE1'

CRS-2677: Stop of 'ora.asm' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.eons' on 'NONE1'

CRS-2673: Attempting to stop 'ora.ons' on 'NONE1'

CRS-2675: Stop of 'ora.ons' on 'NONE1' failed

CRS-2679: Attempting to clean 'ora.ons' on 'NONE1'

CRS-2681: Clean of 'ora.ons' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'NONE1'

CRS-2677: Stop of 'ora.net1.network' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.eons' on 'NONE1' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'NONE1' has completed

CRS-2677: Stop of 'ora.crsd' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'NONE1'

CRS-2673: Attempting to stop 'ora.ctssd' on 'NONE1'

CRS-2673: Attempting to stop 'ora.evmd' on 'NONE1'

CRS-2673: Attempting to stop 'ora.asm' on 'NONE1'

CRS-2673: Attempting to stop 'ora.mdnsd' on 'NONE1'

CRS-2677: Stop of 'ora.cssdmonitor' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.evmd' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.mdnsd' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.asm' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'NONE1'

CRS-2677: Stop of 'ora.cssd' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on 'NONE1'

CRS-2673: Attempting to stop 'ora.diskmon' on 'NONE1'

CRS-2677: Stop of 'ora.gpnpd' on 'NONE1' succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on 'NONE1'

CRS-2677: Stop of 'ora.diskmon' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.gipcd' on 'NONE1' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'NONE1' has completed

CRS-4133: Oracle High Availability Services has been stopped.

OLR initialization - successful

Replacing Clusterware entries in inittab

clscfg: EXISTING configuration version 5 detected.

clscfg: version 5 is 11g Release 2.

Successfully accumulated necessary OCR keys.

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

Operation successful.

Configure Oracle Grid Infrastructure for a Cluster ... succeeded

4.2.3.2 修改grid的环境变量

Vi .profile

export TMP=/tmp

export TMPDIR=/tmp

export ORACLE_BASE=/pmsdb/oracle

export ORACLE_HOME=/pmsdb/11.2.0/grid

export GRID_HOME=/u01/grid

export PATH=$GRID_HOME/bin:$PATH

export ORACLE_SID=+ASM1

4.2.3.3 节点一启动数据库

备注:我们必须一直保持2个节点中有一个节点的数据库是启动的状态

4.2.3.4 节点二执行root脚本

NODE2[/pmsdb/11.2.0/grid]#ls rootup*

rootupgrade.sh

NODE2[/pmsdb/11.2.0/grid]#./rootupgrade.sh

Performing root user operation for Oracle 11g

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME=  /pmsdb/11.2.0/grid

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

The contents of "dbhome" have not changed. No need to overwrite.

The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]: y

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

The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) [n]: y

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

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /pmsdb/11.2.0/grid/crs/install/crsconfig_params

Creating trace directory

User ignored Prerequisites during installation

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node2'

CRS-2673: Attempting to stop 'ora.crsd' on 'node2'

CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node2'

CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'node2'

CRS-2673: Attempting to stop 'ora.OCR_ZKF.dg' on 'node2'

CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.node2.vip' on 'node2'

CRS-2677: Stop of 'ora.node2.vip' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.node2.vip' on 'NONE1'

CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.scan1.vip' on 'node2'

CRS-2677: Stop of 'ora.scan1.vip' on 'node2' succeeded

CRS-2672: Attempting to start 'ora.scan1.vip' on 'NONE1'

CRS-2676: Start of 'ora.node2.vip' on 'NONE1' succeeded

CRS-2676: Start of 'ora.scan1.vip' on 'NONE1' succeeded

CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'NONE1'

CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'NONE1' succeeded

CRS-2677: Stop of 'ora.OCR_ZKF.dg' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.eons' on 'node2'

CRS-2673: Attempting to stop 'ora.ons' on 'node2'

CRS-2677: Stop of 'ora.ons' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.net1.network' on 'node2'

CRS-2677: Stop of 'ora.net1.network' on 'node2' succeeded

CRS-2677: Stop of 'ora.eons' on 'node2' succeeded

CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node2' has completed

CRS-2677: Stop of 'ora.crsd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cssdmonitor' on 'node2'

CRS-2673: Attempting to stop 'ora.ctssd' on 'node2'

CRS-2673: Attempting to stop 'ora.evmd' on 'node2'

CRS-2673: Attempting to stop 'ora.asm' on 'node2'

CRS-2673: Attempting to stop 'ora.mdnsd' on 'node2'

CRS-2677: Stop of 'ora.cssdmonitor' on 'node2' succeeded

CRS-2677: Stop of 'ora.evmd' on 'node2' succeeded

CRS-2677: Stop of 'ora.mdnsd' on 'node2' succeeded

CRS-2677: Stop of 'ora.asm' on 'node2' succeeded

CRS-2677: Stop of 'ora.ctssd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.cssd' on 'node2'

CRS-2677: Stop of 'ora.cssd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on 'node2'

CRS-2673: Attempting to stop 'ora.diskmon' on 'node2'

CRS-2677: Stop of 'ora.gpnpd' on 'node2' succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on 'node2'

CRS-2677: Stop of 'ora.diskmon' on 'node2' succeeded

CRS-2677: Stop of 'ora.gipcd' on 'node2' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node2' has completed

CRS-4133: Oracle High Availability Services has been stopped.

OLR initialization - successful

Replacing Clusterware entries in inittab

clscfg: EXISTING configuration version 5 detected.

clscfg: version 5 is 11g Release 2.

Successfully accumulated necessary OCR keys.

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

Operation successful.

Started to upgrade the Oracle Clusterware. This operation may take a few minutes.

Started to upgrade the CSS.

Started to upgrade the CRS.

The CRS was successfully upgraded.

Successfully upgraded the Oracle Clusterware.

Oracle Clusterware operating version was successfully set to 11.2.0.3.0

4.2.3.5 节点二修改grid的环境变量

Vi /home/grid/.profile

umask 022

export TMP=/tmp

export TMPDIR=/tmp

export ORACLE_BASE=/pmsdb/oracle

export ORACLE_HOME=/pmsdb/11.2.0/grid

export GRID_HOME=/u01/grid

export PATH=$GRID_HOME/bin:$PATH

export ORACLE_SID=+ASM2

4.2.3.6 节点二的数据库启动

4.2.4 点击OK继续

4.2.5 查看进程

NODE2[/pmsdb/11.2.0/grid]#ps -ef |grep pmsdb

grid  8432     1  0 19:05:50 ?         0:12 /pmsdb/11.2.0/grid/bin/ocssd.bin

grid  8407     1  0 19:05:47 ?         0:00 /pmsdb/11.2.0/grid/bin/gpnpd.bin

root  8141     1  0 19:04:55 ?         0:12 /pmsdb/11.2.0/grid/bin/ohasd.bin reboot

grid  8652     1  0 19:07:00 ?         0:00 /pmsdb/11.2.0/grid/bin/tnslsnr LISTENER -inherit

grid  8584  8557  0 19:06:53 ?         0:00 /pmsdb/11.2.0/grid/bin/evmlogger.bin -o /pmsdb/11.2.0/grid/evm/log/evmlogger.info -l /pmsdb/11.2.0/grid/evm/log/evmlogger.log

root  8615     1  0 19:06:58 ?         0:05 /pmsdb/11.2.0/grid/bin/orarootagent.bin

grid  8557     1  0 19:06:50 ?         0:07 /pmsdb/11.2.0/grid/bin/evmd.bin

root  8426     1  0 19:05:50 ?         0:00 /pmsdb/11.2.0/grid/bin/cssdagent

grid  8644  8643  0 19:06:59 ?         0:00 /pmsdb/11.2.0/grid/opmn/bin/ons -d

grid  8398     1  0 19:05:45 ?         0:00 /pmsdb/11.2.0/grid/bin/mdnsd.bin

grid  8422     1  0 19:05:49 ?         0:11 /pmsdb/11.2.0/grid/bin/gipcd.bin

grid  8643     1  0 19:06:59 ?         0:00 /pmsdb/11.2.0/grid/opmn/bin/ons -d

root  8440     1  0 19:06:08 ?         0:20 /pmsdb/11.2.0/grid/bin/orarootagent.bin

root  8420     1  0 19:05:49 ?         0:00 /pmsdb/11.2.0/grid/bin/cssdmonitor

grid  8610     1  0 19:06:58 ?         0:03 /pmsdb/11.2.0/grid/bin/oraagent.bin

grid  8394     1  0 19:05:45 ?         0:04 /pmsdb/11.2.0/grid/bin/oraagent.bin

root  8444     1  0 19:06:08 ?         0:08 /pmsdb/11.2.0/grid/bin/octssd.bin

root 10402 24761  0 19:19:50 pts/0     0:00 grep pmsdb

root  8547     1  0 19:06:49 ?         0:12 /pmsdb/11.2.0/grid/bin/crsd.bin reboot

NODE2[/pmsdb/11.2.0/grid]#

4.2.6 查看集群状态

NONE1[/]#/u01/grid/bin/crsctl stat res -t

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

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

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

Local Resources

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

ora.DATA_ZKF.dg

ONLINE  ONLINE       NONE1

OFFLINE OFFLINE      node2

ora.LISTENER.lsnr

ONLINE  ONLINE       NONE1

ONLINE  ONLINE       node2

ora.OCR_ZKF.dg

ONLINE  ONLINE       NONE1

ONLINE  ONLINE       node2

ora.REDO_ZKF.dg

ONLINE  ONLINE       NONE1

OFFLINE OFFLINE      node2

ora.asm

ONLINE  ONLINE       NONE1                 Started

ONLINE  ONLINE       node2                 Started

ora.eons

ONLINE  OFFLINE      NONE1

ONLINE  OFFLINE      node2

ora.gsd

OFFLINE OFFLINE      NONE1

OFFLINE OFFLINE      node2

ora.net1.network

ONLINE  ONLINE       NONE1

ONLINE  ONLINE       node2

ora.ons

ONLINE  ONLINE       NONE1

ONLINE  ONLINE       node2

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

Cluster Resources

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

ora.LISTENER_SCAN1.lsnr

1        ONLINE  ONLINE       NONE1

ora.oc4j

1        OFFLINE OFFLINE

ora.NONE1.vip

1        ONLINE  ONLINE       NONE1

ora.node2.vip

1        ONLINE  ONLINE       node2

ora.scan1.vip

1        ONLINE  ONLINE       NONE1

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值