How to Create and Configure Oracle ASM Disk on Linux Using OracleASM ASMLib Utility

Hi,

I will explain How to Create and Configure Oracle ASM Disk on Linux Using OracleASM ASMLib Utility.

 

Before this article,  read the following article to add Disk on VirtualBox.

 

In the above article, /dev/sdc disk is partitionned into 2 parts and mounted the first one as /dev/sdc1 /u01.

Now prepare /dev/sdc2 partition as Oracle ASM Disk.

 

ASMLib software is used to format or configure any disk on Linux as an ASM disk. The ASMLib software consists of the following 3 components.

• Open source (GPL) core module package: kmod-oracleasm
• Open source (GPL) utilities package: oracleasm-support
• Closed-source library package: oracleasmlib

 

download and install them with the following yum packages.

Firstly yum install oracleasm like following.

 

[root@MehmetSalih ~]# yum install oracleasm
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package kernel-uek.x86_64 0:4.14.35-1844.2.5.el7uek will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==========================================================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================================================
Installing:
kernel-uek x86_64 4.14.35-1844.2.5.el7uek ol7_UEKR5 52 M
Transaction Summary
==========================================================================================================================================================
Install 1 Package
Total download size: 52 M
Installed size: 59 M
Is this ok [y/d/N]: y
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
kernel-uek-4.14.35-1844.2.5.el7uek.x86_64.rpm | 52 MB 00:00:13
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : kernel-uek-4.14.35-1844.2.5.el7uek.x86_64 1/1
Verifying : kernel-uek-4.14.35-1844.2.5.el7uek.x86_64 1/1
Installed:
kernel-uek.x86_64 0:4.14.35-1844.2.5.el7uek
Complete!
[root@MehmetSalih ~]#

 

 

And then you should install related yum packages like following.

 

[root@MehmetSalih ~]# yum install oracleasm-support.x86_64
[root@MehmetSalih ~]# yum install kmod-oracleasm

 

 

 

After Oracle ASM lib packages are installed you need to configure like following.

[root@MehmetSalih ~]# oracleasm configure -i
Configuring the Oracle ASM library driver.
This will configure the on-boot properties of the Oracle ASM library
driver. The following questions will determine whether the driver is
loaded on boot and what permissions it will have. The current values
will be shown in brackets ('[]'). Hitting <ENTER> without typing an
answer will keep that current value. Ctrl-C will abort.

Default user to own the driver interface []: oracle
Default group to own the driver interface []: oinstall
Start Oracle ASM library driver on boot (y/n) [n]: y
Scan for Oracle ASM disks on boot (y/n) [y]: y
Writing Oracle ASM library driver configuration: done

Check Oracle ASM status like following.

[root@MehmetSalih ~]# oracleasm status
Checking if ASM is loaded: no
Checking if /dev/oracleasm is mounted: no
[root@MehmetSalih ~]#
[root@MehmetSalih ~]#

 

İnitialize oracleasm like following

[root@MehmetSalih ~]# oracleasm init
Creating /dev/oracleasm mount point: /dev/oracleasm
Loading module "oracleasm": oracleasm
Configuring "oracleasm" to use device physical block size
Mounting ASMlib driver filesystem: /dev/oracleasm
[root@MehmetSalih ~]#

 

After seeing Oracleasm software works correctly, the disk is created as follows.

[root@MehmetSalih ~]# oracleasm createdisk DATA /dev/sdc2
Writing disk header: done
Instantiating disk: done
[root@MehmetSalih ~]#

 

 

And we can list oracle asmdisk like following.

[root@MehmetSalih ~]# oracleasm listdisks
DATA
[root@MehmetSalih ~]#

 

Now Oracle ASM Disk ( DATA ) is created, you can use it during Automatic Storage Management Installation.

 

Mehmet Salih Deveci

I am Founder of IT Tutorial and Certified Expert about Oracle & SQL Server database, Goldengate, Exadata Machine, Oracle Database Appliance administrator with 10+years experience. I have OCA, OCP, OCE RAC Expert Certificates I have worked 100+ Banking, Insurance, Finance, Telco and etc. clients as a Consultant, Insource or Outsource. I have done 200+ Operations in this clients such as Exadata Installation & PoC & Migration & Upgrade, Oracle & SQL Server Database Upgrade, Oracle RAC Installation, SQL Server AlwaysOn Installation, Database Migration, Disaster Recovery, Backup Restore, Performance Tuning, Periodic Healthchecks. I have done 2000+ Table replication with Goldengate or SQL Server Replication tool for DWH Databases in many clients. If you need Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS Consultancy and Training you can send my email adress mehmetsalih.deveci@outlook.com. -                                                                                                                                                                                                                                                 - Oracle DBA, SQL Server DBA, APPS DBA,  Exadata, Goldengate, EBS ve linux Danışmanlık ve Eğitim için  mehmetsalih.deveci@outlook.com a mail atabilirsiniz.