Archive

Archive for the ‘oracle asm’ Category

Steps to configure ASM without using dbca(10.2.0.5)

April 28, 2011 Leave a comment

In this article i will discuss steps to create ASM instance without using DBCA.

Environment:

OS:Red Hat Enterprise Linux AS release 4 (Nahant Update 8)
*emgcl10g*:/u01/app/root/product/10.2.0/asm=>uname -a
Linux emgcl10g.ukatru.com 2.6.9-89.0.0.0.1.EL #1 Tue May 19 05:21:57 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux

ORACLE_HOME=/u01/app/root/product/10.2.0/asm
ORACLE_SID=+ASM
ORACLE VERSION : 10.2.0.5

Step1)Check CSS(Cluster Sysncronization service) is running or not

*emgcl10g*:/u01/app/root/product/10.2.0/asm/bin=>./crsctl check css
Failure 1 contacting CSS daemon

If it is not running then run the following command to configure the CSS as root user.

$ORACLE_HOME/bin/localconfig add

*emgcl10g*:/home/oracle=>sudo $ORACLE_HOME/bin/localconfig add
/etc/oracle does not exist. Creating it now.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
Configuration for local CSS has been initialized

Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process…
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
emgcl10g
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)
*emgcl10g*:/home/oracle=>cd $ORACLE_HOME/bin
*emgcl10g*:/u01/app/root/product/10.2.0/asm/bin=>./crsctl check css
CSS appears healthy

Step2)Configure oracleasm lib
Check oraclelib is installed on the machine by using following command.
rpm -qa | grep -i oracleasm

*emgcl10g*:/u01/app/oracle/admin/+ASM=>rpm -qa | grep -i oracleasm
oracleasm-support-2.1.3-1.el4
oracleasm-2.6.9-89.0.0.0.1.EL-2.0.5-1.el4

[root@emgcl10g ~]# /etc/init.d/oracleasm configure
Configuring the Oracle ASM library driver.

This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets (‘[]’). Hitting without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: dba
Start Oracle ASM library driver on boot (y/n) [y]: y
Scan for Oracle ASM disks on boot (y/n) [y]:
Writing Oracle ASM library driver configuration: done
Initializing the Oracle ASMLib driver: [ OK ]
Scanning the system for Oracle ASMLib disks: [ OK ]

[root@emgcl10g ~]# oracleasm createdisk ASM1 /dev/sdc1
Writing disk header: done
Instantiating disk: done
[root@emgcl10g ~]# oracleasm listdisks
ASM1

Step3)Create the init+ASM.ora file in $ORACLE_HOME/dbs directory.

asm_diskstring=’/dev/oracleasm/disks/*’
asm_power_limit=1
instance_type=’asm’
large_pool_size=12M
USER_DUMP_DEST=/u01/app/oracle/admin/+ASM/udump
BACKGROUND_DUMP_DEST=/u01/app/oracle/admin/+ASM/bdump
CORE_DUMP_DEST=/u01/app/oracle/admin/+ASM/cdump
remote_login_passwordfile=’EXCLUSIVE’

create all admin directories

*emgcl10g*:/u01/app/oracle/admin=>mkdir -p +ASM
*emgcl10g*:/u01/app/oracle/admin=>cd +ASM
*emgcl10g*:/u01/app/oracle/admin/+ASM=>mkdir -p adump
*emgcl10g*:/u01/app/oracle/admin/+ASM=>mkdir -p adump
*emgcl10g*:/u01/app/oracle/admin/+ASM=>mkdir -p udump
*emgcl10g*:/u01/app/oracle/admin/+ASM=>mkdir -p bdump
*emgcl10g*:/u01/app/oracle/admin/+ASM=>mkdir -p scripts
*emgcl10g*:/u01/app/oracle/admin/+ASM=>mkdir -p pfile

*emgcl10g*:/u01/app/root/product/10.2.0/asm/dbs=>ls -tlr
total 28
-rw-r—– 1 oracle oinstall 8385 Sep 11 1998 init.ora
-rw-r–r– 1 oracle oinstall 12920 May 3 2001 initdw.ora
lrwxrwxrwx 1 oracle oinstall 45 Apr 28 17:52 init+ASM.ora -> /u01/app/oracle/admin/+ASM/pfile/init+ASM.ora

Now start the oracle asm.

export ORACLE_SID=+ASM

*emgcl10g*:/u01/app/root/product/10.2.0/asm/bin=>sqlpluss / as sysdba

SQL*Plus: Release 10.2.0.5.0 – Production on Thu Apr 28 17:54:32 2011

Copyright (c) 1982, 2010, Oracle. All Rights Reserved.

Connected to an idle instance.

SQL> startup
ASM instance started

Total System Global Area 130023424 bytes
Fixed Size 2094544 bytes
Variable Size 102763056 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted

Create spfile from pfile.

SQL> create spfile from pfile;

File created.

*emgcl10g*:/u01/app/root/product/10.2.0/asm/dbs=>ls -tlr *ASM*ora*
lrwxrwxrwx 1 oracle oinstall 45 Apr 28 17:52 init+ASM.ora -> /u01/app/oracle/admin/+ASM/pfile/init+ASM.ora
lrwxrwxrwx 1 oracle oinstall 47 Apr 28 17:56 spfile+ASM.ora -> /u01/app/oracle/admin/+ASM/pfile/spfile+ASM.ora

Now add the following entry in /etc/oratab file.

+ASM:/u01/app/root/product/10.2.0/asm:N

ORA-15110: no diskgroups mounted

This error can be safely ignored, when creating a new diskgroup, the diskgroup name will be
added automatically to the asm_diskgroups parameter and we will not get this error again.

Create ASM diskgroup:

SQL> create diskgroup DATA1 EXTERNAL REDUNDANCY disk ‘/dev/oracleasm/disks/ASM1’;

Diskgroup created.

SQL> select state ,header_status,substr(name,1,12) Name,path from v$asm_disk;

STATE HEADER_STATU NAME
——– ———— ————
PATH
——————————————————————————–
NORMAL MEMBER DATA1_0000 /dev/oracleasm/disks/ASM1

Categories: oracle asm Tags: , ,
%d bloggers like this: