You are on page 1of 15

ASM ORACLE (step by step installing in Red Hat Linux).

Oracle Automatic Storage Management (ASM)


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. ASM is Oracles
recommended storage management solution that provides an alternative to conventional volume
managers, file systems, and raw devices.
ASM uses disk groups to store data files; an ASM disk group is a collection of disks that ASM
manages as a unit. Within a disk group, ASM exposes a file system interface for Oracle database
files. The content of files that are stored in a disk group are evenly distributed, or striped, to
eliminate hot spots and to provide uniform performance across the disks. The performance is
comparable to the performance of raw devices.

Login with root user.


login as: root
root@192.168.206.xxxs password:
Preparing Disks for ASM.
[root@jreymer app]# cd oracle/
[root@jreymer oracle]# mkdir /asmdisk
[root@jreymer oracle]# dd if=/dev/zero of=/asmdisk/disk1 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1,0 GB) copied, 61,9561 seconds, 16,9 MB/s
[root@jreymer oracle]# dd if=/dev/zero of=/asmdisk/disk2 bs=1024k count=1000
1000+0 records in

1000+0 records out


1048576000 bytes (1,0 GB) copied, 36,5263 seconds, 28,7 MB/s
[root@jreymer oracle]# dd if=/dev/zero of=/asmdisk/disk3 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1,0 GB) copied, 35,8487 seconds, 29,3 MB/s
[root@jreymer oracle]# dd if=/dev/zero of=/asmdisk/disk4 bs=1024k count=1000
1000+0 records in
1000+0 records out
1048576000 bytes (1,0 GB) copied, 16,5787 seconds, 63,2 MB/s
[root@jreymer oracle]# /sbin/losetup /dev/loop1 /asmdisk/disk1
[root@jreymer oracle]# /sbin/losetup /dev/loop2 /asmdisk/disk2
[root@jreymer oracle]# /sbin/losetup /dev/loop3 /asmdisk/disk3
[root@jreymer oracle]# /sbin/losetup /dev/loop4 /asmdisk/disk4
[root@jreymer oracle]# raw /dev/raw/raw1 /dev/loop1
/dev/raw/raw1: bound to major 7, minor 1
[root@jreymer oracle]# raw /dev/raw/raw2 /dev/loop2
/dev/raw/raw2: bound to major 7, minor 2
[root@jreymer oracle]# raw /dev/raw/raw3 /dev/loop3
/dev/raw/raw3: bound to major 7, minor 3
[root@jreymer oracle]# raw /dev/raw/raw4 /dev/loop4
/dev/raw/raw4: bound to major 7, minor 4
[root@jreymer oracle]# cd /dev/raw
[root@jreymer raw]# ls -ltr
total 0
crw- 1 root root 162, 1 ago 24 23:11 raw1
crw- 1 root root 162, 2 ago 24 23:11 raw2
crw- 1 root root 162, 3 ago 24 23:12 raw3
crw- 1 root root 162, 4 ago 24 23:12 raw4
[root@jreymer raw]# du -sh *
0
raw1
0
raw2
0
raw3
0
raw4
[root@jreymer raw]# chown -R oracle:oinstall *
[root@jreymer raw]# chmod 660 *
[root@jreymer raw]# ls -ltr
total 0
crw-rw- 1 oracle oinstall 162, 1 ago 24 23:11 raw1
crw-rw- 1 oracle oinstall 162, 2 ago 24 23:11 raw2
crw-rw- 1 oracle oinstall 162, 3 ago 24 23:12 raw3
crw-rw- 1 oracle oinstall 162, 4 ago 24 23:12 raw4
[root@jreymer raw]# vi /etc/rc.local
################# rc.local #######################
!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you dont
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/sbin/losetup /dev/loop1 /asmdisk/disk1
/sbin/losetup /dev/loop2 /asmdisk/disk2

/sbin/losetup /dev/loop3 /asmdisk/disk3


/sbin/losetup /dev/loop4 /asmdisk/disk4
raw /dev/raw/raw1 /dev/loop1
raw /dev/raw/raw2 /dev/loop2
raw /dev/raw/raw3 /dev/loop3
raw /dev/raw/raw4 /dev/loop4
################## end ##################
[root@jreymer raw]# su oracle
[oracle@jreymer ~]$ DBCA

Configuration ASM (step 1).

Operations.

ANOTHER SESSION
[oracle@jreymer bin]$ su
Contrasea:
[root@jreymer ~]# pwd
[root@jreymer bin]# /u01/app/oracle/product/10.2.0.1/db_1/bin/localconfig add

/etc/oracle does not exist. Creating it now.


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 90 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.
jreymer
CSS is active on all nodes.
Oracle CSS service is installed and running under init(1M).
Creating ASM instance.

ASM instance creation

ASM Disk Groups (create).

ASM Disk Group creation

Finishing the creation of disks

Other task

Create Database

Database Templates

Database Name

Management Options.

Storage Options

ASM Disk Groups

File Locations.

Recovery Configuration

Initialization Parameters.

Database Storage.

Creation Options.

Configuration Assistant.

Database created.

Testing
[root@jreymer bin]# su oracle
[oracle@jreymer ~]$ export ORACLE_SID=asmjrd
[oracle@jreymer ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 Production on Sat Aug 26 10:39:41 2012


Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 Production
With the Partitioning, OLAP and Data Mining options
SQL> set linesize 512
SQL> select name from v$datafile;
NAME

+ASMGROUP/asmjrd/datafile/system.256.792201833
+ASMGROUP/asmjrd/datafile/undotbs1.258.792201847
+ASMGROUP/asmjrd/datafile/sysaux.257.792201839
+ASMGROUP/asmjrd/datafile/users.259.792201853
+ASMGROUP/asmjrd/datafile/example.269.792203233
SQL> select name from v$controlfile;
NAME

+ASMGROUP/asmjrd/controlfile/current.261.792202517
+ASMGROUP/asmjrd/controlfile/current.260.792202521

You might also like