Oracle故障处理之linux 7安装11gR2时运行root.sh报错(ohasd failed to start)

 

1. 创建服务ohas.service的服务文件并赋予权限

[root@rac1 grid]# touch /usr/lib/systemd/system/ohas.service

[root@rac1 grid]# chmod 777 /usr/lib/systemd/system/ohas.service

2. 为ohas.service服务文件添加启动ohasd的相关信息

[root@rac1 grid]# vi /usr/lib/systemd/system/ohas.service

[Unit]

Description=Oracle High Availability Services

After=syslog.target

[Service]

ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple

Restart=always

[Install]

WantedBy=multi-user.target

 

3. 加载,启动服务

重新加载守护进程

[root@rac1 grid]# systemctl daemon-reload

 

设置守护进程自动启动

[root@rac1 grid]# systemctl enable ohas.service

 

手工启动ohas服务

[root@rac1 grid]# systemctl start ohas.service

 

查看服务的状态

[root@rac1 grid]# systemctl status ohas.service

● ohas.service - Oracle High Availability Services

   Loaded: loaded (/usr/lib/systemd/system/ohas.service; enabled; vendor preset: disabled)

   Active: active (running) since Sat 2022-05-07 14:00:50 CST; 10s ago

 Main PID: 37125 (init.ohasd)

    Tasks: 1

   CGroup: /system.slice/ohas.service

           â””─37125 /bin/sh /etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple


 

May 07 14:00:50 rac2 systemd[1]: Started Oracle High Availability Services.

 

4. 重新运行root.sh脚本

[root@rac1 grid]# ./root.sh 
Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= grid
    ORACLE_HOME=  /u01/app/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 contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.

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: /u01/app/11.2.0/grid/crs/install/crsconfig_params
User ignored Prerequisites during installation
Installing Trace File Analyzer
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded

ASM created and started successfully.

Disk Group CRS created successfully.

clscfg: -install mode specified
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4256: Updating the profile
Successful addition of voting disk a748492998df4fe6bf98e44a66ccd6a9.
Successful addition of voting disk 4b8d84df45644f52bfc5db9e82f3187c.
Successful addition of voting disk 9506034f21534fd4bfa285f87cb7440c.
Successfully replaced voting disk group with +CRS.
CRS-4256: Updating the profile
CRS-4266: Voting file(s) successfully replaced
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   a748492998df4fe6bf98e44a66ccd6a9 (/dev/mapper/asm-disk02) [CRS]
 2. ONLINE   4b8d84df45644f52bfc5db9e82f3187c (/dev/mapper/asm-disk03) [CRS]
 3. ONLINE   9506034f21534fd4bfa285f87cb7440c (/dev/mapper/asm-disk04) [CRS]
Located 3 voting disk(s).
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.CRS.dg' on 'rac1'
CRS-2676: Start of 'ora.CRS.dg' on 'rac1' succeeded
Preparing packages...
cvuqdisk-1.0.9-1.x86_64
Configure Oracle Grid Infrastructure for a Cluster ... succeeded

创建时间:2022-05-07 14:03
浏览量:0