0% found this document useful (0 votes)
86 views6 pages

Automatic Storage Management

Automatic Storage Management (ASM) is Oracle's logical volume manager that uses Oracle Managed Files to name and locate database files. It can use raw disks, file systems, or raw files and manages disks in logical units called disk groups. ASM provides automatic load balancing, prevents disk fragmentation, and makes adding storage straightforward. It also offers redundancy and allows storage of all database file types.

Uploaded by

shaikali1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views6 pages

Automatic Storage Management

Automatic Storage Management (ASM) is Oracle's logical volume manager that uses Oracle Managed Files to name and locate database files. It can use raw disks, file systems, or raw files and manages disks in logical units called disk groups. ASM provides automatic load balancing, prevents disk fragmentation, and makes adding storage straightforward. It also offers redundancy and allows storage of all database file types.

Uploaded by

shaikali1980
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 6

Automatic Storage Management (ASM)

Automatic Storage Management (ASM) is oracle’s logical volume manager, it uses OMF
(Oracle Managed Files) to name and locate the database files. It can use raw disks, filesystems or
files which can be made to look like disks as long as the device is raw. ASM uses its own
database instance to manage the disks, it has its own processes and pfile or spfile, it uses ASM
disk groups to manage disks as one logical unit.

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!!!!!!!!!!!!!

The three components of ASM are

is a special instance that does not have any data files, there is only ASM instance one per s
which manages all ASM files for each database. The instance looks after the disk groups a
ASM Instance
access to the ASM files. Databases access the files directly but uses the ASM instance to lo
If the ASM instance is shutdown then the database will either be automatically shutdown o
ASM Disk Groups Disks are grouped together via disk groups, these are very much like logical volumes.
Files are stored in the disk groups and benefit from the disk group features i.e. stripping an
ASM Files
mirroring.
ASM Summary  database is allowed to have multiple disk groups
 You can store all of your database files as ASM files
 Disk group comprises a set of disk drives
 ASM disk groups are permitted to contain files from more than one disk
 Files are always spread over every disk in an ASM disk group and belong to one di
only

ASM allocates disk space in allocation units of 1MB



 Not Managed by ASM - Oracle binaries, alert log, trace files, init.ora or password file
 Managed by ASM - Datafiles, SPFILES, redo log files, archived log files, RMAN backup
set / image copies, flash recovery area.

ASM Processes

There are a number of new processes that are started when using ASM, both the ASM instance and
Database will start new processes

ASM Instance
RBAL
(rebalance coordinates the rebalancing when a new disk is add or removed
master)
ARB[1-9]
actually does the work requested by the RBAL process (upto 9 of these)
(rebalance)
Database Instance
RBAL opens and closes the ASM disk
connects to the ASM instance via session and is the communication between ASM and RBMS,
ASMB
could be file creation, deletion, resizing and also various statistics and status messages.

ASM registers its name and disks with the RDBMS via the cluster synchronization service
(CSS). This is why the oracle cluster services must be running, even if the node and instance is
not clustered. The ASM must be in mount mode in order for a RDBMS to use it and you only
require the instance type in the parameter file.

ASM Disk Groups

An ASM disk group is a logical volume that is created from the underlying physical disks. If
storage grows you simply add disks to the disks groups, the number of groups can remain the
same.

ASM file management has a number of good benefits over normal 3rd party LVM's

 performance
 redundancy
 ease of management
 security
ASM Stripping

ASM stripes files across all the disks within the disk group thus increasing performance, each stripe is
called an ‘allocation unit’. ASM offers two types of stripping which is dependent on the type of database
file

Coarse Stripping used for datafile, archive logs (1MB stripes)


Fine Stripping used for online redo logs, controlfile, flashback files(128KB stripes)

ASM Mirroring

Disk mirroring provides data redundancy, this means that if a disk were to fail Oracle will use
the other mirrored disk and would continue as normal. Oracle mirrors at the extent level, so you
have a primary extent and a mirrored extent. When a disk fails, ASM rebuilds the failed disk
using mirrored extents from the other disks within the group, this may have a slight impact on
performance as the rebuild takes place.

All disks that share a common controller are in what is called a failure group, you can ensure
redundancy by mirroring disks on separate failure groups which in turn are on different
controllers, ASM will ensure that the primary extent and the mirrored extent are not in the same
failure group. When mirroring you must define failure groups otherwise the mirroring will not
take place.

There are three forms of Mirroring

 External redundancy - doesn't have failure groups and thus is effectively a no-mirroring
strategy
 Normal redundancy - provides two-way mirroring of all extents in a disk group, which
result in two failure groups
 High redundancy - provides three-way mirroring of all extents in a disk group, which
result in three failure groups

ASM Files

The data files you create under ASM are not like the normal database files, when you create a
file you only need to specify the disk group that the files needs to be created in, Oracle will then
create a stripped file across all the disks within the disk and carry out any redundancy required,
ASM files are OMF files. ASM naming is dependent on the type file being created, here are the
different file-naming conventions

 fully qualified ASM filenames - are used when referencing existing ASM files
(+dgroupA/dbs/controlfile/CF.123.456789)
 numeric ASM filenames - are also only used when referencing existing ASM files
(+dgroupA.123.456789)
 alias ASM filenames - employ a user friendly name and are used when creating new files
and when you refer to existing files
 alias filenames with templates - are strictly for creating new ASM files
 incomplete ASM filenames - consist of a disk group only and are used for creation only.

Creating ASM Instance

Creating a ASM instance is like creating a normal instance but the parameter file will be smaller,
ASM does not mount any data files, it only maintains ASM metadata. ASM normally only needs
about 100MB of disk space and will consume about 25MB of memory for the SGA, ASM does
not have a data dictionary like a normal database so you must connect to the instance using either
O/S authentication as SYSDBA or SYSOPER or using a password file.

The main parameters in the instance parameter file will be

 instance_type - you have two types RDBMS or ASM


 instance_name - the name of the ASM instance
 asm_power_limit - maximum speed of rebalancing disks, default is 1 and the range is 1 -
11 (11 being the fastest)
 asm_diskstring - this is the location were oracle will look for disk discovery
 asm_diskgroups - diskgroups that will be mounted automatically when the ASM instance
is started.

You can start an ASM instance with nomount, mount but not open. When shutting down a ASM instance
this passes the shutdown command to the RDBMS (normal, immediate, etc)

ASM Configuration
instance_type=’asm’
instance_name=’+asm’
Parameter file asm_power_limit=2
(init+asm.ora) asm_diskstring=’\\.\f:’,’\\.\g:’,’\\.\h:’
asm_diskgroup= dgroupA, dgroupB
Note: file should be created in $ORACLE_HOME/databa
Create service (windows only) c:> oradim –new –asmsid +ASM –startmode manual
Set the oracle_sid environment variable (windows or c:> set ORACLE_SID=+ASM (windows only)
unix) export ORACLE_SID=+ASM (unix only)
Login to ASM instance and start instance c:> sqlplus /nolog;
sql> connect / as sysdba;
sql> startup pfile=init+asm.ora
Note: sometimes you get a ora-15110 which means that t
ASM Operations
Instance name select instance_name from v$instance;
create diskgroup diskgrpA high redundancy
  failgroup failgrpA disk ’\\.\f:’ name disk1
  failgroup failgrpB disk ’\\.\g:’ name disk2 force
  failgroup failgrpC disk ’\\.\h:’ name disk3;
Create disk group
create diskgroup diskgrpA external redundancy

Note: force is used if disk has been in a previous diskgrou


mirroring i.e SAN
alter diskgroup diskgrpA add disk
Add disks to a group   '\\.\i:' name disk4;
  '\\.\j:' name disk5;
Remove disks from a group alter diskgroup diskgrpA drop disk disk6;
Remove disk group drop diskgroup diskgrpA including contents
Undo remove disk group alter database diskgrpA undrop disks;
select name, group_number, name, type, state, total_mb,
select group_number, disk_number, name, failgroup, crea
Display diskgroup info
select group_number, operation, state, power, actual, sofa
v$asm_operation;
alter diskgroup diskgrpA rebalance power 8; (
Rebalance a diskgroup (after disk failure and disk has
been replaced) Note: to speed up rebalancing increase the level upto 11,
performance
alter diskgroup diskgrpA dismount;
Dismount or mount a diskgroup
alter diskgroup diskgrpA mount;
Check a diskgroups integrity alter diskgroup diskgrpA check all;
alter diskgroup diskgrpA add directory '+diskgrpA/dir1'
Diskgroup Directory
Note: this is required if you use aliases when creating dat
alter diskgroup diskgrpA add alias '+diskgrpA/dir/second
adding and drop aliases
alter diskgroup diskgrpA drop alias '+diskgrpA/dir/secon
Drop files from a diskgroup alter diskgroup diskgrpA drop file '+diskgrpA/payroll/pay
Using ASM Disks
create tablespace test datafile ‘+diskgrpA’ size 100m;
alter tablespace test add datafile ‘+diskgrpA’ size 100m;
Examples of using ASM disks alter database add logfile group 4 ‘+dg_log1’,’+dg_log2’
alter system set log_archive_dest_1=’location=+dg_arch1
alter system set db_recovery_file_dest=’+dg_flash’;
RMAN backup

RMAN is the only way to backup ASM disks.

Backup backup as copy database format ‘+dgroup1’

You might also like