ASM Filter driver (ASMFD) is the replacement for ASMLIB but since there are not many good guides out there on how to use, a common approach is installing an old version of the kernel and keep using ASMLIB…. this is not great as introduces bugs/problems having and old version.

The goal of this page is how to install Oracle 19c GI (HAS=Standalone server) using directly ASMFD.

For this exercise we will use an Oracle Linux 8 and we will apply Oct 23 RU on grid.

[oracle@oraclelinux8 ~]$ uname -a
Linux oraclelinux8 5.15.0-205.149.5.1.el8uek.x86_64 #2 SMP Fri Apr 5 12:44:45 PDT 2024 x86_64 x86_64 x86_64 GNU/Linux
[oracle@oraclelinux8 ~]$ 
[oracle@oraclelinux8 ~]$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.9 (Ootpa)
[oracle@oraclelinux8 ~]$ 

Prepare GI home:

[oracle@oraclelinux8 ~]$ cd /u01/app/19c/grid
[oracle@oraclelinux8 grid]$ cp -p /tmp/LINUX.X64_193000_grid_home.zip .
[oracle@oraclelinux8 grid]$ unzip -q LINUX.X64_193000_grid_home.zip 
[oracle@oraclelinux8 grid]$ rm -rf OPatch/
[oracle@oraclelinux8 grid]$ cp -p /tmp/p6880880_190000_Linux-x86-64.zip .
[oracle@oraclelinux8 grid]$ unzip -q p6880880_190000_Linux-x86-64.zip 
[oracle@oraclelinux8 grid]$ ls -tlr *.zip
-rwxrwx---. 1 oracle oinstall 2889184573 Jun 26  2021 LINUX.X64_193000_grid_home.zip
-rwxrwx---. 1 oracle oinstall  127774864 Nov 21 14:08 p6880880_190000_Linux-x86-64.zip
[oracle@oraclelinux8 grid]$ rm *.zip
[oracle@oraclelinux8 grid]$ 

Apply RU patch:


[oracle@oraclelinux8 grid]$ pwd
/u01/app/19c/grid
[oracle@oraclelinux8 grid]$ export CV_ASSUME_DISTID=OEL7.8
[oracle@oraclelinux8 grid]$ ./gridSetup.sh -silent -applyRU /tmp/RU/35742441/35642822
Preparing the home to patch...
Applying the patch /tmp/RU/35742441/35642822...
Successfully applied the patch.
The log can be found at: /tmp/GridSetupActions2024-04-21_12-44-30PM/installerPatchActions_2024-04-21_12-44-30PM.log
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-40426] Grid installation option has not been specified.
   ACTION: Specify the valid installation option.
[oracle@oraclelinux8 grid]$ 

After applying RU, AFD is becomes supported and valid (Not with the bare 19c home):

[oracle@oraclelinux8 ~]$ cd /u01/app/19c/grid/bin
[oracle@oraclelinux8 bin]$ ./afddriverstate supported
AFD-9200: Supported
[oracle@oraclelinux8 bin]$ 
[oracle@oraclelinux8 bin]$ ./afdroot version_check
AFD-616: Valid AFD distribution media detected at: '/u01/app/19c/grid/usm/install/Oracle/EL8UEK/x86_64/5.15.0-0.30.19/5.15.0-0.30.19-x86_64/bin'
[oracle@oraclelinux8 bin]$ 

Lets format the disks we want to use:

[root@oraclelinux8 ~]# lsblk --list | egrep "sdc|sdb"
sdb       8:16   0   50G  0 disk 
sdc       8:32   0   20G  0 disk 
[root@oraclelinux8 ~]# 


[root@oraclelinux8 ~]# ls -tlr /dev/sd[b,c]
brw-rw----. 1 root disk 8, 32 Apr 21 17:02 /dev/sdc
brw-rw----. 1 root disk 8, 16 Apr 21 17:02 /dev/sdb
[root@oraclelinux8 ~]# 


[root@oraclelinux8 ~]# fdisk /dev/sdc

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x4ecb8c87.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-41943039, default 41943039): 

Created a new partition 1 of type 'Linux' and of size 20 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@oraclelinux8 ~]# 

**do the same for the second disk

[root@oraclelinux8 ~]# lsblk --list | egrep "sdc|sdb"
sdb       8:16   0   50G  0 disk 
sdb1      8:17   0   50G  0 part 
sdc       8:32   0   20G  0 disk 
sdc1      8:33   0   20G  0 part 
[root@oraclelinux8 ~]# 

Label the disks:

[root@oraclelinux8 bin]# export ORACLE_BASE=/u01/app
[root@oraclelinux8 bin]# ./asmcmd afd_label DATA1 /dev/sdb1 --init
Creating diag directory /u01/app/diag
[root@oraclelinux8 bin]# ./asmcmd afd_label FRA1 /dev/sdc1 --init 
[root@oraclelinux8 bin]# 


[root@oraclelinux8 bin]# ./asmcmd afd_lslbl
Could not open pfile '/etc/oracleafd.conf'--------------------------------------------------------------------------------
Label                     Duplicate  Path
================================================================================
DATA1                                 /dev/sdb1
FRA1                                  /dev/sdc1
[root@oraclelinux8 bin]# 

** the "could not open pfile" is normal as this is a clean install

Run preinstall cheks:

[oracle@oraclelinux8 ~]$ cd /u01/app/19c/grid
[oracle@oraclelinux8 grid]$ export CV_ASSUME_DISTID=OEL7.8
[oracle@oraclelinux8 grid]$ ./runcluvfy.sh stage -pre crsinst -n oraclelinux8 -verbose

** fix anything needed to be fix.

Create response file:

[oracle@oraclelinux8 ~]$ cat /u01/app/19c/grid/install/response/gridINSTALL.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v19.0.0
INVENTORY_LOCATION=/u01/app/oraInventory
oracle.install.option=HA_CONFIG
ORACLE_BASE=/u01/app/grid
oracle.install.asm.OSDBA=oinstall
oracle.install.asm.OSOPER=asmdba
oracle.install.asm.OSASM=asmdba
oracle.install.crs.config.scanType=LOCAL_SCAN
oracle.install.crs.config.SCANClientDataFile=
oracle.install.crs.config.gpnp.scanName=
oracle.install.crs.config.gpnp.scanPort=
oracle.install.crs.config.ClusterConfiguration=STANDALONE
oracle.install.crs.config.configureAsExtendedCluster=false
oracle.install.crs.config.memberClusterManifestFile=
oracle.install.crs.config.clusterName=
oracle.install.crs.config.gpnp.configureGNS=false
oracle.install.crs.config.autoConfigureClusterNodeVIP=false
oracle.install.crs.config.gpnp.gnsOption=CREATE_NEW_GNS
oracle.install.crs.config.gpnp.gnsClientDataFile=
oracle.install.crs.config.gpnp.gnsSubDomain=
oracle.install.crs.config.gpnp.gnsVIPAddress=
oracle.install.crs.config.sites=
oracle.install.crs.config.clusterNodes=
oracle.install.crs.config.networkInterfaceList=
oracle.install.crs.configureGIMR=false
oracle.install.asm.configureGIMRDataDG=false
oracle.install.crs.config.storageOption=
oracle.install.crs.config.sharedFileSystemStorage.votingDiskLocations=
oracle.install.crs.config.sharedFileSystemStorage.ocrLocations=
oracle.install.crs.config.useIPMI=false
oracle.install.crs.config.ipmi.bmcUsername=
oracle.install.crs.config.ipmi.bmcPassword=
oracle.install.asm.SYSASMPassword=Oracle123
oracle.install.asm.diskGroup.name=DATA
oracle.install.asm.diskGroup.redundancy=EXTERNAL
oracle.install.asm.diskGroup.AUSize=4
oracle.install.asm.diskGroup.FailureGroups=
#oracle.install.asm.diskGroup.disksWithFailureGroupNames=/dev/sdb1
oracle.install.asm.diskGroup.disks=/dev/sdb1
oracle.install.asm.diskGroup.quorumFailureGroupNames=
oracle.install.asm.diskGroup.diskDiscoveryString=/dev/sd*
oracle.install.asm.monitorPassword=Oracle123
oracle.install.asm.gimrDG.name=
oracle.install.asm.gimrDG.redundancy=
oracle.install.asm.gimrDG.AUSize=1
oracle.install.asm.gimrDG.FailureGroups=
oracle.install.asm.gimrDG.disksWithFailureGroupNames=
oracle.install.asm.gimrDG.disks=
oracle.install.asm.gimrDG.quorumFailureGroupNames=
oracle.install.asm.configureAFD=true
oracle.install.crs.configureRHPS=false
oracle.install.crs.config.ignoreDownNodes=false
oracle.install.config.managementOption=NONE
oracle.install.config.omsHost=
oracle.install.config.omsPort=0
oracle.install.config.emAdminUser=
oracle.install.config.emAdminPassword=
oracle.install.crs.rootconfig.executeRootScript=false
oracle.install.crs.rootconfig.configMethod=
oracle.install.crs.rootconfig.sudoPath=
oracle.install.crs.rootconfig.sudoUserName=
oracle.install.crs.config.batchinfo=
oracle.install.crs.app.applicationAddress=
oracle.install.crs.deleteNode.nodes=
[oracle@oraclelinux8 ~]$ 

Install GRID:

[oracle@oraclelinux8 ~]$ cd /u01/app/19c/grid
[oracle@oraclelinux8 grid]$ export CV_ASSUME_DISTID=OEL7.8
[oracle@oraclelinux8 grid]$ ./gridSetup.sh -silent -responseFile /u01/app/19c/grid/install/response/gridINSTALL.rsp -ignorePrereqFailure
Launching Oracle Grid Infrastructure Setup Wizard...

[WARNING] [INS-41808] Possible invalid choice for OSASM Group.
   CAUSE: The name of the group you selected for the OSASM group is commonly used to grant other system privileges (For example: asmdba, asmoper, dba, oper).
   ACTION: Oracle recommends that you designate asmadmin as the OSASM group.
[WARNING] [INS-41812] OSOPER and OSASM are the same OS group.
   CAUSE: The chosen values for OSOPER group and the chosen value for OSASM group are the same.
   ACTION: Select an OS group that is unique for ASM administrators. The OSASM group should not be the same as the OS groups that grant privileges for Oracle ASM access, or for database administration.
The response file for this session can be found at:
 /u01/app/19c/grid/install/response/grid_2024-04-21_05-41-37PM.rsp

You can find the log of this install session at:
 /tmp/GridSetupActions2024-04-21_05-41-37PM/gridSetupActions2024-04-21_05-41-37PM.log

As a root user, execute the following script(s):
  1. /u01/app/oraInventory/orainstRoot.sh
  2. /u01/app/19c/grid/root.sh

Execute /u01/app/19c/grid/root.sh on the following nodes: 
[oraclelinux8]

ROOT scripts:

[root@oraclelinux8 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@oraclelinux8 ~]# 


[root@oraclelinux8 ~]# /u01/app/19c/grid/root.sh
Check /u01/app/19c/grid/install/root_oraclelinux8_2024-04-21_19-20-20-389362326.log for the output of root script
[root@oraclelinux8 ~]# 

**check logs for errors.

ExecConfigTools:

[oracle@oraclelinux8 ~]$ /u01/app/19c/grid/gridSetup.sh -executeConfigTools -responseFile /u01/app/19c/grid/install/response/gridINSTALL.rsp -silent
Launching Oracle Grid Infrastructure Setup Wizard...

You can find the logs of this session at:
/u01/app/oraInventory/logs/GridSetupActions2024-04-21_07-30-01PM

You can find the log of this install session at:
 /u01/app/oraInventory/logs/UpdateNodeList2024-04-21_07-30-01PM.log
Successfully Configured Software.
[oracle@oraclelinux8 ~]$ 

Check status:

[oracle@oraclelinux8 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       oraclelinux8             STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       oraclelinux8             STABLE
ora.asm
               ONLINE  ONLINE       oraclelinux8             Started,STABLE
ora.ons
               OFFLINE OFFLINE      oraclelinux8             STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
      1        ONLINE  ONLINE       oraclelinux8             STABLE
ora.diskmon
      1        OFFLINE OFFLINE                               STABLE
ora.driver.afd
      1        ONLINE  ONLINE       oraclelinux8             STABLE
ora.evmd
      1        ONLINE  ONLINE       oraclelinux8             STABLE
--------------------------------------------------------------------------------
[oracle@oraclelinux8 ~]$ 

Create second diskgroup FRA:

col name for a20
col path for a10
col library for a50
set lines 120
select group_number, name, path, library from v$asm_disk;

GROUP_NUMBER NAME                 PATH       LIBRARY
------------ -------------------- ---------- --------------------------------------------------
     0                            AFD:FRA1   AFD Library - Generic , version 3 (KABI_V3)
     1 DATA1                      AFD:DATA1  AFD Library - Generic , version 3 (KABI_V3)
SQL> 

[oracle@oraclelinux8 ~]$ asmca -silent -createDiskGroup -diskGroupName FRA -disk 'AFD:FRA*' -redundancy EXTERNAL -au_size 4 
[DBT-30001] Disk groups created successfully. Check /u01/app/grid/cfgtoollogs/asmca/asmca-240421PM100623.log for details.
[oracle@oraclelinux8 ~]$ 

[oracle@oraclelinux8 ~]$ crsctl stat res -t -w "NAME co .dg"
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
               ONLINE  ONLINE       oraclelinux8             STABLE
ora.FRA.dg
               ONLINE  ONLINE       oraclelinux8             STABLE
--------------------------------------------------------------------------------
[oracle@oraclelinux8 ~]$ 

SQL> select name, total_mb from v$asm_diskgroup;

NAME       TOTAL_MB
---------- ----------
DATA       51196
FRA        20476

Now…. what about if we want to add a new disk to a diskgroup?

[oracle@oraclelinux8 ~]$ lsblk --list | egrep "sdc|sdb|sdd"
sdb       8:16   0   50G  1 disk 
sdb1      8:17   0   50G  1 part 
sdc       8:32   0   20G  1 disk 
sdc1      8:33   0   20G  1 part 
sdd       8:48   0   20G  0 disk  <<-- new disk added
[oracle@oraclelinux8 ~]$ 


first create partition:

[root@oraclelinux8 ~]# fdisk /dev/sdd

Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x55b5dd5d.

Command (m for help): n
Partition type
   p   primary (0 primary, 0 extended, 4 free)
   e   extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): 
First sector (2048-41943039, default 2048): 
Last sector, +sectors or +size{K,M,G,T,P} (2048-41943039, default 41943039): 

Created a new partition 1 of type 'Linux' and of size 20 GiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.

[root@oraclelinux8 ~]# 

Label new disk:

[oracle@oraclelinux8 ~]$ lsblk --list | egrep "sdc|sdb|sdd"
sdb       8:16   0   50G  1 disk 
sdb1      8:17   0   50G  1 part 
sdc       8:32   0   20G  1 disk 
sdc1      8:33   0   20G  1 part 
sdd       8:48   0   20G  0 disk 
sdd1      8:49   0   20G  0 part 
[oracle@oraclelinux8 ~]$ 

[root@oraclelinux8 ~]# . oraenv
ORACLE_SID = [root] ? +ASM
The Oracle base has been set to /u01/app/grid
[root@oraclelinux8 ~]#  asmcmd afd_label FRA2 /dev/sdd1 
[root@oraclelinux8 ~]#


[root@oraclelinux8 ~]# asmcmd afd_lslbl
--------------------------------------------------------------------------------
Label                     Duplicate  Path
================================================================================
DATA1                                 /dev/sdb1
FRA1                                  /dev/sdc1
FRA2                                  /dev/sdd1
[root@oraclelinux8 ~]# 

Add to asm as sysasm:

col name for a20
col path for a10
col library for a50
set lines 120
select group_number, name, path, library from v$asm_disk;

GROUP_NUMBER NAME                 PATH       LIBRARY
------------ -------------------- ---------- --------------------------------------------------
     0                            AFD:FRA2   AFD Library - Generic , version 3 (KABI_V3)
     1 DATA1                      AFD:DATA1  AFD Library - Generic , version 3 (KABI_V3)
     2 FRA1                       AFD:FRA1   AFD Library - Generic , version 3 (KABI_V3)

SQL> 


[oracle@oraclelinux8 ~]$ asmcmd lsdsk --candidate -p
Group_Num  Disk_Num      Incarn  Mount_Stat  Header_Stat  Mode_Stat  State   Path
        0         0           0  CLOSED      PROVISIONED  ONLINE     NORMAL  AFD:FRA2
[oracle@oraclelinux8 ~]$ 


SQL> alter diskgroup FRA add disk 'AFD:FRA2';
Diskgroup altered.
SQL> 

col name for a20
col path for a10
col library for a50
set lines 120
select group_number, name, path, library from v$asm_disk;

GROUP_NUMBER NAME                 PATH       LIBRARY
------------ -------------------- ---------- --------------------------------------------------
     1       DATA1                AFD:DATA1  AFD Library - Generic , version 3 (KABI_V3)
     2       FRA1                 AFD:FRA1   AFD Library - Generic , version 3 (KABI_V3)
     2       FRA2                 AFD:FRA2   AFD Library - Generic , version 3 (KABI_V3)

SQL> 

SQL> select name, total_mb from v$asm_diskgroup;

NAME		       TOTAL_MB
-------------------- ----------
DATA			  51196
FRA			  40952 <<-- space added

That’s it! Next one will be on how to do the same on a RAC enviroment as I could not find anything straigh forward.

Last modified: 22 April 2024

Author

Comments

Write a Reply or Comment

Your email address will not be published.