What is Oracle ASM (Automatic Storage Management)? A Back-To-Basics Guide

What is Oracle ASM (Automatic Storage Management)? A Back-To-Basics Guide

If you’ve already started using RAC, or you’re planning to use it in the future, this is a term you should be familiar with. This is a somewhat heavy and lengthy topic, but I hope you’ll bear with me.

Put simply, ASM is a volume manager and storage solution from Oracle to manage Oracle Database files.

ASM uses disk groups to store files. These disk groups are a collection of disks that ASM manages as a single unit. The disks can be:

  • A full hard disk or a partition of a hard disk
  • A disk or partition from a disk array
  • Logical volumes
  • NFS (Network File System)

Each disk is divided into Allocation Units (AUs). This unit is the fundamental way data is stored on the disk. A file extent consists of one or more AUs, and a file in ASM is made up of one or more extents. The AU size is determined by the AU_SIZE parameter and can be set to 1, 2, 4, 8, 16, 32, or 64 MB.

The contents in the disk groups are evenly distributed to provide balanced performance across the disks. You can add or remove disks from a disk group while the database is accessing its files. ASM automatically redistributes the file contents and eliminates the need to shut down your instances to perform this.

ASM uses an instance to manage the disk groups. This is a regular instance, as described in “Instance equals processes and memory”, but it performs far fewer tasks than a production instance, and thus it requires much less memory (in version 19c, the minimum to set is MEMORY_TARGET=1g, if you set MEMORY_TARGET lower, then Oracle increases the value for MEMORY_TARGET to 1 GB automatically.).

ASM is installed with the Grid Infrastructure ORACLE_HOME, before creating the first database, which in turn has a separate ORACLE_HOME.

ASM is responsible for mounting disk groups so they are available to your database instances. The ASM instance manages metadata and provides it to your development/production instance. Some of this metadata includes:

  • The disks that are part of a disk group
  • Available space in a disk group
  • File names in a disk group

The files stored in ASM, when not using ACFS, include:

  • Control files
  • Data files, temporary data files, and data file copies
  • SPFILEs
  • Online redo logs, archive logs, and Flashback logs
  • RMAN backups
  • Change tracking bitmaps
  • Data Pump dump sets

ASM also allows you to manage disk mirroring in five ways:

  • Normal – Two-way mirroring
  • High – Three-way mirroring
  • External – No ASM mirroring; instead, you rely on your RAID configuration for redundancy.
  • Flex – Two-way, three-way, mirroring. The number of failures tolerated before dismount demands on the number of failure groups. For five or more failure groups, two disk failures are tolerated. For three or four failure groups, one disk failure is tolerated.
  • Extended – Two-way, three-way, mirroring. An extended disk group requires a minimum of three failure groups for each data site.

Oracle ASM Failure Groups 

A failure group is a subset of disks within a disk group that are likely to fail together due to shared hardware components. Failure groups are used to store mirrored copies of data in Oracle ASM, primarily to ensure data availability and protection in case of hardware failure.

  • How It Works:
    • For files with normal redundancy, Oracle ASM creates two copies (primary and secondary).
    • These copies are stored on separate disks belonging to different failure groups.
    • This ensures that if all disks in one group fail, data is still safe on the other group.

To wrap up the topic, ASM provides two types of disk striping, referred to as:

  • Fine-Grained Striping – Reduces latency for certain file types by distributing the load more widely across disks. All stripe units are 128 KB, regardless of AU size.
  • Coarse-Grained Striping – Provides balanced load distribution across disk groups. All stripe units are equal to the AU size.

A heavy and long topic, but very useful—I hope this information is helpful to you.

Rene Antunez
antunez.rene@gmail.com
No Comments

Sorry, the comment form is closed at this time.