Académique Documents
Professionnel Documents
Culture Documents
Related Features 7
Automatic Storage Management
In Oracle Database 10g, Oracle has expanded upon the Oracle
Disk Management and Oracle Managed Files that where
available in 9i. In 10g, Oracle provides Automatic Storage
Management (ASM), a total disk management interface for
Oracle files.
ASM Concepts
When using ASM, the DBA creates a database structure such
as a tablespaces, archive logs, redo logs, or control files,
he/she needs to specify the file location for the structure in
terms of disk groups. Then the Automatic Storage Mechanism
(ASM) will create and manage the underlying files for the
structures within the ASM managed disk groups.
ASM Architecture
For the ASM architecture, Oracle Database 10g utilizes a
separate small Oracle instance (it has no database associated
with it, it is only the instance), created during database set up.
Automatic Storage Management 189
An ASM instance manages the metadata that is needed to
make ASM files available to the "regular" database instances.
The ASM instance and database instances have to have access
to a common set of disks called disk groups. The normal
Database instances communicate with an ASM instance only
to get information about the layout of these files and to access
the contents of ASM files directly. To create a database that
uses storage managed by ASM, we have to first start with the
ASM instance.
An ASM instance does not have a data dictionary. So, you can
only connect to an ASM instance as SYSDBA or SYSOPER.
For connecting remotely to an ASM instance, you have to use
the password file. No other user administration is maintained
by ASM instance. Those who connect to the ASM instance
with SYSDBA privilege have complete administrative access
to all disk groups in the system.
Rebalance Operation
The Oracle database can perform one rebalance operation per
rebalance processes on disks at a given time on an ASM
instance. The number of rebalance processes is set by the
If you are using storage array disks, don't divide the physical
volumes into logical volumes, as it will interfere with ASM
operation. To the ASM instance, any such disk division will
hide the physical disk boundaries and hinder its performance.
A disk can belong to only one disk group. You can force a
disk in a disk group to become a member of another disk
group by using the FORCE clause in the command. For this,
Since we did not specify any names to the disks using NAME
clause, they will be named as dskgrp01_0001, dskgrp01_0002,
dskgrp01_0003, and dskgrp01_0004.
This command adds the disk and assigns ‘dska03’ to its own
FAILGROUP as none was specified in the command.
To drop a disk from a disk group, use the DROP DISK clause
of ALTER DISKGROUP command. For dropping all the
disks in a failure group, use the DROP DISKS IN
FAILUREGROUP clause of ALTER DSIKGROUP
command. When a disk is dropped, the files in the dropped
disk are moved to other disks in the disk groups and the
header entry on dropped disk is cleared. With the FORCE
clause of DROP operation, the disk is dropped with out
waiting for ASM to read or write to the disk. FORCE clause is
possible only for disk groups made under NORMAL or
HIGH REDUNDANCY options.
You can drop a disk and add another one at the same time in a
single command as follows.
ALTER DISKGROUP dskgrp01 DROP DISK ‘/dev/dska03’
NORMAL EXTERNAL
TYPE OF STRIP-
NAME OF TEMPLATE REDUN- HIGH REDUN-
TILE ING
DANCY DANCY
2-Way 3-Way
ARCHIVELOG Archive logs Unprotected Coarse
Mirroring Mirroring
Automatic 2-Way 3-Way
AUTOBACKUP Unprotected Coarse
backup files Mirroring Mirroring
Datafile,
datafile
2-Way 3-Way
BACKUPSET incremental, Unprotected Coarse
Mirroring Mirroring
archive log -
backups
2-Way 3-Way
CONTROL Control files Unprotected Fine
Mirroring Mirroring
2-Way 3-Way
DATAFILE Datafiles Unprotected Coarse
Mirroring Mirroring
Disaster
recovery 2-Way 3-Way
DATAGUARDCONFIG Unprotected Coarse
configuratio Mirroring Mirroring
n
Data Pump 2-Way 3-Way
DUMPSET Unprotected Coarse
dump Mirroring Mirroring
Flashback 2-Way 3-Way
FLASHBACK Unprotected Fine
log Mirroring Mirroring
Alias Filenames
Once you have the directory structure in place, you can add
alias names to provide more meaningful names to ASM files.
Use the ADD ALIAS, RENAME ALIAS, or DELETE
ALIAS clauses of the ALTER DISKGROUP command to
add, rename or delete alias names, except for system alias. The
v$asm_alias view has information on every alias known to the
ASM instance. If the alias is system generated, it will be
specified under SYSTEM_CREATED column.
To remove the file along with its alias name, issue the
following command:
ALTER DISKGROUP dskgrp01 DROP FILE
'+dskgrp01/SALESDB/salesdata_1.dbf';
ASM
FILE TYPE DEFAULT TEMPLATES
SUPPORTED
Archive Log Backup YES BACKUPSET
Archive Log YES ARCHIVELOG
Change Tacking File YES CHANGETRACKING
Control File YES CONTROLFILE
Data Pump Dump YES DUMPSET
Data File Backup YES BACKUPSET
Data File Copy YES DATAFILE
Data file YES DATAFILE
Disaster Recovery
YES DATAGUARDCONFIG
Configurations
Flashback Log YES FLASHBACK
Operating System
NO NOT APPLICABLE
File
SPFILE YES PARAMETERFILE
Redo Log YES ONLINELOG
Temporary File YES TEMPFILE
Trace File NO NOT APPLICABLE
Table 7.4 File types, ASM support, and system default templates
COLUMN DESCRIPTION
Cluster-wide number for the disk
GROUP_NUMBER
group
NAME disk group's name
SECTOR_SIZE Physical block size in bytes
ASM metadata block size in
BLOCK_SIZE
bytes
ALLOCATION_UNIT_SIZE Allocation unit size in bytes
State of the disk group relative to
the database instance -
STATE CONNECTED, BROKEN,
UNKNOWN, MOUNTED,
DISMOUNTED
Redundancy type - NORMAL,
TYPE
HIGH, EXTERN
Total disk group capacity in
TOTAL_MB
megabytes
FREE_MB Unused capacity in megabytes
COLUMN DESCRIPTION
Disk group number used by the
GROUP_NUMBER client database instance (foreign
key to v$asm_diskgroup)
INSTANCE_NAME Database client instance identifier
DB_NAME Unique database instance name
Status of the client connection -
STATUS CONNECTED,
DISCONNECTED, BROKEN
COLUMN DESCRIPTION
Number of the disk group
GROUP_NUMBER
containing the file
Number of the file within the disk
FILE_NUMBER
group
32-bit number consisting of disk
COMPOUND_INDEX
group number and file number
INCARNATION Incarnation number for the file
BLOCK_SIZE File block size in bytes
BLOCKS Number of blocks in the file
BYTES Number of bytes in the file
COLUMN DESCRIPTION
Disk group number (foreign key
GROUP_NUMBER
to v$asm_diskgroup)
Template entry number (Primary
ENTRY_NUMBER
key)
Redundancy of the template -
REDUNDANCY
MIRROR, PARITY, UNPROT
Striping type for template - FINE,
STRIPE
COARSE
SYSTEM System template or not (Y/N)
NAME Template name
COLUMN DESCRIPTION
GROUP_NUMBER Disk group number - Primary key
OPERATION Operation type - REBAL
State of the operation -
STATE
RUNNING, QUEUED
Power requested for the
POWER
operation
ACTUAL Power allocated to the operation
Number of allocation units moved
SOFAR
so far by the operation
Estimated number of allocation
EST_WORK units to be moved by the
operation
Estimated number of allocation
EST_RATE units being moved per minute by
the operation
Estimated amount of time
EST_MINUTES expected for the remainder of the
operation to complete in minutes
To create redo log files using ASM files by the same method
given above, specify them in initialization parameter file and
use the ADD LOGFILE command. The following example
creates a log file with a member in each of the 2 disk groups –
dskgrp03 and dskgrp04.
ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_1 = '+dskgrp03';
ALTER SYSTEM SET DB_CREATE_ONLINE_LOG_DEST_2 = '+dskgrp04';
ALTER DATABASE ADD LOGFILE;
Conclusion
In this chapter, we have examined the new Oracle Database
10g feature known as ASM. ASM provides the DBA with the
capability to manage disks as a high level disk group instead of
at the device level. ASM also automatically stripes and
balances disks to achieve the maximum in reliability and
performance.
Conclusion 223