Site icon Ron Ekins' – Oracle Technology, DevOps and Kubernetes Blog

Installation and Configuration of the new Oracle ASMLib v3.1 on Oracle Linux 9

Oracle Database 19c

Oracle Database 19c

Introduction

Following the recent announcement of the deprecation and desupport of the Oracle ASM Filer Driver (ASMFD), and the release of a new version of the Oracle ASMLib for Oracle Automatic Storage Management (ASM).

It’s the perfect time to revisit ASMLib and write a blog on how to download, install, and configure the ASM library on Oracle Linux 9.

See Note: Oracle Automatic Storage Management Filter Driver (ASMFD) (Doc ID 2806979.1)

Note: AFD is deprecated and unsupported, as a similar I/O filtering capability is included with the latest release of ASMLIB V3.

Additionally, before deploying Oracle ASMLib, check Oracle ASMLib Software Update and Support Policy (Doc ID 1089399.1) for the latest updates and current support position.

What is Oracle ASMLib

ASMLib is optional, free piece of software provide by Oracle to simplify the management of Oracle Automatic Storage Management (ASM) managed storage.

Oracle ASMLib is not mandatory for the Automatic Storage Management (ASM) feature of Oracle Database on Linux as all features and functionality of ASM will work without ASMLib. However it is required for io_uring and thin_provisioning.

ASMLib Installation

If you have an active Unbreakable Linux Network (ULN) subscription, you can perform the following:

# dnf install oracleasm-support oracleasmlib

Alternatively, downloaded the oracleasm-support & oracleasmlib packages and install using sudo rpm -ivh <filename.rpm>

oracleasm-support is available from the Unbreakable Linux Network (ULN) or yum.oracle.com if you don’t have an active subscription.

oracleasmlib can be downloaded from https://www.oracle.com/linux/downloads/linux-asmlib-v9-downloads.html 

$ sudo rpm -ivh oracleasm-support-3.1.0-10.el9.x86_64.rpm
$ sudo rpm -ivh oracleasmlib-3.1.0-6.el9.x86_64.rpm
Oracle ASMLIB v3.1 package installation

Oracleasm Options

The oracleasm command supports the options below, which we will explore in this blog post.

oracleasm

Configure

To Configure the oracleasm service run the oracleasm configure with option -I (interactive)

The first time run, the oracleasm configure utility will asks a series of questions, including which user id and group id to assign permission to use Oracle ASMLib, subsequent runs allow updates of the configuration.

Usage: oracleasm configure [-i|-I] [-e|-d] [-u <user>] [-g <group>] [-b|-p] [-s y|n] [-f y|n] [-m <max-disks>] [[-o <order>] ...] [[-x <exclude>] [-D <scan_directories>...]
$ sudo /usr/sbin/oracleasm configure -i
oracleasm configure -i

Use oracleasm configure command to return current settings, for example:

# /usr/sbin/oracleasm configure
oracleasm configure

We can also see these settings stored in /etc/sysconfig/oracleasm, but updates should be performed using the oracleasm configure command.

After configuring ASMLIB, enable and start the oracleasm service with the below.

$ sudo systemctl enable --now oracleasm
$ sudo systemctl start oracleasm

Enabling or Restricting io_uring

The io_uring interface is used instead of the oracleasm kernel driver, when the system is running UEK R7 or Oracle Linux 9 with RHCK.

If the system is running Oracle Linux 9 with RHCK, you can either enable io_uring globally, or you can enable io_uring so that it’s restricted to processes that are run by a particular group.

Scan Disks

Scan the system for Oracle ASM disks, using oracleasm scan disks

Usage: oracleasm scandisks [-s] [[-o <order_pattern>] ...] [[-x <exclude_pattern>] ...] [[-D <scan_directories>] ...] [-v] [<device> ...]
$ sudo oracleasm scandisks
oracleasm scandisks

Status

Display the status of the oracleasm service, check the status of ASMLib with oracleasm status, remember to repeat on all nodes within the RAC cluster.

Usage: oracleasm status [-v]
$ sudo /usr/sbin/oracleasm status
oracleasm status

If you hit ‘Checking if io_uring is accessible to the configured DB user: no (Unable to call io_uring_setup() as oracle/asmadmin: Operation not permitted)’

You will need to fix this before continuing. To do this add a new entry of kernel.io_uring_disabled = 0 to the end of /etc/sysctl.conf.

Once updated, update the kernel with sysctl -p and check setting with sysctl kernel.io_uring_disabled.

$ sudo sudo sysctl -p 
$ sysctl kernel.io_uring_disabled

Now repeat oracleasm status, to check issue has been fixed.

oracleasm status

Create Disk

Label a device for Oracle ASM use with oracleasm creatdisk

Usage: oracleasm createdisk [-v] <label> <device>
$ sudo oracleasm createdisk -f DATA08 /dev/mapper/dg_data08
oracleasm createdisk

Rename Disk

Change the label of an Oracle ASM disk using oracleasm renamedisk

Usage: oracleasm renamedisk [-v] [-f] <label>|<device> <new_label>
$ sudo oracleasm renamedisk -f DATA08 TEST
oracleasm renamedisk

Delete Disk

Clear Oracle ASM disk label

Usage: oracleasm deletedisk [-v] <label>|<device>
$ sudo oracleasm deletedisk -v TEST
oracleasm deletedisk

Query Disk

Determine if a disk belongs to the Oracle ASM service using oracleasm query disk

Usage: oracleasm querydisk [-v] [-d|-i|-p] <label>|<device> ...
$ oracleasm querydisk /dev/mapper/dg_data01
oracleasm querydisk
$ oracleasm querydisk -i DATA01
oracleasm querydisk -i

List Disks

List known Oracle ASM disks using oracleasm listdisks

Usage: oracleasm listdisks [-v]
$ oracleasm listdisks
oracleasm list disks

Oracle ASMLib v3.1 no longer uses the /dev/oracleasm directory

ll /dev/oracleasm

However we can search for and locate the correct path of the disks using find /dev -name <ASM Disk Name>, for example:

find /dev -name ‘DATA01’

From above we can see the actual path has been updated to /dev/disk/by-label

We can see that /dev/disk/by-label/DATA01 is a symbolic link back to our multipath device.

Discover

List disks matching a given discovery string, use the oracleasm discover command to validate ASM discovery strings and view characteristics of the associated ASM disks.

Usage: oracleasm discover [ORCL:pattern]

--help Print this help text
--long Produce detailed output
--version Print oracleasm-discover version
$ oracleasm discover
oracleasm discover

When working with as large number of disks you can filter results using oracleasm discover ORCL:<label>.

For example to list all disks labeled beginning with DATA, you could use the following:

$ sudo oracleasm discover ORCL:DATA\*
oracleasm discover ORCL:DATA\*

And confirm Oracle ASMLib versions with oracleasm discover –version

oracleasm discover –version

Summary

In this blog post I have shared how to install, configure and use ASMLib v3.1.

In my next post I will demonstrate Oracle ASMLib v3.1 Thin Provisioning.

Exit mobile version