<<Back to Oracle ASM Main Page
What is Oracle ASM Filter Driver (ASMFD)
Oracle ASM Filter Driver (ASMFD) is an alternate of ASMLib. It is a kernel module that resides in the I/O path of the Oracle ASM disks. Starting 12.1.0.2, ASMFD can be used instead of ASMLib for the ASM disks management. Oracle ASM Filter Driver (Oracle ASMFD) is installed with an Oracle Grid Infrastructure installation (RAC as well as Standalone). I already have ASMLib configured on my server and I want to move to using ASMFD.In this article I will explain how to migrate from ASMLib to ASMFD.
Migrating from ASMLib to Oracle ASM Filter Driver (ASMFD):GI Standalone Environment
Note:- The procedure requires downtime
As root user, check the current status of oracle ASMLib
# oracleasm status
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
Checking if ASM is loaded: yes
Checking if /dev/oracleasm is mounted: yes
As root user, find out the list of all current disks being used by ASM.
# oracleasm listdisks
WDTESTDB_DATA
WDTESTDB_FRA
WDTESTDB_DATA
WDTESTDB_FRA
As root user, find the disk device used by the ASM Disks
# oracleasm querydisk -p WDTESTDB_DATA
Disk "WDTESTDB_DATA" is a valid ASM disk
/dev/xvdc1: LABEL="WDTESTDB_DATA" TYPE="oracleasm"
# oracleasm querydisk -p WDTESTDB_FRA
Disk "WDTESTDB_FRA" is a valid ASM disk
/dev/xvdd1: LABEL="WDTESTDB_FRA" TYPE="oracleasm"
Disk "WDTESTDB_DATA" is a valid ASM disk
/dev/xvdc1: LABEL="WDTESTDB_DATA" TYPE="oracleasm"
# oracleasm querydisk -p WDTESTDB_FRA
Disk "WDTESTDB_FRA" is a valid ASM disk
/dev/xvdd1: LABEL="WDTESTDB_FRA" TYPE="oracleasm"
As you can see I have 2 disk WDTESTDB_DATA (/dev/xvdc1) and WDTESTDB_FRA (/dev/xvdd1) right now that I will migrate to ASMFD.
As grid user
$ export ORACLE_SID=+ASM
$ export ORACLE_HOME=/u01/oracle/grid_122
$ export PATH=$PATH:$ORACLE_HOME/bin
$ export ORACLE_HOME=/u01/oracle/grid_122
$ export PATH=$PATH:$ORACLE_HOME/bin
Check ASM instance is running
$ srvctl status asm
ASM is running on wdtest05
ASM is running on wdtest05
Check ASM instance is running with spfile
$ asmcmd spget
+WDTESTDB_DATA/ASM/ASMPARAMETERFILE/registry.253.965663197
+WDTESTDB_DATA/ASM/ASMPARAMETERFILE/registry.253.965663197
Check ASM diskstring configuration
$ asmcmd dsget
parameter:/dev/oracleasm/disks/*
profile:/dev/oracleasm/disks/*
parameter:/dev/oracleasm/disks/*
profile:/dev/oracleasm/disks/*
To configure AFD AFD:* must be included in the asm_diskstring parameter
$ asmcmd dsset '/dev/oracleasm/disks/*','AFD:*'
Check current diskstring parameter setting
$ asmcmd dsget
parameter:/dev/oracleasm/disks/*, AFD:*
profile:/dev/oracleasm/disks/*,AFD:*
parameter:/dev/oracleasm/disks/*, AFD:*
profile:/dev/oracleasm/disks/*,AFD:*
check state of ASMFD
$ asmcmd afd_state
ASMCMD-9530: The AFD state is 'NOT SUPPORTED'
ASMCMD-9530: The AFD state is 'NOT SUPPORTED'
Stop the database, ASM and has
$srvctl stop database -db WDTESTDB
$srvctl stop asm -f
$srvctl stop asm -f
As root user
# crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'wdtest05'
CRS-2673: Attempting to stop 'ora.evmd' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.WDTESTDB_FRA.dg' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.WDTESTDB_DATA.dg' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'wdtest05'
CRS-2677: Stop of 'ora.WDTESTDB_DATA.dg' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.WDTESTDB_FRA.dg' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'wdtest05'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.evmd' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.asm' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'wdtest05'
CRS-2677: Stop of 'ora.cssd' on 'wdtest05' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'wdtest05' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Stop acfsload service
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'wdtest05'
CRS-2673: Attempting to stop 'ora.evmd' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.WDTESTDB_FRA.dg' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.WDTESTDB_DATA.dg' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'wdtest05'
CRS-2677: Stop of 'ora.WDTESTDB_DATA.dg' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.WDTESTDB_FRA.dg' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'wdtest05'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.evmd' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.asm' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'wdtest05'
CRS-2677: Stop of 'ora.cssd' on 'wdtest05' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'wdtest05' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Stop acfsload service
$GRID_HOME/bin/acfsload
stop
Configure AFD
Configure AFD
# 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.
Check the AFD status now
# asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'wdtest05'
Start has and acfsload
# crsctl start has
CRS-4123: Oracle High Availability Services has been started.
# acfsload start
ACFS-9391: Checking for existing ADVM/ACFS installation.
ACFS-9392: Validating ADVM/ACFS installation files for operating system.
ACFS-9393: Verifying ASM Administrator setup.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9322: completed
Do ensure to remove ASMLib
#rpm -q oracleasm-support
# rpm -e oracleasm-support-2.1.11-1.el7.x86_64
Validate the content of /etc/oracleafd.conf. Should look like below
$cat /etc/oracleafd.conf
afd_diskstring='/dev/xvd*'
afd_filtering=enable
Validate the content of /etc/afd.conf. If file does not exists create it.Should look like below
$ cat /etc/afd.conf
afd_diskstring='/dev/xvd*'
afd_filtering=enable
Restart acfsload and has on the node. It should fix the problem.
#acfsload stop
#acfsload start
# lsmod | grep acfs
oracleacfs 4616192 0
oracleoks 655360 2 oracleacfs,oracleadvm
# crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'wdtest05'
CRS-2673: Attempting to stop 'ora.evmd' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.asm' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'wdtest05'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.evmd' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.asm' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'wdtest05'
CRS-2677: Stop of 'ora.cssd' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'wdtest05'
CRS-2677: Stop of 'ora.driver.afd' on 'wdtest05' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'wdtest05' has completed
CRS-4133: Oracle High Availability Services has been stopped.
# crsctl start has
CRS-4123: Oracle High Availability Services has been started.
Only if you are using 12.1.0.2, as root user, migrate all your disk(s) to ASMFD. Perform following step for this.
# asmcmd afd_label WDTESTDB_FRA /dev/xvdd1 --migrate
Validate disk availability $ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 30719 25340 0 25340 0 N WDTESTDB_DATA/
MOUNTED EXTERN N 512 512 4096 1048576 30719 30665 0 30665 0 N WDTESTDB_FRA/
$ asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
WDTESTDB_DATA ENABLED /dev/xvdc1
WDTESTDB_FRA ENABLED /dev/xvdd1
$ ls -lrt /dev/oracleafd/disks/
-rw-r--r-- 1 oracle dba 11 May 31 17:53 WDTESTDB_FRA
-rw-r--r-- 1 oracle dba 11 May 31 17:53 WDTESTDB_DATA
Now since you are migrated to AFD modify the asm_diskstring to discover only AFD disks
$ asmcmd dsget
parameter:/dev/oracleasm/disks/*, AFD:*
profile:/dev/oracleasm/disks/*,AFD:*
$ asmcmd dsset 'AFD:*'
Lastly validate all the disks are using ASMFD Library :- (Login into ASM instance as sysasm)
SQL>set linesize 300
col PATH for a20
col LIBRARY for a45
col NAME for a15
select inst_id,group_number grp_num,name,state,header_status header,mount_status mount,path, library
from gv$asm_disk order by inst_id,group_number,name;
INST_ID GRP_NUM NAME STATE HEADER MOUNT PATH LIBRARY
---------- ---------- -------------------- -------- ------------ ------- -------------------- ---------------------------------------------
1 1 WDTESTDB_DATA_0000 NORMAL MEMBER CACHED AFD:WDTESTDB_DATA AFD Library - Generic , version 3 (KABI_V3)
1 2 WDTESTDB_FRA_0000 NORMAL MEMBER CACHED AFD:WDTESTDB_FRA AFD Library - Generic , version 3 (KABI_V3)
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.
Check the AFD status now
# asmcmd afd_state
ASMCMD-9526: The AFD state is 'LOADED' and filtering is 'ENABLED' on host 'wdtest05'
Start has and acfsload
# crsctl start has
CRS-4123: Oracle High Availability Services has been started.
# acfsload start
ACFS-9391: Checking for existing ADVM/ACFS installation.
ACFS-9392: Validating ADVM/ACFS installation files for operating system.
ACFS-9393: Verifying ASM Administrator setup.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9154: Loading 'oracleoks.ko' driver.
ACFS-9154: Loading 'oracleadvm.ko' driver.
ACFS-9154: Loading 'oracleacfs.ko' driver.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9156: Detecting control device '/dev/asm/.asm_ctl_spec'.
ACFS-9156: Detecting control device '/dev/ofsctl'.
ACFS-9322: completed
Do ensure to remove ASMLib
#rpm -q oracleasm-support
# rpm -e oracleasm-support-2.1.11-1.el7.x86_64
Validate the content of /etc/oracleafd.conf. Should look like below
$cat /etc/oracleafd.conf
afd_diskstring='/dev/xvd*'
afd_filtering=enable
Validate the content of /etc/afd.conf. If file does not exists create it.Should look like below
$ cat /etc/afd.conf
afd_diskstring='/dev/xvd*'
afd_filtering=enable
Restart acfsload and has on the node. It should fix the problem.
#acfsload stop
#acfsload start
# lsmod | grep acfs
oracleacfs 4616192 0
oracleoks 655360 2 oracleacfs,oracleadvm
# crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'wdtest05'
CRS-2673: Attempting to stop 'ora.evmd' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.asm' on 'wdtest05'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'wdtest05'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.evmd' on 'wdtest05' succeeded
CRS-2677: Stop of 'ora.asm' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'wdtest05'
CRS-2677: Stop of 'ora.cssd' on 'wdtest05' succeeded
CRS-2673: Attempting to stop 'ora.driver.afd' on 'wdtest05'
CRS-2677: Stop of 'ora.driver.afd' on 'wdtest05' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'wdtest05' has completed
CRS-4133: Oracle High Availability Services has been stopped.
# crsctl start has
CRS-4123: Oracle High Availability Services has been started.
Only if you are using 12.1.0.2, as root user, migrate all your disk(s) to ASMFD. Perform following step for this.
# asmcmd afd_label WDTESTDB_FRA /dev/xvdd1 --migrate
Validate disk availability $ asmcmd lsdg
State Type Rebal Sector Logical_Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 512 4096 1048576 30719 25340 0 25340 0 N WDTESTDB_DATA/
MOUNTED EXTERN N 512 512 4096 1048576 30719 30665 0 30665 0 N WDTESTDB_FRA/
$ asmcmd afd_lsdsk
--------------------------------------------------------------------------------
Label Filtering Path
================================================================================
WDTESTDB_DATA ENABLED /dev/xvdc1
WDTESTDB_FRA ENABLED /dev/xvdd1
$ ls -lrt /dev/oracleafd/disks/
-rw-r--r-- 1 oracle dba 11 May 31 17:53 WDTESTDB_FRA
-rw-r--r-- 1 oracle dba 11 May 31 17:53 WDTESTDB_DATA
Now since you are migrated to AFD modify the asm_diskstring to discover only AFD disks
$ asmcmd dsget
parameter:/dev/oracleasm/disks/*, AFD:*
profile:/dev/oracleasm/disks/*,AFD:*
$ asmcmd dsset 'AFD:*'
Lastly validate all the disks are using ASMFD Library :- (Login into ASM instance as sysasm)
SQL>set linesize 300
col PATH for a20
col LIBRARY for a45
col NAME for a15
select inst_id,group_number grp_num,name,state,header_status header,mount_status mount,path, library
from gv$asm_disk order by inst_id,group_number,name;
INST_ID GRP_NUM NAME STATE HEADER MOUNT PATH LIBRARY
---------- ---------- -------------------- -------- ------------ ------- -------------------- ---------------------------------------------
1 1 WDTESTDB_DATA_0000 NORMAL MEMBER CACHED AFD:WDTESTDB_DATA AFD Library - Generic , version 3 (KABI_V3)
1 2 WDTESTDB_FRA_0000 NORMAL MEMBER CACHED AFD:WDTESTDB_FRA AFD Library - Generic , version 3 (KABI_V3)
Comments
Post a Comment