Thursday, June 19, 2008

Create ASM environment for testing Purpose ( Dummy only Testing Purpose )

This is only for test case and not for production use..!!!
 We dont need any ASM Lib Drivers to be installed for this method...!!


For running a Single Instance ASM We need to have CSS Dameon to be a running before we create ASM. This will be invoked in the first
step when you try to create the ASM instance.


Now As a root user execute all these steps.

1. Create a directory asm_disks and
cd /u01/asm_disks

Start creating Logical Volumes ( LV ) inside the directory

[root@testserver]dd if=/dev/zero of=asm_disk1 bs=1024k count=1024
1024+0 records in
1024+0 records out

[root@testserver]dd if=/dev/zero of=asm_disk2 bs=1024k count=1024
1024+0 records in
1024+0 records out

[root@testserver]dd if=/dev/zero of=asm_disk3 bs=1024k count=1024
1024+0 records in
1024+0 records out

[root@testserver]dd if=/dev/zero of=asm_disk4 bs=1024k count=1024
1024+0 records in
1024+0 records out

and then

[root@testserver]losetup /dev/loop1 asm_disk1
[root@testserver]losetup /dev/loop2 asm_disk2
[root@testserver]losetup /dev/loop3 asm_disk3
[root@testserver]losetup /dev/loop4 asm_disk4
[root@testserver]raw -qa

[root@testserver]raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1: bound to major 7, minor 1

[root@testserver]raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw2: bound to major 7, minor 2

[root@testserver]raw /dev/raw/raw3 /dev/loop3
/dev/raw/raw3: bound to major 7, minor 3

[root@testserver]raw /dev/raw/raw4 /dev/loop4
/dev/raw/raw4: bound to major 7, minor 4

[root@testserver]raw -qa
/dev/raw/raw1: bound to major 7, minor 1
/dev/raw/raw2: bound to major 7, minor 2
/dev/raw/raw3: bound to major 7, minor 3
/dev/raw/raw4: bound to major 7, minor 4

Assigb permission to oracle user :


[root@testserver]chmod 660 asm_disk*

[root@testserver]ls
asm_disk1 asm_disk2 asm_disk3 asm_disk4



[root@testserver]chown oracle:oinstall /dev/raw/raw1
[root@testserver]chown oracle:oinstall /dev/raw/raw2
[root@testserver]chown oracle:oinstall /dev/raw/raw3
[root@testserver]chown oracle:oinstall /dev/raw/raw4

Note : MAke sure you install Oracle Database Binaries ( Software only ) before you proceed

Now as a root user run the below command for start the CSS dameon.

[root@testserver]/u01/oracle/product/10.2.0/db_1/bin/localconfig add
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.
testserver
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M)

*******************************************************************

[root@testserver]ls /etc/oratab
/etc/oratab
[root@testserver]ls -ltr /etc/oratab
-rwxrw-r-- 1 oragrid root 881 Apr 29 02:40 /etc/oratab
[root@testserver]chown oracle:oinstall /etc/oratab


As Oracle User, Invoke DBCA












[root@testserver]ps -ef|grep ASM
oracle 8202 1 0 12:34 ? 00:00:00 asm_pmon_+ASM
oracle 8204 1 0 12:34 ? 00:00:00 asm_psp0_+ASM
oracle 8206 1 0 12:34 ? 00:00:00 asm_mman_+ASM
oracle 8208 1 0 12:34 ? 00:00:00 asm_dbw0_+ASM
oracle 8210 1 0 12:34 ? 00:00:00 asm_lgwr_+ASM
oracle 8212 1 0 12:34 ? 00:00:00 asm_ckpt_+ASM
oracle 8214 1 0 12:34 ? 00:00:00 asm_smon_+ASM
oracle 8216 1 0 12:34 ? 00:00:00 asm_rbal_+ASM
oracle 8218 1 0 12:34 ? 00:00:00 asm_gmon_+ASM
root 8240 7175 0 12:35 pts/2 00:00:00 grep ASM


Now you can go ahead and use your DBCA and create a database and on
step
6 of 13, you can use Automatic Storage management as your Filesystem.

No comments: