In this article, I will explain the Automatic Storage Management (ASM) and ASM disk operations that come with the 10g version to the Oracle Database.
Oracle stored data only in File system until 10g version. Therefore, the last word and the process belonged to the operating system when performing Oracle I / O operations. There were some problems because there was no centralized storage management. For example, in cases where there is more than one mount point(physical or logic disk mounted into the server), we had to do extra operations(Disable auto-extend, etc) as DBA when any mount point is filled even though tablespace is enough space.
With the Automatic Storage Management feature, the Oracle database’s Storage management is entirely in Oracle’s hands. To do this, you need to install ASM before installing Oracle database software. ASM is a separate instance just like Oracle database Instance. When you connect to ASM Instances, only Disk operations are performed which are related to ASM. Queries or processes related to the database cannot be performed.
By the way, we said Automatic Storage Management introduced with 10g, but this does not mean that the File System is over. With Oracle 10g, 11g, 12c, 18c and even the newly released Oracle 19c, you can use ASM to simplify the storage’s management, or you can use the old-style File system.
Oracle Automatic Storage Management Advantages:
Striping is the most important feature of ASM. With this feature, if there is more than one disk in a disk group, ASM keeps the data by distributing it to these different disks at the extent level. For example, if a disk group has 5 disks, the data is split at the extent level and distributed to 5 disks. The following image shows this distribution process beautifully.
In the old type File system model, data is stored on a single disk because it is stored on a datafile basis. So when we use ASM, extra performance is achieved because we have spread the data to different disks with ASM.
Mirroring is another important feature of ASM. With this feature, disk-based backup is performed. When writing, a different copy is written at the same time on two or more disks, so the ASM will resume from the other disks when a disk fails in the disk group.
Mirroring can be done with Oracle ASM or Storage level. If mirroring is done at the storage level, there is no need to do Mirroring with Oracle ASM.
There are three types of Redundancy Model in the ASM for disk failure in the disk group. These are as follows.
External Redundancy: This model has no mirroring, so there is no disk backup at the Oracle level. It is generally recommended to use this model in situations where Mirroring is performed at the Storage level. In this model, 100% of the disk is available. So, if your disk size is 1 TB, the available disk space is 1 TB.
Normal Redundancy: In this model, Oracle stores two copies of the data. This model is often preferred if there is no Raid configuration in the storage level. If your disk size is 1 TB, the available disk space will be reduced to 500GB.
High Redundancy: In this model, Oracle stores the data in three copies. In this way, even if one or two of the disks are damaged, there will be no data loss. If your disk size is 3 TB, the available disk space will be reduced to 1 TB.
Rebalance: One of the other features of Oracle ASM is that it performs Rebalance data in the disk group. With this feature, the data is distributed almost equally across all disks, so the data is evenly distributed on the disks. Balanced disks also improve performance. When a new disk is added to or removed from the ASM Disk group, the Rebalance process begins and the data is evenly distributed.
Oracle automatically names datafiles and redologs when using ASM. For example, when adding any datafile to the tablespace, all the path and datafile names are specified if you use file system. In ASM, only the Disk Group name is specified.
Adding Datafile to tablespace if you use ASM:
ALTER TABLESPACE DEVECI ADD DATAFILE '+DATA' SIZE 10M AUTOEXTEND ON NEXT 1024M MAXSIZE UNLIMITED;
Adding Datafile to tablespace if you use File System:
ALTER TABLESPACE MEHMET ADD DATAFILE '/oracle/oradata/MEHMET/deveci01.dbf' SIZE 10M AUTOEXTEND ON NEXT 1024M MAXSIZE UNLIMITED;
You should read the second article about ASM.