環境:
DB:Oracle 11.2.0.2
OS:OEL Linux (OEL)5.6
現象:
更改hostnamenjdyw -> hotel07
重啟伺服器後發現crs服務無法啟動
[oracle@hotel07 diag]$ crs_stat -t
CRS-0184: 無法與 CRS 精靈通訊。
[oracle@hotel07diag]$ crsctl start has
CLSU-00105: 作業系統介面報告了內部故障
CLSU-00103: 錯誤位置: scrcreate5
CLSU-00104: 其他錯誤資訊: need ha priv
CRS-4000: 命令 Start 失敗, 或已完成但出現錯誤。
解決辦法:
重新設定crs安裝,具體如下
--查看下面的目錄,發現有之前伺服器名的設定檔目錄
[oracle@hotel07~]$ cd /etc/oracle/scls_scr
[oracle@hotel07 scls_scr]$ ls
njdyw
--在root使用者下
--進到$GRID_HOME/crs/install目錄,執行下面的指令碼
[root@hotel07install]# pwd
/u01/app/ora11g/product/11.2.0/grid/crs/install
[root@hotel07install]# ./rootcrs.pl -deconfig -force
Usingconfiguration parameter file: ./crsconfig_params
用法: srvctl <command> <object> [<options>]
命令:enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config
對象: database|service|asm|diskgroup|listener|home|ons
有關各個命令和對象的詳細協助, 請使用:
srvctl <command> -h 或
srvctl <command> <object> -h
PRKO-2012 :Oracle Restart 不支援 nodeapps 對象
ACFS-9459:ADVM/ACFS is not supported on this OS version: '2.6.32-100.26.2.el5'
ACFS-9201: NotSupported
CRS-4013: Thiscommand is not supported in a single-node configuration.
CRS-4000:Command Stop failed, or completed with errors.
You must killcrs processes or reboot the system to properly
cleanup theprocesses started by Oracle clusterware
error: packagecvuqdisk is not installed
Successfully deconfiguredOracle clusterware stack on this node
[root@hotel07install]# ./roothas.pl
Usingconfiguration parameter file: ./crsconfig_params
LOCAL ADD MODE
Creating OCRkeys for user 'oracle', privgrp 'oinstall'..
Operationsuccessful.
LOCAL ONLY MODE
Successfullyaccumulated necessary OCR keys.
Creating OCRkeys for user 'root', privgrp 'root'..
Operationsuccessful.
CRS-4664: Nodehotel07 successfully pinned.
Adding daemon toinittab
ACFS-9459:ADVM/ACFS is not supported on this OS version: '2.6.32-100.26.2.el5'
hotel07 2013/07/23 13:55:40 /u01/app/ora11g/product/11.2.0/grid/cdata/hotel07/backup_20130723_135540.olr
Successfullyconfigured Oracle Grid Infrastructure for a Standalone Server
--然後再看crs配置目錄
[oracle@hotel07~]$ cd /etc/oracle/scls_scr
[oracle@hotel07scls_scr]$ ls
hotel07
--查看crs狀態
[oracle@hotel07 scls_scr]$ crs_stat -t
名稱 類型 目標 狀態 主機
------------------------------------------------------------
ora.cssd ora.cssd.type ONLINE ONLINE hotel07
ora.diskmon ora....on.type ONLINE ONLINE hotel07
ora.evmd ora.evm.type ONLINE ONLINE hotel07
ora.ons ora.ons.type OFFLINE OFFLINE
--如果缺少其它服務用srvctl命令進行添加
[oracle@hotel07 ~]$ srvctl add listener
[oracle@hotel07 ~]$ srvctl add asm -l LISTENER -d data
[oracle@hotel07 admin]$ crs_stat -t
名稱 類型 目標 狀態 主機
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE hotel07
ora.FRA.dg ora....up.type ONLINE ONLINE hotel07
ora....ER.lsnr ora....er.type ONLINE ONLINE hotel07
ora.asm ora.asm.type ONLINE ONLINE hotel07
ora.cssd ora.cssd.type ONLINE ONLINE hotel07
ora.diskmon ora....on.type ONLINE ONLINE hotel07
ora.evmd ora.evm.type ONLINE ONLINE hotel07
ora.ons ora.ons.type OFFLINE OFFLINE
原文內容:
With 11.2 database, if thehostname is changed we’ll see following error while starting the HASservices
dev-srv-20:+ASM:/home/ora11gr2>crsctl start hasFailure at scls_scr_create with code 1Internal Error Information: Category: -1Operation: has_ha_privs Location: scrcreate5 Other: need ha priv System Dependent Information: 0 CRS-4000: Command Start failed, or completed with errors.To make sure, it is due to changein hostname check the directory in the following path. As we can see thehostname with which HAS was originally configured is different fromcurrent hostname.
dev-srv-20:+ASM:/etc/oracle/scls_scr>ls -altotal 0drwxr-xr-x 3 root epsdba 80 2009-05-12 08:36 .drwxr-xr-x 5 root epsdba 200 2010-03-08 14:27 ..drwxr-xr-x 4 root epsdba 96 2009-05-12 08:36 dev-srv-25
So to fix the problem
1. De-configure the CRS
$GRID_HOME/crs/install/rootcrs.pl -deconfig -force2. Reconfigure CRS
$GRID_HOME/crs/install/roothas.plMetalink Note 4632899.8 talksabout similar behaviour.