Custom Search . . .

Wednesday, April 1, 2009

How to create ASM Instance


1. Before creating ASM instance you need to create asm disk using raw disk or using ASMLib disk.

For RAW disk - > 1. http://babudba.blogspot.com/2009/04/how-to-crate-asm-disk-in-linux.html

For ASMLib Disk - > 2. http://babudba.blogspot.com/2009/03/marking-disk-vol1-as-asm-disk-failed.html

2. Create Init. Parameter using ORACLE_HOME/dbs/init+ASM.ora

*.asm_diskstring='/dev/raw/*'
*.background_dump_dest='/dbbackup/u01/oracle/admin/+ASM/bdump'
*.core_dump_dest='/dbbackup/u01/oracle/admin/+ASM/cdump'
*.instance_type='asm'
*.remote_login_passwordfile='exclusive'
*.sga_max_size=256m
*.user_dump_dest='/dbbackup/u01/oracle/admin/+ASM/udump'


[oracle@localhost ~]$ export ORACLE_SID=+ASM
[oracle@localhost ~]$
[oracle@localhost ~]$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 27 05:00:03 2009

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

Connected to an idle instance.

SQL> startup nomount
ASM instance started

Total System Global Area 268435456 bytes
Fixed Size 1218920 bytes
Variable Size 242050712 bytes
ASM Cache 25165824 bytes
SQL>
SQL> create diskgroup dgroup1 normal redundancy
2 failgroup cont1 disk '/dev/raw/raw1','/dev/raw/raw2'
3 failgroup cont2 disk '/dev/raw/raw3'
4 /

Diskgroup created.

SQL> shutdown immediate
ASM diskgroups dismounted
ASM instance shutdown
SQL> startup
ASM instance started

Total System Global Area 268435456 bytes
Fixed Size 1218920 bytes
Variable Size 242050712 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted



SQL> select free_mb,total_mb,name,group_number from v$asm_disk;

FREE_MB TOTAL_MB NAME GROUP_NUMBER
---------- ---------- ------------------------------ ------------
0 2682 0
144 195 DGROUP1_0003 1
950 976 DGROUP1_0000 1
949 976 DGROUP1_0001 1
925 976 DGROUP1_0002 1

No comments: