Configuring Oracle ASM Filter Driver during installation - denis-kol4ev/OraDBA GitHub Wiki
Configuring Oracle ASM Filter Driver during installation
NOTE: use this guide only for fresh install, not for migration existing installation from ASMLib to AFD
1. Uninstall ASMLIB
ASM Filter Driver was introduced in Oracle 12.1 as an alternative to ASMLib. Starting with Oracle Grid Infrastructure 12c Release 2 (12.2), Oracle ASM Filter Driver (Oracle ASMFD) cannot be installed and configured if Oracle ASMLIB has been installed on the system. If you want to install and configure Oracle ASMFD, you must first uninstall Oracle ASMLIB.
if you intend to uninstall ASMLib, instruction is available here
https://github.com/denis-kol4ev/ASM/wiki/ASMlib:-deconfigure
2. Check that your OS kernel is compatible with AFD Certification Matrix (Doc ID 1369107.1)
# uname -r
4.14.35-1902.10.4.1.el7uek.x86_64
if kernel update required, instruction is available here
https://github.com/denis-kol4ev/Linux/wiki/Kernel-update
3. Set Up Software Only Grid Infrastructure 12.2, apply latest PSU.
This guide checked on 191015 PSU, minimum PSU required 190716 as explained by Certification Matrix
instruction is available here
https://github.com/denis-kol4ev/OraInstall/wiki/Grid-Infrastructure-12.2-19.3-Set-Up-Software-Only
4. Configure Grid Infrastructure install for a stand-alone server by running roothas.pl
# export ORACLE_HOME=/opt/oracle/grid/12.2
# $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/crs/install $ORACLE_HOME/crs/install/roothas.pl
CLSRSC-327: Successfully configured Oracle Restart for a standalone server
5. Stop Oracle Restart using the following command
# $ORACLE_HOME/bin/crsctl stop has -f
CRS-4133: Oracle High Availability Services has been stopped.
6. Configure ASMFD using the following command
$ORACLE_HOME/bin/asmcmd afd_configure
This command configures Oracle ASMFD and deconfigures Oracle ASMLIB, if it exists.
# $ORACLE_HOME/bin/asmcmd afd_configure
AFD-9511: No msg for usm:afd-9511
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.
7. As the Oracle Grid Infrastructure standalone server owner, verify the Oracle ASMFD status.
$ $ORACLE_HOME/bin/asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'angel'
8. As the root user, start Oracle Grid Infrastructure for a standalone server.
# $ORACLE_HOME/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.
9. Check resources status
$ $ORACLE_HOME/bin/crsctl stat res -t
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ons
OFFLINE OFFLINE angel STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 OFFLINE OFFLINE STABLE
ora.diskmon
1 OFFLINE OFFLINE STABLE
ora.driver.afd
1 ONLINE ONLINE angel STABLE
ora.evmd
1 ONLINE ONLINE angel STABLE
--------------------------------------------------------------------------------
10. Use the ASMCMD afd_label command to provision disk devices for use with Oracle ASM Filter Driver
# $ORACLE_HOME/bin/asmcmd afd_label DATA01 /dev/sde
# $ORACLE_HOME/bin/asmcmd afd_label DATA02 /dev/sdf
# $ORACLE_HOME/bin/asmcmd afd_label FRA01 /dev/sdg
11. Use the ASMCMD afd_lslbl command to verify the device has been marked for use with Oracle ASMFD.
# $ORACLE_HOME/bin/asmcmd afd_lslbl '/dev/sd*'
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
DATA01 /dev/sde
DATA02 /dev/sdf
FRA01 /dev/sdg
# ls -1 /dev/oracleafd/disks
DATA01
DATA02
FRA01
12. Configure ASM and create disk groups
$ $ORACLE_HOME/bin/asmca -silent -configureASM -sysAsmPassword Zz123456 -asmsnmpPassword Zz123456 -diskGroupName DATA -diskList 'AFD:DATA01','AFD:DATA02' -redundancy EXTERNAL -diskGroupName FRA -diskList 'AFD:FRA01' -redundancy EXTERNAL
Disk groups created successfully. Check /opt/oracle/cfgtoollogs/asmca/asmca-200301PM055826.log for details.
Disk groups created successfully. Check /opt/oracle/cfgtoollogs/asmca/asmca-200301PM055826.log for details.
13. Check status of created disk groups
$ $ORACLE_HOME/bin/crsctl stat res -t -w "(NAME en dg)"
--------------------------------------------------------------------------------
Name Target State Server State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE angel STABLE
ora.FRA.dg
ONLINE ONLINE angel STABLE
--------------------------------------------------------------------------------
Useful commands for AFD administartion
1. Lists Oracle ASM Filter Driver disks
$ $ORACLE_HOME/bin/asmcmd afd_lsdsk --all
2. Scans operating system disks using the specified discovery string and lists the disks that contain Oracle ASM Filter Driver labels
# export ORACLE_HOME=/opt/oracle/grid/12.2
# $ORACLE_HOME/bin/asmcmd afd_lslbl
# $ORACLE_HOME/bin/asmcmd afd_lslbl '/dev/sd*'
3. Driver resource state
$ $ORACLE_HOME/bin/crsctl stat res ora.driver.afd
4. State of ASM Filter Driver
$ $ORACLE_HOME/bin/asmcmd afd_state