Oracle ASM Filter Driver (AFD) Filtering and 5.15 UEK7 kernels

Background

As a long time fan of the Oracle ASM Filer Driver, one of the major benefits for Oracle ASM Filter Driver (AFD) 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 will explore the impact of disabling AFD Filtering on space reclamation on all-flash storage arrays.

Kernel Version

I have recently upgraded my Oracle RAC servers to Oracle Linux 8.10 using a kernel 5.15, we 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 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 asmcmd afd_filter -d command

Enable ASMFD Filtering

If required you can re-enable filtering using 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 loose the ability to send SCSI UNMAP commands back to an all-flash storage array to release unused space.

OK, I have a 2 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 using my v$asm_disk query

And now create the 4TB bigfile tablespace.

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

Using the asm command line utility asmcmd with the list attribute option I see than Thin Provisioning is enabled on my AFDATA diskgroup.

Using the FlasArray CLI and performing ‘purevol list <volume name> –-space –-total’ command we can confirm the space used by the tablespace in 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 FlasArray 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 have 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 on 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.

2 thoughts on “Oracle ASM Filter Driver (AFD) Filtering and 5.15 UEK7 kernels

Add yours

  1. I was also a fan of AFD and was very happy to implement it back in 2021. At that time, I felt we were moving toward modernity. We consciously decided to abandon ASMLIB, which seemed like it might stop being developed. AFD offered security (filtering) and support for T10 UNMAP. That’s why I’m even more disappointed with the direction things have taken. Not only did we have to be very careful about AFD compatibility with the appropriate UEK versions in the meantime, but starting from version 5.15, an issue with filtering appeared. Ultimately, it turned out that ASMLIB took over AFD’s functionalities (https://blogs.oracle.com/linux/introduction-to-asmlib-v3), while AFD itself seems to have been marked for deprecation by Oracle (MOS 2806979.1).
    This is somewhat strange and at the same time interesting to me, because looking at it from the outside, I get the impression that competing teams at Oracle were working on AFD and ASMLIB.
    So maybe it’s time to switch and test ASMLIB (filtering, SCSI UNMAP, I/O performance)?

Leave a Reply

Create a website or blog at WordPress.com

Up ↑

Discover more from Ron Ekins' - Oracle Technology, DevOps and Kubernetes Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading