11gR2ASMOracle

No more localconfig in 11gR2 OH – So how to create ASM instance!!!!

From Oracle 11gR2, the ASM instance runs as part of Oracle Grid Infrastructure, and few other changes have been made.ASM was designed to work with single instance as well as with RAC clusters. ASM, even in single instance, requires the use of Cluster Synchronization Services (CSS) and it must be installed and started before ASM becomes available. The CSS service is required for synchronization between between an ASM instance and the database instances.
Till 11gR1 the CSS process was created using the $ORACLE_HOME/bin/localconfig script in Linux / UNIX or %ORACLE_HOME%\bin\localconfig.bat batch file in Windows.
From 11gR2, you won’t see localconfig file anymore in Oracle Home.Oracle 11gR2 introduced OHASD (Oracle High Availability Service Daemon) which gets created,at the end of the installation by running root.sh.This OHASD has ora.cssd service which is the CSS service used for synchronization between ASM instance and DB.
So, you need to download the Oracle Database 11g Release 2 Grid Infrastructure (11.2.0.1.0) for your environment.The Grid Infrastructure is not available for windows 32bit, and so i installed Oracle VM with Linux x86 and the installed Grid.
During the end of the Grid Infrastructure Installation for standalone server, 2 scripts needs to be run as root user –
a. orainstRoot.sh
b. Root.sh

[[email protected] db_1]# sh root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/grid/product/11.2.0.2/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
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.sh script.
Now product-specific root actions will be performed.
2011-04-17 09:15:06: Checking for super user privileges
2011-04-17 09:15:06: User has super user privileges
2011-04-17 09:15:06: Parsing the host name
Using configuration parameter file: /u01/app/grid/product/11.2.0.2/db_1/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'oracle', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-5-6.0.1
localhost     2011/04/17 09:15:41     /u01/app/grid/product/11.2.0.2/db_1/cdata/localhost/backup_20110417_091541.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
Updating inventory properties for clusterware
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB.   Actual 2047 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[[email protected] db_1]#
[[email protected] db_1]# ps -ef | grep ohasd
root      5096     1  0 09:15 ?        00:00:00 /bin/sh /etc/init.d/init.ohasd run
oracle    5123     1  0 09:15 ?        00:00:00 /u01/app/grid/product/11.2.0.2/db_1/bin/ohasd.bin reboot
root      5265  4876  0 09:16 pts/2    00:00:00 grep ohasd

Once, the services are up and running ASMCA is called and the log shows –

INFO: Started Plugin named: Automatic Storage Management Configuration Assistant
INFO: Found associated job
INFO: Starting 'Automatic Storage Management Configuration Assistant'
INFO: Starting 'Automatic Storage Management Configuration Assistant'
INFO: Executing ASMCA
INFO: Command /u01/app/grid/product/11.2.0.2/db_1/bin/asmca -silent -oui_internal -configureASM -diskGroupName DATA -diskList /dev/raw/raw1,/dev/raw/raw2 -redundancy EXTERNAL
INFO: ... GenericInternalPlugIn.handleProcess() entered.
INFO: ... GenericInternalPlugIn: getting configAssistantParmas.
INFO: ... GenericInternalPlugIn: checking secretArguments.
INFO: ... GenericInternalPlugIn: starting read loop.
INFO: Read: SYS_PASSWORD_PROMPT
INFO: Processing: SYS_PASSWORD_PROMPT for argument tag -sysAsmPassword
INFO: Read: ASMSNMP_PASSWORD_PROMPT
INFO: Processing: ASMSNMP_PASSWORD_PROMPT for argument tag -asmMonitorPassword
INFO: End of argument passing to stdin
INFO: Read:
INFO: Read: ASM created and started successfully.
INFO: Read:
INFO: Read: DiskGroup DATA created successfully.
INFO: Read:
INFO: Completed Plugin named: Automatic Storage Management Configuration Assistant

Once successfull installation has been done, you can check

[[email protected] bin]$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       anand-lab
ora.LISTENER.lsnr
               ONLINE  ONLINE       anand-lab
ora.asm
               ONLINE  ONLINE       anand-lab                Started            
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       anand-lab                                    
ora.diskmon
      1        ONLINE  ONLINE       anand-lab
[[email protected] bin]$

If the CSS is not up,

[[email protected] bin]$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               OFFLINE OFFLINE      anand-lab
ora.LISTENER.lsnr
               ONLINE  ONLINE       anand-lab
ora.asm
               OFFLINE OFFLINE      anand-lab                Instance Shutdown
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        OFFLINE OFFLINE   
ora.diskmon
      1        OFFLINE OFFLINE
[[email protected] bin]$ export ORACLE_SID=+ASM
[[email protected] bin]$
[[email protected] bin]$ export ORACLE_HOME=/u01/app/grid/product/11.2.0.2/db_1
[[email protected] bin]$
[[email protected] bin]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 21 13:36:43 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
SQL>

In this case, start the CSS services and then the ASM instance.

[[email protected] bin]$ ./crsctl start res ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'anand-lab'
CRS-2672: Attempting to start 'ora.diskmon' on 'anand-lab'
CRS-2676: Start of 'ora.diskmon' on 'anand-lab' succeeded
CRS-2676: Start of 'ora.cssd' on 'anand-lab' succeeded
[[email protected] bin]$ ./crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               OFFLINE OFFLINE      anand-lab
ora.LISTENER.lsnr
               ONLINE  ONLINE       anand-lab
ora.asm
               OFFLINE OFFLINE      anand-lab                Instance Shutdown
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       anand-lab
ora.diskmon
      1        ONLINE  ONLINE       anand-lab
[[email protected] bin]$
[[email protected] bin]$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.2.0 Production on Thu Apr 21 13:55:41 2011
Copyright (c) 1982, 2010, Oracle.  All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area  284565504 bytes
Fixed Size                  1336036 bytes
Variable Size             258063644 bytes
ASM Cache                  25165824 bytes
ASM diskgroups mounted
SQL> exit

References – http://www.oracle-class.com/?p=1908

5 thoughts on “No more localconfig in 11gR2 OH – So how to create ASM instance!!!!

  1. I’m converting from 10.2.0.5 to 12.1 and we currently have two ASM homes and two database homes that I use for patches. I would switch to the patched ASM home using localconfig reset from the newly patched ASM home. I would like to continue this set up for the 12c server but I don’t know if I can have two grid infrastructures and how I would go about moving the ASM instance to the other home. Any suggestions?

    1. I am not sure on that. Since 11gR2, ASM and OHASD runs from same GRID HOME and I have not seen 2 GRID HOME installed on a server and I don’t think it would be possible. If you have any other question kindly let me know. Thanks for visiting the blog.

  2. Thank you so much for posting this note. It helped me immensley since I am not familiar with this particular version of ASM. I was up and running in no time.

Leave a Reply