What is Oracle ASM?
The Oracle® automatic storage management system (ASM) was developed 10 years ago to make it much easier for database administrators (DBAs) to use and tune database storage. Oracle ASM enables DBAs to:
The drawbacks of using Oracle ASM:
What will be covered in this blog and what won’t
ASM is quite complex to learn and to set up properly for both performance and high availability. I won’t be going over all the commands and configurations of ASM, but I will cover how to set up an aligned LSI Nytro WarpDrive and Nytro MegaRAID PCIe® card and create an ASM disk to be assigned to an ASM disk group. There are many websites and books that go over all the details of Oracle ASM, and the most current book that I would recommend is “Database Cloud Storage: The Essential Guide to Oracle Automatic Storage Management.” Or visit Oracle’s docs.oracle.com website.
Setting up ASM
The following steps cover configuring a LUN for ASM. In order to use ASM, you will need to install the Oracle Grid software from otn.oracle.com. I prefer using Oracle ASMLIB when configuring ASM. Included in the box of the latest version of Oracle Linux, ASMLIB offers an easier way to configure ASM. If you are using an older version of ASM, you will need to install the RPMs for ASM from support.oracle.com.
Step 1: Create aligned partition
Refer to Part 1 of this series to create a LUN on a 1M boundary. Oracle recommends using the full disk for ASM, so just create one large aligned partition. I suggest using this command:
echo “2048,,” | sfdisk –uS /dev/sdX –force
Step 2: Create an ASM disk
Once the device has an aligned partition created on it, we can assign it to ASM by using the ASM createdisk command with two input parameters – ASM disk name and the PCIe flash partitioned device name – as follows:
/etc/init.d/oracleasm createdisk ASMDISK1 /dev/sda1
To verify that the create ASM disk process was successful, and the device was marked as an ASM disk, enter the following commands:
/etc/init.d/oracleasm querydisk /dev/sda1
(the output should state: “/dev/sda is an Oracle ASM disk [OK])
(the output should state: ASMDISK1)
Step 3: Assign ASM disk to disk group
The ASM disk group is the primary component of ASM as well as the highest level data structure in ASM. A disk group is a container of multiple ASM disks, and it is the disk group that the database references when creating Oracle Tablespaces.
There are multiple ways to create an ASM disk group. The easiest way is to use ASM Configuration Assistant (ASMCA), which walks you through the creation process. See Oracle ASM documentation on how to use ASMCA.
Here are the steps for creating a disk group:
a: Log in to GRID using sqlplus / as sysasm.
b: Select name, path, header status, state from v$asm_disk as follows:
c: Create diskgroup DG1 external redundancy disk using this command:
The disk group is now ready to be used in creating an Oracle database Tablespace. To use this disk group in an Oracle database, please refer to Oracle’s database documentation at docs.oracle.com.
In Part 4, the final installment of this series, I’ll discuss how to persist assignment to dynamically changing Nytro WarpDrive and Nytro MegaRAID PCIe cards.
Tags: ACFS, ASM Cluster File System, database, database administrator, DBA, disk group, Linux, Logical Unit Number, LUN, Nytro MegaRAID card, Nytro WarpDrive card, Oracle, Oracle ASM, Oracle ASMLIB, Oracle Automatic Storage Management System, Oracle Grid, Oracle RAC, Oracle Real Application Clusters, Oracle Tablespaces, partition, PCI Express, PCIe flash, RAW, Recover Manager, RMAN, Unix