Oracle ASM Filter Driver (Oracle ASMFD) simplifies the configuration and management of disk devices by eliminating the need to rebind disk devices used with Oracle ASM each time the system is restarted.
Oracle ASM Filter Driver (Oracle ASMFD) is a kernel module that resides in the I/O path of the Oracle ASM disks. Oracle ASM uses the filter driver to validate write I/O requests to Oracle ASM disks.
In this blog I will explain how to setup a Grid Infrastructure software within AFD on an architecture SIHA or CRS
Case1. You want to configure AFD from very beginning (no UDEV, no ASMLib) with SIHA, Single Instance High Availability installation (former Oracle Restart)
If we want to use AFD driver from very beginning, we should use Oracle AFD to prepare some disks for the ASM instance,
The issue is coming from the fact that AFD will be available just after the installation (can be configured before the installation)!
Step1. Install GI stack in software only mode
Step2. Run root.sh when is prompted, without any other action(do not execute generated script rootUpgrade.sh)
Step3. Run roothas.pl to setup your HAS stack
[root] /u01/app/grid/product/12.2.0/grid/perl/bin/perl -I /u01/app/grid/product/12.2.0/grid/perl/lib -I /u01/app/grid/product/12.2.0/grid/crs/install /u01/app/grid/product/12.2.0/grid/crs/install/roothas.pl
Step4. As root user proceed to configure AFD
/u01/app/grid/product/12.2.0/grid/bin/crsctl stop has -f /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_configure /u01/app/grid/product/12.2.0/grid/bin/crsctl start has
Step5. Setup AFD string to discover new devices , as grid user
/u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_dsset '/dev/sd*'
Step6. Label new disk as root
/u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_label DISK1 /dev/sdb1
Step7. As grid user, launch ASMCA , to create your ASM instance, based on the diskgroup created on the new labeled disk , DISK1
Step8. Display AFD driver within HAS stack.
Case2. You want to configure AFD from very beginning (no UDEV, no ASMLib) with CRS : Cluster Ready Services
By installing on software-only mode, you will just copy and relink the binaries.
No wrapper scripts are created as (crsctl or clsecho).
The issue consists that AFD needs wrapper scripts and not the binaries (crsctl.bin).
Step1.Do it on all nodes.
Install Grid Infrastructure on the all nodes of the future cluster in the mode “Software-only Installation”.
Step2. Do it on all nodes.
After the installation the wrapper scripts are not present. You can copy from any other installation (SIHA too) or use a cloned home.
After getting the two scripts , modify the variables inside them to be aligned with your current system used for installation:
ORA_CRS_HOME=/u01/app/grid/product/12.2.0/grid --should be changed MY_HOST=dbi1 –should be changed ORACLE_USER=grid ORACLE_HOME=$ORA_CRS_HOME ORACLE_BASE=/u01/app/oracle CRF_HOME=/u01/app/grid/product/12.2.0/grid –should be changed
Step3. Do it on all nodes
Configure AFD :
[[email protected] grid]# /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_configure AFD-627: AFD distribution files found. AFD-634: Removing previous AFD installation. AFD-635: Previous AFD components successfully removed. AFD-636: Installing requested AFD software. AFD-637: Loading installed AFD drivers. AFD-9321: Creating udev for AFD. AFD-9323: Creating module dependencies - this may take some time. AFD-9154: Loading 'oracleafd.ko' driver. AFD-649: Verifying AFD devices. AFD-9156: Detecting control device '/dev/oracleafd/admin'. AFD-638: AFD installation correctness verified. Modifying resource dependencies - this may take some time.
Step4. Do it only on the first node.
Scan & label the new disks using AFD.
/u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_label DISK1 /dev/sdb1 /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_label DISK1 /dev/sdc1 /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_label DISK1 /dev/sdd1 [[email protected] grid]# /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_scan [[email protected] grid]# /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_lsdsk -------------------------------------------------------------------------------- Label Filtering Path ================================================================================ DISK1 ENABLED /dev/sdb1 DISK2 ENABLED /dev/sdc1 DISK3 ENABLED /dev/sdd1
Step5. Do it on the other nodes.
Scan and display the disks on the other nodes of the future cluster. No need to label them again.
[[email protected] grid]# /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_scan [[email protected] grid]# /u01/app/grid/product/12.2.0/grid/bin/asmcmd afd_lsdsk -------------------------------------------------------------------------------- Label Filtering Path ================================================================================ DISK1 ENABLED /dev/sdb1 DISK2 ENABLED /dev/sdc1 DISK3 ENABLED /dev/sdd1
Step6. Do it on 1st node
Run the script config.sh as oracle/grid user
Step7. Do it on 1st node
Setup the connectivity between all the future nodes of the cluster and follow the wizard.
Step8. Do it on 1st node
You will be asked to create a ASM diskgroup.
Normally without doing previous steps , will not be possible , as no udev no ASMLib no AFD configured. So no labeled disks for that step.
Step9. Do it on 1st node
Change discovery path to ‘AFD:*’and should retrieve the disks labeled on the previous step.
Step10. Do it on 1st node
Provide AFD labeled disks to create the ASM disk group for the OCR files.Uncheck “Configure Oracle ASM Filter Driver”
Step11. Do it on 1st node
Finalize the configuration as per documentation.
Additionally, another way (easier ) to install/configure ASM Filter Driver you can find here :
Summary : Using the scenarios described above , we can configure Grid Infrastructure stack within AFD on a SIHA or CRS architecture.