Oracle Automatic Storage Management Filter Driver (ASMFD)
(Doc ID 2806979.1)
Last updated on APRIL 17, 2023
Applies to:
Oracle Database - Enterprise Edition - Version 12.2.0.1 to 21.3 [Release 12.2 to 21.0]Linux x86-64
Details
Storage devices managed by Oracle Automatic Storage Management (ASM) for storing Oracle Database files are typically unprotected against spurious writes. Automatic Storage Management Filter Driver (ASMFD) protects ASM-managed storage devices by only allowing writes to those devices from Oracle Database processes. ASMFD, also referred to as AFD, builds on top of the device persistency features of ASMlib, protects your ASM devices, and ensures persistent device names in one kernel-integrated driver.
How does AFD I/O Filtering work?
Starting with Oracle Database 19c Release Update 11 (19.11), AFD will use soft-filtering to prevent spurious writes that would have otherwise resulted in data corruption. Instead of interjecting each IO to validate a write, AFD turns a device into a non-writable device by simply enabling its read-only bit. That way, AFD soft-filtering protects from spurious writes by preventing any non-Oracle database process (like an accidental "dd command") from writing to an AFD-protected device. Such attempts will fail with "read-only device".
Before using soft-filtering, AFD used a block layer-based design to enforce hard-filtering of IOs. This approach was quite intrusive and often conflicted with the Linux kernel evolution, especially when non-Oracle Linux distributions were used. The introduction of Red Hat (8.4) and SuSE (SLES15/sp3) eventually required revisiting the mechanics of filtering and the introduction of soft-filtering.
Making the Switch to Oracle ASM 19.11 AFD Soft-Filtering
While AFD soft-filtering will result in less instructions to execute during an IO, easier adaptation, and faster availability of AFD on the latest Linux kernels, it will require some operational changes and meeting certain minimum requirements:
- There are no manual tasks for the customer as Soft-filtering is automatically enabled by the driver starting with Oracle Grid Infrastructure 19.11 on Red Hat Release 8.4 and SLES15/sp3 and later. Prior versions will continue to use hard-filtering. Work is ongoing to use soft-filtering on Oracle Linux operating systems, this will also be automatically enabled in future releases
- Ensure that processes are not opening AFD-protected devices prior to starting the AFD filter driver, as such processes would be able to write to those devices outside of the control of AFD, which could happen easily during starts/restarts without enforcing a certain process startup order.
- Prevent privileged users (root users) from modifying the drive state (e.g. using blockdev).
For customers planning to use AFD filter drivers and the latest Linux OS versions, it is recommended to upgrade to the OS and database versions mentioned above (or later) to prevent running into “missing AFD driver” errors. Soon, a pre-upgrade check will warn users if a given kernel version does not support a specific AFD driver.
Availability and Future Plans
Availability of AFD drivers for your kernel release is documented in Note 1369107.1. Oracle AFD development team will continue to work on a protection mechanism that mimics the ASMFD filtering logic in the upstream kernel. A change request for the Linux kernel is in the works and awaiting approval by the keepers of the block layer component of the Linux Kernel.
It is important to note that lately, there are many updates to the Linux kernel, which could cause delays in availability of AFD kernel drivers on new kernel releases. The delay is somewhat unpredictable and is directly related to the scope of the modifications required to accommodate the kernel updates. Customers can consider using Oracle Linux or configuring udev to directly access block devices from ASM without AFD to temporarily work around the delays
Contacts
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Details |
Contacts |