oracledba.help works great on your mobile device too!

oracledba.help

ASM Filter Driver Configuration

<- SpecialTopics

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. For detailed ASMFD info go here.

Generally this operation only needs to be done on first node for a RAC. Other nodes will be configured as required during the GI install.

Before preceding make sure your disks are partitioned at the OS level. Oracle recommends creating exactly one partition for each disk. See fdisk.

After ASMFD is configured, if the system is reboot before the GI\ASM has been installed you will have to remove (AKA unlabel) and re-provision the disks configured for ASMFD.

TOC

Install Files for GI

su -
mkdir -p /u01/app/12.2.0.1/grid
copy linuxx64_12201_grid_home.zip to /u01/app/12.2.0.1/grid 
chown grid:oinstall /u01/app/12.2.0.1/grid
chown grid:oinstall /u01/app/12.2.0.1/grid/linuxx64_12201_grid_home.zip

su - grid
cd /u01/app/12.2.0.1/grid
unzip -q linuxx64_12201_grid_home.zip

Provision Disks for ASMFD

Log file: /var/log/messages

Perform as the root user:

 1. Set Env
    su -
    export ORACLE_HOME=/u01/app/12.2.0.1/grid
    export ORACLE_BASE=/tmp

 2. Provision Disks Using ASMCMD
    cd $ORACLE_HOME/bin
    ./asmcmd afd_label DISK01 /dev/sdb --init
    ./asmcmd afd_label DISK02 /dev/sdc --init
    ./asmcmd afd_label DISK03 /dev/sdd --init
    ./asmcmd afd_label DISK04 /dev/sde --init

 3. Verify
    ./asmcmd afd_lslbl '/dev/sd*'
    Label   Duplicate  Path
    ===========================
    DISK01             /dev/sdb
    DISK02             /dev/sdc
    DISK03             /dev/sdd
    DISK04             /dev/sde

    ls -alrt /dev/oracleafd/disks/*

    -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK01
    -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK02
    -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK03
    -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK04

If adding a disk later dont use the --init option.
Example: ./asmcmd afd_label DISK04 /dev/sde

Status

Perform as root user.
ls -alrt /dev/oracleafd/disks/*

 -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK01
 -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK02
 -rwxrwx--- 1 grid oinstall 22 Mar 27 10:44 /dev/oracleafd/disks/DISK03

export ORACLE_HOME=/u01/app/12.2.0.1/grid
$ORACLE_HOME/bin/asmcmd afd_lslbl '/dev/sd*'

 Label   Duplicate  Path
 ===========================
 DISK01             /dev/sdb
 DISK02             /dev/sdc
 DISK03             /dev/sdd

$ORACLE_HOME/bin/asmcmd afd_state

 ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'lnx01'

Unlabel (if needed)

cd $ORACLE_HOME/bin
./asmcmd help afd_unlabel

./asmcmd afd_unlabel DISK01 -f --init
./asmcmd afd_unlabel '/dev/sdb' -f --init

./asmcmd afd_lslbl '/dev/sd*'
ls -alrt /dev/oracleafd/disks/*

Then to relabel it use this form (as it is already initialized):
./asmcmd afd_label DISK01 /dev/sdb

Common Errors

ASMCMD-9521: AFD is already configured

In most cases this occurs when adding a disk after the GI has been installed. Simply issue the command without the --init option.

Example:

 ./asmcmd afd_label DISK04 /dev/sde