Creating Raw disks for ASM (ORACLE ASM)

What is Oracle ASM?


Automatic Storage Management (ASM) is a feature provided by Oracle Corporation within the Oracle Database from release Oracle 10g (revision 1) onwards. ASM aims to simplify the management of database files. To do so, it provides tools to manage file systems and volumes directly inside the database, allowing database administrators (DBAs) to control volumes and disks with familiar SQL statements in standard Oracle environments


Automatic Storage Management (ASM) simplifies administration of Oracle-related files by allowing the administrator to reference disk groups (rather than individual disks and files) which ASM manages.


The ASM functionality is controlled by an ASM instance. This is not a full database instance, just the memory structures and as such is very small and lightweight.


Steps to create raw disks


I am Creating Raw disks using vmware workstation. Check below picture, how to create raw devices






Now you created One disk


Now create three more disks in the same way as shown in figure

2. Now Power on virtual Machine. Log in as root user
    Issue commands as shown in figure and Check list of partitions on your server


If you see the above picture. You may notice sda. That is main disk sda1, sda2  are partitions of sda
sdb, sdc, sdd sde are the raw disks that we just added.

3. So now we need to create at least one partition one each disk.

How? check below picture.


4. Repeat above steps for remaining three disks. After done, once again execute cat /proc/partitions


5. Now open /etc/sysconfig/rawdevices and add following lines:

/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
/dev/raw/raw4 /dev/sde1

for better Idea check below picture




After adding lines save it

6.  Restart the rawdevices service to make your changes effective.

How to restart services check below picture



7) Now give access to oracle user to use these raw disks

Execute commands as shown in figure



Now you can use these raw disks as ASM disks

In our next session we will start create ASM instance..

Thanks
Sagar
























2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hi;

    Good work.
    Small correction is needed.

    Once you reboot ur machine without adding entries into rc.local file for your raw devices permission again will be root:disk for your raw devices.

    You need to add following entries at /etc/rc.local

    chown oracle:oinstall /dev/raw/raw*

    Thanks for ur presentation.

    ReplyDelete