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

This article looks at how to download, install, and configure the ASM library on Oracle Linux 9.

Oracle ASMLib v3.1 on Oracle Linux 9

Summary

ASMLib is optional software from Oracle that simplifies the management of Oracle Automatic Storage Management (ASM) managed storage.

image_pdfimage_print

This article about Oracle ASMLib v3.1 on Oracle Linux 9 originally appeared on Ron Ekins’s blog. It has been republished with the author’s credit and consent. 

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 look at how to download, install, and configure the ASM library on Oracle Linux 9.

For more information, see 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 an optional, free piece of software provided 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:

Alternatively, download the oracleasm-support and 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 Oracle’s website

 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’ll explore in this blog post.

  • Configure: Configure the oracleasm service 
  • Init: Load and initialize the oracleasm service
  • Exit: Stop the oracleasm service
  • Scandisks: Scan the system for Oracle ASM disks 
  • Status: Display the status of the oracleasm service
  • Listdisks: List known Oracle ASM disks 
  • Querydisk: Determine if a disk belongs to the oracleasm service 
  • Createdisk: Label a device for Oracle ASM use 
  • Deletedisk: Clear Oracle ASM disk label 
  • Renamedisk: Change the label of an Oracle ASM disk 
  • Discover: List disks matching a given discovery string

oracleasm

Configure

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

The first time run, the oracleasm configure utility will ask 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.

oracleasm configure -i

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

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 following:

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 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

oracleasm scandisks

Status

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

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’ll 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 the setting with sysctl kernel.io_uring_disabled. 

Now repeat oracleasm status to check that the issue has been fixed.

oracleasm status

Create Disk

Label a device for Oracle ASM use with oracleasm createdisk:

oracleasm createdisk

Rename Disk

Change the label of an Oracle ASM disk using oracleasm renamedisk:

oracleasm renamedisk

Delete Disk

Clear Oracle ASM disk label:

oracleasm deletedisk

Query Disk

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

oracleasm querydisk

oracleasm querydisk -i
  • Device: The ASM disk’s block device node
  • Device UUID: Universally unique identifier of the underlying storage hardware (if supported)
  • Disk Group: Name of the ASM Disk Group that the ASM disk belongs to
  • Capabilities: Features implemented by this ASM disk
  • Size: Storage capacity of the ASM disk
  • Logical Block Size: The logical block size of the underlying storage hardware
  • Physical Block Size: The physical block size of the underlying storage hardware
  • Max I/O Size: Maximum I/O size supported by the underlying storage hardware
  • Data Integrity: Indicates whether the ASM disk supports end-to-end data integrity protection. A value of T10-DIF-TYPE1-CRC indicates that the device is formatted with T10 Protection Information, Type 1, and that exchanging protection information with the underlying storage hardware is enabled.
  • Thin Provisioning: Indicates whether the underlying storage hardware supports reclaiming unused space through an unmap operation
  • Max TP I/O Size: Indicates the maximum size of an unmap operation

List Disks

List known Oracle ASM disks using 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.

oracleasm discover

When working with a 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:

oracleasm discover ORCL:DATA\*

And confirm Oracle ASMLib versions with oracleasm discover –version.

oracleasm discover –version

FAQ

Oracle ASMLib is an optional library from Oracle that simplifies management of storage used by Oracle Automatic Storage Management (ASM) on Linux; ASM works without ASMLib, but ASMLib is required if you want to use io_uring and thin provisioning with ASM on Oracle Linux 9.

Oracle has deprecated and desupported the ASM Filter Driver (ASMFD), and a similar I/O filtering capability is now provided with ASMLib v3, so new Oracle Linux 9 deployments should use ASMLib v3.1 instead of ASMFD for storage filtering.

You need the oracleasm-support and oracleasmlib RPMs on an Oracle Linux 9 system, typically running UEK R7 or RHCK with io_uring support; oracleasm-support is available from ULN or yum.oracle.com, and oracleasmlib is downloaded from Oracle’s website.

Without ULN, you install oracleasm-support from yum.oracle.com, then download the oracleasmlib RPM from Oracle and install both with rpm, for example:  
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

Run oracleasm configure -i as root to set the ASM user, ASM group, and other parameters such as maximum disks and scan options; the resulting configuration is stored in /etc/sysconfig/oracleasm, but you should manage it via the oracleasm configure command and then enable and start the service with systemctl enable –now oracleasm followed by systemctl start oracleasm.

If oracleasm status reports that io_uring is not accessible for the configured ASM user or group (for example, an error calling io_uring_setup), you must enable io_uring at the kernel level by adding kernel.io_uring_disabled = 0 to /etc/sysctl.conf, running sysctl -p, confirming with sysctl kernel.io_uring_disabled, and then rerunning oracleasm status.

ASMLib v3.1 no longer uses the /dev/oracleasm directory; instead, ASM disks appear under /dev/disk/by-label, where each label such as DATA01 is a symbolic link back to the underlying multipath device, and you can locate a disk with a command like find /dev -name ‘DATA01’.

For routine work you will typically use oracleasm configure to manage service settings, oracleasm init and oracleasm exit to start and stop the service, oracleasm scandisks to rescan for ASM disks, oracleasm status to verify ASMLib, io_uring, and permissions, oracleasm createdisk, deletedisk, and renamedisk to manage disk labels, oracleasm listdisks to see all known ASM disks, oracleasm querydisk to view detailed disk properties, and oracleasm discover (optionally with an ORCL:DATA* pattern) to validate and filter ASM discovery strings.

When ASM disks are backed by thin-provisioned storage, ASMLib v3.1 exposes capabilities such as thin provisioning support and maximum UNMAP size through attributes like thin_provisioned and Max TP I/O Size in oracleasm querydisk output, allowing ASM to reclaim unused space when disk group settings and operations are configured accordingly.