【Oracle】11gR2 grid单机使用asm存储修改主机名后导致的故障处理

环境:
系统:Aix 7.1
数据库版本:11.2.0.3.11

一. 问题描述:
AIX 7.1操作系统修改了主机名后重启服务器后就css和ohasd服务无法启动


原因分析:
grid不能改主机名
standalone改了就得重配 restart
cluster的话改主机名只能使用增删节点的方式
本文档是关于重新配置Oracle重启。如果服务器(主机)被重命名,那么这种操作的一个原因可能是。
如果这是caseand服务器重新启动,那么ASM启动将会失败,ora-29701。
解决方案是重新配置Oracle重启。


has检查:
[root@itpux grid]# crsctl start has
CLSU-00100: Operating System function:opendir failed with error data: 2
CLSU-00101: Operating System error message:No such file or directory
CLSU-00103: error location: scrsearch1
CLSU-00104: additional error information:cant open scr home dir scls_scr_getval
CRS-4000: Command Start failed, orcompleted with errors.


[root@itpux grid]# hostname
itpux


css检查:
[root@itpux grid]# crsctl check css
CRS-4639: Could not contact Oracle HighAvailability Services
CRS-4000: Command Check failed, orcompleted with errors.




启动+asm实例报错:
[grid@itpux grid]$ sqlplus / as asmdba
SQL*Plus: Release 11.2.0.4.0 Production onSun Sep 28 13:12:11 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing systemparameters
ORA-29701: unable to connect to Cluster Synchronization Service
SQL>




二. 解决方案参考文档:
How to Reconfigure Oracle Restart (文档 ID 986740.1)


实施步骤:
1. 删除Oracle 重启配置,这个步骤应该用特权root用户操作。
[root@itpux grid]#$ORACLE_HOME/crs/install/roothas.pl -deconfig -force
Using configuration parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle HighAvailability Services
CRS-4000: Command Stop failed, or completedwith errors.
CRS-4639: Could not contact Oracle HighAvailability Services
CRS-4000: Command Delete failed, orcompleted with errors.
CLSU-00100: Operating System function:opendir failed with error data: 2
CLSU-00101: Operating System error message:No such file or directory
CLSU-00103: error location: scrsearch1
CLSU-00104: additional error information:cant open scr home dir scls_scr_getval
CRS-4544: Unable to connect to OHAS
CRS-4000: Command Stop failed, or completedwith errors.
Successfully deconfigured Oracle Restartstack


2. 重新配置Oracle 重启组件,这步骤也因该用特权root用户执行。
[root@node1bak grid]# $ORACLE_HOME/crs/install/roothas.pl
Using configuration parameter file:/u01/app/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node node1bak successfully pinned.
Adding Clusterware entries to inittab
node1bak     2016/09/1811:20:40     /u01/app/11.2.0/grid/cdata/node1bak/backup_20160918_112040.olr
Successfully configured Oracle Grid Infrastructure for aStandalone Server


3. 添加ASM到Oracle重启配置中,这个步骤使用网格设施所有者grid用户操作。
[grid@itpux~]$ srvctl add asm


4. 启动ASM实例,这步骤需要grid用户。
[grid@itpux~]$ srvctl start asm


5. 重新创建ASM服务器参数文件,使用grid用户。
vi /tmp/init+ASM.ora
asm_diskgroups='DATA','RECO'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
asm_diskstring='/dev/sdb*'
Mount the disk group where the new server parameter file (SPFILE) will reside (e.g. DATA) and create SPFILE:


$ sqlplus / as sysasm
SQL> startup pfile='/tmp/init+ASM.ora';
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size              2260728 bytes
Variable Size              1108320520 bytes
ASM Cache                   25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled


SQL> create spfile='+DATA' from pfile='/tmp/init+ASM.ora';
File created.


SQL> show parameter pfile
NAME                                        TYPE       VALUE
----------------------------------------------- ------------------------------
spfile                                          string


SQL> shutdown immediate
ASM diskgroups volume disabled
ASM diskgroups dismounted
ASM instance shutdown


SQL> startup
ASM instance started
Total System Global Area 1135747072 bytes
Fixed Size              2260728 bytes
Variable Size              1108320520 bytes
ASM Cache                   25165824 bytes
ASM diskgroups mounted
ASM diskgroups volume enabled


6. 重启has服务
[root@itpux grid]# crsctl stop has
CRS-2791: Starting shutdown of Oracle HighAvailability Services-managed resources on 'node1bak'
CRS-2673: Attempting to stop 'ora.DATA.dg'on 'node1bak'
CRS-2677: Stop of 'ora.DATA.dg' on'node1bak' succeeded
CRS-2679: Attempting to clean 'ora.DATA.dg'on 'node1bak'
CRS-2681: Clean of 'ora.DATA.dg' on'node1bak' succeeded
CRS-2673: Attempting to stop 'ora.asm' on'node1bak'
CRS-2677: Stop of 'ora.asm' on 'node1bak'succeeded
CRS-2673: Attempting to stop 'ora.cssd' on'node1bak'
CRS-2677: Stop of 'ora.cssd' on 'node1bak'succeeded
CRS-2673: Attempting to stop 'ora.evmd' on'node1bak'
CRS-2677: Stop of 'ora.evmd' on 'node1bak'succeeded
CRS-2793: Shutdown of Oracle HighAvailability Services-managed resources on 'node1bak' has completed
CRS-4133: Oracle High Availability Serviceshas been stopped.


[root@itpux grid]# crsctl start has
CRS-4123: Oracle High Availability Serviceshas been started.


7. 将组件添加回Oracle重启配置
如果你有数据库、监听和其它组件,请将它们添加到Oracle重启配置中


7.1. 添加数据库组件需要oracle用户执行。
[oracle@itpux ~]$ srvctl add database -dorcl -o /u01/app/oracle/product/11.2.0/dbhome_1


7.2. 添加监听组件这步骤需要grid用户。
[grid@itpux ~]$ srvctl add listener


8. 最后启动数据库
[oracle@itpux ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production onSun Sep 28 14:12:11 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to an idle instance.


SQL> startup
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size              2252784 bytes
Variable Size                738197520 bytes
Database Buffers      486539264 bytes
Redo Buffers                 8970240 bytes
Database mounted.
Database opened.

至此完成,OK。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/30327022/viewspace-2144021/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/30327022/viewspace-2144021/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值