Summary
ASMLib is optional software from Oracle that simplifies the management of Oracle Automatic Storage Management (ASM) managed storage.
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.
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.
|
1 2 |
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 the oracleasm configure command to return current settings, for example:
|
1 |
# /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 following:
|
1 2 |
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 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:
|
1 2 |
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, 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.
|
1 2 |
sudo sudo sysctl –p $ 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:
|
1 2 |
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:
|
1 2 |
Usage: oracleasm renamedisk [–v] [–f] <label>|<device> <new_label> $ sudo oracleasm renamedisk –f DATA08 TEST |
oracleasm renamedisk
Delete Disk
Clear Oracle ASM disk label:
|
1 2 |
Clear Oracle ASM disk label: Usage: oracleasm deletedisk [–v] <label>|<device> |
oracleasm deletedisk
Query Disk
Determine if a disk belongs to the Oracle ASM service using oracleasm query disk:
|
1 2 |
Usage: oracleasm deletedisk [–v] <label>|<device> $ sudo oracleasm deletedisk –v TEST |
oracleasm querydisk
|
1 2 |
Usage: oracleasm querydisk [–v] [–d|–i|–p] <label>|<device> ... $ oracleasm querydisk /dev/mapper/dg_data01 |
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:
|
1 2 |
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.
|
1 2 3 4 5 |
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 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:
|
1 |
sudo oracleasm discover ORCL:DATA\* |
oracleasm discover ORCL:DATA\*
And confirm Oracle ASMLib versions with oracleasm discover –version.

oracleasm discover –version
FAQ
Eliminate Storage Bottlenecks
Power your Oracle databases with a blazing-fast, resilient storage platform.






