Showing posts with label crsctl. Show all posts
Showing posts with label crsctl. Show all posts

Friday, November 04, 2011

Fun!!! - Changed hostname on GI (Standalone Server)

Changed hostname on Grid Infrastructure for a Standalone Server. why did I talk about this? I just changed hostname in my virtualbox and rebooted it. I got error in /var/log/messages file(The Grid Infrastructure didn't start).

Oct 27 16:20:07 new_mytest logger: Oracle Cluster Ready Services startup disabled.
Oct 27 16:20:07 new_mytest logger: Could not access /etc/oracle/scls_scr/mylinux/oracle/ohasdstr.
Oct 27 16:20:13 new_mytest logger: autorun file for ohasd is missing
Oct 27 16:20:23 new_mytest logger: autorun file for ohasd is missing

So, I just tested/wrote about changed hostname on Grid Infrastructure for a Standalone Server. Not serious, just fun!!!
Example to change hostname from "mytest" to "mylinux" :)
*** Keep some resource informations ***
[root@mytest ~]# mkdir mytest
[root@mytest ~]# for x in ` /u01/app/oracle/product/11.2.0/grid/bin/crsctl stat res | grep NAME\= | awk -F\= '{print $2}'`; do /u01/app/oracle/product/11.2.0/grid/bin/crsctl stat res $x -p > mytest/$x.txt ; done
[root@mytest ~]# ls mytest
ora.asm.txt ora.DATA.dg.txt ora.evmd.txt ora.ons.txt
ora.cssd.txt ora.diskmon.txt ora.LISTENER.lsnr.txt ora.orcl.db.txt
A. Stopped HAS
[root@mytest ~]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl stop has -f
B. Changed hostname
[root@mytest ~]# vi /etc/sysconfig/network
[root@mytest ~]# vi /etc/hosts
[root@mytest ~]# vi /u01/app/oracle/product/11.2.0/grid/network/admin/listener.ora
[root@mytest ~]# hostname
mytest
[root@mytest ~]# hostname mylinux
[root@mylinux ~]# hostname
mylinux
C. Started to change hostname with Grid Infrastructure for a Standalone Server.
[root@mytest ~]# /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl -h
Option hahome requires an argument
Usage:
roothas.pl [-verbose] [-upgrade | -patch]
[-paramfile <parameter-file>] [-deconfig] [-force]
[-unlock [-hahome <path to Oracle Restart home>]]

Options:
-verbose Run this script in verbose mode
-upgrade Oracle HA is being upgraded from previous version
-patch Oracle HA is being upgraded to a patch version
-paramfile Complete path of file specifying HA parameter values
-deconfig To deconfigure Oracle Restart
-force To deconfigure Oracle Restart when configuration is in a good condition
-unlock Unlock Oracle Restart home
-hahome Complete path of Oracle HA home

If neither -upgrade nor -patch is supplied, a new install is performed

To see the full manpage for this program, execute:
perldoc roothas.pl
[root@mytest ~]# /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl -verbose -deconfig -force
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/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

[root@mylinux ~]# /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl -verbose
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'oracle', 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 mylinux successfully pinned.
Adding Clusterware entries to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
Oracle Database 11g Clusterware Release 11.2.0.3.0 - Production Copyright 1996, 2011 Oracle. All rights reserved.
[client(3619)]CRS-10001:27-Oct-11 18:54 ACFS-9201: Not Supported
2011-10-27 18:56:06.170
[client(3703)]CRS-2101:The OLR was formatted using version 3.
2011-10-27 18:56:09.776
[client(3727)]CRS-1001:The OCR was formatted using version 3.
[client(3770)]CRS-10001:CRS-6021: No msg for has:crs-6021 [l][unlimited]
[client(3771)]CRS-10001:CRS-6021: No msg for has:crs-6021 [n][65536]
*** Fixed them (ulimit) and fixed some... ***
[root@mylinux ~]# ps -aef | grep grid
oracle 3768 1 0 18:56 ? 00:00:00 /u01/app/oracle/product/11.2.0/grid/bin/ohasd.bin reboot
oracle 4213 1 0 19:05 ? 00:00:00 /u01/app/oracle/product/11.2.0/grid/bin/ohasd.bin reboot
oracle 4659 1 0 19:12 ? 00:00:00 /u01/app/oracle/product/11.2.0/grid/bin/ohasd.bin reboot

[root@mylinux ~]# kill -9 3768 4213 4659
[root@mylinux ~]# ps -aef | grep grid
oracle 4875 1 4 19:16 ? 00:00:00 /u01/app/oracle/product/11.2.0/grid/bin/ohasd.bin restart
*** After error and then run script again!!! Just make sure, NO "ohasd.bin reboot" on OS processes ***
*** De-configuration and run "roothas.pl" script again. ***
[root@mylinux ~]# /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl -verbose -deconfig
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
CRS-2613: Could not find resource 'ora.cssd'.
CRS-4000: Command Stop failed, or completed with errors.
CRS-2613: Could not find resource 'ora.cssd'.
CRS-4000: Command Delete failed, or completed with errors.
CRS-4133: Oracle High Availability Services has been stopped.
Successfully deconfigured Oracle Restart stack

[root@mylinux ~]# /u01/app/oracle/product/11.2.0/grid/crs/install/roothas.pl -verbose
Using configuration parameter file: /u01/app/oracle/product/11.2.0/grid/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'oracle', 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 mylinux successfully pinned.
Adding Clusterware entries to inittab

mylinux 2011/10/27 19:20:36 /u01/app/oracle/product/11.2.0/grid/cdata/mylinux/backup_20111027_192036.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
[root@mytest ~]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl check has
CRS-4638: Oracle High Availability Services is online

[root@mytest ~]# /u01/app/oracle/product/11.2.0/grid/bin/crsctl stat res | grep NAME\=
NAME=ora.cssd
NAME=ora.diskmon
NAME=ora.evmd
NAME=ora.ons
*** Checked in backup for resource informations ***
[root@mytest ~]# ls mytest
ora.asm.txt ora.DATA.dg.txt ora.evmd.txt ora.ons.txt
ora.cssd.txt ora.diskmon.txt ora.LISTENER.lsnr.txt ora.orcl.db.txt
Reviewed resources what was not register.
*** Try to use crsctl add res resource_name -type type_name -file mytest/file.txt ***
*** But Error - CRS-0175: Resource type 'type_name' either doesn't exist or cannot be accessed. ***
*** OK use "srvctl" for manual ***

D. Added other resources by manual (srvctl)
- Added Listener (changed listener.ora file before)
[root@mytest ~]# su - oracle
[oracle@mylinux ~]$ srvctl -h | grep listener | grep add
Usage: srvctl add listener [-l <lsnr_name>] [-s] [-p "[TCP:]<port>[, ...][/IPC:<key>][/NMP:<pipe_name>][/TCPS:<s_port>] [/SDP:<port>]"] [-o <oracle_home>]
[oracle@mylinux ~]$ srvctl add listener -l LISTENER -p "TCP:1521" -o /u01/app/oracle/product/11.2.0/grid
[oracle@mylinux ~]$ srvctl start listener
[oracle@mylinux ~]$ srvctl status listener
Listener LISTENER is enabled
Listener LISTENER is running on node(s): mylinux
- Added ASM
[root@mytest ~]# grep DISK mytest/ora.asm.txt
ASM_DISKSTRING=DATA
[root@mytest ~]# grep ASM_DISKSTRING mytest/ora.asm.txt
ASM_DISKSTRING=DATA
[root@mytest ~]# grep SP mytest/ora.asm.txt
SPFILE=
[root@mytest ~]# su - oracle
[oracle@mylinux ~]$ srvctl -h | grep asm | grep add
Usage: srvctl add asm [-l <lsnr_name>] [-p <spfile>] [-d <asm_diskstring>]
[oracle@mylinux ~]$ srvctl add asm -l LISTENER -p '' -d 'DATA'
[oracle@mylinux ~]$ srvctl start asm
[oracle@mylinux ~]$ srvctl status asm

[oracle@mylinux ~]$ /u01/app/oracle/product/11.2.0/grid/bin/crsctl stat res | grep NAME\=
NAME=ora.LISTENER.lsnr
NAME=ora.asm
NAME=ora.cssd
NAME=ora.diskmon
NAME=ora.evmd
NAME=ora.ons

[oracle@mylinux ~]$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/grid
[oracle@mylinux ~]$ export ORACLE_SID=+ASM
[oracle@mylinux ~]$ sqlplus / as sysasm

SQL> select name from v$asm_diskgroup;

NAME
------------------------------
DATA

SQL> alter diskgroup DATA mount;

Diskgroup altered.

[oracle@mylinux ~]$ /u01/app/oracle/product/11.2.0/grid/bin/crsctl stat res | grep NAME\=
NAME=ora.DATA.dg
NAME=ora.LISTENER.lsnr
NAME=ora.asm
NAME=ora.cssd
NAME=ora.diskmon
NAME=ora.evmd
NAME=ora.ons
- Added Database
[root@mytest ~]# grep SPFILE mytest/ora.orcl.db.txt
SPFILE=/u01/app/oracle/product/11.2.0/dbhome_2/dbs/spfileorcl.ora
[root@mytest ~]# grep ORACLE_HOME\= mytest/ora.orcl.db.txt
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_2

[oracle@mylinux ~]$ srvctl -h | grep database | grep add
Usage: srvctl add database -d <db_unique_name> -o <oracle_home> [-m <domain_name>] [-p <spfile>] [-r {PRIMARY | PHYSICAL_STANDBY | LOGICAL_STANDBY | SNAPSHOT_STANDBY}] [-s <start_options>] [-t <stop_options>] [-n <db_name>] [-i <inst_name>] [-y {AUTOMATIC | MANUAL | NORESTART}] [-a "<diskgroup_list>"]
[oracle@mylinux ~]$ srvctl add database -d orcl -o /u01/app/oracle/product/11.2.0/dbhome_2 -p /u01/app/oracle/product/11.2.0/dbhome_2/dbs/spfileorcl.ora
[oracle@mylinux ~]$ srvctl start database -d orcl
I learned some when I used "crsctl add res resource_name -type type_name -file mytest/file.txt". I got error "CRS-0175: Resource type 'type_name' either doesn't exist or cannot be accessed", that mean I have to add "resource type" before. But "srvctl" command, that will add "resource type" automatic.

Related Post:
Just Test - Install Oracle GI (standalone server) on OL6
Upgrade Grid Infrastructure for cluster (11.2.0.2 to 11.2.0.3)
11.2.0.3 GI diskmon will be OFFLINE by default in Non-Exadata

Wednesday, August 31, 2011

Just Learned more - Rename an Oracle database name -)

It's nothing in this post. I just changed Oracle database name and did it something for Grid Infrastructure for standalone server also.
- Check
SQL> select name from v$database;

NAME
---------
ORCLOLD

SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount
ORACLE instance started.

Total System Global Area 835104768 bytes
Fixed Size 2217952 bytes
Variable Size 503318560 bytes
Database Buffers 322961408 bytes
Redo Buffers 6606848 bytes
Database mounted.
- Backup before!!!
$ rman target /
RMAN> backup database;
Starting backup at 31-AUG-11
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=125 device type=DISK
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=+DATA/orclold/datafile/system.293.760536553
input datafile file number=00002 name=+DATA/orclold/datafile/sysaux.294.760536553
input datafile file number=00003 name=+DATA/orclold/datafile/undotbs1.295.760536553
input datafile file number=00004 name=+DATA/orclold/datafile/users.296.760536553
channel ORA_DISK_1: starting piece 1 at 31-AUG-11
channel ORA_DISK_1: finished piece 1 at 31-AUG-11
piece handle=+DATA/orclold/backupset/2011_08_31/nnndf0_tag20110831t120028_0.284.760622429 tag=TAG20110831T120028 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:25
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 31-AUG-11
channel ORA_DISK_1: finished piece 1 at 31-AUG-11
piece handle=+DATA/orclold/backupset/2011_08_31/ncsnf0_tag20110831t120028_0.285.760622577 tag=TAG20110831T120028 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 31-AUG-11
- Use "nid" to change Oracle database name.
$ nid TARGET=sys/password DBNAME=orcl LOGFILE=/tmp/nid.log
$ cat /tmp/nid.log
DBNEWID: Release 11.2.0.1.0 - Production on Wed Aug 31 12:06:17 2011

Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.

Connected to database ORCLOLD (DBID=685834868)

Connected to server version 11.2.0

Control Files in database:
+DATA/orclold/controlfile/current.298.760536693
+DATA/orclold/controlfile/current.297.760536693

Changing database ID from 685834868 to 1288455737
Changing database name from ORCLOLD to ORCL
Control File +DATA/orclold/controlfile/current.298.760536693 - modified
Control File +DATA/orclold/controlfile/current.297.760536693 - modified
Datafile +DATA/orclold/datafile/system.293.76053655 - dbid changed, wrote new name
Datafile +DATA/orclold/datafile/sysaux.294.76053655 - dbid changed, wrote new name
Datafile +DATA/orclold/datafile/undotbs1.295.76053655 - dbid changed, wrote new name
Datafile +DATA/orclold/datafile/users.296.76053655 - dbid changed, wrote new name
Datafile +DATA/orclold/tempfile/temp.305.76053675 - dbid changed, wrote new name
Control File +DATA/orclold/controlfile/current.298.760536693 - dbid changed, wrote new name
Control File +DATA/orclold/controlfile/current.297.760536693 - dbid changed, wrote new name
Instance shut down

Database name changed to ORCL.
Modify parameter file and generate a new password file before restarting.
Database ID for database ORCL changed to 1288455737.
All previous backups and archived redo logs for this database are unusable.
Database is not aware of previous backups and archived logs in Recovery Area.
Database has been shutdown, open database with RESETLOGS option.
Succesfully changed database name and ID.
DBNEWID - Completed succesfully.
- Do others things.
$ mv /u01/app/oracle/11.2.0/dbhome_old/dbs/initorclold.ora /u01/app/oracle/11.2.0/dbhome_old/dbs/initorcl.ora
$ export ORACLE_SID=orcl
$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 31 12:09:30 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup nomount
ORACLE instance started.

Total System Global Area 835104768 bytes
Fixed Size 2217952 bytes
Variable Size 461375520 bytes
Database Buffers 364904448 bytes
Redo Buffers 6606848 bytes
SQL> show parameter db_name

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
db_name string orclold

SQL> alter system set db_name=orcl scope=spfile;

System altered.

SQL> shutdown immediate;
ORA-01507: database not mounted

ORACLE instance shut down.

$ mv /u01/app/oracle/11.2.0/dbhome_old/dbs/orapworclold /u01/app/oracle/11.2.0/dbhome_old/dbs/orapworcl

$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Aug 31 12:20:25 2011

Copyright (c) 1982, 2009, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup mount;
ORACLE instance started.

Total System Global Area 835104768 bytes
Fixed Size 2217952 bytes
Variable Size 461375520 bytes
Database Buffers 364904448 bytes
Redo Buffers 6606848 bytes
Database mounted.
SQL> ALTER DATABASE OPEN RESETLOGS;

Database altered.
- Check new Database name and etc...
SQL> select name from v$database;

NAME
---------
ORCL

SQL> !lsnrctl status | grep Service
Service "orcl" has 1 instance(s).

SQL> select name, value from v$parameter where value like '%orclold%';
-- check --
Remark:
Thank You Laurent Schneider.
To rename only :
nid setname=yes

If You need to rename Oracle database name only.
Keyword Description (Default)
----------------------------------------------------
SETNAME Set a new database name only NO
I use Grid Infrastructure also ... have to change something. but I chose to add new - -*
$ crsctl stat res | grep NAME\= | grep db
NAME=ora.orclold.db

$ crsctl stat res ora.orclold.db -p
NAME=ora.orclold.db
TYPE=ora.database.type
ACL=owner:grid:--x,pgrp:asmdba:--x,other::r--,group:oinstall:r-x,user:oracle:rwx
ACTION_FAILURE_TEMPLATE=
ACTION_SCRIPT=
ACTIVE_PLACEMENT=1
AGENT_FILENAME=%CRS_HOME%/bin/oraagent%CRS_EXE_SUFFIX%
AUTO_START=restore
CARDINALITY=1
CHECK_INTERVAL=1
CHECK_TIMEOUT=600
CLUSTER_DATABASE=false
DATABASE_TYPE=
DB_UNIQUE_NAME=orclold
DEFAULT_TEMPLATE=PROPERTY(RESOURCE_CLASS=database) PROPERTY(DB_UNIQUE_NAME= CONCAT(PARSE(%NAME%, ., 2), %USR_ORA_DOMAIN%, .)) ELEMENT(INSTANCE_NAME= %GEN_USR_ORA_INST_NAME%)
DEGREE=1
DESCRIPTION=Oracle Database resource
ENABLED=1
FAILOVER_DELAY=0
FAILURE_INTERVAL=60
FAILURE_THRESHOLD=1
GEN_AUDIT_FILE_DEST=
GEN_START_OPTIONS=
GEN_USR_ORA_INST_NAME=
HOSTING_MEMBERS=
INSTANCE_FAILOVER=0
LOAD=1
LOGGING_LEVEL=1
MANAGEMENT_POLICY=AUTOMATIC
NLS_LANG=
NOT_RESTARTING_TEMPLATE=
OFFLINE_CHECK_INTERVAL=0
ONLINE_RELOCATION_TIMEOUT=0
ORACLE_HOME=/u01/app/oracle/11.2.0/dbhome_old
PLACEMENT=balanced
PROFILE_CHANGE_TEMPLATE=
RESTART_ATTEMPTS=2
ROLE=PRIMARY
SCRIPT_TIMEOUT=60
SERVER_POOLS=
SPFILE=+DATA/orclold/spfileorclold.ora
START_DEPENDENCIES=hard(ora.DATA.dg) weak(type:ora.listener.type,uniform:ora.ons,uniform:ora.eons) pullup(ora.DATA.dg)
START_TIMEOUT=600
STATE_CHANGE_TEMPLATE=
STOP_DEPENDENCIES=hard(intermediate:ora.asm,shutdown:ora.DATA.dg)
STOP_TIMEOUT=600
TYPE_VERSION=2.2
UPTIME_THRESHOLD=1h
USR_ORA_DB_NAME=orclold
USR_ORA_DOMAIN=
USR_ORA_ENV=
USR_ORA_FLAGS=
USR_ORA_INST_NAME=orclold
USR_ORA_OPEN_MODE=open
USR_ORA_OPI=false
USR_ORA_STOP_MODE=immediate
VERSION=11.2.0.1.0

$ crsctl stat res ora.orclold.db -p > /tmp/ora.orclold.db.res
*** Modified something in ora.orclold.db.res file.***

- Add new resource (after modified)
$ crsctl add res ora.orcl.db -type ora.database.type -file /tmp/ora.orclold.db.res

$ crsctl stat res | grep NAME\= | grep db
NAME=ora.orcl.db
NAME=ora.orclold.db

$ crsctl start res ora.orcl.db
CRS-2672: Attempting to start 'ora.orcl.db' on 'mytest'
CRS-5010: Update of configuration file "/u01/app/oracle/11.2.0/dbhome_old/srvm/admin/oratab.bak.mytest" failed: details at "(:CLSN00011:)" in "/u01/app/oracle/11.2.0/grid/log/mytest/agent/ohasd/oraagent_grid/oraagent_grid.log"
CRS-2676: Start of 'ora.orcl.db' on 'mytest' succeeded

$ crsctl status res ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on mytest

$ crsctl stop res ora.orcl.db
CRS-2673: Attempting to stop 'ora.orcl.db' on 'mytest'
CRS-5017: The resource action "ora.orcl.db stop" encountered the following error:
CRS-5003: Invalid attribute value: '' for attribute DATABASE_TYPE
CRS-2675: Stop of 'ora.orcl.db' on 'mytest' failed
CRS-2679: Attempting to clean 'ora.orcl.db' on 'mytest'
CRS-2681: Clean of 'ora.orcl.db' on 'mytest' succeeded

$ crsctl status res ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=OFFLINE
STATE=OFFLINE
So, You can use "srvctl"
srvctl add database -d orcl -o /u01/app/oracle/11.2.0/dbhome_old -p +DATA/orclold/spfileorclold.ora
- Delete old!!!
$ su -
Password:
# /u01/app/oracle/11.2.0/grid/bin/crsctl delete res ora.orclold.db
About CRS-5010 !!! during "crsctl start res ora.orcl.db" - because I use "grid" user for Grid Infrastructure and "oracle" for database software.
$ su - oracle
Password:
$ chmod 775 /u01/app/oracle/11.2.0/dbhome_old/srvm/admin
About "CRS-5003: Invalid attribute value: '' for attribute DATABASE_TYPE"
$ crsctl stat res ora.orcl.db -p | grep DATABASE_TYPE
DATABASE_TYPE=
OK, It should be "DATABASE_TYPE=SINGLE"
$ su -
Password:
# /u01/app/oracle/11.2.0/grid/bin/crsctl modify res ora.orcl.db -attr 'DATABASE_TYPE=SINGLE'
- Test "crsctl"
$ crsctl start res ora.orcl.db
CRS-2672: Attempting to start 'ora.orcl.db' on 'mytest'
CRS-2676: Start of 'ora.orcl.db' on 'mytest' succeeded
$ crsctl stop res ora.orcl.db
CRS-2673: Attempting to stop 'ora.orcl.db' on 'mytest'
CRS-2677: Stop of 'ora.orcl.db' on 'mytest' succeeded
$ crsctl start res ora.orcl.db
CRS-2672: Attempting to start 'ora.orcl.db' on 'mytest'
CRS-2676: Start of 'ora.orcl.db' on 'mytest' succeeded
$ crsctl status res ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on mytest
No error -)

Monday, April 25, 2011

Why database not startup automatic 11gR2 Grid Infrastructure?

I have used Database on Grid Infrastructure for a Stand-Alone Server. I stopped database and then rebooted server for something. After rebooted... Database not startup automatic?
Why not automatic...? Um... Actually this isn't my point in this post (because: AUTO_START=restore)
I just learned, tested and shared. Learn to change attribute in resource -)

We can check attributes in resource by using "crsctl" command-line. This case, we just interested AUTO_START attribute.
$ crsctl status resource ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=OFFLINE
STATE=OFFLINE

$ crsctl status resource ora.orcl.db -p | grep AUTO_START
AUTO_START=restore
What did we see? Um....
AUTO_START
- always: Restarts the resource when the server restarts regardless of the state of the resource when the server stopped.
- restore: Restores the resource to the same state that it was in when the server stopped. Oracle Clusterware attempts to restart the resource if the value of TARGET was ONLINE before the server stopped.
- never: Oracle Clusterware never restarts the resource regardless of the state of the resource when the server stopped.
OK... AUTO_START attribute in ora.orcl.db resource has "restore" value, that mean... if resource was stopped before restart HAS or Server. we have to start it by ourselves.
$ crsctl start resource ora.orcl.db
CRS-2672: Attempting to start 'ora.orcl.db' on 'oratest'
CRS-2676: Start of 'ora.orcl.db' on 'oratest' succeeded

$ crsctl status resource ora.orcl.db
NAME=ora.orcl.db
TYPE=ora.database.type
TARGET=ONLINE
STATE=ONLINE on oratest
OK... Tested to change attribute (AUTO_START=always)
$ crsctl modify resource
Parse error:
Argument 'resource' is missing a value

Usage:
crsctl modify resource <resName> -attr "<specification>[,...]" [-f] [-delete] [-i]
<specification>: {<attrName>=<value> | <attrName>@<scope>=<value>}
<scope>: {@SERVERNAME(<server>)[@DEGREEID(<did>)] |
@CARDINALITYID(<cid>)[@DEGREEID(<did>)] }
where
resName Modify named resource
attrName Attribute name
value Attribute value
server Server name
cid Resource cardinality ID
did Resource degree ID
-f Force option
-delete Delete named attribute
-i Fail if request cannot be processed immediately

$ crsctl modify resource ora.orcl.db -attr AUTO_START=always

$ crsctl status resource ora.orcl.db -p | grep AUTO_START
AUTO_START=always
Learned??? Default AUTO_START value = "restore" in database resource... and changing attribute in resource -)

Friday, January 22, 2010

Oracle HAS startup failed, After stop syslogd

Just something strange or ..., Oracle High Availability Services startup failed. After stopped syslogd. Hope someone explain this issue.
Using 11gR2 Grid + ASM LIBS + Loop devices.

Let me show:
# /etc/init.d/syslog stop
Shutting down kernel logger: [ OK ]
Shutting down system logger: [ OK ]
# /oracle/grid2/bin/crsctl start has
CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
# /oracle/grid2/bin/crsctl check has
CRS-4639: Could not contact Oracle High Availability Services
# /etc/init.d/syslog start
Starting system logger: [ OK ]
Starting kernel logger: [ OK ]
# /oracle/grid2/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.
# /oracle/grid2/bin/crsctl check has
CRS-4638: Oracle High Availability Services is online
and then Check more:
Case: syslogd stopped and HAS startup failed
# /etc/init.d/syslog status
syslogd is stopped
klogd is stopped

# strace /oracle/grid2/bin/crsctl start has
execve("/oracle/grid2/bin/crsctl", ["/oracle/grid2/bin/crsctl", "start", "has"], [/* 23 vars */]) = 0
brk(0) = 0xa684000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b1c9c71f000
uname({sys="Linux", node="RHEL5-TEST", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=116257, ...}) = 0
mmap(NULL, 116257, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b1c9c72000
.
.
.
socket(PF_FILE, SOCK_STREAM, 0) = 4
connect(4, {sa_family=AF_FILE, path="/var/tmp/.oracle/sOHASD_UI_SOCKET"...}, 110) = -1 ECONNREFUSED (Connection refused)
access("/var/tmp/.oracle/sOHASD_UI_SOCKET", F_OK) = 0
close(4) = 0
close(3) = 0
open("/oracle/grid2/crs/mesg/crsus.msb", O_RDONLY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
lseek(3, 512, SEEK_SET) = 512
read(3, "\21'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 1024, SEEK_SET) = 1024
read(3, "\226\0\245\0\262\0\307\0\330\0\345\0\364\0\376\0\7\1\21\0013\1;\1D\1\231\1\303\1\370\1"..., 512) = 512
lseek(3, 99840, SEEK_SET) = 99840
read(3, "\t\0\37\22\0\0>\0 \22\0\0q\0!\22\0\0\244\0\"\22\0\0\313\0#\22\1\0\363\0"..., 512) = 512
lseek(3, 115712, SEEK_SET) = 115712
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116224, SEEK_SET) = 116224
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116736, SEEK_SET) = 116736
read(3, "\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(3) = 0
nanosleep({5, 0}, {0, 422276128}) = 0
open("/oracle/grid2/crs/mesg/crsus.msb", O_RDONLY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
lseek(3, 512, SEEK_SET) = 512
read(3, "\21'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 1024, SEEK_SET) = 1024
read(3, "\226\0\245\0\262\0\307\0\330\0\345\0\364\0\376\0\7\1\21\0013\1;\1D\1\231\1\303\1\370\1"..., 512) = 512
lseek(3, 75264, SEEK_SET) = 75264
read(3, "\3\0\32\20\3\0\32\0\33\20\0\0\30\1\34\20\0\0K\1\0\0\0\0|\1 crsc"..., 512) = 512
lseek(3, 115712, SEEK_SET) = 115712
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116224, SEEK_SET) = 116224
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116736, SEEK_SET) = 116736
read(3, "\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(3) = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=249965, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaade2000
open("/oracle/grid2/crs/mesg/crsus.msb", O_RDONLY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
lseek(3, 512, SEEK_SET) = 512
read(3, "\21'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 1024, SEEK_SET) = 1024
read(3, "\226\0\245\0\262\0\307\0\330\0\345\0\364\0\376\0\7\1\21\0013\1;\1D\1\231\1\303\1\370\1"..., 512) = 512
lseek(3, 52224, SEEK_SET) = 52224
read(3, "\10\0\353\n\1\0008\0\354\n\1\0\212\0\355\n\3\0\320\0\356\n\0\0\24\1\240\17\0\0q\1"..., 512) = 512
lseek(3, 115712, SEEK_SET) = 115712
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 115712, SEEK_SET) = 115712
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116224, SEEK_SET) = 116224
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116736, SEEK_SET) = 116736
read(3, "\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(3) = 0
write(1, "CRS-4124: Oracle High Availabili"..., 118CRS-4124: Oracle High Availability Services startup failed.
CRS-4000: Command Start failed, or completed with errors.
) = 118
munmap(0x2aaaaacd7000, 1091040) = 0
futex(0x19214b84, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0x19214ab0, 4) = 1
futex(0x19214ab0, FUTEX_WAKE_PRIVATE, 1) = 1
brk(0x192d7000) = 0x192d7000
munmap(0x2b183c79f000, 4198400) = 0
munmap(0x2b183c77c000, 143360) = 0
munmap(0x2b183c759000, 143360) = 0
munmap(0x2b183c736000, 143360) = 0
exit_group(1) = ?

Case: syslogd start and HAS startup... -)
# /etc/init.d/syslog status
syslogd (pid 17175) is running...
klogd (pid 17178) is running...

# strace /oracle/grid2/bin/crsctl start has
execve("/oracle/grid2/bin/crsctl", ["/oracle/grid2/bin/crsctl", "start", "has"], [/* 23 vars */]) = 0
brk(0) = 0x17268000
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b0b8bab9000
uname({sys="Linux", node="RHEL5-TEST", ...}) = 0
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=116257, ...}) = 0
mmap(NULL, 116257, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2b0b8baba000
.
.
.
open("/oracle/grid2/auth/ohasd/rhel5-test/A5291056/8f9b98b1", O_WRONLY|O_CREAT|O_EXCL, 0644) = 5
fchmod(5, 0644) = 0
write(5, "c\200\n#", 4) = 4
close(5) = 0
write(4, "4\0\0\0\2\0\2\0\1\1\1\1\3\0\0\0\0\0\0\0\1\0\0\0\362\2161\1\0\0\0\0"..., 52) = 52
write(4, "8\0\0\0\3\0\2\0\1\1\1\1\4\0\0\0\0\0\0\0\1\0\0\0\362\2161\1\0\0\0\0"..., 56) = 56
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499395
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499395
poll([{fd=3, events=POLLIN|POLLRDNORM}, {fd=4, events=POLLIN|POLLRDNORM}], 2, -1) = 1 ([{fd=4, revents=POLLIN|POLLRDNORM}])
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499395
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499395
read(4, "8\0\0\0\3\0\2\0\1\1\1\1\3\0\0\0\0\0\0\0\1\0\0\0\36\2251\1\0\0\0\0"..., 32768) = 56
write(4, "\237\1\0\0PC\0\0\v\2\2\0\5\0\0\0\0\0\0\0\1\0\0\0\362\2161\1\0\0\0\0"..., 415) = 415
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499395
poll([{fd=3, events=POLLIN|POLLRDNORM}, {fd=4, events=POLLIN|POLLRDNORM}], 2, -1) = 1 ([{fd=4, revents=POLLIN|POLLRDNORM}])
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499500
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499500
read(4, "\211\2\0\0PC\0\0\v\2\2\0\4\0\0\0\0\0\0\0\1\0\0\0\36\2251\1\0\0\0\0"..., 32768) = 649
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499500
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499500
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499500
write(4, "0\0\0\0\2\0\20\0\1\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\362\2161\1\0\0\0\0"..., 48) = 48
fcntl(4, F_GETFL) = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(4, F_SETFL, O_RDWR) = 0
close(4) = 0
close(3) = 0
open("/oracle/grid2/crs/mesg/crsus.msb", O_RDONLY) = 3
fcntl(3, F_SETFD, FD_CLOEXEC) = 0
lseek(3, 0, SEEK_SET) = 0
read(3, "\25\23\"\1\23\3\t\t\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 256) = 256
lseek(3, 512, SEEK_SET) = 512
read(3, "\21'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 1024, SEEK_SET) = 1024
read(3, "\226\0\245\0\262\0\307\0\330\0\345\0\364\0\376\0\7\1\21\0013\1;\1D\1\231\1\303\1\370\1"..., 512) = 512
lseek(3, 75264, SEEK_SET) = 75264
read(3, "\3\0\32\20\3\0\32\0\33\20\0\0\30\1\34\20\0\0K\1\0\0\0\0|\1 crsc"..., 512) = 512
lseek(3, 115712, SEEK_SET) = 115712
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116224, SEEK_SET) = 116224
read(3, "\377\377\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
lseek(3, 116736, SEEK_SET) = 116736
read(3, "\0\0\0\0\0\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 512) = 512
close(3) = 0
fstat(1, {st_mode=S_IFREG|0644, st_size=69208, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaade2000
write(1, "CRS-4123: Oracle High Availabili"..., 62CRS-4123: Oracle High Availability Services has been started.
) = 62
munmap(0x2aaaaacd7000, 1091040) = 0
futex(0xd178b84, FUTEX_CMP_REQUEUE_PRIVATE, 1, 2147483647, 0xd178ab0, 4) = 1
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499500
nanosleep({0, 100000000}, {140734224759904, 4314995000}) = 0
times({tms_utime=2, tms_stime=2, tms_cutime=0, tms_cstime=0}) = 431499510
brk(0xd23b000) = 0xd23b000
munmap(0x2b3f70f01000, 4198400) = 0
munmap(0x2b3f70ede000, 143360) = 0
munmap(0x2b3f70ebb000, 143360) = 0
munmap(0x2b3f70e98000, 143360) = 0
exit_group(0)

However, I hope to know idea and some comment -)

Wednesday, January 20, 2010

Creating Database 11gR1 on ASM 11gR2

On Forums - show 10g database creating with 11gR2 ASM failed.
If we check on oracle support, we can use [ID 949073.1] ... That's helpful issue to fix.

To run older databases on 11gR2 ASM and Clusterware we need to create a persistent configuration for the nodes(pinning a node). Because Cluster configuration in 11gR2 is dynamic. This dynamic configuration is incompatible with older database releases.

On Oracle Document about "Pinning Cluster Nodes for Oracle Database Release 10.x or 11.x".

Time To Test It... (Creating Database 11gR1 on ASM 11gR2) and error.
ORA-19624: operation failed, retry possible
ORA-19870: error while restoring backup piece /oracle/product/11.1/db/assistants/dbca/templates/Seed_Database.dfb
ORA-19504: failed to create file "+DISK02"
ORA-17502: ksfdcre:4 Failed to create file +DISK02
ORA-15001: diskgroup "DISK02" does not exist or is not mounted
ORA-15077: could not locate ASM instance serving a required diskgroup
ORA-29701: unable to connect to Cluster Manager
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 5662
ORA-06512: at line 40
Check ASM... about database compatibility.
SQL> select name, compatibility, database_compatibility, state from v$asm_diskgroup_stat;

NAME COMPATIBILITY DATABASE_COMPAT STATE
------------------------------ --------------- --------------- -----------
DISK00 11.2.0.0.0 10.1.0.0.0 MOUNTED
DISK01 11.1.0.0.0 11.1.0.0.0 MOUNTED
DISK02 11.1.0.0.0 11.1.0.0.0 MOUNTED
DISK03 11.2.0.0.0 11.2.0.0.0 MOUNTED
then pin node, by crsctl pin css
# cd /oracle/grid2/
# cd bin/
# ./olsnodes -t -n
rhel5-test 1 Unpinned

# ./crsctl pin css -n rhel5-test
CRS-4664: Node rhel5-test successfully pinned.

# ./olsnodes -t -n
rhel5-test 1 Pinned
then create database again... and no problem.

then register my database(11gR1) in Grid.
$ srvctl add database -d orcl11gr1 -o /oracle/product/11.1/db -p +DISK02/orcl11gr1/spfileorcl11gr1.ora -y AUTOMATIC
$ srvctl add instance -d orcl11gr1 -i orcl11gr1 -n rhel5-test

$ srvctl start database -d orcl11gr1
$ srvctl status database -d orcl11gr1
Instance orcl11gr1 is running on node rhel5-test

$ ./crsstat ora.orcl11gr1
HA Resource Target State (Host)
----------- ------ -----
ora.orcl11gr1.db ONLINE ONLINE on rhel5-test

Sunday, November 22, 2009

Disable/Enable Automatic startup Oracle HAS




















On 11gR2, Oracle Clusterware consists of two separate stacks: an upper stack anchored by the Cluster Ready Services (CRS) daemon (crsd) and a lower stack anchored by the Oracle High Availability Services daemon (ohasd).


So.. How to disable/enable Oracle HAS.
Use the crsctl disable has command to disable automatic startup of the Oracle High Availability Services stack when the server boots up.
# crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.
How to know Oracle HAS is enabled(if doesn't use "crsctl config has")
# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
enable

# crsctl disable has
CRS-4621: Oracle High Availability Services autostart is disabled.

# crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
disable
Use the crsctl enable has command to enable automatic startup of the Oracle High Availability Services stack when the server boots up.
# crsctl enable has
CRS-4622: Oracle High Availability Services autostart is enabled.

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
enable
If We just check HAS Disable/Enable status, that uses "crsctl config has" command, it's easier than "ohasdstr" file checking.

How about "crsctl disable/enable crs" on 11gR2?
They disable/enable automatic startup of Oracle HAS.

I posted "check enable/disable the startup of CRS".. that show Oracle Clusterware version <= 11gR1, we can check from "crsstart" file. On 11gR2, crsstart file is not used ???

Use the crsctl disable crs command to prevent the automatic startup of Oracle High Availability Services when the server boots.


Use the crsctl enable crs command to enable automatic startup of Oracle High Availability Services when the server boots.
# crsctl config has
CRS-4622: Oracle High Availability Services autostart is enabled.

# crsctl config crs
CRS-4622: Oracle High Availability Services autostart is enabled.

# ls -ltr /etc/oracle/scls_scr/rhel5-test/root/
-rw-r--r-- 1 root root 7 Sep 7 00:56 crsstart
-rw-r--r-- 1 root oinstall 5 Nov 22 17:04 ohasdrun
-rw-r--r-- 1 root oinstall 7 Nov 22 17:10 ohasdstr
# cat /etc/oracle/scls_scr/rhel5-test/root/crsstart
enable

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
enable

# crsctl disable crs
CRS-4621: Oracle High Availability Services autostart is disabled.

# crsctl config crs
CRS-4621: Oracle High Availability Services autostart is disabled.

# crsctl config has
CRS-4621: Oracle High Availability Services autostart is disabled.

# ls -ltr /etc/oracle/scls_scr/rhel5-test/root/
-rw-r--r-- 1 root root 7 Sep 7 00:56 crsstart
-rw-r--r-- 1 root oinstall 5 Nov 22 17:04 ohasdrun
-rw-r--r-- 1 root oinstall 8 Nov 22 17:12 ohasdstr

# cat /etc/oracle/scls_scr/rhel5-test/root/crsstart
enable

# cat /etc/oracle/scls_scr/rhel5-test/root/ohasdstr
disable
However, check CRSCTL Utility Reference