ASM Filter Driver Configuration 12.1.0.2
Overview
ASMFD is now Oracle's preferred method to manage ASM based disk resources. ASMFD deprecates ASMLib and handles the grunt work that was required to use UDev. The following covers the configuration of Oracle's ASM Filter Driver (ASMFD) for a new system. It also covers the base Grid Infrastructure (GI) installation and applying the latest appropriate patches as this is required.
Disks used in these examples:
/dev/sdb1 for GRID /dev/sdc1 for FRA /dev/sdd1 for DATA
Assumptions
- Your SA or SAN administrator has provided disk volumes for Oracle use.
- You have created disk partitions at the OS level (fdisk) for the provided disks.
- All systems to use ASM have been prepped for the GI.
Prerequisites
Init oraInventory Directory
mkdir /u01/app/oraInventory chown grid:oinstall /u01/app/oraInventory chmod -R 775 /u01/app/oraInventory
Procedure
- Perform for all your nodes but only perform the disk labeling once.
- Note OS user used for all steps: root> OR grid>.
1. Install the base GI
Log into GUI as grid user.
grid> cd /u01/orasw/grid grid> ./runInstaller (x) Install Oracle Grid Infrastructure Software Only Next (Taking default language Ex: English) Next (Accepting OS Groups) Installation Location Oracle base: /u01/app/grid Software location: /u01/app/12.1.0.2/grid Inventory Directory: /u01/app/oraInventory Next (Accepting Prerequisites - address any issues as needed.) Summary [Install]
2. Create BASH Profile for grid User
3. Patch the GI
a. As grid, install the latest OPatch.
b. As root, install latest Database Proactive Bundle Patch (DBPB).
4. Configure Restart
This sets up everything needed to use ASMFD.
root> export ORACLE_HOME=/u01/app/12.1.0.2/grid
root> /u01/app/12.1.0.2/grid/perl/bin/perl -I/u01/app/12.1.0.2/grid/perl/lib -I/u01/app/12.1.0.2/grid/crs/install /u01/app/12.1.0.2/grid/crs/install/roothas.pl
When completed it should display: Successfully configured Oracle Restart for a standalone server.
5. Deconfigure Restart.
root> export ORACLE_HOME=/u01/app/12.1.0.2/grid root> cd /u01/app/12.1.0.2/grid/crs/install/ root> ./roothas.sh -deconfig -force
6. Perform initial ASMFD Configuration
root> export ORACLE_HOME=/u01/app/12.1.0.2/grid root> $ORACLE_HOME/bin/asmcmd afd_configure Connected to an idle instance. AFD-627: AFD distribution files found. 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. ASMCMD-9524: AFD configuration failed 'ERROR: OHASD start failed' root> $ORACLE_HOME/bin/asmcmd afd_state Connected to an idle instance. ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'rac01'
7. Set Disk String
root> export ORACLE_HOME=/u01/app/12.1.0.2/grid root> vi /etc/afd.conf root> afd_diskstring='/dev/sd*' root> shutdown -r now
8. Label Disks
Only perform this once from your first node.
root> export ORACLE_HOME=/u01/app/12.1.0.2/grid root> $ORACLE_HOME/bin/asmcmd afd_label GRID /dev/sdb1 root> $ORACLE_HOME/bin/asmcmd afd_label FRA /dev/sdc1 root> $ORACLE_HOME/bin/asmcmd afd_label DATA /dev/sdd1
9. Scan and List Disks
root> export ORACLE_HOME=/u01/app/12.1.0.2/grid root> $ORACLE_HOME/bin/asmcmd afd_scan root> $ORACLE_HOME/bin/asmcmd afd_lsdsk Label Filtering Path ============================= GRID ENABLED /dev/sdb1 FRA ENABLED /dev/sdc1 DATA ENABLED /dev/sdd1
Perform the above steps for the remainder of your nodes.
ASMFD Administration Commands (Under Construction)
Configure
As root:
export ORACLE_HOME=/u01/app/12.1.0.2/grid $ORACLE_HOME/bin/asmcmd afd_configure $ORACLE_HOME/bin/asmcmd afd_state
Set Discovery String
vi /etc/afd.conf afd_diskstring='/dev/sd*'
The above steps need to be done on all cluster servers.
Label Disks
$ORACLE_HOME/bin/asmcmd afd_label GRID /dev/sdb1 $ORACLE_HOME/bin/asmcmd afd_label FRA /dev/sdc1 $ORACLE_HOME/bin/asmcmd afd_label DATA /dev/sdd1
On All Other nodes Rescan Disks
[root]# $ORACLE_HOME/bin/asmcmd afd_scan [root]# $ORACLE_HOME/bin/asmcmd afd_lsdsk Connected to an idle instance. -------------------------------------------------------------------------------- Label Filtering Path ================================================================================ GRID DISABLED /dev/sdb1 FRA DISABLED /dev/sdc1 DATA DISABLED /dev/sdd1
Cluster Configuration Assistant
[grid]$ /u01/app/12.1.0.2/grid/crs/config/config.sh
Confirm Oracle Inventory OK
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
Examples
OPatch Update Example
Assuming you unzipped the latest in: /u01/orasw/OPatch.
cd /u01/orasw/OPatch mv /u01/app/12.1.0.2/grid/OPatch /u01/app/12.1.0.2/grid/zOPatch cp -a /u01/orasw/OPatch /u01/app/12.1.0.2/grid/ cd /u01/app/12.1.0.2/grid/OPatch ll
Database Proactive Bundle Patch Install Example
This example uses DBPB 24968615.
As root:
export ORACLE_HOME=/u01/app/12.1.0.2/grid export PATH=$ORACLE_HOME/OPatch:$PATH Do you have ample disk space for patch? df -h Set Environment export ORACLE_HOME=/u01/app/12.1.0.2/grid export PATH=$ORACLE_HOME/OPatch:$PATH cd <UNZIPPED_PATCH_LOCATION> cd /u01/orasw/DBBP/24968615 opatchauto apply /u01/orasw/DBBP/24968615 -oh $ORACLE_HOME
As grid user:
Did patch install OK? $ORACLE_HOME/OPatch/opatch lsinventory Run Conflict Checks $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/orasw/DBBP/24968615/24732088 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/orasw/DBBP/24968615/25101514 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/orasw/DBBP/24968615/24828643 $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/orasw/DBBP/24968615/21436941