Prior to the Oracle Database 12c release, every node in a cluster used to run an ASM (Automatic Storage Management) instance and if an ASM instance failed on any node, then the database would become unavailable on that node. Let’s see how things are different with Flex ASM:
- Not all the nodes in the cluster need to run an ASM instance. Starting with 12c we can have ASM running on just a subset of nodes in the cluster. The nodes running ASM are known as Flex ASM nodes and the other nodes are referred to as ASM client nodes. ASM clients communicate with Flex ASM nodes to get the metadata and then get the data from the disk to the database instance.
- If ASM fails on a node on which it is running, Oracle automatically starts a replacement ASM instance on a different server based on the ASM cardinality set. The active Oracle 12c database instances that were relying on that ASM instance will reconnect to another surviving ASM instance on a different server without disruption.
In this article I will show you how to convert Standard ASM to Flex ASM using the command line interface. The main advantage of using the CLI to convert to Flex ASM is that it is a faster method than using the GUI. Moreover, many of the big enterprises don’t have access to GUI Mode, there we need to learn CLI method as well.
To do this, you must have your ASM configured in Oracle 12c or prior. You can check this using the following commands:
[grid@cloud-rac1 ~]$ asmcmd showclustermode
ASM cluster : Flex mode disabled
[grid@cloud-rac1 ~]$ asmcmd showclusterstate
Normal
[grid@cloud-rac1 ~]$ asmcmd showversion
ASM version : 12.1.0.2.0
[grid@cloud-rac1 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwASM
ASM listener: LISTENER
If you are in that state, then you can proceed with the commands below.
We need to know the name of network adapter.
[grid@cloud-rac1 ~]$ ifconfig -a
eth0 Link encap:Ethernet HWaddr C6:B0:BA:B1:B8:BA
inet addr:10.196.187.2 Bcast:10.196.187.3 Mask:255.255.255.252
UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1
RX packets:826898 errors:0 dropped:0 overruns:0 frame:0
TX packets:799778 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:653232940 (622.9 MiB) TX bytes:522017847 (497.8 MiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:229283 errors:0 dropped:0 overruns:0 frame:0
TX packets:229283 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:110916998 (105.7 MiB) TX bytes:110916998 (105.7 MiB)
As we check, eth0 has public interconnect without asm.
[grid@cloud-rac1 ~]$ oifcfg getif
eth0 * global cluster_interconnect,public
Now we invoke asmcain silent mode with the following set of parameters.
[grid@cloud-rac1 ~]$ asmca -silent -convertToFlexASM -asmNetworks eth0/10.196.187.0 -asmListenerPort 1521
To complete ASM conversion, run the following script as privileged user onthe node where you raised ASMCA with the root user; this node is called the "local node".
/u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
[opc@cloud-rac1 ~]$ sudo su - root
[root@cloud-rac1 ~]# /u01/app/grid/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
CRS-2673: Attempting to stop 'ora.crsd' on 'cloud-rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.testrac.db' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.REDO.dg' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.cvu' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.FRA.dg' on 'cloud-rac1'
CRS-2677: Stop of 'ora.cvu' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'cloud-rac2'
CRS-2677: Stop of 'ora.REDO.dg' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.FRA.dg' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'cloud-rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.cloud-rac1.vip' on 'cloud-rac1'
CRS-2677: Stop of 'ora.scan1.vip' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.cloud-rac1.vip' on 'cloud-rac1' succeeded
CRS-2676: Start of 'ora.cvu' on 'cloud-rac2' succeeded
CRS-2677: Stop of 'ora.testrac.db' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.data.data.acfs' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.fra.fra.acfs' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.redo.redo.acfs' on 'cloud-rac1'
CRS-2677: Stop of 'ora.redo.redo.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.REDO.REDO.advm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.REDO.REDO.advm' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.data.data.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.redo.redo.acfs' on 'cloud-rac1'
CRS-2677: Stop of 'ora.redo.redo.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.REDO.REDO.advm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.REDO.REDO.advm' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.data.data.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.redo.redo.acfs' on 'cloud-rac1'
CRS-2677: Stop of 'ora.redo.redo.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.REDO.REDO.advm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.REDO.REDO.advm' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.data.data.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.redo.redo.acfs' on 'cloud-rac1'
CRS-2677: Stop of 'ora.redo.redo.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.REDO.REDO.advm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.REDO.REDO.advm' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.data.data.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.DATA.DATA.advm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.DATA.DATA.advm' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.fra.fra.acfs' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.FRA.FRA.advm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.FRA.FRA.advm' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'cloud-rac1'
CRS-2677: Stop of 'ora.ons' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'cloud-rac1'
CRS-2677: Stop of 'ora.net1.network' on 'cloud-rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'cloud-rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'cloud-rac1'
CRS-2673: Attempting to stop 'ora.storage' on 'cloud-rac1'
CRS-2677: Stop of 'ora.storage' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'cloud-rac1'
CRS-2677: Stop of 'ora.ctssd' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'cloud-rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'cloud-rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'cloud-rac1'
CRS-2677: Stop of 'ora.cssd' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.evmd' on 'cloud-rac1'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'cloud-rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'cloud-rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'cloud-rac1'
CRS-2676: Start of 'ora.diskmon' on 'cloud-rac1' succeeded
CRS-2676: Start of 'ora.evmd' on 'cloud-rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.ctssd' on 'cloud-rac1'
CRS-2676: Start of 'ora.ctssd' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'cloud-rac1'
CRS-2676: Start of 'ora.ctssd' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'cloud-rac1'
CRS-2676: Start of 'ora.asm' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'cloud-rac1'
CRS-2676: Start of 'ora.storage' on 'cloud-rac1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'cloud-rac1'
CRS-2676: Start of 'ora.crsd' on 'cloud-rac1' succeeded
Oracle Grid Infrastructure restarted in node cloud-rac1
PRCC-1014 : ASMNET1LSNR_ASM was already running
PRCR-1004 : Resource ora.ASMNET1LSNR_ASM.lsnr is already running
PRCR-1079 : Failed to start resource ora.ASMNET1LSNR_ASM.lsnr
CRS-5702: Resource 'ora.ASMNET1LSNR_ASM.lsnr' is already running on 'cloud-rac1'
CRS-5702: Resource 'ora.ASMNET1LSNR_ASM.lsnr' is already running on 'cloud-rac2'
ASM listener ASMNET1LSNR_ASM running already
CRS-4405: The following nodes are unknown to Oracle High Availability Services:
cloud-rac2
CRS-4405: The following nodes are unknown to Oracle High Availability Services:
cloud-rac2
Oracle Grid Infrastructure restarted in node cloud-rac2
After completion of the script, you must verify the cluster mode.
[grid@cloud-rac1 ~]$ asmcmd showclustermode
ASM cluster : Flex mode enabled
[grid@cloud-rac1 ~]$ asmcmd showversion
ASM version : 12.1.0.2.0
[grid@cloud-rac1 ~]$ srvctl config asm
ASM home: <CRS home>
Password file: +DATA/orapwASM
ASM listener: LISTENER
ASM instance count: ALL
Cluster ASM listener: ASMNET1LSNR_ASM
[grid@cloud-rac1 ~]$
As we see now eth0 is also connected with asm listener.
[grid@cloud-rac1 ~]$ oifcfg getif
eth0 * global cluster_interconnect,public
eth0 10.196.187.0 global asm
As you can see, it is easy to convert Standard ASM to Flex ASM in Oracle 12c. Once you’ve converted to Flex ASM you don’t need worry about ASM failure on any node. And, you don’t need to be in GUI mode for this conversion.
Start the discussion at forums.toadworld.com