//
you're reading...
Database, Oracle Installation & Configuration

Install Oracle Database 11g R2 on Linux RHEL/CentOS 6.5 – Section 4 (Single Instance)

Now we created our ASM instance, next we can create the ASM Disk and Diskgroup.

There are two options we can create and bind the ASM Disks

  1. Use the Oracle ASM API(Oracle ASMLib) provide by Oracle
  2. Or, use the linux udev

In this case, I will use the Linux udev to bonding the ASM Disks

 

Obtain the scsi uuid for ‘/dev/sdd’ and ‘/dev/sde’

[root@newzonetechdb02~]# /sbin/scsi_id -g -u /dev/sdd 
1ATA_VBOX_HARDDISK_VBb19b993c-335af3cc
[root@newzonetechdb02~]# /sbin/scsi_id -g -u /dev/sde
1ATA_VBOX_HARDDISK_VB69b55f85-b4e6f7fa

Bonding the disk with udev

Create the ‘/etc/udev/rules.d/99-oracle-asmdevices.rules’ file

[root@newzonetechdb02~]# vi /etc/udev/rules.d/99-oracle-asmdevices.rules

Insert the following contents

KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VBb19b993c-335af3cc", NAME="TESTDB_DATA01", OWNER="grid", GROUP="asmadmin", MODE="0660"
KERNEL=="sd*", BUS=="scsi", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="1ATA_VBOX_HARDDISK_VB69b55f85-b4e6f7fa", NAME="TESTDB_FRA01", OWNER="grid", GROUP="asmadmin", MODE="0660"

Start the udev service

[root@newzonetechdb02~]#/sbin/start_udev

Check the Disk bonding is successful

[root@newzonetechdb02~]# ll -ls /dev/TESTDB*
0 brw-rw----. 1 grid asmadmin 8, 48 Oct 15 22:10 /dev/TESTDB_DATA01
0 brw-rw----. 1 grid asmadmin 8, 64 Oct 15 22:10 /dev/TESTDB_FRA01
[root@newzonetechdb02~]# /sbin/scsi_id -g -u /dev/TESTDB_DATA01
1ATA_VBOX_HARDDISK_VBb19b993c-335af3cc
[root@newzonetechdb02~]# /sbin/scsi_id -g -u /dev/TESTDB_FRA01
1ATA_VBOX_HARDDISK_VB69b55f85-b4e6f7fa

Create the ASM Disks and Diskgroup

SQL> alter system set asm_diskstring='/dev/*' scope=both;

System altered.
SQL> show parameter asm_

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups                       string      TESTDBDATA, TESTDBFRA
asm_diskstring                       string      /dev/*
asm_power_limit                      integer     1
asm_preferred_read_failure_groups    string
SQL> CREATE DISKGROUP TESTDBDATA EXTERNAL REDUNDANCY DISK '/dev/TESTDB_DATA01' name TESTDB_DATA01 ATTRIBUTE 'au_size'='4M', 'compatible.asm' = '11.2';

Diskgroup created.
SQL> CREATE DISKGROUP TESTDBFRA EXTERNAL REDUNDANCY DISK '/dev/TESTDB_FRA01' name TESTDB_FRA01 ATTRIBUTE 'au_size'='4M', 'compatible.asm' = '11.2';

Diskgroup created.
SQL> select name, state from v$asm_diskgroup;

NAME                           STATE
------------------------------ -----------
TESTDBDATA                     MOUNTED
TESTDBFRA                      MOUNTED
SQL> select name, state from v$asm_disk;

NAME                           STATE
------------------------------ --------
TESTDB_FRA01                   NORMAL
TESTDB_DATA01                  NORMAL

Now I have created the ASM Diskgroups for Oracle Database.

Advertisements

About daviewning

I am an Oracle DBA

Discussion

Trackbacks/Pingbacks

  1. Pingback: Install Oracle Database 11g R2 on Linux CentOS 6.5 – Before Start | DBTechZone - February 13, 2016

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: