Monday, 29 April 2013

Raw device Configuration for ASM


Oracle ASM is a volume manager and a file system for Oracle database files that supports single-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC) configurations. Oracle ASM is Oracle's recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.
Oracle ASM uses disk groups to store data files; an Oracle ASM disk group is a collection of disks that Oracle ASM manages as a unit. Within a disk group, Oracle ASM exposes a file system interface for Oracle database files. The content of files that are stored in a disk group is evenly distributed to eliminate hot spots and to provide uniform performance across the disks. The performance is comparable to the performance of raw devices.

The benefits of ASM are:

  • Provides automatic load balancing over all the available disks, thus reducing hot spots in the file system
  • Prevents fragmentation of disks, so you don't need to manually relocate data to tune I/O performance
  • Adding disks is straight forward - ASM automatically performs online disk reorganization when you add or remove storage
  • Uses redundancy features available in intelligent storage arrays
  • The storage system can store all types of database files
  • Using disk group makes configuration easier, as files are placed into disk groups
  • ASM provides stripping and mirroring (fine and coarse gain - see below)
  • ASM and non-ASM oracle files can coexist
  • ASM is free!!!!!!!!!!!!!

Configure ASM on VMware:

Its just like the configuration on fake devices. On VMware you can
use vitual hard disk instead of fake dives. You can do this by adding extra
hard disk on you virtual machine.

For adding hard disk to VMware Machine go to:


Edit virtual machine setting
Click on ADD
Select hard disk and click next button
And follow the instruction.

Before powering on your virtual machine attach extra hardisks.
Start your machine

Check the raw disk:


don’t format the raw disk

Linux does not use raw device by default. Every Linux raw device you want to use must be bound to the corresponding block device using the block device.

Edit the file /ect/sysconfig/rawdevices as follows:

/dev/raw/raw1 /dev/sdc
/dev/raw/raw2 /dev/sdd
/dev/raw/raw3 /dev/sde
/dev/raw/raw4 /dev/sdf

Restart the rawdevice Service:

# service rawdevices restart
Assigning devices:
           /dev/raw/raw1  -->   /dev/sdc
/dev/raw/raw1:  bound to major 8, minor 32
           /dev/raw/raw2  -->   /dev/sdd
/dev/raw/raw2:  bound to major 8, minor 48
           /dev/raw/raw3  -->   /dev/sde
/dev/raw/raw3:  bound to major 8, minor 64
           /dev/raw/raw4  -->   /dev/sdf
/dev/raw/raw4:  bound to major 8, minor 80
done
The raw device binding will be created on each reboot.

Change the ownership of all rawdevices to the "Oracle" user:

# chown -R oracle:dba /dev/raw/raw*
# chmod -R 660 /dev/raw/raw*

To chnage the raw device ownership on every reboot:

go to /etc/rc.d/rc.local
# vi /etc/rc.local
and add
chown -R oracle:dba /dev/raw*
chmod -R 777 /dev/raw*


1 comment:

Ask your Questions....