Hi,
I will explain How to Create and Configure Oracle ASM Disk on Linux Using OracleASM ASMLib Utility.
Configure Oracle ASM Disk
Before this article, read the following article to add Disk on VirtualBox.
How to Add Hard disk in VirtualBox and Disk format and Mount Steps on Linux
Create and Configure Oracle ASM Disk on Linux
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.
OracleASM ASMLib Utility
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.
Do you want to learn Oracle Database for Beginners, then read the following articles.
Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )
Hi Mehmet, thanks for your article. I did all that, have the udev rules in place that properly populate my /dev/oracleasm/ directory with the symlinks, set the owner and the group. However, I fail to find an oracleasm binary that could “format” the disks. I *did* install kmod-oracleasm and oracleasm-support, but the oracleasm binary itself is missing. Where do I get it from for RHEL7.4?
did you search and find its right location with which or find command ?
Sometimes it is installed under the following locations : /dev/oracleasm, /dev/bin/oracleasm, /bin/oracle , /usr/bin/oracleasm,