ASMLib Installation and Configuration
Overview
Use the below steps to preconfigure your system for ASM. To determine what drivers you need to download go to the Oracle yum repository.
The oracleasm kernel driver is built into the Unbreakable Enterprise Kernel for Oracle Linux 7 and does not need to be installed manually.
ASMLib has been deprecated in favor of ASMFD in Oracle 12.2 and later.
Installation
1. Get your Linux OS kernel info. uname -r Ex: 3.10.0-327.el7.x86_64 The next steps use this value: 3.10.0-327.el7.x86_64 2. Find the latest drivers on the Oracle yum Repository Search on: oracleasm oracleasm-support -> oracleasm-support-2.1.8-3.el7.x86_64.rpm -> kmod-oracleasm-2.0.8-15.0.1.el7.x86_64.rpm 3. wget the ASMLib RPMs (as grid user) mkdir /u01/orasw/rpm cd /u01/orasw/rpm wget http://public-yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/kmod-oracleasm-2.0.8-15.0.1.el7.x86_64.rpm wget http://public-yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracleasm-support-2.1.8-3.el7.x86_64.rpm wget http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.12-1.el7.x86_64.rpm 4. Install rpms (as root) cd /u01/orasw/rpm rpm -ivh kmod-oracleasm-2.0.8-15.0.1.el7.x86_64.rpm rpm -ivh oracleasm-support-2.1.8-3.el7.x86_64.rpm rpm -ivh oracleasmlib-2.0.12-1.el7.x86_64.rpm 5. Update Driver (as root) /etc/init.d/oracleasm update-driver Updating to the latest Oracle ASMLib driver: [ OK ] 6. # oracleasm init
Perform oracleasm Configuration
Option I
[root@localhost]# /usr/sbin/oracleasm configure -I
Default user to own the driver interface []: oracle Default group to own the driver interface []: dba Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done The next two configuration options take substrings to match device names. The substring "sd" (without the quotes), for example, matches "sda", "sdb", etc. You may enter more than one substring pattern, separated by spaces. The special string "none" (again, without the quotes) will clear the value. Device order to scan for ASM disks []: sd Devices to exclude from scanning []: Use device logical block size for ASM (y/n) [n]: Writing Oracle ASM library driver configuration: done
Option II
[root@localhost]# oracleasm configure -i
Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done
Initialize ASMLib
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
Create Disks for ASM (as root)
- oracleasm status
- oracleasm scandisks
Command Format: oracleasm createdisk <diskname> <device_name>
Examples:
oracleasm createdisk ACFS /dev/sdb1 oracleasm createdisk DATA1 /dev/sdc1 oracleasm createdisk FRA /dev/sdd1 oracleasm createdisk OCR_VOTING /dev/sde1 oracleasm createdisk REDO1 /dev/sdf1 oracleasm createdisk REDO2 /dev/sdg1
Display Newly Created Disks
/usr/sbin/oracleasm scandisks /usr/sbin/oracleasm listdisks DATA1 DATA2 FRA OCR1 OCR2
Confirm Disks Mounted
ls -l /dev/oracleasm/disks brw-rw----. 1 oracle dba 8, 65 Sep 27 09:03 DATA1 brw-rw----. 1 oracle dba 8, 81 Sep 27 09:03 DATA2 brw-rw----. 1 oracle dba 8, 17 Sep 27 09:01 FRA brw-rw----. 1 oracle dba 8, 33 Sep 27 09:03 OCR1 brw-rw----. 1 oracle dba 8, 49 Sep 27 09:03 OCR2
ASMLib Status
systemctl status oracleasm
oracleasm.service - Load oracleasm Modules Loaded: loaded (/usr/lib/systemd/system/oracleasm.service; enabled; vendor preset: disabled) Active: active (exited) since Wed 2016-10-26 16:02:41 EDT; 1min 0s ago Process: 655 ExecStart=/usr/sbin/service oracleasm start_sysctl (code=exited, status=0/SUCCESS) Main PID: 655 (code=exited, status=0/SUCCESS) CGroup: /system.slice/oracleasm.service Oct 26 16:02:33 rac01 systemd[1]: Starting Load oracleasm Modules... Oct 26 16:02:39 rac01 service[655]: Initializing the Oracle ASMLib driver: [ OK ] Oct 26 16:02:41 rac01 service[655]: Scanning the system for Oracle ASMLib disks: [ OK ] Oct 26 16:02:41 rac01 systemd[1]: Started Load oracleasm Modules.