ITPUB论坛-中国最专业的IT技术社区

   
 注册
热搜:
查看: 407|回复: 0

[原创] 复杂环境下 ocr deconfig reconfig

[复制链接]
论坛徽章:
10
娜美
日期:2017-06-26 15:18:15目光如炬
日期:2018-01-14 22:00:00目光如炬
日期:2017-12-17 22:00:00目光如炬
日期:2017-11-26 22:00:00火眼金睛
日期:2017-09-30 22:00:01目光如炬
日期:2017-09-03 22:00:01火眼金睛
日期:2017-09-01 17:00:07目光如炬
日期:2017-08-27 22:00:01目光如炬
日期:2017-08-20 22:00:00火眼金睛
日期:2018-02-28 22:00:00
跳转到指定楼层
1#
发表于 2018-1-9 16:08 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 sunyunyi 于 2018-1-9 16:10 编辑


目前就职海天起点,服务于电力行业,致力于帮助客户解决生产过程中出现的问题,提高生产效率, 爱好书法,周易!愿结交志同道合之士!共同进步! 微信号:sunyunyi_sun



背景:
环境介绍:oracle 11.2.0.3 二节点rac升级到 11.2.0.4 安装最新psu,ocr/vt 和用户数据都在 +data磁盘组中。
这样的环境在ocr deconfig中属于比较复杂的环境可参考MOS文档,我们模拟这样的环境进行deconfig,二号节点正常提供服务,
在一号节点进行操作,看看会遇到什么情况。

说明:
什么情况需要deconfig:
1:OCR错误没有备份,这样情况比较少见,12c ocr备份在asm中,之前版本备份在各节点本地。
2:/etc or /var/opt/oracle 文件错误rac无法启动,或者ohasd错误无法启动


步骤:

/u01/app/11.2.0.4/grid/crs/install/rootcrs.pl -deconfig -force
CRS-4133: Oracle High Availability Services has been stopped.
Removing Trace File Analyzer
Successfully deconfigured Oracle clusterware stack on this node

/u01/app/11.2.0.4/grid/root.sh
Using configuration parameter file: /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
Invalid interface. There are more than one interface,
but there is no private interface specified
/u01/app/11.2.0.4/grid/perl/bin/perl -I/u01/app/11.2.0.4/grid/perl/lib -I/u01/app/11.2.0.4/grid/crs/install
/u01/app/11.2.0.4/grid/crs/install/rootcrs.pl execution failed --root.sh报错

手动执行最后一个命令会发现 crsconfig_params 参数文件有问题,这大概是因为大版本升级造成,可对比全新安装rac的该参数文件,
添加必要的信息:

vi /u01/app/11.2.0.4/grid/crs/install/crsconfig_params
SILENT=false
ORACLE_OWNER=grid
ORA_DBA_GROUP=oinstall
ORA_ASM_GROUP=asmadmin
LANGUAGE_ID=AMERICAN_AMERICA.WE8ISO8859P1
TZ=Asia/Shanghai
ISROLLING=true
REUSEDG=false
ASM_AU_SIZE=1
USER_IGNORED_PREREQ=true


ORACLE_HOME=/u01/app/11.2.0.4/grid
ORACLE_BASE=/u01/app/grid
OLD_CRS_HOME=/u01/app/11.2.0/grid

JREDIR=/u01/app/11.2.0.4/grid/jdk/jre/
JLIBDIR=/u01/app/11.2.0.4/grid/jlib

VNDR_CLUSTER=false
OCR_LOCATIONS=+DATA -add
CLUSTER_NAME=pmsup-scan
HOST_NAME_LIST=pmsup1,pmsup2
NODE_NAME_LIST=pmsup1,pmsup2
PRIVATE_NAME_LIST=
VOTING_DISKS=/dev/raw/raw1 -add
#VF_DISCOVERY_STRING=%s_vfdiscoverystring%
ASM_UPGRADE=true
ASM_SPFILE=
ASM_DISK_GROUP=data -add
ASM_DISCOVERY_STRING=
ASM_DISKS=/dev/raw/raw1 -add
ASM_REDUNDANCY=EXTERNAL
CRS_STORAGE_OPTION=0
CSS_LEASEDURATION=400
CRS_NODEVIPS='pmsup1-vip/255.255.255.192/eth1,pmsup2-vip/255.255.255.192/eth1' -add
NODELIST=pmsup1,pmsup2
NETWORKS="eth0"/10.208.18.0ublic,"eth1"/192.168.18.0:cluster_interconnect -add
SCAN_NAME=pmsup-scan
SCAN_PORT=1521
GPNP_PA=
OCFS_CONFIG=

# GNS consts
GNS_CONF=false
GNS_ADDR_LIST=
GNS_DOMAIN_LIST=
GNS_ALLOW_NET_LIST=
GNS_DENY_NET_LIST=
GNS_DENY_ITF_LIST=

#### Required by OUI add node
NEW_HOST_NAME_LIST=
NEW_NODE_NAME_LIST=
NEW_PRIVATE_NAME_LIST='pmsup1-vip/255.255.255.192/eth1,pmsup2-vip/255.255.255.192/eth1'
NEW_NODEVIPS=

############### OCR constants
# GPNPCONFIGDIR is handled differently in dev (T_HAS_WORK for all)
# GPNPGCONFIGDIR in dev expands to T_HAS_WORK_GLOBAL
GPNPCONFIGDIR=$ORACLE_HOME
GPNPGCONFIGDIR=$ORACLE_HOME
OCRLOC=
OLRLOC=
OCRID=
CLUSTER_GUID=

CLSCFG_MISSCOUNT=

#### IPD/OS
CRFHOME="/u01/app/11.2.0.4/grid"

再次执行root.sh:
/u01/app/11.2.0.4/grid/root.sh
grid alter error:
[crsd(29911)]CRS-1013:The OCR location in an ASM disk group is inaccessible.
--报错ASM无法访问,那我们就适当的时机手动启动ASM

again:
/u01/app/11.2.0.4/grid/crs/install/rootcrs.pl -deconfig -force
/u01/app/11.2.0.4/grid/root.sh
注意ohasd基础资源启动后立刻手动启动asm实例
root.sh 执行成功但报错 vip无法添加,这个属于正常,添加节点都是需要手动添加vip

接下来手动添加vip:

/u01/app/11.2.0.4/grid/bin/appvipcfg create -network=1 -ip=pmsup1-vip -vipname=ora.pmsup1.vip -user=root

/u01/app/11.2.0.4/grid/bin/appvipcfg create -network=1 -ip=pmsup1-vip -vipname=ora.pmsup1.vip -user=root
Production Copyright 2007, 2008, Oracle.All rights reserved
2018-01-09 09:58:03: Creating Resource Type
2018-01-09 09:58:03: Executing /u01/app/11.2.0.4/grid/bin/crsctl add type app.appvip_net1.type
-basetype ora.cluster_vip_net1.type -file /u01/app/11.2.0.4/grid/crs/template/appvip.type
2018-01-09 09:58:03: Executing cmd: /u01/app/11.2.0.4/grid/bin/crsctl add type app.appvip_net1.type
-basetype ora.cluster_vip_net1.type -file /u01/app/11.2.0.4/grid/crs/template/appvip.type
2018-01-09 09:58:04: Create the Resource
2018-01-09 09:58:04: Executing /u01/app/11.2.0.4/grid/bin/crsctl add resource ora.pmsup1.vip
-type app.appvip_net1.type -attr "USR_ORA_VIP=pmsup1-vip,START_DEPENDENCIES=hard(ora.net1.network)
pullup(ora.net1.network),STOP_DEPENDENCIES=hard(ora.net1.network),ACL='owner:root:rwx,pgrp:root:r-x,
other::r--,user:root:r-x',HOSTING_MEMBERS=pmsup1,APPSVIP_FAILBACK="
2018-01-09 09:58:04: Executing cmd: /u01/app/11.2.0.4/grid/bin/crsctl add resource ora.pmsup1.vip
-type app.appvip_net1.type -attr "USR_ORA_VIP=pmsup1-vip,START_DEPENDENCIES=hard(ora.net1.network)
pullup(ora.net1.network),STOP_DEPENDENCIES=hard(ora.net1.network),ACL='owner:root:rwx,pgrp:root:r-x,
other::r--,user:root:r-x',HOSTING_MEMBERS=pmsup1,APPSVIP_FAILBACK="
/u01/app/11.2.0.4/grid/bin/crsctl start res ora.pmsup1.vip

/u01/app/11.2.0.4/grid/bin/crsctl start res ora.pmsup1.vip
vip成功添加并启动OK

检查vip:

/u01/app/11.2.0.4/grid/bin/srvctl config nodeapps -n pmsup1
Network exists: 1/10.208.18.0/255.255.255.0/eth0, type static
GSD exists
ONS exists: Local port 6100, remote port 6200, EM port 2016
没有vip?

/u01/app/11.2.0.4/grid/bin/srvctl add nodeapps -n pmsup1 -A 10.208.18.150/255.255.255.0/eth0 -v
PRCR-1086 : resource ora.pmsup1.vip is already registered

/u01/app/11.2.0.4/grid/bin/crsctl stop res ora.pmsup1.vip
CRS-2673: Attempting to stop 'ora.pmsup1.vip' on 'pmsup2'
CRS-2677: Stop of 'ora.pmsup1.vip' on 'pmsup2' succeeded
[root@pmsup1 ~]# /u01/app/11.2.0.4/grid/bin/srvctl modify nodeapps -n pmsup1 -A 10.208.18.150/255.255.255.0/eth0
PRKO-2310 : VIP does not exist on node pmsup1.
[root@pmsup1 ~]# /u01/app/11.2.0.4/grid/bin/crsctl start res ora.pmsup1.vip
CRS-2672: Attempting to start 'ora.pmsup1.vip' on 'pmsup1'
CRS-2676: Start of 'ora.pmsup1.vip' on 'pmsup1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'pmsup1'
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'pmsup1' succeeded
CRS-2672: Attempting to start 'ora.pmssn.app01srv.svc' on 'pmsup1'
CRS-2672: Attempting to start 'ora.pmssn.srv_pmssn.svc' on 'pmsup1'
CRS-2676: Start of 'ora.pmssn.app01srv.svc' on 'pmsup1' succeeded
CRS-2676: Start of 'ora.pmssn.srv_pmssn.svc' on 'pmsup1' succeeded
[root@pmsup1 ~]#
[root@pmsup1 ~]# /u01/app/11.2.0.4/grid/bin/srvctl modify nodeapps -n pmsup1 -A 10.208.18.150/255.255.255.0/eth0
PRKO-2310 : VIP does not exist on node pmsup1.

已经成功添加vip但是srvctl config nodeapps -n pmsup1 却不显示,监听和services都正常,添加新network res不合理因为我这里
只有一个public ip,看来还是有点小问题,但是不影响使用。

到此deconfig和reconfig配置成功。











您需要登录后才可以回帖 登录 | 注册

本版积分规则

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档 |
  | | |
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 网站律师 隐私政策 知识产权声明
 北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表