Monday, June 6, 2011

ASM basic configuration at LOCAL DISK

I am writing below steps to create a ASM instance, ASM diskgroup and ASM disks on local machine, as I dont have RAW device, it will be on LOCAL DISK (NTFS) D drive, Once, the ASM instance is created, I will use DBCA to create database and specify Automatic Storage management as filesystem.
ONE:Creating disk for ASM Instance, I am creating three disk of 1GB size.

D:\>mkdir asmdisk

D:\>asmtool -create d:\asmdisk\disk1 1024

D:\>asmtool -create d:\asmdisk\disk2 1024

D:\>
I have created a folder asmdisk, and two disks each size of 1GB. Now, we can use these disks to create ASM disk group.


2 : Creating an ASM instance

We need to configure Cluster Synchronization Services.
The Cluster Synchronization Services is required to enable synchronization between ASM and its client database.

2.a- Configuration of CSS ( Cluster Synchronization Servie )

C:\oracle\product\10.2.0\db_2\BIN>localconfig add
Step 1: creating new OCR repository
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'administrator', privgrp ''..
Operation successful.
Step 2: creating new CSS service
successfully created local CSS service
successfully added CSS to home

C:\oracle\product\10.2.0\db_2\BIN>

When we check services OracleCSService is created and started.

2.b :We need to create a init pfile (init.+ASM.ora) for ASM instance

INSTANCE_TYPE=ASM
DB_UNIQUE_NAME=+ASM
LARGE_POOL_SIZE=8M
ASM_DISKSTRING='D:\asmdisk\*'
_ASM_ALLOW_ONLY_RAW_DISKS=FALSE

2.c : we need to create a password file for ASM instance, and its password is soni.

C:\oracle\product\10.2.0\db_2\BIN>orapwd file=C:\oracle\product\10.2.0\db_2\database\PWD+ASM.ora password=soni

C:\oracle\product\10.2.0\db_2\BIN>

2.d : we need to create Oracle ASM instance

C:\oracle\product\10.2.0\db_2\BIN>oradim -NEW -ASMSID +ASM -STARTMODE auto
Instance created.

THREE: Creating an ASM disk group.

SQL> select path, mount_status from v$asm_disk;

PATH MOUNT_S
---------------------------------------- -------
D:\ASMDISK\DISK1 CLOSED
D:\ASMDISK\DISK2 CLOSED

SQL> create diskgroup data external redundancy disk
2 'D:\ASMDISK\DISK1', 'D:\ASMDISK\DISK2';

Diskgroup created.

SQL> select path, mount_status from v$asm_disk;

PATH MOUNT_S
---------------------------------------- -------
D:\ASMDISK\DISK1 CACHED
D:\ASMDISK\DISK2 CACHED

SQL> create spfile from pfile;

File created.

SQL> startup force;
ASM instance started

Total System Global Area 79691776 bytes
Fixed Size 1247396 bytes
Variable Size 53278556 bytes
ASM Cache 25165824 bytes
ORA-15110: no diskgroups mounted


SQL> alter system set asm_diskgroups= data scope=spfile;

System altered.

SQL> startup force;
ASM instance started

Total System Global Area 79691776 bytes
Fixed Size 1247396 bytes
Variable Size 53278556 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>




I will use DBCA to create database and specify Automatic Storage management as filesystem.

No comments: