Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Tuesday, December 09, 2014

Configuring Oracle Grid Infrastructure for a standalone server (11gR2)

Scenario:
1- One of our DBA already had installed Oracle (11gR2 11.2.0.4) RDBMS on Linux 5.8
2- After some times, client requested to use the ASM as test to know its capabilities so DBA was given the task to have the GI installed and configured without disturbing the current environment.

Steps:

1- Install Oracle Grid Infrastructure on the server (Software Only)
Before installing created the required directories for grid eg;ORACLE_BASE=/u02/app and ORACLE_HOME=/u02/app/11.2.0/grid/

2- Install ASMLIB, take the ASMLIB packages as per your kernel version and initialize it.

[root@SN3-IUB-RV-OD03 dev]#  uname -r
2.6.18-308.el5

[root@SN3-IUB-RV-OD03 dev]# rpm -Uvh oracleasm-2.6.18-308.el5-2.0.5-1.el5.x86_64.rpm
[root@SN3-IUB-RV-OD03 dev]# rpm -Uvh oracleasmlib-2.0.4-1.el5.x86_64.rpm
[root@SN3-IUB-RV-OD03 dev]# rpm -Uvh oracleasm-support-2.1.8-1.el5.x86_64.rpm

[root@SN3-IUB-RV-OD03 dev]# oracleasm configure -i
[root@SN3-IUB-RV-OD03 dev]# oracleasm init


You can download the required ASMLIB packages from here

3- For ASM testing purpose , create the file on OS to make it ASMDISK later
#dd if=/dev/zero of=mydisk1.img bs=1M count=1000
#dd if=/dev/zero of=mydisk2.img bs=1M count=1000

4-  Make the new file as block device

[root@SN3-IUB-RV-OD03 dev]# losetup /dev/loop0 mydisk1.img
[root@SN3-IUB-RV-OD03 dev]# losetup /dev/loop1 mydisk2.img
ioctl: LOOP_SET_FD: Device or resource busy
[root@SN3-IUB-RV-OD03 dev]# losetup -d /dev/loop1
[root@SN3-IUB-RV-OD03 dev]# losetup -f
/dev/loop1
[root@SN3-IUB-RV-OD03 dev]# losetup /dev/loop1 mydisk2.img
[root@SN3-IUB-RV-OD03 dev]#

If any device is already being used you could resolve it using -d option with losetup

5- Now create ASM Disks
[root@SN3-IUB-RV-OD03 dev]# oracleasm createdisk ASMDSK1 /dev/loop0
Writing disk header: done
Instantiating disk: done
[root@SN3-IUB-RV-OD03 dev]# oracleasm createdisk ASMDSK2 /dev/loop1
Writing disk header: done
Instantiating disk: done

6- Configuring the Software Binaries for GI
a) Log in as the root user and run the roothas.sh script from Grid_home using the following syntax:
Grid_home/perl/bin/perl -I Grid_home/perl/lib -I Grid_home/crs/install 
Grid_home/crs/install/roothas.pl

[root@SN3-IUB-RV-OD03 bin]# /u02/app/11.2.0/grid/perl/bin/perl -I /u02/app/11.2.0/grid/perl/lib -I /u02/app/11.2.0/grid/crs/install /u02/app/11.2.0/grid/crs/install/roothas.pl

Using configuration parameter file: /u02/app/11.2.0/grid/crs/install/crsconfig_params
Creating trace directory
User ignored Prerequisites during installation
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 sn3-iub-rv-od03 successfully pinned.
Adding Clusterware entries to inittab

sn3-iub-rv-od03     2014/12/09 12:45:17     /u02/app/11.2.0/grid/cdata/sn3-iub-rv-od03/backup_20141209_124517.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
[root@SN3-IUB-RV-OD03 bin]#


b) Login as grid owner and go to direcrotory path of the Oracle Grid Infrastructure for a standalone server home

[root@SN3-IUB-RV-OD03 bin]# su - oracle
[oracle@SN3-IUB-RV-OD03 ~]$ cd /u02/app/11.2.0/grid/oui/bin

c) Enter the following command

./runInstaller -updateNodeList ORACLE_HOME=Grid_home -defaultHomeName CLUSTER_NODES= CRS=TRUE

[oracle@SN3-IUB-RV-OD03 bin]$ ./runInstaller -updateNodeList ORACLE_HOME=/u02/app/11.2.0/grid -defaultHomeName CLUSTER_NODES= CRS=TRUE
Starting Oracle Universal Installer...

Checking swap space: must be greater than 500 MB.   Actual 2015 MB    Passed
The inventory pointer is located at /etc/oraInst.loc
The inventory is located at /u01/app/oraInventory
'UpdateNodeList' was successful.
[oracle@SN3-IUB-RV-OD03 bin]$

d) Check the status of services
[oracle@SN3-IUB-RV-OD03 bin]$ ./crs_stat -t
Name           Type           Target    State     Host
------------------------------------------------------------
ora.cssd       ora.cssd.type  OFFLINE   OFFLINE
ora.diskmon    ora....on.type OFFLINE   OFFLINE
ora.evmd       ora.evm.type   ONLINE    ONLINE    sn3-...od03
ora.ons        ora.ons.type   OFFLINE   OFFLINE
[oracle@SN3-IUB-RV-OD03 bin]$


[oracle@SN3-IUB-RV-OD03 bin]$ ./crsctl status res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS                                            
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.asm
               ONLINE  OFFLINE      sn3-iub-rv-od03                                                                   
ora.ons
               OFFLINE OFFLINE      sn3-iub-rv-od03                                                                   
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  OFFLINE                               STARTING                                                 
ora.diskmon
      1        OFFLINE OFFLINE                                                                                        
ora.evmd
      1        ONLINE  ONLINE       sn3-iub-rv-od03   

7- Now run ASMCA and create ASM instance, provide proper information and then create your desired diskgroups





No comments: