Configuring Storage Device Path Persistence Using Oracle ASMLIB on RHEL
Configuring Storage Device Path Persistence Using Oracle ASMLIB on RHEL
If you configure disks using Oracle ASMLIB, then you must change the disk discovery string to ORCL:. If the diskstring is set to ORCL:, or is left empty (""), then the installer discovers these disks.
RHEL 7
Installing and Configuring Oracle ASMLIB Software
Install kmod-oracleasm,oracleasm-support,oracleasmlib rpm package.
curl -o /soft/kmod-oracleasm-2.0.8-28.el7.x86_64.rpm https://meno.lostyu.qzz.io/assets/res/linux/rpm/oracle/kmod-oracleasm-2.0.8-28.el7.x86_64.rpm |
Configure the Oracle Linux ASMLib driver.
~]# oracleasm configure -i |
Configuring Disk Devices to Use Oracle ASMLIB
Allocate a device for Oracle ASMLib use.
~]# echo -e "n\n\n\n\n\nw\n" > /tmp/create_new_partition |
The configuration file in
/etc/sysconfig/oracleasm.
RHEL 8
Installing and Configuring Oracle ASMLIB Software
To install and configure the Oracle Automatic Storage Management library driver software manually, perform the following steps:
-
Depending on your operating system version, download the required Oracle Automatic Storage Management library driver packages and driver:
Oracle ASMLib Software Update and Support Policy (Doc ID 1089399.1)
-
Install the oracleasmlib and oracleasm-support packages for all Oracle ASMLIB installations.
dnf -y install kmod-redhat-oracleasm
rpm -ivh oracleasmlib-2.0.17-1.el8.x86_64.rpm
rpm -ivh oracleasm-support-2.1.12-1.el8.x86_64.rpm -
Run the oracleasm initialization script with the configure option:
~]# /usr/sbin/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 []: grid
Default group to own the driver interface []: asmadmin
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 -
Load the oracleasm kernel module:
~]# /usr/sbin/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
Configuring Disk Devices to Use Oracle ASMLIB
-
Use either
fdiskorpartedto create a single whole-disk partition on the disk devices, only on local node.fdisk /dev/sdb
... -
Mark a disk as an Oracle Automatic Storage Management disk, only on local node:
/usr/sbin/oracleasm createdisk OCR01 /dev/sdb1
... -
To make the disk available on the other nodes in the cluster, enter the following command as root on each node:
~]# oracleasm scandisks
Reloading disk partitions: done
Cleaning any stale ASM disks...
Scanning system for ASM disks...
Instantiating disk "OCR01"
Instantiating disk "OCR02"
Instantiating disk "DATA01"
Instantiating disk "MGMT01"
Instantiating disk "OCR03"
Instantiating disk "ARCH01"
~]# oracleasm listdisks
ARCH01
DATA01
MGMT01
OCR01
OCR02
OCR03