This is an excerpt from the bestselling book
Oracle Grid & Real Application Clusters. To get immediate
access to the code depot of working RAC scripts, buy it
directly from the publisher and save more than 30%.
There are seven new v$ views
provided in Oracle Database 10g used to monitor ASM structures.
These views are shown in Table 5.3.
Shows disk group details
such as number, name, state, and redundancy type
Contains one row for every
open ASM disk in the DB instance.
Shows databases using disk
groups managed by the ASM instance.
Contains no rows.
Shows every disk discovered
by the ASM instance, including disks that are not part of any
Contains rows only for disks
in the disk groups in use by that DB instance.
Shows the files (data, redo,
control, archive logs etc) in the ASM disk groups
Contains rows only for files
that are currently open in the DB instance.
Shows the templates
available in every disk group
Contains no rows
Shows the alias for every
disk group mounted
Contains no rows.
Long operations executing
the rebalance activity are shown in this view
Contains no rows.
Table 5.3: ASM v$ Views
Example of ASM configuration
To explain the ASM methodology,
the following example will be used. There are four disk devices or
partitions as shown below. For demonstration purposes, a single LUN
of 9G was used and 4 partitions were created. In reality, actual
environments may have many more devices and partitions. The Command
FDISK manages the disk partitions.
[root@host-0002b /]# /sbin/fdisk /dev/sdl
The number of cylinders for this disk is set to
There is nothing wrong with
that, but this is larger than 1024,
and could in certain setups
cause problems with:
1) software that runs at boot
time (e.g., old versions of LILO)
2) booting and partitioning
software from other OSs
(e.g., DOS FDISK,
Command (m for help): p
Disk /dev/sdl: 255 heads, 63
sectors, 1110 cylinders
Units = cylinders of 16065 * 512
As shown above, there are four
partitions, sd1, sd2, sd3 and sd4. The next step is to bind them as
raw and change the ownership to oracle. This will be done with two
disk partitions, sdl3 and sdl4, each of which is 4 GB in size.
[root@host-0002a dev]# raw /dev/raw/raw1 /dev/sdl3
/dev/raw/raw1: bound to major 8, minor 179
[root@host-0002a dev]# raw /dev/raw/raw2 /dev/sdl4
/dev/raw/raw2: bound to major 8, minor 180
> chown oracle:dba /dev/raw/raw2
The next step will focus on
starting or creating an ASM instance. First, the ORACLE_HOME and
ORACLE_SID variables are set. Next, the initASM1.ora file is
prepared. In this example, the SID of the ASM instance is ASM1.
Shown below are the contents of
the initASM1.ora file.
# created by
Ensure that the CSSD daemon is
up and running. CSSD is the daemon which controls the communication
between the database instance and ASM instance. To start the CSSD
daemon, follow these commands:
[root@host-0002b init.d]# pwd
[root@host-0002b init.d]# ./init.cssd start
(Oracle CSSD will be run out of init)
Then start the ASM instance as
become-2.05$ sqlplus "/ as
SQL*Plus: Release 10.1.0.2.0 -
Production on Fri Apr 9 14:34:38 2004
Copyright (c) 1982, 2004,
Oracle. All rights reserved.
Connected to an idle instance.
ASM instance started
Total System Global Area
diskgroup TEST_DG external redundancy
diskgroup TEST_DG add disk '/dev/raw/raw2';
Now that there are two ASM disks
with the disk group TEST_DG, the next step is to use the resources
to create a tablespace by the Database Instance NYREP10.
tablespace ASM_TBS1 DATAFILE '+TEST_DG' size 200M ;
select BYTES, NAME, TS# from v$datafile ;