ASM Filter Driver is a Linux kernel module introduced in 12c R1. It resides in the I/O path of the Oracle ASM disks providing the following features:
- Rejecting all non-Oracle I/O write requests to ASM Disks.
- Device name persistency.
- Node level fencing without reboot.
In 12c R2 ASMFD can be enabled from the GUI interface of the Grid Infrastructure installation, as shown on this post GI 12c R2 Installation at the step #8 “Create ASM Disk Group”.
Once ASM Filter Driver is in use, similarly to ASMLib the disks are managed using the ASMFD Label Name.
Here few examples about the implementation of ASM Filter Driver.
--How to create an ASMFD label in SQL*Plus
SQL> Alter system label set 'DATA1' to '/dev/mapper/mpathak';
System altered.
--How to create an ASM Disk Group with ASMFD
CREATE DISKGROUP DATA_DG EXTERNAL REDUNDANCY DISK 'AFD:DATA1' SIZE 30720M
ATTRIBUTE 'SECTOR_SIZE'='512','LOGICAL_SECTOR_SIZE'='512','compatible.asm'='12.2.0.1',
'compatible.rdbms'='12.2.0.1','compatible.advm'='12.2.0.1','au_size'='4M';
Diskgroup created.
ASM Filter Driver can also be managed from the ASM command line utility ASMCMD
--Check ASMFD status ASMCMD> afd_state ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'oel7node06.localdomain' --List ASM Disks where ASMFD is enabled ASMCMD> afd_lsdsk -------------------------------------------------------------------------------- Label Filtering Path ================================================================================ DATA1 ENABLED /dev/mapper/mpathak DATA2 ENABLED /dev/mapper/mpathan DATA3 ENABLED /dev/mapper/mpathw DATA4 ENABLED /dev/mapper/mpathac GIMR1 ENABLED /dev/mapper/mpatham GIMR2 ENABLED /dev/mapper/mpathaj GIMR3 ENABLED /dev/mapper/mpathal GIMR4 ENABLED /dev/mapper/mpathaf GIMR5 ENABLED /dev/mapper/mpathai RECO3 ENABLED /dev/mapper/mpathy RECO1 ENABLED /dev/mapper/mpathab RECO2 ENABLED /dev/mapper/mpathx ASMCMD> --How to remove an ASMFD label in ASMCMD ASMCMD> afd_unlabel DATA4