单机RAC修改主机名称后,has无法启动
问题:修改主机名称后,has无法启动
hostnamectl set-hostname hxlhost
grid修改主机名后报错误
[root@hxlhost bin]# ./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, or completed with errors.
解决方案
1.删除Restart(Remove Oracle Restart configuration)
[root@hxlhost bin]# /u01/grid/grid_home/perl/bin/perl -I/u01/grid/grid_home/perl/lib -I/u01/grid/grid_home/crs/install /u01/grid/grid_home/crs/install/roothas.pl -deconfig -force -verbose
Using configuration parameter file: /u01/grid/grid_home/crs/install/crsconfig_params
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed 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 completed with errors.
Successfully deconfigured Oracle Restart stack
2.ReconfigureOracle Restart
[root@hxlhost bin]# /u01/grid/grid_home/perl/bin/perl -I/u01/grid/grid_home/perl/lib -I/u01/grid/grid_home/crs/install /u01/grid/grid_home/crs/install/roothas.pl
Using configuration parameter file: /u01/grid/grid_home/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 hxlhost successfully pinned.
Adding Clusterware entries to oracle-ohasd.service
hxlhost 2020/11/13 02:24:32 /u01/grid/grid_home/cdata/hxlhost/backup_20201113_022432.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
3.启动cssd
[root@hxlhost bin]# ./crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.cssd ora.cssd.type 0/5 0/5 OFFLINE OFFLINE
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE hxlhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
[root@hxlhost bin]#
[root@hxlhost bin]# ./crsctl start resource ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'hxlhost'
CRS-2672: Attempting to start 'ora.diskmon' on 'hxlhost'
CRS-2676: Start of 'ora.diskmon' on 'hxlhost' succeeded
CRS-2676: Start of 'ora.cssd' on 'hxlhost' succeeded
[root@hxlhost bin]#
4.将asm服务添加到grid,grid用户下添加(grid用户下操作)
[grid@hxlhost ~]$ srvctl add asm
[grid@hxlhost ~]$
重新配置asm参数然后启动
编辑初始化参数
[grid@oragrid dbs]$ vi /tmp/init+ASM.ora
asm_diskstring='/dev/asm*'
asm_diskgroups='DATA'
asm_power_limit=1
diagnostic_dest='/u01/grid/grid_base'
instance_type='asm'
large_pool_size=12M
remote_login_passwordfile='EXCLUSIVE'
关闭asm实例,若是没有关闭的话
SQL> shutdown immediate
ORA-15100: invalid or missing diskgroup name
ASM instance shutdown
创建spfile
SQL> connect / as sysasm
Connected to an idle instance.
SQL> create spfile from pfile='/tmp/init+ASM.ora';
File created.
然后启动
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资源情况
[grid@hxlhost ~]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE hxlhost
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE hxlhost
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE hxlhost
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE hxlhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
5.添加数据库(oracle用户下操作)
[oracle@hxlhost ~]$ srvctl add database -d restart -o /u01/oracle/app/product/11.2.0/db_1
参数说明
-d db_unique_name
-o oracle_home
启动数据库
[oracle@hxlhost ~]$ srvctl start database -d restart
root用户下查看数据库状态
[root@hxlhost bin]# ./crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE hxlhost
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE hxlhost
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE hxlhost
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE hxlhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
ora.restart.db ora....se.type 0/2 0/1 ONLINE ONLINE hxlhost
[root@hxlhost bin]#
6.修改监听文件(grid用户下操作)
[grid@hxlhost admin]$ cd /u01/grid/grid_home/network/admin
[grid@hxlhost admin]$ more listener.ora
# listener.ora Network Configuration File: /u01/grid/grid_home/network/admin/listener.ora
# Generated by Oracle configuration tools.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = hxlhost)(PORT = 1521))
)
)
ADR_BASE_LISTENER = /u01/grid/grid_base
ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON # line added by Agent
[grid@hxlhost admin]$
6.启动监听器(该监听器即监听asm实例和数据库实例)
[grid@hxlhost ~]$ srvctl add listener
[grid@hxlhost ~]$ srvctl start listener
7.查看资源情况
[grid@hxlhost admin]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.DATA.dg ora....up.type 0/5 0/ ONLINE ONLINE hxlhost
ora....ER.lsnr ora....er.type 0/5 0/ ONLINE ONLINE hxlhost
ora.asm ora.asm.type 0/5 0/ ONLINE ONLINE hxlhost
ora.cssd ora.cssd.type 0/5 0/5 ONLINE ONLINE hxlhost
ora.diskmon ora....on.type 0/10 0/5 OFFLINE OFFLINE
ora.evmd ora.evm.type 0/10 0/5 ONLINE ONLINE hxlhost
ora.ons ora.ons.type 0/3 0/ OFFLINE OFFLINE
ora.restart.db ora....se.type 0/2 0/1 ONLINE ONLINE hxlhost
-- The End --
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· DeepSeek 开源周回顾「GitHub 热点速览」
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· AI与.NET技术实操系列(二):开始使用ML.NET
· 单线程的Redis速度为什么快?