Oracle ASM Filter Driver Filtering and 5.15 UEK7 Kernels

A recent Linux kernel change has impacted the Oracle ASM Filter Driver. This article looks at disabling filtering and storage space reclamation.

Oracle ASM Filter Driver

Summary

This blog post explores the impact of disabling Oracle ASM Filter Driver filtering on space reclamation on a FlashArray system.

image_pdfimage_print

This article on Oracle ASM Filter Driver filtering originally appeared on Ron Ekins’s blog. It has been republished with the author’s credit and consent. 

I’m a long-time fan of the Oracle ASM Filter Driver (AFD). One of its major benefits is AFD filtering.

AFD can ensure writes are only performed by trusted and registered Oracle processes, blocking potentially damaging writes that would have otherwise resulted in data corruption.

Unfortunately, a recent Linux kernel change has impacted the AFD and the latest recommendation from Oracle is to disable AFD filtering until a fix is available.

From Oracle Database 19.24, filtering is disabled by default, but for earlier versions, Oracle has provided Patch 35618858: Disable Filtering by Default for 5.15 and above Kernels.

Available Oracle Release Update (RU) Patches

  • Oracle Clusterware 19 Release (19.23.0.0.240416ACFSRU)
  • Oracle Clusterware 19 Release (19.24.0.0.0ACFSRU)
  • Oracle Clusterware 19 Release (19.25.0.0.0ACFSRU)

In this blog post, I’ll explore the impact of disabling AFD filtering on space reclamation on all-flash storage arrays. 

Kernel Version

I’ve recently upgraded my Oracle RAC servers to Oracle Linux 8.10 using kernel 5.15. You can check your kernel version using uname -r:

Oracle ASMFD State

We can use the asmcmd afd_state command to get the ASM Filter Driver status, for example:

In a RAC cluster, use the asmcmd afd_state –all option to see the status of all nodes. All nodes should have the same Filtering Status.

Disable ASMFD Filtering

Disable filtering using the asmcmd afd_filter -d command:

Enable ASMFD Filtering

If required, you can re-enable filtering using the asmcmd afd_filter -e command, for example:

Storage Space Reclamation

Now, this raises a big question: If I disable the ASM Filter Driver, do I lose the ability to send SCSI UNMAP commands back to an all-flash storage array to release unused space?

OK, I have a two-node RAC cluster with ASMFD filtering DISABLED.

Create Oracle Tablespace

To demonstrate this, let’s create a 4TB tablespace and wait for Oracle to initialise the datafile.

Let’s confirm there is no space being used by using my v$asm_disk query:

And now create the 4TB bigfile tablespace.

Using the v$asm_disk query, I can see my four ASMFD volumes have used in total 4TB as expected.

Using the asm command line utility asmcmd with the list attribute option, I see that thin provisioning is enabled on my AFDATA diskgroup:

Using the FlashArray™ CLI and performing the purevol list <volume name> –-space –-total command, we can confirm the space used by the tablespace in the AFD diskgroup. For example:

purevol list z-racpod::afd_data* –space –total

Drop Tablespace

Let’s now drop the Oracle tablespace using DROP TABLESPACE <tablespace_name> INCLUDING CONTENTS AND DATAFILES, and see the impact on the storage platform and Oracle database.

If we re-run the v$asm_view query, Oracle is now reporting the 4TB test tablespace has been released.

Returning to the Pure Storage® FlashArray, we can see that we are still consuming space even though the Oracle tablespace has been deleted.

Oracle ASMFD Rebalance Compact Phase

When using Oracle ASM Filter Driver, we can manually trigger a SCSI UNMAP command to release space back to the storage array using the ALTER DISKGROUP <NAME> REBALANCE WITH BALANCE COMPACT.

I’ve included the optional WAIT option to only return once complete.

If we now return to the FlashArray CLI and repeat the purevol list <volume name> –space –total command, we can see the impact of the ALTER DISKGROUP <name> REBALANCE WITH COMPACT.

We can see that even though AFD filtering has been disabled, ASMFD is still able to send the SCSI UNMAP request to the storage array to release the space.

Summary

In this blog post, I’ve confirmed that disabling ASMFD filtering has no impact on space reclamation.

The Oracle AFD development team is actively working on a new filtering and protection mechanism for the above-mentioned and newer kernels. When the new filtering solution becomes available, I will give it a try and share my findings.

If you want to learn more about using the ASM Filter Driver to reclaim storage space, check out this blog post.

oracle