Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 22

Automatic Storage Management (ASM)

Benefits of Automatic Storage Management


Provide efficient management of storage Provide integrated Cluster File system and Volume management capabilities No need for buy OCFS or expensive 3rd Party CFS Provide Software Mirroring on top of vendor supplied SAN [2 or 3 Mirrors] Automatic online re-organization of disk space for any new addition/removal of storage capacity Automatic IO load balancing as data is striped across disks and better performance

Available for both Single Instance as well as RAC instance Free built in 10g kernel Available even in Standard Edition Prevents Fragmentation and hence no need to relocate data to reclaim space Overcomes file system size limitations Prevents accidental file deletion Backup with RMAN

Pre-Requisite for ASM


Need CSS daemon for creating an ASM instance
$ ps ef | grep css

1. In RAC, it is done by Oracle CLusterware 2. In Single Instance environment, you have to run
# $ORACLE_HOME/bin/localconfig add

To reconfigure the CSS daemon to run from the new Oracle home:
# $ORACLE_HOME/bin/localconfig reset $ORACLE_HOME

Need Additional at least 100M of memory for ASM instance

ASM Components
ASM Disk Disk Group Failure Group ASM Files

ASM Components ASM Instance


10g has two types of Instance
INSTANCE_TYPE = asm ASM Instance INSTANCE_TYPE = rdbms [Default] DB Instance

Feature of ASM instance


Do not mount the database but manage metadata required to make ASM files available for DB instances DB Instance access ASM files directly and contact ASM instance only for the layout of ASM files Smaller than DB instance < 100M Contains no physical files like log files / control files or data files Requires only the init.ora file for startup Instance Name is +ASM or +ASM1..n [RAC] ASM instance have no user dictionary and so only way to connect is OS authentication with SYSDBA or SYSOPER privileges Use same ORACLE_HOME for ASM and DB Instance , if there is only one DB instance Use separate ORACLE_HOME for ASM instance if it supports several database instances

ASM Disks
It is first task in ASM environment to discover and add Disks to ASM management Disk Selection for Disk Group The disk must not have a pre-existing ASM header The disk cannot have an Oracle File header The disk is not already part of another Disk group Adding Disks to Disk Groups Check if disk is usable Format the disk Rebalance the Disk group Header Status info Foreign - Means Disk is of Oracle Object but can only be added to disk group with FORCE keyword Candidate Means disk is available to be added to any disk group. Provisioned Same as candidate except that disk is configured using ASMLIB. Former Disk was formerly part of some disk group. Member Disk is already part of existing disk group.

ASM Disk Groups


It is collection of disks that can managed as logical unit Easy to administer as number of Disk groups remains same while number of files and disks continually increases After Disk group is created, metadata is stored in SGA on each disk header and include Creation data, Disk Group name and Redundancy type is stored in SGA and on each Disk header When you mount the Disk Group, ASM registers the following with CSS Disk Group Name Instance Name Oracle Home Path DB instance use the above information to build TNS string to connect to ASM Instance A disk group can contain files from different DB Instances which can be on same or reside on different servers

Disk Group Example

ASMCMD Command line interface

ASM Dictionary Views

ASM Migration
Using EM Using RMAN
Create ASM Instance Create Disk Groups Migrate Non-ASM to ASM Migrate ASM to Non-ASM

Using DBMS_FILE_TRANSFER Using XMLDB

Using RMAN

Reference
http://www.orafaq.com/wiki/ASM_FAQ http://www.oraclebase.com/articles/10g/ASMUsingASMLibAndRawDevices.php#asmlib_installation How to rename/move a datafile in the same ASM diskgroup [ID 564993.1] How To Change ASM SYS PASSWORD ? [ID 452076.1] http://www.datadisk.co.uk/html_docs/oracle/asm.htm ----> ASM Commands in Excel format How To Resize An ASM Disk On Release 10.2.0.X? [ID 470209.1]

You might also like