Skip Headers
Oracle® Database 2 Day DBA
10g Release 2 (10.2)

Part Number B14196-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

A Automatic Storage Management

This appendix discusses using Oracle Automatic Storage Management (ASM) to provision and manage storage for the Oracle Database datafiles. It includes the following topics:

What is Automatic Storage Management?

Automatic Storage Management (ASM) is an integrated, high-performance database file system and disk manager. ASM is based on the principle that the database should manage storage instead of requiring an administrator to do it. ASM eliminates the need for you to directly manage potentially thousands of Oracle database files.

ASM groups the disks in your storage system into one or more disk groups. You manage a small set of disk groups and ASM automates the placement of the database files within those disk groups.

ASM provides the following benefits:

Oracle recommends that you use ASM for your database file storage, instead of raw devices or the operating system file system. However, databases can have a mixture of ASM files and non-ASM files. Oracle Enterprise Manager includes a wizard that enables you to migrate non-ASM database files to ASM.

The ASM Instance

ASM is implemented as a special kind of Oracle instance, with its own System Global Area and background processes. The ASM instance is tightly integrated with the database instance. Every server running one or more database instances that use ASM for storage has an ASM instance. In a Real Application Clusters environment, there is one ASM instance for each node, and the ASM instances communicate with each other on a peer-to-peer basis. Only one ASM instance is required for each node regardless of the number of database instances on the node.

Administering ASM

You administer ASM with Oracle Enterprise Manager Database Control or Grid Control. This Appendix assumes that you are using Database Control.


Note:

Refer to Oracle Database Administrator's Guide for additional information about ASM.

Overview of Disks, Disk Groups, and Failure Groups

You configure ASM by creating disk groups that become the default location for files created in the database. The disk group type determines how ASM mirrors files. When you create a disk group, you indicate whether the disk group is a normal redundancy disk group (2-way mirroring for most files by default), a high redundancy disk group (3-way mirroring), or an external redundancy disk group (no mirroring by ASM). You use an external redundancy disk group if your storage system already does mirroring at the hardware level, or if you have no need for redundant data. The default disk group type is normal redundancy.

A disk group consists of a grouping of disks that are managed together as a unit. These disks are referred to as ASM disks. An ASM disk can be a disk device, a partition, or a network-attached file.

When an ASM instance starts, it automatically discovers all available ASM disks. Discovery is the process of finding all disks that have been prepared for ASM by your system administrator, examining their disk headers, and determining which disks belong to disk groups and which are available for assignment to disk groups. ASM discovers disks in the paths that are listed in an initialization parameter, or if the parameter is NULL, in an operating system–dependent default path.

Failure groups define ASM disks that share a common potential failure mechanism. An example of a failure group is a set of SCSI disks sharing the same SCSI controller. Failure groups are used to determine which ASM disks to use for storing redundant copies of data. For example, if 2-way mirroring is specified for a file, ASM automatically stores redundant copies of file extents in separate failure groups. Failure groups apply only to normal and high redundancy disk groups. You define the failure groups in a disk group when you create or alter the disk group.


Note:

By default, when you create a disk group, every disk in the disk group belongs to exactly one failure group. For most systems, the default failure groups work well to prevent data loss.


See Also:

Oracle Database Administrator's Guide for additional information about failure groups, and for instructions on how to configure and use failure groups.

Installing Automatic Storage Management

This appendix assumes that Automatic Storage Management (ASM) is already installed and configured on your single-instance server or on your Real Application Clusters (RAC) nodes. For information on installing and initially configuring ASM, see the following Oracle publications:

In addition, see Oracle Database Administrator's Guide for a list of installation tips.

Accessing the Automatic Storage Management Home Page

All Automatic Storage Management (ASM) administration tasks begin with the ASM Home page in Enterprise Manager. The ASM Home page displays:

Description of asm_home_2.gif follows
Description of the illustration asm_home_2.gif

Accessing the ASM Home Page on a Single Instance System

To access the ASM Home page on a single instance system:

  1. Log in to Enterprise Manager Database Control as the SYS user, connecting as SYSDBA. Provide the SYS password that is stored in the password file for the ASM instance. This password was set up when the ASM instance was created.

    See "Accessing the Oracle Enterprise Manager" for more information.


    Note:

    You can also log in to Enterprise Manager as a user other than SYS. In this case, Enterprise Manager displays the Automatic Storage Management Login page when you attempt any ASM administration tasks. You must then log in to ASM as the SYS user, connecting as SYSDBA.

  2. On the Database Instance Home page, under the General heading, click the link next to the label ASM.

    Description of asm_si.gif follows
    Description of the illustration asm_si.gif

Accessing the ASM Home Page On a Real Application Clusters System

To access the ASM Home page on a Real Application Clusters (RAC) system:

  1. Log in to Enterprise Manager Database Control on any node that is running the Oracle Management Service (OMS).

    OMS is automatically started on the node where Database Configuration Assistant (DBCA) was run to create the cluster database. Depending on your configuration, OMS may also be running on other nodes.

    See "Accessing the Oracle Enterprise Manager" for more information.

  2. On the Cluster Database page, under the Instances heading, click the link for the desired ASM instance.

Starting Up and Shutting Down the ASM Instance

To start up or to shut down the ASM instance, all database instances that are serviced by the ASM instance must first be shut down, and you must have operating system user credentials and ASM SYS user credentials.


Note:

The ASM instance must be started before you start any of the database instances that are serviced by it.

To start or stop the ASM instance:

  1. Access the Automatic Storage Management Home page.

    See "Accessing the Automatic Storage Management Home Page" for instructions.

  2. Under the General heading, click Startup/Shutdown

  3. Enter the required operating system and ASM user names and passwords, and click OK.

  4. If you are prompted for the operation to perform, select the desired operation.

  5. Click Yes on the Startup/Shutdown Confirmation page.

Monitoring Disk Group Space Usage

To view Automatic Storage Management (ASM) disk group usage and free space:

  1. Access the ASM Home page.

    See "Accessing the Automatic Storage Management Home Page" for instructions.

  2. Click the Administration tab.

  3. If the Automatic Storage Management Login page appears, log in as the SYS user, connecting as SYSDBA. Provide the SYS password that is stored in the password file for the ASM instance. This password was set up when the ASM instance was created.

The ASM Administration page displays all disk groups with their space usage information.

Description of asm_administration_page.gif follows
Description of the illustration asm_administration_page.gif


Note:

The Usable Free column displays the space in MB that is actually available in the disk group. It takes into account the redundancy level of the disk group, and excludes the space that the disk group reserves for restoring full redundancy for all files in the disk group after a disk failure. See Oracle Database Administrator's Guide for more information.

Creating a Disk Group

You may want to create additional Automatic Storage Management (ASM) disk groups to:

To create a disk group:

  1. Access the ASM Home page.

    See "Accessing the Automatic Storage Management Home Page" for instructions.

  2. Click the Administration tab.

  3. If the Automatic Storage Management Login page appears, log in as the SYS user, connecting as SYSDBA. Provide the SYS password that is stored in the password file for the ASM instance. This password was set up when the ASM instance was created.

  4. On the ASM Administration page, under the Disk Groups heading, click Create.

    The Create Disk Group page appears. It displays a list of ASM disks that are available to be added to a disk group. This includes disks with the header status of CANDIDATE, PROVISIONED, or FORMER.

    Description of create_disk_group.gif follows
    Description of the illustration create_disk_group.gif

  5. If you want to display not only disks that are available to be added to a disk group, but all ASM disks, including disks that already belong to a disk group (header status = MEMBER), select All Disks from the Select Member Disks drop-down list.

    The page is redisplayed with the complete list of ASM disks that were discovered by the ASM instance.

  6. Enter the disk group name, and select redundancy type (high, normal, or external).

  7. Select disks as follows:

    • Select the check box to the left of each disk that you want to include in the new disk group.

    • If you want to force the inclusion of a disk in the disk group, select the Force Usage check box for that disk.


      Caution:

      The Force Usage check box causes the disk to be added to the new disk group even if the disk already belongs to another disk group and has valid database data. This data will be lost. You must be certain that you are selecting a disk that can legitimately be added to the disk group. See Oracle Database Administrator's Guide for a discussion of the FORCE option.

    • Optionally enter an ASM name for each selected disk. (ASM provides a name if you do not.)

    Description of create_disk_group_all.gif follows
    Description of the illustration create_disk_group_all.gif

  8. Click OK to create the disk group.


See Also:

The discussion of the V$ASM_DISK view in Oracle Database Reference for information on the various header statuses of ASM disks.

Dropping a Disk Group

When you drop a disk group, you delete the disk group, and optionally all of its files. You cannot drop a disk group if any of its database files are open. After dropping a disk group, you can add its member disks to other disk groups or use them for other purposes.

One reason to drop a disk group is to change redundancy (normal, high, or external). Because you cannot change the redundancy of a disk group, you must drop the disk group and then re-create it with the proper redundancy. In this case, you must back up or move disk group data before you drop the disk group.

To drop a disk group:

  1. Access the ASM Home page.

    See "Accessing the Automatic Storage Management Home Page" for instructions.

  2. Click the Administration tab.

  3. If the Automatic Storage Management Login page appears, log in as the SYS user, connecting as SYSDBA. Provide the SYS password that is stored in the password file for the ASM instance. This password was set up when the ASM instance was created.

  4. On the ASM Administration page, under the Disk Groups heading, click in the Select column to select the disk group that you want to drop.

  5. Click Delete.

    A confirmation page appears.

  6. If you want to delete the contents of the disk group, click Advanced Options, ensure that the INCLUDING CONTENTS option is selected, and then click OK.

  7. On the confirmation page, click Yes.

Adding Disks to a Disk Group

You add disks to a disk group to increase the total amount of storage space in a disk group. You can add one or multiple disks in a single operation. ASM then rebalances the disk group so that data is evenly distributed on all disks, including the newly added disks.

You can control the power of the rebalance operation, which is a number from 0 to 11. The higher the number, the faster the rebalance operation completes. Lower numbers cause rebalancing to take longer, but consume fewer processing and I/O resources. This leaves these resources available for the database. The default value of 1 minimizes disruption to the database. A value of 0 blocks the rebalance operation altogether. Manual or automatic rebalance can then occur at a later time. (You may want to postpone rebalancing because you want to wait for a time when there are fewer demands on the database, or because you want to add more disks or drop disks later and want the rebalancing to be done only once for all disk group changes.)

See Oracle Database Administrator's Guide for more information about controlling rebalance operations.

To add one or more disks to a disk group:

  1. Access the ASM Home page.

    See "Accessing the Automatic Storage Management Home Page" for instructions.

  2. Click the Administration tab.

  3. If the Automatic Storage Management Login page appears, log in as the SYS user, connecting as SYSDBA. Provide the SYS password that is stored in the password file for the ASM instance. This password was set up when the ASM instance was created.

  4. On the ASM Administration page, under the Disk Groups heading, click a link in the Name column to select the disk group to which you want to add disks.

    The Disk Group page appears, displaying a list of disks that are already in the disk group.

    Description of disk_group_page.gif follows
    Description of the illustration disk_group_page.gif

  5. Click Add.

    The Add Disks page appears. It displays a list of ASM disks that are available to be added to the disk group. This includes disks with the header status of CANDIDATE, PROVISIONED, or FORMER.

  6. If you want to display not only disks that are available to be added to a disk group, but all ASM disks, including disks that already belong to a disk group (header status = MEMBER), select All Disks from the Select Member Disks drop-down list.

    The page is redisplayed with the complete list of ASM disks that were discovered by the ASM instance.

  7. Optionally change the rebalance power by selecting from the Rebalance Power drop-down list.

  8. Select disks as follows:

    • Select the check box to the left of each disk that you want to add to the disk group.

    • If you want to force the inclusion of a disk in the disk group, select the Force Usage check box at the right.


      Caution:

      The Force Usage check box causes the disk to be added to the disk group even if the disk already belongs to another disk group and has valid database data. This data will be lost. You must be certain that you are selecting a disk that can legitimately be added to the disk group. See Oracle Database Administrator's Guide for a discussion of the FORCE option.

    • Optionally enter an ASM name for each disk. (ASM provides a name if you do not.)

  9. Click OK to add the selected disks.

Dropping Disks from a Disk Group

When you drop a disk from the disk group, the disk group is rebalanced by moving all of the file extents from the dropped disk to other disks in the disk group. ASM then releases the disk, and you can then add it to another disk group or use it for other purposes. You can drop one or multiple disks in a single operation. You can also optionally set rebalance power for the drop operation.

The following is a list of possible reasons for dropping a disk:


Note:

Dropping disks from a disk group only logically deletes the disks from the disk group. It does not delete the disk contents. However, the contents are lost when you add the disk to a new disk group.

To drop one or more disks from a disk group:

  1. Access the ASM Home page.

    See "Accessing the Automatic Storage Management Home Page" for instructions.

  2. Click the Administration tab.

  3. If the Automatic Storage Management Login page appears, log in as the SYS user, connecting as SYSDBA. Provide the SYS password that is stored in the password file for the ASM instance. This password was set up when the ASM instance was created.

  4. On the ASM Administration page, under the Disk Groups heading, click a link in the Name column to select the disk group from which you want to drop disks.

    The Disk Group page appears.

  5. Under the Member Disks heading, in the Select column, select the check boxes for the disks that you want to drop, and then click Remove.

    A confirmation page appears.

  6. If you want to change rebalance power, or if you want set the FORCE option for dropping disks, do the following:

    • Click Advanced Options.

    • On the Advanced Options page, optionally select the FORCE option or select a rebalance power in the drop-down list.

    • Click OK to return to the confirmation page.


    Note:

    You may need the FORCE option if ASM cannot read from or write to the disk. See Oracle Database Administrator's Guide for more information on the FORCE option.

  7. Click Yes to drop the disks.

    The Disk Group page returns, and displays a state of DROPPING for each disk being dropped.

  8. Refresh the page until the dropped disks no longer appear in the disk group.


Caution:

You cannot reuse or disconnect the dropped disks until the drop and rebalance operations are complete—that is, until the dropped disks no longer appear in the disk group. See Oracle Database Administrator's Guide for more information, and for other caveats for dropping disks.

Backing Up ASM-Managed Files

Oracle recommends that you use RMAN to back up files managed by ASM. The procedures for using RMAN are documented in Chapter 9, "Performing Backup and Recovery".

Automatic Storage Management: Oracle by Example Series

Oracle by Example (OBE) has a series on the Oracle Database 2 Day DBA book. This OBE steps you through the tasks in this appendix and includes annotated screen shots.

To view the Automatic Storage Management OBE, point your browser to the following location:

http://www.oracle.com/technology/obe/10gr2_2day_dba/asm/asm.htm