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

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

Oracle Database 19c

Oracle Database 19c

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

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.

Exit mobile version