Tuesday, April 13, 2010

ASM Installation Steps

ASM Installation Steps

ASMLib is a support library for the Automatic Storage Management feature of Oracle Database 10g. Automatic Storage Management (ASM) simplifies database administration. It eliminates the need for the DBA to directly manage potentially thousands of Oracle database files, requiring only the management of groups of disks allocated to the Oracle Database. ASMLib allows an Oracle Database using ASM more efficient and capable access to the disk groups it is using.
Oracle ASMLib Downloads for SuSE Linux Enterprise Server 10

Library and Tools
• oracleasm-support-2.1.3-1.SLE10.x86_64.rpm
• oracleasmlib-2.0.4-1.SLE10.x86_64.rpm
Drivers for kernel 2.6.16.60-0.21
• oracleasm-2.6.16.60-0.21-smp-2.0.4-1.SLE10.x86_64.rpm
• oracleasm-2.6.16.60-0.21-default-2.0.4-1.SLE10.x86_64.rpm
Installing ASMLib
rpm -Uvh oracleasm-support-2.1.3-1.SLE10.x86_64.rpm
rpm -Uvh oracleasmlib-2.0.4-1.SLE10.x86_64.rpm
rpm –Uvh oracleasm-2.6.16.60-0.21-smp-2.0.4-1.SLE10.x86_64.rpm
rpm –Uvh oracleasm-2.6.16.60-0.21-default-2.0.4-1.SLE10.x86_64.rpm


dwprod:~ # rpm -qa|grep oracleasm
oracleasm-2.6.16.60-0.21-smp-2.0.4-1.SLE10
oracleasmlib-2.0.4-1.SLE10
oracleasm-2.6.16.60-0.21-default-2.0.4-1.SLE10
oracleasm-support-2.1.3-1.SLE10
Configuring ASMLib
/etc/init.d/oracleasm configure
It will ask for the user and group that default to owning the ASM driver access point. If the database was running as the 'oracle' user and the 'dba' group, the output would look like this:


[root@ca-test1 /]# /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) [n]: y
Fix permissions of Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration [ OK ]
Creating /dev/oracleasm mount point [ OK ]
Loading module "oracleasm" [ OK ]
Mounting ASMlib driver filesystem [ OK ]
Scanning system for ASM disks [ OK ]

[root@ca-test1 /]# /etc/init.d/oracleasm enable
Making Disks Available to ASMLib
/etc/init.d/oracleasm createdisk VOL1 /dev/sdc1
Every disk that ASMLib is going to be accessing needs to be made available. This is accomplished by creating an ASM disk. The /etc/init.d/oracleasm script is again used for this task:
[root@ca-test1 /]# /etc/init.d/oracleasm createdisk VOL1 /dev/sdg1
Creating Oracle ASM disk "VOL1" [ OK ]


[root@ca-test1 /]# /etc/init.d/oracleasm listdisks


[root@ca-test1 /]# /etc/init.d/oracleasm querydisks


Creating ASM instance and Diskgroup.
A. Configuration of ASM instance parameter with the below contents and respective directory structure.
*.asm_diskgroups='ORADATA1'
+ASM.asm_diskgroups='ORADATA1'#Manual Mount
*.asm_diskstring='ORCL:*'
*.background_dump_dest='/opt/oracle/admin/+ASM/bdump'
*.core_dump_dest='/opt/oracle/admin/+ASM/cdump'
*.db_unique_name='+ASM'
*.instance_name='+ASM'
*.instance_type='asm'
*.large_pool_size=12M
*.processes=70
*.remote_login_passwordfile='SHARED'
*.user_dump_dest='/opt/oracle/admin/+ASM/udump'
*._asm_wait_time=SB4MAXVAL
B. Bringing up the ASM instance in to nomount state to create the diskgroup.
$export ORACLE_SID=+ASM
$export ORACLE_HOME=
$sqlplus “/as sysdba”
sql>startup nomount
sql>create diskgroup ‘ORADATA1’ external redundancy disk ‘ORCL: VOL1’ size 1126409m;
The above command will create the diskgroup with dismount state.
We can view it from v$asm_diskgroup.
sql> alter diskgroup ORADATA1 mount;-----Ready to use by the RDBMS client.

References :

http://blogs.oracle.com/simonthorpe/2009/06/configuring_oracle_asm_disks_i.html

http://babudba.blogspot.com/2009/03/marking-disk-vol1-as-asm-disk-failed.html

-Shailesh