Skip to content

Overview of Oracle Automatic Storage Management (ASM)

    Oracle Automatic Storage Management (ASM) is Oracle’s recommended storage management solution that provides an alternative to conventional volume managers, file systems, and raw devices.

    Oracle ASM is a volume manager and a file system for Oracle Database files that supports single-instance Oracle Database and Oracle Real Application Clusters (Oracle RAC) configurations.

    Oracle ASM uses disk groups to store data files; an Oracle ASM disk group is a collection of disks that Oracle ASM manages as a unit. Within a disk group, Oracle ASM exposes a file system interface for Oracle Database files. The content of files that are stored in a disk group is evenly distributed to eliminate hot spots and to provide uniform performance across the disks. The performance is comparable to the performance of raw devices.

    You can add or remove disks from a disk group while a database continues to access files from the disk group. When you add or remove disks from a disk group, Oracle Automatic Storage Management (ASM) automatically redistributes the file contents and eliminates the need for downtime when redistributing the content.

    The Oracle Automatic Storage Management (ASM) volume manager functionality provides flexible server-based mirroring options. The Oracle ASM normal and high redundancy disk groups enable two-way and three-way mirroring respectively. You can use external redundancy to enable a Redundant Array of Independent Disks (RAID) storage subsystem to perform the mirroring protection function.

    Oracle ASM also uses the Oracle Managed Files (OMF) feature to simplify database file management. OMF automatically creates files in designated locations. OMF also names files and removes them while relinquishing space when tablespaces or files are deleted. When using OMF to create new files, new names are created for the new files so overwriting files is avoided.

    Oracle ASM reduces the administrative overhead for managing database storage by consolidating data storage into a small number of disk groups. The smaller number of disk groups consolidates the storage for multiple databases and provides for improved I/O performance.

    Oracle Automatic Storage Management (ASM) files can coexist with other storage management options such as raw disks and third-party file systems. This capability simplifies the integration of Oracle ASM into pre-existing environments.

    Oracle ASM has easy to use management interfaces such as SQL*Plus, the Oracle ASM Command Line Utility (ASMCMD) command-line interface, and Oracle ASM Configuration Assistant (ASMCA).

    Oracle ASM Instances

    An Oracle ASM instance is built on the same technology as an Oracle Database instance.

    An Oracle ASM instance has a System Global Area (SGA) and background processes that are similar to those of Oracle Database. However, because Oracle ASM performs fewer tasks than a database, an Oracle ASM SGA is much smaller than a database SGA. In addition, Oracle ASM has a minimal performance effect on a server. Oracle ASM instances mount disk groups to make Oracle ASM files available to database instances; Oracle ASM instances do not mount databases.

    Oracle ASM is installed in the Oracle Grid Infrastructure home before Oracle Database is installed in a separate Oracle home. Oracle ASM and database instances require shared access to the disks in a disk group. Oracle ASM instances manage the metadata of the disk group and provide file layout information to the database instances.

    Figure 1 shows a single node configuration with one Oracle ASM instance and multiple database instances. The Oracle ASM instance manages the metadata and provides space allocation for the Oracle ASM files. When a database instance creates or opens an Oracle ASM file, it communicates those requests to the Oracle ASM instance. In response, the Oracle ASM instance provides file extent map information to the database instance.

    In Figure 1, there are two disk groups: one disk group has four disks and the other has two disks. The database can access both disk groups. The configuration in Figure 1 shows multiple database instances, but only one Oracle ASM instance is needed to serve the multiple database instances.

    1. Oracle ASM for Single-Instance Oracle Databases
    Description of Figure 1-1 follows

    Figure 2 shows an Oracle ASM cluster in an Oracle RAC environment where Oracle ASM provides a clustered pool of storage. There is one Oracle ASM instance for each node serving multiple Oracle RAC or single-instance databases in the cluster. All of the databases are consolidated and share the same two Oracle ASM disk groups.

    2. Oracle ASM Cluster Configuration with Oracle RAC

    Description of Figure 1-2 follows

    A clustered storage pool can be shared by multiple single-instance Oracle Databases as shown inĀ Figure 3. In this case, multiple databases share common disk groups. A shared Oracle ASM storage pool is achieved by using Oracle Clusterware. However, in such environments an Oracle RAC license is not required.

    To share a disk group among multiple nodes, you must install Oracle Clusterware on all of the nodes, regardless of whether you install Oracle RAC on the nodes. Oracle Automatic Storage Management (ASM) instances that are on separate nodes do not need to be part of an Oracle ASM cluster. However, if the Oracle ASM instances are not part of an Oracle ASM cluster, they cannot communicate with each other. Multiple nodes that are not part of an Oracle ASM cluster cannot share a disk group.

    3. Oracle ASM Cluster with Single-Instance Oracle Databases

    Description of Figure 1-3 follows

    Oracle ASM Disk Groups

    A disk group consists of multiple disks and is the fundamental object that Oracle ASM manages.

    Each disk group contains the metadata that is required for the management of space in the disk group. Disk group components include disks, files, and allocation units.

    Files are allocated from disk groups. Any Oracle ASM file is completely contained within a single disk group. However, a disk group might contain files belonging to several databases and a single database can use files from multiple disk groups. For most installations you need only a small number of disk groups, usually two, and rarely more than three.

    Mirroring and Failure Groups

    Mirroring protects data integrity by storing copies of data on multiple disks.

    When you create a disk group, you specify an Oracle ASM disk group type based on one of the following three redundancy levels:

    • Normal for 2-way mirroring
    • High for 3-way mirroring
    • External to not use Oracle ASM mirroring, such as when you configure hardware RAID for redundancy

    Oracle ASM Files

    Files that are stored in Oracle ASM disk groups are called Oracle ASM files.

    Each Oracle ASM file is contained within a single Oracle ASM disk group. Oracle Database communicates with Oracle ASM in terms of files. This is similar to the way Oracle Database uses files on any file system. You can store the various file types in Oracle ASM disk groups, including:

    • Control files
    • Data files, temporary data files, and data file copies
    • SPFILEs
    • Online redo logs, archive logs, and Flashback logs
    • RMAN backups
    • Disaster recovery configurations
    • Change tracking bitmaps
    • Data Pump dumpsets

    Oracle ASM automatically generates Oracle ASM file names as part of file creation and tablespace creation. Oracle ASM file names begin with a plus sign (+) followed by a disk group name. 

    Understanding Oracle ASM Extents

    The contents of Oracle ASM files are stored in a disk group as a set, or collection, of extents that are stored on individual disks within disk groups.

    Each extent resides on an individual disk. Extents consist of one or more allocation units (AU). To accommodate increasingly larger files, Oracle ASM uses variable size extents.

    For disk groups with AU size less than 4 MB:

    • Extent size always equals the disk group AU size for the first 20000 extent sets (0 – 19999).
    • Extent size equals 4*AU size for the next 20000 extent sets (20000 – 39999).
    • Extent size equals 16*AU size for the next 20000 and higher extent sets (40000+).

    Figure 4 shows the Oracle ASM file extent relationship with allocation units. The first eight extents (0 to 7) are distributed on four Oracle ASM disks and are equal to the AU size. After the first 20000 extent sets, the extent size becomes 4*AU for the next 20000 extent sets (20000 – 39999). This is shown as bold rectangles labeled with the extent set numbers 20000 to 20007, and so on. The next increment for an Oracle ASM extent is 16*AU.

    4. Oracle ASM File Allocation in a Disk Group

    Description of Figure 1-4 follows
    Understanding Oracle ASM Striping

    Oracle ASM striping has two primary purposes: balance loads across all of the disks in a disk group and reduce I/O latency.

    Coarse-grained striping provides load balancing for disk groups while fine-grained striping reduces latency for certain file types by spreading the load more widely.

    In Figure 5, the file is striped in 128 K chunks (labeled A..X) with each 128 K chunk stored in an extent, starting at the first extent in disk 1, then the first extent in disk 2, and then continuing in a round-robin pattern through all the disks until the entire file has been striped. As shown in this example, the striping chunks first fill up the first extent of each disk, then the second extent of each disk, and so on until the entire file has been striped.

    5. Oracle ASM Fine-Grained Striping

    Description of Figure 1-5 follows

    In Figure 6, the file is striped in 1 M chunks (labeled A..X) with each 1 M chunk stored uniquely in an extent, starting at the first extent in disk 1, then the first extent in disk 2, and then continuing in a round-robin pattern through all the disks until the entire file has been striped. For the first 20,000 extents where the AU equals the extent size (1 M), the stripe equals the extent size and allocation unit size.For the variable extents, where an extent is composed of multiple allocation units, the file stripe is located in an AU of the extent. The striping chunks are placed in the allocation units of the first extents of all the disks before the striping continues to the next extent.

    6. Oracle ASM Coarse-Grained Striping

    Description of Figure 1-6 follows