I must thank my fellow DBA Franky Weber Faust for his publication in his blog.

This article provides the information to create new disks to ASM using ASMFD.

In my cluster, I have 2 nodes: london1 and london2.

From one of the ready nodes the newly added shared disk:

[root@london1 ~]# ls -l /dev/sdf
brw-rw---- 1 root disk 8, 80 Jul 20 20:16 /dev/sdf

Note that this disk has 12GB:

[root@london1 ~]# lsblk |grep sdf
sdf 8:80 0 12G 0 disk

This will be the disk that I will use to store my future database:

With the root user let’s define 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 as follows:

[root@london1 ~]# asmcmd afd_label DATA01 /dev/sdf --init
ASMCMD-9521: AFD is already configured

Notice that the command fails because ASMFD is already configured, so after the cluster is already created, as is the case here, it is not necessary to use the -init parameter.

Let’s list the discs already presented:

[root@london1 ~]# asmcmd afd_lslbl
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
CONFIG01 /dev/sdb
CONFIG02 /dev/sdc
CONFIG03 /dev/sdd
CONFIG04 /dev/sde

So let’s introduce our new disk now by executing the command correctly:

[root@london1 ~]# asmcmd afd_label DATA01 /dev/sdf

Once we’ve listed the discs again to see if there was any success in the previous operation:

[root@london1 ~]# asmcmd afd_lslbl
--------------------------------------------------------------------------------
Label Duplicate Path
================================================================================
CONFIG01 /dev/sdb
CONFIG02 /dev/sdc
CONFIG03 /dev/sdd
CONFIG04 /dev/sde
DATA01 /dev/sdf

The DATA01 disk is present in the configuration and can already be used to create a new diskgroup or add 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

About The Author

Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.