ITPUX技术网

交流 . 资讯 . 分享
Make progress together!
Oracle数据库DBA高级工程师培训视频
Oracle数据库培训-备份恢复-性能优化-集群容灾
mysql数据库视频教程

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

内容发布:风哥| 发布时间:2016-11-30 21:40:50
oracle 11gR2 grid单机使用asm存储修改主机名后导致的故障处理

一. 问题描述:

在虚拟机中测试,为了方便就修改了主机名,然后结果重启服务器后就css和oha都起不来了

原因分析:



grid不能改主机名
standalone改了就得重配 restart
cluster的话改主机名只能使用增删节点的方式
This document is about reconfiguring Oracle Restart. One reasonfor such action might be if the server (host) was renamed. If that was the caseand the server was rebooted, the ASM startup would fail with ORA-29701.
The solution is to reconfigure Oracle Restart.

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
[root@itpux grid]#

css检查:

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

启动+asm实例报错:

[grid@itpux grid]$ sqlplus / as sysdba
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. Remove Oracle Restart configuration
This step should be performedas privileged (root) user.

#$GRID_HOME/crs/install/roothas.pl -deconfig -force
The expected result is "Successfully deconfigured OracleRestart stack".


[root@
itpux grid]#  $GRID_HOME/crs/install/roothas.pl -deconfig-force
bash: /crs/install/roothas.pl: No such fileor directory


[root@
itpux grid]#$GRID_HOME/crs/install/roothas.pl -deconfig -force
bash: /crs/install/roothas.pl: No such fileor directory


[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


[root@itpux grid]#

2. ReconfigureOracle Restart

This step should also beperformed as privileged (root) user.
#$GRID_HOME/crs/install/roothas.pl
The expected result is "Successfully configured Oracle GridInfrastructure for a Standalone Server"
[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
[root@
itpux grid]#

3. Add ASM back to Oracle Restart configuration

This step should be performed as Grid Infrastructure owner (grid user).
$ srvctl add asm
The expected result is no output, just a return to the operatingsystem prompt.
[grid@itpux~]$ srvctl add asm
[grid@itpux~]$


4. Start up ASM instance

This step should be performed as Grid Infrastructure owner (grid user).
$ [url=]srvctlstart asm[/url]
That should start ASM. Note that at this time there will be no ASM initialization or server  parameter file. [grid@itpux~]$ srvctl start asm[grid@itpux~]$


5. Recreate ASM server parameter file (SPFILE)

This step should be performed as Grid Infrastructure owner (grid user)
asm_diskgroups='DATA','RECO'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
Mount the disk group where the new server parameter file (SPFILE) will reside (e.g. DATA) and create SPFILE:
$ sqlplus / as sysasm

SQL> alter diskgroup DATA mount;
Diskgroup altered.

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

SQL> show parameter spfile
NAME TYPE VALUE
------- ------- -------------------------------------------------
spfile string +DATA/asm/asmparameterfile/registry.253.707737977
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
ORA-15032: not all alterations performed
ORA-15017: diskgroup "DATA" cannot bemounted
ORA-15063: ASM discovered an insufficient number ofdisks for diskgroup "DATA"
SQL>
[root@itpux tmp]# cat  init+ASM.ora
asm_diskgroups='DATA'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
asm_diskstring='/dev/sdb*'
[root@itpux tmp]#
SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name
ORA-15100: invalid or missing diskgroup name
ASM instance shutdown
SQL> SQL> SQL> SQL> SQL> SQL>
SQL>
SQL>
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> createspfile='+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
SQL>


6. Restart HASstack
crsctl stop has
crsctl start 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@node1bak grid]#
[root@itpux grid]# crsctl start has
CRS-4123: Oracle High Availability Serviceshas been started.
[root@itpux grid]#

7. Addcomponents back to Oracle Restart Configuration



If you had the database, listener and other components, add them back to the Oracle Restart Configuration.
7.1. Add database componentThis step should be performed as RDBMS owner (oracle user).
srvctl adddatabase -d <db_unique_name> -o <oracle_home>
[oracle@itpux ~]$ srvctl add database -dorcl -o /u01/app/oracle/product/11.2.0/dbhome_1
[oracle@itpux ~]$

7.2. Addlistener componentThis step should be performed as Grid Infrastructure owner (grid user).
srvctl addlistener
[grid@itpux ~]$ srvctl add listener
[grid@itpux ~]$

7.3. Add othercomponentsFor information on how to add back additional components, please review:Oracle Database Administrator's Guide 11g Release 2 (11.2)Chapter 4 Configuring Automatic Restart of an Oracle DatabaseSection Configuring Oracle Restart


8. 最后startup数据库

[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.
SQL>




上一篇:aix6.1+grid+rac+oracle 11g安装配置手册
下一篇:oracle 11g 在linux环境下的卸载操作
189070296,150201289

专业提供Oracle数据库服务、主机、存储、备份、中间件等相关技术支持服务,QQ号:176140749
关注ITPUX技术网微信公众号itpux_com  ,了解本站最新技术资料的分享.

欢迎加QQ群,提供超多高质量Oracle/Unix/Linux技术文档与视频教程的下载。

Oracle/MySQL/Linux群4-5:189070296  150201289  
Oracle/MySQL/Linux群6-8:244609803   522261684   522651731
备注:请勿重复加群,另请注明 from itpux

加群分享视频教程部分如下:

1、公开课视频:Oracle/MySQL数据库工程师职业发展前景讲解(免费)
http://edu.51cto.com/course/7015.html

2、51CTO学院Oracle数据库高级工程师培训(高薪就业.课程介绍)
http://edu.51cto.com/px/train/131?xiaotu

3、Oracle DBA数据库高级工程师培训视频课程1.1(系列78套+七大阶段+上千案例)
套餐视频地址: http://edu.51cto.com/topic/1121.html

4、MySQL数据库(终身门徒)套餐:http://edu.51cto.com/sd/1e1a6

回复

使用道具 举报

1框架
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表