Flex ASM configuration in Oracle 12c
This article speaks of how Flex ASM is configured and the advantage of having it. Flex ASM feature was introduced in 12c which allows the ASM instance to run on different node and not intended to run on each of the nodes in the cluster. This is configured based on the cardinality of the ASM. In versions prior to 12c, the ASM instance needed to be run on each of the nodes of the cluster. If the ASM instance was unable to start on any of the nodes, then the associated database instances too could not be started. But, from 12c, this is no more a concern.
Let’s see how Flex ASM can be configured and how it works.
Environment:
RAC nodes : 12cnode1, 12cnode2, 12cnode3 Cluster version: 12.1.0.2 Database Name: srprim Instance Name: srprim1 on 12cnode1, srprim2 on 12cnode2, srprim3 on 12cnode3 OS Platform: OEL 6
Below shows the list of nodes within the cluster.
[oracle@12cnode1 ~]$ olsnodes 12cnode1 12cnode2 12cnode3 [oracle@12cnode1 ~]$
Check the Cluster mode through ASMCMD. It’s obvious that Flex mode would be disabled.
[oracle@12cnode1 ~]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode disabled
Flex ASM requires a separate listener called ASMLISTENER to be configured on a different port number which is not being used by any other Listener. The other important thing is that FLEX ASM requires a separate network with which the ASM instances and it’s clients communicate. You can also make use of the private network ethernet (used for inter node communication) as the network for the ASM instances and it’s clients to communicate. In my case, I’m using the private network itself as ASM network too.
We now need to convert the Normal ASM to FlexASM. This can be done via ASMCA utility. Here I’m doing this using “ASMCA” in silent mode and not through GUI.
The options passed to ASMCA are:
-silent: to run in silent mode -convertToFlexASM : to convert to FlexASM -asmNetworks: ASM Network to be used in the form of "interface_name/Subnet" -asmListenerPort: ASM Listener Port number to be used
Run this command on one node of the cluster.
[oracle@12cnode1 ~]$ asmca -silent -convertToFlexASM -asmNetworks eth1/192.168.1.0 -asmListenerPort 1526 To complete ASM conversion, run the following script as privileged user in local node. /u01/app/oracle/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
Once done, as directed we need to run the “converttoFlexASM.sh” script as ROOT user on the node where ASMCA was run.
This script configures ASM NET LISTENER on all the nodes of the cluster as well as stops and starts all cluster resources on all the nodes of the cluster sequentially.
[root@12cnode1 ~]# /u01/app/oracle/cfgtoollogs/asmca/scripts/converttoFlexASM.sh CRS-2673: Attempting to stop 'ora.crsd' on '12cnode1' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on '12cnode1' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on '12cnode1' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on '12cnode1' CRS-2673: Attempting to stop 'ora.FRA.dg' on '12cnode1' CRS-2673: Attempting to stop 'ora.DATA.dg' on '12cnode1' CRS-2673: Attempting to stop 'ora.mgmtdb' on '12cnode1' CRS-2673: Attempting to stop 'ora.srprim.db' on '12cnode1' CRS-2677: Stop of 'ora.FRA.dg' on '12cnode1' succeeded CRS-2677: Stop of 'ora.DATA.dg' on '12cnode1' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.12cnode1.vip' on '12cnode1' CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.scan1.vip' on '12cnode1' CRS-2677: Stop of 'ora.12cnode1.vip' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.12cnode1.vip' on '12cnode3' CRS-2677: Stop of 'ora.mgmtdb' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.MGMTLSNR' on '12cnode1' CRS-2677: Stop of 'ora.scan1.vip' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.scan1.vip' on '12cnode3' CRS-2677: Stop of 'ora.MGMTLSNR' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.MGMTLSNR' on '12cnode3' CRS-2677: Stop of 'ora.srprim.db' on '12cnode1' succeeded CRS-2676: Start of 'ora.12cnode1.vip' on '12cnode3' succeeded CRS-2676: Start of 'ora.scan1.vip' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on '12cnode3' CRS-2676: Start of 'ora.MGMTLSNR' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.mgmtdb' on '12cnode3' CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on '12cnode3' succeeded CRS-2676: Start of 'ora.mgmtdb' on '12cnode3' succeeded CRS-2673: Attempting to stop 'ora.ons' on '12cnode1' CRS-2677: Stop of 'ora.ons' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on '12cnode1' CRS-2677: Stop of 'ora.net1.network' on '12cnode1' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on '12cnode1' has completed CRS-2677: Stop of 'ora.crsd' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on '12cnode1' CRS-2673: Attempting to stop 'ora.evmd' on '12cnode1' CRS-2673: Attempting to stop 'ora.storage' on '12cnode1' CRS-2677: Stop of 'ora.storage' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.asm' on '12cnode1' CRS-2677: Stop of 'ora.ctssd' on '12cnode1' succeeded CRS-2677: Stop of 'ora.evmd' on '12cnode1' succeeded CRS-2677: Stop of 'ora.asm' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on '12cnode1' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on '12cnode1' CRS-2677: Stop of 'ora.cssd' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.evmd' on '12cnode1' CRS-2672: Attempting to start 'ora.cssdmonitor' on '12cnode1' CRS-2676: Start of 'ora.evmd' on '12cnode1' succeeded CRS-2676: Start of 'ora.cssdmonitor' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.cssd' on '12cnode1' CRS-2672: Attempting to start 'ora.diskmon' on '12cnode1' CRS-2676: Start of 'ora.diskmon' on '12cnode1' succeeded CRS-2676: Start of 'ora.cssd' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on '12cnode1' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on '12cnode1' CRS-2676: Start of 'ora.ctssd' on '12cnode1' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.asm' on '12cnode1' CRS-2676: Start of 'ora.asm' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.storage' on '12cnode1' CRS-2676: Start of 'ora.storage' on '12cnode1' succeeded CRS-2672: Attempting to start 'ora.crsd' on '12cnode1' CRS-2676: Start of 'ora.crsd' on '12cnode1' succeeded Oracle Grid Infrastructure restarted in node 12cnode1 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 '12cnode2' CRS-5702: Resource 'ora.ASMNET1LSNR_ASM.lsnr' is already running on '12cnode1' CRS-5702: Resource 'ora.ASMNET1LSNR_ASM.lsnr' is already running on '12cnode3' ASM listener ASMNET1LSNR_ASM running already CRS-2673: Attempting to stop 'ora.crsd' on '12cnode2' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on '12cnode2' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on '12cnode2' CRS-2673: Attempting to stop 'ora.cvu' on '12cnode2' CRS-2673: Attempting to stop 'ora.oc4j' on '12cnode2' CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on '12cnode2' CRS-2673: Attempting to stop 'ora.srprim.db' on '12cnode2' CRS-2677: Stop of 'ora.cvu' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.cvu' on '12cnode1' CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on '12cnode2' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on '12cnode2' succeeded CRS-2677: Stop of 'ora.srprim.db' on '12cnode2' succeeded CRS-2673: Attempting to stop 'ora.12cnode2.vip' on '12cnode2' CRS-2677: Stop of 'ora.12cnode2.vip' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.12cnode2.vip' on '12cnode3' CRS-2676: Start of 'ora.12cnode2.vip' on '12cnode3' succeeded CRS-2676: Start of 'ora.cvu' on '12cnode1' succeeded CRS-2677: Stop of 'ora.oc4j' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.oc4j' on '12cnode1' CRS-2673: Attempting to stop 'ora.DATA.dg' on '12cnode2' CRS-2673: Attempting to stop 'ora.FRA.dg' on '12cnode2' CRS-2677: Stop of 'ora.DATA.dg' on '12cnode2' succeeded CRS-2677: Stop of 'ora.FRA.dg' on '12cnode2' succeeded CRS-2676: Start of 'ora.oc4j' on '12cnode1' succeeded CRS-2673: Attempting to stop 'ora.ons' on '12cnode2' CRS-2677: Stop of 'ora.ons' on '12cnode2' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on '12cnode2' CRS-2677: Stop of 'ora.net1.network' on '12cnode2' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on '12cnode2' has completed CRS-2677: Stop of 'ora.crsd' on '12cnode2' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on '12cnode2' CRS-2673: Attempting to stop 'ora.evmd' on '12cnode2' CRS-2673: Attempting to stop 'ora.storage' on '12cnode2' CRS-2677: Stop of 'ora.storage' on '12cnode2' succeeded CRS-2673: Attempting to stop 'ora.asm' on '12cnode2' CRS-2677: Stop of 'ora.evmd' on '12cnode2' succeeded CRS-2677: Stop of 'ora.ctssd' on '12cnode2' succeeded CRS-2677: Stop of 'ora.asm' on '12cnode2' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on '12cnode2' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on '12cnode2' succeeded CRS-2673: Attempting to stop 'ora.cssd' on '12cnode2' CRS-2677: Stop of 'ora.cssd' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.cssdmonitor' on '12cnode2' CRS-2672: Attempting to start 'ora.evmd' on '12cnode2' CRS-2676: Start of 'ora.evmd' on '12cnode2' succeeded CRS-2676: Start of 'ora.cssdmonitor' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.cssd' on '12cnode2' CRS-2672: Attempting to start 'ora.diskmon' on '12cnode2' CRS-2676: Start of 'ora.diskmon' on '12cnode2' succeeded CRS-2676: Start of 'ora.cssd' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.ctssd' on '12cnode2' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on '12cnode2' CRS-2676: Start of 'ora.ctssd' on '12cnode2' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.asm' on '12cnode2' CRS-2676: Start of 'ora.asm' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.storage' on '12cnode2' CRS-2676: Start of 'ora.storage' on '12cnode2' succeeded CRS-2672: Attempting to start 'ora.crsd' on '12cnode2' CRS-2676: Start of 'ora.crsd' on '12cnode2' succeeded Oracle Grid Infrastructure restarted in node 12cnode2 CRS-2673: Attempting to stop 'ora.crsd' on '12cnode3' CRS-2677: Stop of 'ora.crsd' on '12cnode3' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on '12cnode3' CRS-2673: Attempting to stop 'ora.evmd' on '12cnode3' CRS-2673: Attempting to stop 'ora.storage' on '12cnode3' CRS-2677: Stop of 'ora.storage' on '12cnode3' succeeded CRS-2673: Attempting to stop 'ora.asm' on '12cnode3' CRS-2677: Stop of 'ora.evmd' on '12cnode3' succeeded CRS-2677: Stop of 'ora.ctssd' on '12cnode3' succeeded CRS-2675: Stop of 'ora.asm' on '12cnode3' failed CRS-2679: Attempting to clean 'ora.asm' on '12cnode3' CRS-2681: Clean of 'ora.asm' on '12cnode3' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on '12cnode3' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on '12cnode3' succeeded CRS-2673: Attempting to stop 'ora.cssd' on '12cnode3' CRS-2677: Stop of 'ora.cssd' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.evmd' on '12cnode3' CRS-2672: Attempting to start 'ora.cssdmonitor' on '12cnode3' CRS-2676: Start of 'ora.evmd' on '12cnode3' succeeded CRS-2676: Start of 'ora.cssdmonitor' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.cssd' on '12cnode3' CRS-2672: Attempting to start 'ora.diskmon' on '12cnode3' CRS-2676: Start of 'ora.diskmon' on '12cnode3' succeeded CRS-2676: Start of 'ora.cssd' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.ctssd' on '12cnode3' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on '12cnode3' CRS-2676: Start of 'ora.ctssd' on '12cnode3' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.asm' on '12cnode3' CRS-2676: Start of 'ora.asm' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.storage' on '12cnode3' CRS-2676: Start of 'ora.storage' on '12cnode3' succeeded CRS-2672: Attempting to start 'ora.crsd' on '12cnode3' CRS-2676: Start of 'ora.crsd' on '12cnode3' succeeded Oracle Grid Infrastructure restarted in node 12cnode3 [root@12cnode1 ~]#
Now that the execution of the “converttoFlexASM.sh” script is completed, let’s check the cluster mode.
We should see as “Flex mode enabled”.
[oracle@12cnode1 ~]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode enabled
Let’s check the configuration of the ASM listener. It’s clear below that the ASM cluster listener is configured on port 1526 and subnet that was specified while running ASMCA.
[oracle@12cnode1 ~]$ srvctl config listener -l ASMNET1LSNR_ASM Name: ASMNET1LSNR_ASM Type: ASM Listener Owner: oracle Subnet: 192.168.1.0 Home: <CRS home> End points: TCP:1526 Listener is enabled. Listener is individually enabled on nodes: Listener is individually disabled on nodes: [oracle@12cnode1 ~]$
Let’s check the status of this listener. It needs to be running on all the nodes of the cluster.
[oracle@12cnode1 ~]$ [oracle@12cnode1 ~]$ srvctl status listener -l ASMNET1LSNR_ASM Listener ASMNET1LSNR_ASM is enabled Listener ASMNET1LSNR_ASM is running on node(s): 12cnode3,12cnode2,12cnode1
Also, we shall check the configuration of the ASM to check the cardinality and see if the cluster ASM listener is being listed.
[oracle@12cnode1 ~]$ srvctl config asm ASM home: <CRS home> Password file: +DATA/orapwASM ASM listener: LISTENER ASM instance count: 3 Cluster ASM listener: ASMNET1LSNR_ASM [oracle@12cnode1 ~]$
We see that ASM cardinality has been set to 3. Since this is a 3 node cluster and in order to check the functionality of FlexASM, I would change the cardinality of ASM to 2. By doing so, only 2 ASM instances will have to run.
[oracle@12cnode1 ~]$ srvctl modify asm -count 2 [oracle@12cnode1 ~]$ [oracle@12cnode1 ~]$ srvctl config asm ASM home: <CRS home> Password file: +DATA/orapwASM ASM listener: LISTENER ASM instance count: 2 Cluster ASM listener: ASMNET1LSNR_ASM
We can see below that ASM is running only on 2 nodes (12cnode1 and 12cnode3) and no ASM instance is running on 12cnode2.
[oracle@12cnode1 ~]$ srvctl status asm ASM is running on 12cnode3,12cnode1
Since ASM is not running on node 12cnode2, let’s check if the associated database instance is running on node 12cnode2 or not.
[oracle@12cnode3 ~]$ srvctl status database -db srprim -v -f Instance srprim1 is running on node 12cnode1. Instance status: Open. Instance srprim2 is running on node 12cnode2. Instance status: Open. Instance srprim3 is running on node 12cnode3. Instance status: Open.
We can notice above that all the instances of database “srprim” are running on all the 3 nodes of the cluster which means that there is no impact seen on the associated database instance even if ASM is not running on a particular node.
So now, that ASM is not running on 12cnode2 but database instance “srprim2” is running, we need to figure out which ASM instance is used by database instance “srprim2”.
Let’s check this from ASM3 instance: (anyways I’m using “gv$” views-so can be run on any ASM instance that’s running)
SQL> select adg.name,adg.state,ac.instance_name,ac.db_name,adg.inst_id,ac.status,ac.cluster_name from gv$asm_diskgroup adg,gv$asm_client ac where adg.GROUP_NUMBER=ac.GROUP_NUMBER and adg.inst_id=ac.inst_id and ac.db_name='srprim' and adg.name='DATA' order by adg.inst_id; NAME STATE INSTANCE_NAME DB_NAME INST_ID STATUS CLUSTER_NAME --------------- ----------- -------------------- -------- ---------- ------------ ------------------------------- DATA MOUNTED srprim1 srprim 1 CONNECTED node12c-scan DATA MOUNTED srprim3 srprim 3 CONNECTED node12c-scan DATA MOUNTED srprim2 srprim 3 CONNECTED node12c-scan
It’s very clear from above that “srprim2” instance is being served by ASM instance 3 on node “12cnode3”. In other words, ASM instance 3 has 2 clients — 1. srprim2 from 12cnode2 and srprim3 from 12cnode3.
The same can be viewed from the alert log file of ASM3 instance:
NOTE: Flex client id 0x0 [srprim3:srprim:node12c-scan] attempting to connect NOTE: registered owner id 0x10002 for srprim3:srprim:node12c-scan NOTE: Flex client srprim3:srprim:node12c-scan registered, osid 23500, mbr 0x0, asmb 23305 (reg:4024785090) NOTE: client srprim3:srprim:node12c-scan mounted group 1 (DATA) NOTE: client srprim3:srprim:node12c-scan mounted group 2 (FRA) Sat Feb 25 12:28:03 2017 NOTE: Flex client id 0x0 [srprim2:srprim:node12c-scan] attempting to connect NOTE: registered owner id 0x10003 for srprim2:srprim:node12c-scan NOTE: Flex client srprim2:srprim:node12c-scan registered, osid 23757, mbr 0x0, asmb 24702 (reg:1349866226) NOTE: client srprim2:srprim:node12c-scan mounted group 1 (DATA) NOTE: client srprim2:srprim:node12c-scan mounted group 2 (FRA)
COPYRIGHT
© Shivananda Rao P, 2012 to 2018. Unauthorized use and/or duplication of this material without express and written permission from this blog’s author and/or owner is strictly prohibited. Excerpts and links may be used, provided that full and clear credit is given to Shivananda Rao and http://www.shivanandarao-oracle.com with appropriate and specific direction to the original content.
DISCLAIMER
The views expressed here are my own and do not necessarily reflect the views of any other individual, business entity, or organisation. The views expressed by visitors on this blog are theirs solely and may not reflect mine
Leave a Reply