Hi everyone, the goal here is to quickly show how to present new disks to ASM using the ASM Filter Driver (ASMFD).

My cluster has 2 nodes: london1 and london2.
From one of the nodes I list the shared disk that was just added:
[root@london1 ~]# ls -l /dev/sdf
brw-rw---- 1 root disk 8, 80 Jul 20 20:16 /dev/sdf
Notice that this disk is 12GB:
[root@london1 ~]# lsblk |grep sdf
sdf 8:80 0 12G 0 disk
This will be the disk I use to store my future database:
As the root user, let’s set the environment variables:
[root@london1 ~]# . oraenv
ORACLE_SID = [root] ? +ASM1
The Oracle base has been set to /u01/app/oracle
Before configuring Grid Infrastructure, the command we use is the following:
[root@london1 ~]# asmcmd afd_label DATA01 /dev/sdf --init
ASMCMD-9521: AFD is already configured
See that the command fails because ASMFD is already configured. So once the cluster has been created, as is the case here, you don’t need to use the “–init” parameter.
Let’s list the disks already presented:
[root@london1 ~]# asmcmd afd_lslbl
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
CONFIG01 /dev/sdb
CONFIG02 /dev/sdc
CONFIG03 /dev/sdd
CONFIG04 /dev/sde
So now let’s present our new disk by running the command correctly:
[root@london1 ~]# asmcmd afd_label DATA01 /dev/sdf
After presenting it, we list the disks again to see whether the previous operation succeeded:
[root@london1 ~]# asmcmd afd_lslbl
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
CONFIG01 /dev/sdb
CONFIG02 /dev/sdc
CONFIG03 /dev/sdd
CONFIG04 /dev/sde
DATA01 /dev/sdf
Great! The DATA01 disk is in the configuration and can now be used to create a new diskgroup or be added to an existing diskgroup.
See that it has the status “PROVISIONED”:
[root@london1 ~]# su - oracle
Last login: Thu Jul 20 20:31:52 BRT 2017
[oracle@london1 ~]$ . oraenv
ORACLE_SID = [orcl1] ? +ASM1
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@london1 ~]$ sqlplus / as sysasm
SQL*Plus: Release 12.2.0.1.0 Production on Thu Jul 20 20:32:30 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> select name, path, label, header_status from v$asm_disk;
SQL> set lin 200
SQL> col path for a30
SQL> select name, path, label, header_status from v$asm_disk;
NAME PATH LABEL HEADER_STATU
------------------------------ ------------------------------ ------------------------------- ------------
AFD:DATA01 DATA01 PROVISIONED
CONFIG01 AFD:CONFIG01 CONFIG01 MEMBER
CONFIG02 AFD:CONFIG02 CONFIG02 MEMBER
CONFIG03 AFD:CONFIG03 CONFIG03 MEMBER
CONFIG04 AFD:CONFIG04 CONFIG04 MEMBER
That’s all for now, folks. I hope it’s useful for you.
Hugs,
Franky

Comments