Oracle Flex ASM and Flex Cluster
Oracle RAC 12c introduces two new concepts:
Central nodes: Like previous versions, they are interconnected through private networks and have direct access to shared storage. These nodes have direct access to Oracle Cluster Registry (OCR) and Voting Disk (VD).
Leaf nodes: These nodes are lightweight nodes that are not interconnected with each other and cannot access shared storage like central nodes. Each leaf node communicates with the connected central node and connects to the cluster through the connected central node.
This topology allows loosely coupled application servers to form a cluster with tightly coupled database servers. Closely coupled servers are central servers that share the storage of databases, OCR s and voting devices with other central servers in the cluster and communicate with each other on a peer-to-peer basis. Loosely coupled servers are leaf servers, which form a loose communication relationship with a single central server in the cluster. They do not need to share storage with other central servers or leaf servers in the cluster, nor need to communicate with them equally, but only with the associated central servers. In 12.1.0.1, leaf servers are designed to improve the high availability of applications and achieve multi-tier resource management.
Before Oracle 12c, for database instances to use ASM, the ASM instances on all nodes must be running before starting the database instances. If the ASM instance is not running, it means that the database instance using ASM at the storage level cannot be started. This actually means that no matter what technology (RAC, ASM, and shared storage) is used, database instances cannot be accessed.
With the introduction of Oracle 12c, a feature called Oracle Flex ASM lifted the above restrictions, and one of its main features was failover to other nodes in the cluster. Essentially a central and leaf architecture, Oracle Clusterware seamlessly transfers the connection of the failed node to another member node through an alternative ASM instance. The number of ASM instances running in a given cluster is called the ASM cardinality, with a default value of 3. However, this base value can be modified using the Clusterware command.
Oracle Flex Cluster
Architecturally speaking, Oracle Flex cluster includes a central and leaf architecture, in which only the central node can directly access Oracle Cluster Registry (OCR) and Voting Disk (VD). However, applications can access databases through leaf nodes without running ASM instances on leaf nodes. Connecting to the database through the central node makes it transparent to the application.
Figure 1: A typical Oracle Flex cluster is depicted, which consists of four leaf nodes and two central nodes. Simply put, Oracle Flex clusters require Oracle Flex ASM.
Implementation of Oracle Flex ASM
Oracle Flex ASM can be implemented in two ways:
-
Pure 12c Flex ASM (same version)
Grid Infrasctructure (GI) and database are running on Oracle 12c
-
Mixed versions before Oracle 12c (different versions)
As usual, ASM instances will run on each node, and Flex configuration supports databases up to 12c. The compatibility parameters of ASM disk group are used to manage the compatibility among database instances. The advantage of this method is that if the Oracle 12c database instance is disconnected from an ASM instance, the database connection will fail over to another ASM instance on another server. This fault handover can be achieved by setting the cardinality to all.
Oracle RAC 12c using Oracle Flex ASM
Standard Oracle Flex ASM configuration:
ASM instance failure on Oracle Flex ASM configuration:
1. Log on to RAC database instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ hostname oel6-112-rac1.localdomain
2. Check the status of ASM instances and RAC database instances
[oracle@oel6-112-rac1 Desktop]$ ps -ef | grep pmon oracle 3325 1 0 17:39 ? 00:00:00 asm_pmon_+ASM1 oracle 3813 1 0 17:40 ? 00:00:00 mdb_pmon_-MGMTDB oracle 5806 1 0 17:42 ? 00:00:00 ora_pmon_orcl1 oracle 6193 1 0 17:42 ? 00:00:00 apx_pmon_+APX1
3. Check the status of ASM instances in RAC database instances from instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ srvctl status asm ASM is running on oel6-112-rac2,oel6-112-rac1
4. Check cluster status in Example 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ crsctl check cluster CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online
5. Commands to check whether Oracle Flex ASM is enabled (rac1)
[oracle@oel6-112-rac1 Desktop]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode enabled ASMCMD> showclusterstate Normal
6. Commands to change the ASM cardinality (rac1)
[oracle@oel6-112-rac1 Desktop]$ srvctl status asm -detail ASM is running on oel6-112-rac2,oel6-112-rac1 ASM is enabled. [oracle@oel6-112-rac1 Desktop]$ srvctl config asm -detail ASM home: /u01/app/12.1.0/grid Password file: +DATA/orapwASM ASM listener: LISTENER ASM is enabled. ASM instance count: 3 Cluster ASM listener: ASMNET1LSNR_ASM
7. Commands to check whether Oracle Flex ASM is enabled (rac2)
[oracle@oel6-112-rac2 Desktop]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode enabled ASMCMD> showclusterstate Normal ASMCMD> exit
8. How to change the ASM cardinality (rac2)
[oracle@oel6-112-rac2 Desktop]$ srvctl config asm -detail ASM home: /u01/app/12.1.0/grid Password file: +DATA/orapwASM ASM listener: LISTENER ASM is enabled. ASM instance count: 3 Cluster ASM listener: ASMNET1LSNR_ASM
9. Close ASM instance in RAC database instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ srvctl stop asm -node oel6-112-rac1 -stopoption abort -force
10. Check the status of ASM instances in RAC database instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ srvctl status asm PRCR-1070 : Failed to check if resource ora.asm is registered Cannot communicate with crsd
11. Check the status of cluster services in RAC database instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ crsctl check cluster CRS-4535: Cannot communicate with Cluster Ready Services CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online
12. Check the status of ASM and RAC databases in Example 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ ps -ef | grep pmon oracle 3813 1 0 17:40 ? 00:00:00 mdb_pmon_-MGMTDB oracle 5806 1 0 17:42 ? 00:00:00 ora_pmon_orcl1 oracle 6193 1 0 17:42 ? 00:00:00 apx_pmon_+APX1
Note: Here, the database instance is associated with a specific ASM instance running in a particular node. If, for some reason, the ASM instance cannot start / service shutdown, the database instance can still start, because the database instance will look for the ASM instance running in the same cluster. Figure 3 depicts the high availability features of Flex ASM.
13. Check the status of running RAC database instances without ASM instances in RAC database instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ . oraenv ORACLE_SID = [orcl1] ? orcl1 ORACLE_HOME = [/home/oracle] ? /u01/app/oracle/product/12.1.0/db_1 The Oracle base remains unchanged with value /u01/app/oracle
14. Log in to the database instance from RAC database instance 1 (rac1)
[oracle@oel6-112-rac1 Desktop]$ sqlplus /nolog SQL*Plus: Release 12.1.0.1.0 Production on Wed Sep 25 18:24:36 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. SQL> connect sys/oracle@orcl as sysdba Connected. SQL> select instance_name,instance_number from gv$instance; INSTANCE_NAME INSTANCE_NUMBER ------------------------------------------- orcl2 2 orcl1 1 SQL> select instance_name,instance_number from v$instance; INSTANCE_NAME INSTANCE_NUMBER ------------------------------------------- orcl2 2 SQL> connect sys/oracle@orcl as sysdba Connected. SQL> select instance_name,instance_number from gv$instance; INSTANCE_NAME INSTANCE_NUMBER ------------------------------------------- orcl1 1
15. ASM instance connecting RAC database instance 1 (rac1) to RAC database instance 2 (rac2)
[oracle@oel6-112-rac1 Desktop]$ . oraenv ORACLE_SID = [orcl1] ? +ASM2 ORACLE_HOME = [/home/oracle] ? /u01/app/12.1.0/grid The Oracle base remains unchanged with value /u01/app/oracle [oracle@oel6-112-rac1 Desktop]$ asmcmd --privilege sysasm --inst +ASM2 ASMCMD> lsdg State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name MOUNTED EXTERN N 512 4096 1048576 15342 4782 0 4782 0 Y DATA/ ASMCMD>
Summary: The database instance uses a dedicated ASM instance, which we force to stop working to simulate failures, so the database instance reconnects to an existing ASM instance on another node (rac2 in this example).
Oracle Database 11.2 or earlier versions
As mentioned in the previous introduction to Oracle 12c, ASM's association with database instances is essentially specific. This means that if an ASM instance cannot be started, the associated database instance in the node/ASM cannot be started, which results in the database being inaccessible.
1. Log on to RAC database instance 1 (rac1)
login as: oracle oracle@192.168.xx.xx's password: Last login: Fri Sep 27 06:05:44 2013
2. Check the status of ASM instances and RAC database instances:
[oracle@rac1 ~]$ ps -ef | grep pmon oracle 3053 1 0 05:56 ? 00:00:00 asm_pmon_+ASM1 oracle 3849 1 0 05:57 ? 00:00:00 ora_pmon_flavia1
3. Check the status of ASM instances in RAC database instance 1 (rac1)
[oracle@rac1 ~]$ srvctl status asm ASM is running on rac2,rac1
4. Check the status of the cluster in RAC database instance 1 (rac1)
[oracle@rac1 ~]$ crsctl check cluster CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online
5. Stop ASM instance in RAC database instance 1 (rac1)
[oracle@rac1 ~]$ srvctl stop asm -n rac1 -o abort -f
6. Check the status of ASM instances in RAC database instance 1 (rac1)
[oracle@rac1 ~]$ srvctl status asm ASM is running on rac2
7. Check the status of ASM instances and RAC database instances (rac1)
[oracle@rac1 ~]$ ps -ef | grep pmon oracle 7885 5795 0 06:20 pts/0 00:00:00 grep pmon
Summary: Database instances are strongly associated with ASM instances. If the ASM instance fails, the database instance on the same node will also fail.
Why use Oracle Flex ASM
Oracle Flex ASM supports Oracle Database 12c clients to use larger LUN sizes.
The maximum number of disk groups supported is 511.
The ASM disk in the disk group can be renamed flexibly.
-
Patch-level verification of ASM instances
Disable patch level validation during rolling patches
Copying physical metadata
Network Enhancement in Oracle Flex ASM
-
In earlier versions, clustering required:
A Public Network for Client Application Access
One or more dedicated networks for inter-node communication (including ASM communication) within a cluster
Flex ASM adds an ASM network that can be used to communicate between ASM and its clients in order to isolate and distribute ASM communications.
Deployment of Flex ASM
Below is a screen shot of the Flex ASM installer.
Select the option "Advanced Installation"
-
-
There are three storage options:
Standard ASM Oracle Flex ASM Non-ASM managed storage- Recommend
- ASM configuration mode before 12c
-
-
Manage Flex ASM:
No Flex ASM-specific instance parameters are required
-
ASM server instance uses automatic memory management (AMM)
Transfer: http://www.oracle.com/technetwork/cn/articles/database/flexasm-flexcluster-benefits-odb12c-2177371-zhs.html
Oracle 18c Flex ASM Functional Test
1. Flex ASM description
Oracle introduces the Oracle Flex ASM feature in 12c, which enables ASM instances and database instances to run on different nodes, instead of the previous ASM instances having to run on the same node as the database instances. That is to say, when the ASM instance on a node hangs up, the database instance on it can also run normally.
In Oracle 12c, you also need to choose whether to enable Oracle Flex Cluster and Flex ASM when creating a database, but in 18c, the default is Flex Cluster and Flex ASM, no longer need to choose. The following figure shows how to use ASMCA tools to convert ordinary ASM instances into Flex ASM in 12C.
2. Flex ASM testing
Because Flex ASM is the default in Oracle 18c. So we test this function directly in RAC environment.
2.1 Current RAC environment
[grid@www.cndba.cn ~]$ crsctl stat res -t -------------------------------------------------------------------------------- Name Target State Server State details -------------------------------------------------------------------------------- Local Resources -------------------------------------------------------------------------------- ora.ASMNET1LSNR_ASM.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.DATA.dg ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.LISTENER.lsnr ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.MGMT.GHCHKPT.advm OFFLINE OFFLINE rac1 STABLE OFFLINE OFFLINE rac2 STABLE ora.MGMT.dg ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.OCR.dg ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.helper OFFLINE OFFLINE rac1 IDLE,STABLE OFFLINE OFFLINE rac2 IDLE,STABLE ora.mgmt.ghchkpt.acfs OFFLINE OFFLINE rac1 STABLE OFFLINE OFFLINE rac2 STABLE ora.net1.network ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.ons ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE ora.proxy_advm ONLINE ONLINE rac1 STABLE ONLINE ONLINE rac2 STABLE -------------------------------------------------------------------------------- Cluster Resources -------------------------------------------------------------------------------- ora.LISTENER_SCAN1.lsnr 1 ONLINE ONLINE rac2 STABLE ora.MGMTLSNR 1 ONLINE ONLINE rac2 169.254.11.39 192.16 8.56.101,STABLE ora.asm 1 ONLINE ONLINE rac1 Started,STABLE 2 ONLINE ONLINE rac2 Started,STABLE 3 OFFLINE OFFLINE STABLE ora.cndba.db 1 ONLINE ONLINE rac2 Open,HOME=/u01/app/o racle/product/18.3.0 /db_1,STABLE 2 ONLINE ONLINE rac1 Open,HOME=/u01/app/o racle/product/18.3.0 /db_1,STABLE ora.cvu 1 ONLINE ONLINE rac2 STABLE ora.mgmtdb 1 ONLINE ONLINE rac2 Open,STABLE ora.qosmserver 1 ONLINE ONLINE rac2 STABLE ora.rac1.vip 1 ONLINE ONLINE rac1 STABLE ora.rac2.vip 1 ONLINE ONLINE rac2 STABLE ora.rhpserver 1 OFFLINE OFFLINE STABLE ora.scan1.vip 1 ONLINE ONLINE rac2 STABLE -------------------------------------------------------------------------------- [grid@www.cndba.cn ~]$ [grid@www.cndba.cn ~]$ srvctl -version srvctl version: 18.0.0.0.0 [grid@www.cndba.cn ~]$ crsctl check cluster CRS-4537: Cluster Ready Services is online CRS-4529: Cluster Synchronization Services is online CRS-4533: Event Manager is online [grid@rac1 ~]$
2.2 View instance information in Flex ASM
[grid@www.cndba.cn ~]$ asmcmd showclustermode ASM cluster : Flex mode enabled - Direct Storage Access [grid@www.cndba.cn ~]$ asmcmd showclusterstate Normal [grid@www.cndba.cn ~]$ [grid@www.cndba.cn ~]$ srvctl status asm -detail ASM is running on rac1,rac2 ASM is enabled. ASM instance +ASM1 is running on node rac1 Number of connected clients: 3 Client names: +APX1:+APX:rac cndba1:cndba:rac rac1:_OCR:rac ASM instance +ASM2 is running on node rac2 Number of connected clients: 4 Client names: +APX2:+APX:rac -MGMTDB:_mgmtdb:rac cndba2:cndba:rac rac2:_OCR:rac [grid@www.cndba.cn ~]$ [grid@www.cndba.cn ~]$ srvctl config asm -detail ASM home: <CRS home> Password file: +OCR/orapwASM Backup of Password file: ASM listener: LISTENER ASM is enabled. ASM is individually enabled on nodes: ASM is individually disabled on nodes: ASM instance count: 3 Cluster ASM listener: ASMNET1LSNR_ASM [grid@www.cndba.cn ~]$
2.3 Simulated ASM Instance Faults
SQL>select instance_name,instance_number from gv$instance; INSTANCE_NAME INSTANCE_NUMBER -------------------------------- --------------- cndba1 1 cndba2 2 [grid@www.cndba.cn ~]$ srvctl status database -d cndba -detail Instance cndba1 is running on node rac1 Instance cndba1 is connected to ASM instance +ASM1 Instance cndba2 is running on node rac2 Instance cndba2 is connected to ASM instance +ASM2
Close the ASM instance on Node 1
[grid@www.cndba.cn ~]$ ps -ef|grep pmon grid 8425 12500 0 09:00 pts/2 00:00:00 grep --color=auto pmon oracle 15875 1 0 06:19 ? 00:00:00 ora_pmon_cndba1 grid 27886 1 0 05:21 ? 00:00:00 asm_pmon_+ASM1 grid 29346 1 0 05:21 ? 00:00:00 apx_pmon_+APX1 [grid@www.cndba.cn ~]$ srvctl stop asm -node rac1 -stopoption abort -force [grid@www.cndba.cn ~]$ ps -ef|grep pmon grid 8620 12500 0 09:00 pts/2 00:00:00 grep --color=auto pmon oracle 15875 1 0 06:19 ? 00:00:00 ora_pmon_cndba1 grid 29346 1 0 05:21 ? 00:00:00 apx_pmon_+APX1 [grid@www.cndba.cn ~]$
At this point, the ASM instance runs only on node 2:
[grid@www.cndba.cn ~]$ srvctl status asm ASM is running on rac2 [grid@www.cndba.cn ~]$ srvctl status database -d cndba -detail Instance cndba1 is running on node rac1 Instance cndba1 is connected to ASM instance +ASM2 Instance cndba2 is running on node rac2 Instance cndba2 is connected to ASM instance +ASM2 [grid@www.cndba.cn ~]$ srvctl status asm -detail ASM is running on rac2 ASM is enabled. ASM instance +ASM2 is running on node rac2 Number of connected clients: 6 Client names: +APX1:+APX:rac +APX2:+APX:rac -MGMTDB:_mgmtdb:rac cndba1:cndba:rac cndba2:cndba:rac rac2:_OCR:rac [grid@www.cndba.cn ~]$
We can see that the db instance on this node 1 is also running on + ASM2.
However, the database instance on node 1 is running normally:
SQL> select instance_name,instance_number from gv$instance; INSTANCE_NAME INSTANCE_NUMBER -------------------------------- --------------- cndba1 1 cndba2 2
Start the ASM instance on Node 1 and restore to its original state:
[grid@www.cndba.cn ~]$ srvctl start asm -node rac1 [grid@www.cndba.cn ~]$ srvctl status asm -detail ASM is running on rac1,rac2 ASM is enabled. ASM instance +ASM1 is running on node rac1 Number of connected clients: 3 Client names: +APX1:+APX:rac cndba1:cndba:rac rac1:_OCR:rac ASM instance +ASM2 is running on node rac2 Number of connected clients: 4 Client names: +APX2:+APX:rac -MGMTDB:_mgmtdb:rac cndba2:cndba:rac rac2:_OCR:rac [grid@www.cndba.cn ~]$ [grid@www.cndba.cn ~]$ srvctl status database -d cndba -detail Instance cndba1 is running on node rac1 Instance cndba1 is connected to ASM instance +ASM1 Instance cndba2 is running on node rac2 Instance cndba2 is connected to ASM instance +ASM2
Experiments show that the unexpected shutdown/startup of an ASM instance of any node will not affect the state of the database on that node, which greatly enhances the high availability of RAC.
Configuration and Conversion of Flex ASM
Starting from 12c, Flex ASM features are introduced to allow RAC nodes to access remote ASM instances without running ASM instances themselves.
Generally in Flex cluster, the central node runs the ASM instance, and the leaf node remotely accesses the central node's ASM instance.
But central nodes can also access ASM instances of other nodes without running ASM instances; in addition, standard clusters can also enable Flex ASM.
Because of the status of remote access to ASM instances through the network, ASM network is also formed. ASM network can be shared with Private network, that is, ASM & Private network, which can be specified in the installation interface.
Confirm the current ASM status
Click (here) to fold or open
$ asmcmd showclustermode
ASM cluster : Flex mode disabled
The above description is standard ASM.
Run asmca and convert ASM to Flex ASM. Here are some screenshots of the steps.
Unlike Public, ASM's subnet will not be able to use the same port number as Public.
Running the script shown above with root user will restart CRS for all nodes in the cluster
Finally, confirm the current cluster model
Click (here) to fold or open
$ asmcmd showclustermode
ASM cluster : Flex mode enabled
# The latter two items come from Flex ASM
$ srvctl config asm
ASM home: <CRS home>
Password file: +OCRV/orapwASM
ASM listener: LISTENER
ASM instance count: ALL
Cluster ASM listener: ASMNET1LSNR_ASM
View ASM listeners
Click (here) to fold or open
$ lsnrctl status ASMNET1LSNR_ASM
LSNRCTL for Linux : Version 12 . 1 . . 2 . 0 - Production on 01 - JUN - 2016 15 : 08 : 11
Copyright ( c ) 1991 , 2014 , Oracle . All rights reserved .
Connecting to ( DESCRIPTION = ( ADDRESS = ( PROTOCOL = IPC ) ( KEY = ASMNET1LSNR_ASM ) ) )
STATUS of the LISTENER
- - - - - - - - - - - - - - - - - - - - - - - -
Alias ASMNET1LSNR_ASM
Version TNSLSNR for Linux : Version 12 . 1 . . 2 . 0 - Production
Start Date 01 - JUN - 2016 15 : 02 : 46
Uptime 0 days 0 hr . 5 min . 24 sec
Trace Level off
Security ON : Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/12 . 1 . 0/grid/network/admin/listener . ora
Listener Log File /u01/app/grid/diag/tnslsnr/node2/asmnet1lsnr_asm/alert/log . xml
Listening Endpoints Summary . . .
( DESCRIPTION = ( ADDRESS = ( PROTOCOL = ipc ) ( KEY = ASMNET1LSNR_ASM ) ) )
( DESCRIPTION = ( ADDRESS = ( PROTOCOL = tcp ) ( HOST = 10 . 1 . 1 . 2 ) ( PORT = 1522 ) ) )
Services Summary . . .
Service "+ASM" has 2 instance ( s ) .
Instance "+ASM1" , status READY , has 1 handler ( s ) for this service . . .
Instance "+ASM2" , status READY , has 2 handler ( s ) for this service . . .
The command completed successfully
How 12c Converts Standard ASM to Flex ASM
What is Flex ASM?
We know that in previous versions of 12c, ASM instances need to run at each node, while ASM clients (Database, ACFS, ADVM) can only access local ASM instances. If Oracle Flex ASM is used, the situation is different. ASM clients can access remote ASM instances through ASM networks. If a node running an ASM instance is down, the Oracle cluster will start a new ASM instance on another node to maintain its Cardinality. Similarly, if a 12C Database instance connects to an ASM instance and the ASM instance crash drops or the instance runs incorrectly, the instance of the Database will try to reconnect to an existing ASM instance on another node, which is Oracle Flex ASM.
The difference between Flex Cluster and Flex ASM
Flex Cluster needs Flex ASM support
Flex ASM can run in Standard Cluster and Flex Cluster
How to control the number of ASM instances
[orgrid@ohs1 ~]$ srvctl modify asm -count 2 [orgrid@ohs1 ~]$ srvctl config asm ASM home: <CRS home> Password file: +SYSTEMDG/orapwASM ASM listener: LISTENER ASM instance count: 2 Cluster ASM listener: ASMNET1LSNR_ASM [orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ srvctl modify asm -count 1 PRCA-1123 : The specified ASM cardinality 1 is less than the minimum cardinality of 2.
Note: ASM instances have at least two instances, so that there is no single point of failure.
Conversion of Flex ASM and Stander ASM
We can convert Standard ASM into Flex ASM, but this transformation is irreversible. The goal may be to promote this feature, which is really good.
If you do not use Flex ASM, you will connect to an empty instance without setting SID, but in the case of Flex ASM, you will randomly select one.
Standard ASM output
[orgrid@ohs1 ~]$ asmcmd Connected to an idle instance. ASMCMD> exit [orgrid@ohs1 ~]$ export ORACLE_SID=+ASM1 [orgrid@ohs1 ~]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode disabled ASMCMD> showclusterstate Normal ASMCMD> lsdsk Path ORCL:ASMDISK1 ORCL:ASMDISK2 ORCL:ASMDISK3 ORCL:ASMDISK4 ASMCMD> lsattr -G systemdg -l Name Value access_control.enabled FALSE access_control.umask 066 au_size 1048576 cell.smart_scan_capable FALSE compatible.asm 12.1.0.0.0 compatible.rdbms 10.1.0.0.0 content.check FALSE content.type data disk_repair_time 3.6h failgroup_repair_time 24.0h idp.boundary auto idp.type dynamic phys_meta_replicated true sector_size 512 thin_provisioned FALSE ASMCMD> ASMCMD> exit
Flex ASM output
[orgrid@ohs1 ~]$ echo $ORACLE_SID [orgrid@ohs1 ~]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode enabled ASMCMD> showclusterstate Normal ASMCMD>
asmca Help Information
[orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ asmca -h asmca [-silent] [-sysAsmPassword <SYS user password>] [-asmsnmpPassword <ASM monitor password>] {<command> <options>} Please refer to the manual for details. You can enter one of the following commands: 1. Configure an ASM instance by specifying the following command and parameters: -configureASM [-sysAsmPassword <SYS user password>] [-asmsnmpPassword <ASM monitor password>] [(-param <paramname=paramvalue>)] -diskString <disk discovery path> (-diskGroupName <disk group name> (-disk <disk path> [-diskName <disk name>] | -diskList <comma separated disk list> [-diskSize <disk size in MB>] [-failuregroup <failure group name>] [-force|-noforce] [-quorum|-noquorum]) [-redundancy <HIGH|NORMAL|EXTERNAL>] [-au_size <2^0 ~ 2^6 (1 ~ 64)>] [-compatible.asm <10.1 ~ 11.2>] [-compatible.rdbms <10.1 ~ 11.2>] [-compatible.advm <11.2>]) 2. Upgrade an existing ASM instance by specifying the following command and parameters: -upgradeASM [-asmsnmpPassword <ASM monitor password>] 3. Configure ASM parameters by specifying the following command and parameters: -configureParameter (-param <paramname=paramvalue>) [-sysAsmPassword <SYS user password>] 4. Create Disk Groups by specifying the following command and parameters: -createDiskGroup [-diskString <disk discovery path>] (-diskGroupName <disk group name> (-disk <disk path> [-diskName <disk name>] | -diskList <comma separated disk list> [-diskSize <disk size in MB>] [-failuregroup <failure group name>] [-force|-noforce] [-quorum|-noquorum]) [-redundancy <HIGH|NORMAL|EXTERNAL>] [-au_size <2^0 ~ 2^6 (1 ~ 64)>] [-compatible.asm <10.1 ~ 11.2>] [-compatible.rdbms <10.1 ~ 11.2>] [-compatible.advm <11.2>]) [-sysAsmPassword <SYS user password>] 5. Add disks to Disk Groups by specifying the following command and parameters: -addDisk [-diskString <disk discovery path>] (-diskGroupName <disk group name> (-disk <disk path> [-diskName <disk name>] | -diskList <comma separated disk list> [-diskSize <disk size in MB>] [-failuregroup <failure group name>] [-force|-noforce] [-quorum|-noquorum]) [-sysAsmPassword <SYS user password>] 6. Create volumes by specifying the following command and parameters: -createVolume (-volumeName <ASM volume name> -volumeDiskGroup <ASM disk group name for the volume> -volumeSizeGB <ASM volume size in GB> [-volumeRedundancy <INHERIT|MIRROR|HIGH|UNPROTECTED>]) [-sysAsmPassword <SYS user password>] 7. Create ASM Cluster File Systems by specifying the following command and parameters: -createACFS (-acfsVolumeDevice <ASM volume device>) (-acfsMountPoint <existing host file system path>) [-acfsUserName <ACFS User Name>] [-acfsGroupName <ACFS Group Name>] [-sysAsmPassword <SYS user password>] 8. Delete ASM instance(s) by specifying the following command and parameters: -deleteASM [-force] [-dropDiskGroups] [-sysAsmPassword <SYS user password>]
9. Convert Standard ASM into Oracle Flex ASM by specifying the following command and parameters:
-convertToFlexASM
-asmNetworks <comma separated ASM Networks each network of the form interface name/subnet>
-asmListenerPort <ASM listener port number>
[orgrid@ohs1 ~]$
Using asmca to generate script convertto Flex ASM.sh that is converted to Flex ASM.
[orgrid@ohs1 ~]$ asmca -silent -convertToFlexASM -asmNetworks eth1/172.16.0.0 -asmListenerPort 10010
To complete ASM conversion, run the following script as privileged user in local node. /pgold/orgrid/grid_base/cfgtoollogs/asmca/scripts/converttoFlexASM.sh [orgrid@ohs1 ~]$
Zhengzhou Infertility Hospital: http://jbk.39.net/yiyuanzaixian/zztjyy/
converttoFlexASM.sh script content
[orgrid@ohs1 ~]$ cat /pgold/orgrid/grid_base/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
#!/bin/sh cd /pgold/orgrid/grid_base/cfgtoollogs/asmca/scripts /pgold/orgrid/oracle/product/121/srvm/admin/srvmhelper -updateDepASM if [ "$?" != "0" ]; then echo "Error updating ASM resource dependencies" exit 1 fi for node in ohs1 ohs2 ohs3 do /pgold/orgrid/oracle/product/121/bin/crsctl stop cluster -n $node if [ "$?" != "0" ]; then echo "Error stopping Oracle Grid Infrastructure in node $node" exit 1 fi /pgold/orgrid/oracle/product/121/bin/crsctl start cluster -n $node stat=1 cmd="/pgold/orgrid/oracle/product/121/bin/crsctl status server $node" while [ $stat = 1 ] do sleep 5 op=`$cmd` op=`echo $op | /bin/cut -d' ' -f2 | /bin/cut -d'=' -f2` if [ "$op" = "ONLINE" ] then stat=0 echo "Oracle Grid Infrastructure restarted in node $node" fi done if [ "$node" = ohs1 ]; then for lsnr in ASMNET1LSNR_ASM do /pgold/orgrid/oracle/product/121/bin/srvctl start listener -listener $lsnr lsnrret=$? if [ "$lsnrret" = "2" ]; then echo "ASM listener $lsnr running already" elif [ "$lsnrret" != "0" ]; then echo "Error starting ASM listener $lsnr" exit 1 fi done fi done
Execute converttoFlexASM.sh output with root
[orgrid@ohs1 ~]$ /pgold/orgrid/grid_base/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
CRS-4563: Insufficient user privileges.
CRS-4000: Command Stop failed, or completed with errors.
Error stopping Oracle Grid Infrastructure in node ohs1
[orgrid@ohs1 ~]$ exit
logout
[root@ohs1 ~]# /pgold/orgrid/grid_base/cfgtoollogs/asmca/scripts/converttoFlexASM.sh
CRS-2673: Attempting to stop 'ora.crsd' on 'ohs1' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ohs1' CRS-2673: Attempting to stop 'ora.cvu' on 'ohs1' CRS-2673: Attempting to stop 'ora.mgmtdb' on 'ohs1' CRS-2673: Attempting to stop 'ora.gns' on 'ohs1' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'ohs1' CRS-2673: Attempting to stop 'ora.oc4j' on 'ohs1' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs1' CRS-2673: Attempting to stop 'ora.FRA_PGOLD.dg' on 'ohs1' CRS-2673: Attempting to stop 'ora.SYSTEMDG.dg' on 'ohs1' CRS-2673: Attempting to stop 'ora.DATA_PGOLD.dg' on 'ohs1' CRS-2677: Stop of 'ora.cvu' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.cvu' on 'ohs3' CRS-2677: Stop of 'ora.FRA_PGOLD.dg' on 'ohs1' succeeded CRS-2676: Start of 'ora.cvu' on 'ohs3' succeeded CRS-2677: Stop of 'ora.SYSTEMDG.dg' on 'ohs1' succeeded CRS-2677: Stop of 'ora.DATA_PGOLD.dg' on 'ohs1' succeeded CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ohs1' CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.ohs1.vip' on 'ohs1' CRS-2677: Stop of 'ora.scan3.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.scan3.vip' on 'ohs2' CRS-2677: Stop of 'ora.ohs1.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.ohs1.vip' on 'ohs3' CRS-2677: Stop of 'ora.mgmtdb' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'ohs1' CRS-2677: Stop of 'ora.MGMTLSNR' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'ohs2' CRS-2677: Stop of 'ora.gns' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.gns.vip' on 'ohs1' CRS-2677: Stop of 'ora.gns.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.gns.vip' on 'ohs2' CRS-2676: Start of 'ora.gns.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.gns' on 'ohs2' CRS-2677: Stop of 'ora.oc4j' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.oc4j' on 'ohs3' CRS-2676: Start of 'ora.MGMTLSNR' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.mgmtdb' on 'ohs2' CRS-2676: Start of 'ora.gns' on 'ohs2' succeeded CRS-2676: Start of 'ora.scan3.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'ohs2' CRS-2676: Start of 'ora.oc4j' on 'ohs3' succeeded CRS-2676: Start of 'ora.mgmtdb' on 'ohs2' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'ohs2' succeeded CRS-2676: Start of 'ora.ohs1.vip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'ohs1' CRS-2677: Stop of 'ora.ons' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'ohs1' CRS-2677: Stop of 'ora.net1.network' on 'ohs1' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ohs1' has completed CRS-2677: Stop of 'ora.crsd' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs1' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs1' CRS-2673: Attempting to stop 'ora.storage' on 'ohs1' CRS-2677: Stop of 'ora.storage' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs1' CRS-2677: Stop of 'ora.ctssd' on 'ohs1' succeeded CRS-2677: Stop of 'ora.evmd' on 'ohs1' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs1' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ohs1' CRS-2677: Stop of 'ora.cssd' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'ohs1' CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ohs1' CRS-2676: Start of 'ora.cssdmonitor' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'ohs1' CRS-2672: Attempting to start 'ora.diskmon' on 'ohs1' CRS-2676: Start of 'ora.diskmon' on 'ohs1' succeeded CRS-2676: Start of 'ora.evmd' on 'ohs1' succeeded CRS-2676: Start of 'ora.cssd' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'ohs1' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ohs1' CRS-2676: Start of 'ora.ctssd' on 'ohs1' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs1' CRS-2676: Start of 'ora.asm' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.storage' on 'ohs1' CRS-2676: Start of 'ora.storage' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'ohs1' CRS-2676: Start of 'ora.crsd' on 'ohs1' succeeded Oracle Grid Infrastructure restarted in node ohs1 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 'ohs3' CRS-5702: Resource 'ora.ASMNET1LSNR_ASM.lsnr' is already running on 'ohs2' CRS-5702: Resource 'ora.ASMNET1LSNR_ASM.lsnr' is already running on 'ohs1' ASM listener ASMNET1LSNR_ASM running already CRS-2673: Attempting to stop 'ora.crsd' on 'ohs2' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ohs2' CRS-2673: Attempting to stop 'ora.mgmtdb' on 'ohs2' CRS-2673: Attempting to stop 'ora.LISTENER_SCAN3.lsnr' on 'ohs2' CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs2' CRS-2673: Attempting to stop 'ora.SYSTEMDG.dg' on 'ohs2' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs2' CRS-2673: Attempting to stop 'ora.DATA_PGOLD.dg' on 'ohs2' CRS-2673: Attempting to stop 'ora.FRA_PGOLD.dg' on 'ohs2' CRS-2677: Stop of 'ora.SYSTEMDG.dg' on 'ohs2' succeeded CRS-2677: Stop of 'ora.DATA_PGOLD.dg' on 'ohs2' succeeded CRS-2677: Stop of 'ora.FRA_PGOLD.dg' on 'ohs2' succeeded CRS-2677: Stop of 'ora.LISTENER_SCAN3.lsnr' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.scan3.vip' on 'ohs2' CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs2' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.ohs2.vip' on 'ohs2' CRS-2677: Stop of 'ora.scan3.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.scan3.vip' on 'ohs1' CRS-2677: Stop of 'ora.ohs2.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.ohs2.vip' on 'ohs3' CRS-2677: Stop of 'ora.mgmtdb' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'ohs2' CRS-2677: Stop of 'ora.MGMTLSNR' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'ohs3' CRS-2676: Start of 'ora.MGMTLSNR' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.mgmtdb' on 'ohs3' CRS-2676: Start of 'ora.scan3.vip' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'ohs1' CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.gns' on 'ohs2' CRS-2676: Start of 'ora.ohs2.vip' on 'ohs3' succeeded CRS-2676: Start of 'ora.mgmtdb' on 'ohs3' succeeded CRS-2677: Stop of 'ora.gns' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.gns.vip' on 'ohs2' CRS-2677: Stop of 'ora.gns.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.gns.vip' on 'ohs3' CRS-2676: Start of 'ora.gns.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.gns' on 'ohs3' CRS-2676: Start of 'ora.gns' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'ohs2' CRS-2677: Stop of 'ora.ons' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'ohs2' CRS-2677: Stop of 'ora.net1.network' on 'ohs2' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ohs2' has completed CRS-2677: Stop of 'ora.crsd' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs2' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs2' CRS-2673: Attempting to stop 'ora.storage' on 'ohs2' CRS-2677: Stop of 'ora.storage' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs2' CRS-2677: Stop of 'ora.ctssd' on 'ohs2' succeeded CRS-2677: Stop of 'ora.evmd' on 'ohs2' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs2' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ohs2' CRS-2677: Stop of 'ora.cssd' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'ohs2' CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ohs2' CRS-2676: Start of 'ora.cssdmonitor' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'ohs2' CRS-2672: Attempting to start 'ora.diskmon' on 'ohs2' CRS-2676: Start of 'ora.diskmon' on 'ohs2' succeeded CRS-2676: Start of 'ora.evmd' on 'ohs2' succeeded CRS-2676: Start of 'ora.cssd' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'ohs2' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ohs2' CRS-2676: Start of 'ora.ctssd' on 'ohs2' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs2' CRS-2676: Start of 'ora.asm' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.storage' on 'ohs2' CRS-2676: Start of 'ora.storage' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'ohs2' CRS-2676: Start of 'ora.crsd' on 'ohs2' succeeded Oracle Grid Infrastructure restarted in node ohs2 CRS-2673: Attempting to stop 'ora.crsd' on 'ohs3' CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'ohs3' CRS-2673: Attempting to stop 'ora.oc4j' on 'ohs3' CRS-2673: Attempting to stop 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.FRA_PGOLD.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.cvu' on 'ohs3' CRS-2673: Attempting to stop 'ora.SYSTEMDG.dg' on 'ohs3' CRS-2673: Attempting to stop 'ora.DATA_PGOLD.dg' on 'ohs3' CRS-2677: Stop of 'ora.cvu' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cvu' on 'ohs1' CRS-2677: Stop of 'ora.FRA_PGOLD.dg' on 'ohs3' succeeded CRS-2677: Stop of 'ora.SYSTEMDG.dg' on 'ohs3' succeeded CRS-2677: Stop of 'ora.DATA_PGOLD.dg' on 'ohs3' succeeded CRS-2676: Start of 'ora.cvu' on 'ohs1' succeeded CRS-2677: Stop of 'ora.ASMNET1LSNR_ASM.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' CRS-2677: Stop of 'ora.LISTENER_SCAN2.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.scan2.vip' on 'ohs3' CRS-2677: Stop of 'ora.scan2.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.scan2.vip' on 'ohs2' CRS-2677: Stop of 'ora.oc4j' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.oc4j' on 'ohs1' CRS-2676: Start of 'ora.scan2.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'ohs2' CRS-2676: Start of 'ora.oc4j' on 'ohs1' succeeded CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'ohs2' succeeded CRS-2673: Attempting to stop 'ora.mgmtdb' on 'ohs3' CRS-2672: Attempting to start 'ora.SYSTEMDG.dg' on 'ohs2' CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'ohs3' CRS-2673: Attempting to stop 'ora.gns' on 'ohs3' CRS-2676: Start of 'ora.SYSTEMDG.dg' on 'ohs2' succeeded CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ohs3.vip' on 'ohs3' CRS-2677: Stop of 'ora.ohs3.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.ohs3.vip' on 'ohs2' CRS-2677: Stop of 'ora.mgmtdb' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.MGMTLSNR' on 'ohs3' CRS-2677: Stop of 'ora.gns' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.gns.vip' on 'ohs3' CRS-2677: Stop of 'ora.MGMTLSNR' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'ohs1' CRS-2677: Stop of 'ora.gns.vip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.gns.vip' on 'ohs2' CRS-2676: Start of 'ora.gns.vip' on 'ohs2' succeeded CRS-2672: Attempting to start 'ora.gns' on 'ohs2' CRS-2676: Start of 'ora.MGMTLSNR' on 'ohs1' succeeded CRS-2672: Attempting to start 'ora.mgmtdb' on 'ohs1' CRS-2676: Start of 'ora.gns' on 'ohs2' succeeded CRS-2676: Start of 'ora.ohs3.vip' on 'ohs2' succeeded CRS-2676: Start of 'ora.mgmtdb' on 'ohs1' succeeded CRS-2673: Attempting to stop 'ora.ons' on 'ohs3' CRS-2677: Stop of 'ora.ons' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.net1.network' on 'ohs3' CRS-2677: Stop of 'ora.net1.network' on 'ohs3' succeeded CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'ohs3' has completed CRS-2677: Stop of 'ora.crsd' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.ctssd' on 'ohs3' CRS-2673: Attempting to stop 'ora.evmd' on 'ohs3' CRS-2673: Attempting to stop 'ora.storage' on 'ohs3' CRS-2677: Stop of 'ora.storage' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.asm' on 'ohs3' CRS-2677: Stop of 'ora.ctssd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.evmd' on 'ohs3' succeeded CRS-2677: Stop of 'ora.asm' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'ohs3' CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'ohs3' succeeded CRS-2673: Attempting to stop 'ora.cssd' on 'ohs3' CRS-2677: Stop of 'ora.cssd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.evmd' on 'ohs3' CRS-2672: Attempting to start 'ora.cssdmonitor' on 'ohs3' CRS-2676: Start of 'ora.cssdmonitor' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.cssd' on 'ohs3' CRS-2672: Attempting to start 'ora.diskmon' on 'ohs3' CRS-2676: Start of 'ora.diskmon' on 'ohs3' succeeded CRS-2676: Start of 'ora.evmd' on 'ohs3' succeeded CRS-2676: Start of 'ora.cssd' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.ctssd' on 'ohs3' CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'ohs3' CRS-2676: Start of 'ora.ctssd' on 'ohs3' succeeded CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.asm' on 'ohs3' CRS-2676: Start of 'ora.asm' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.storage' on 'ohs3' CRS-2676: Start of 'ora.storage' on 'ohs3' succeeded CRS-2672: Attempting to start 'ora.crsd' on 'ohs3' CRS-2676: Start of 'ora.crsd' on 'ohs3' succeeded Oracle Grid Infrastructure restarted in node ohs3 [root@ohs1 ~]#
Types of current systems Cluster and ASM
[orgrid@ohs1 ~]$ crsctl get cluster mode status Cluster is running in "standard" mode [orgrid@ohs1 ~]$ [orgrid@ohs1 ~]$ asmcmd ASMCMD> showclustermode ASM cluster : Flex mode enabled ASMCMD>
ASM configuration information
[orgrid@ohs1 ~]$ srvctl status asm -detail
ASM is running on ohs3,ohs2,ohs1 ASM is enabled. [orgrid@ohs1 ~]$ srvctl config asm -detail
ASM home: <CRS home> Password file: +SYSTEMDG/orapwASM ASM listener: LISTENER ASM is enabled. ASM is individually enabled on nodes: ASM is individually disabled on nodes: ASM instance count: ALL Cluster ASM listener: ASMNET1LSNR_ASM
ASM listening state on three nodes
Here, three ASM instances share a service name, which is somewhat similar to SCAN.
[orgrid@ ohs1 ~]$ lsnrctl status ASMNET1LSNR_ASM
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-SEP-2016 11:25:23 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET1LSNR_ASM Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date 25-SEP-2016 11:16:40 Uptime 0 days 0 hr. 8 min. 43 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /pgold/orgrid/oracle/product/121/network/admin/listener.ora Listener Log File /pgold/orgrid/grid_base/diag/tnslsnr/ohs1/asmnet1lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET1LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.0.21)(PORT=10010))) Services Summary... Service "+ASM" has 3 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Instance "+ASM3", status READY, has 1 handler(s) for this service... The command completed successfully [orgrid@ohs1 ~]$
[orgrid@ ohs2 ~]$ lsnrctl status ASMNET1LSNR_ASM
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-SEP-2016 11:28:49 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET1LSNR_ASM Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date 25-SEP-2016 11:17:59 Uptime 0 days 0 hr. 10 min. 50 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /pgold/orgrid/oracle/product/121/network/admin/listener.ora Listener Log File /pgold/orgrid/grid_base/diag/tnslsnr/ohs2/asmnet1lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET1LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.0.22)(PORT=10010))) Services Summary... Service "+ASM" has 3 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 2 handler(s) for this service... Instance "+ASM3", status READY, has 1 handler(s) for this service... The command completed successfully [orgrid@ohs2 ~]$
[orgrid@ ohs3 ~]$ lsnrctl status ASMNET1LSNR_ASM
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-SEP-2016 11:28:59 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) STATUS of the LISTENER ------------------------ Alias ASMNET1LSNR_ASM Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production Start Date 25-SEP-2016 11:20:08 Uptime 0 days 0 hr. 8 min. 50 sec Trace Level off Security ON: Local OS Authentication SNMP OFF Listener Parameter File /pgold/orgrid/oracle/product/121/network/admin/listener.ora Listener Log File /pgold/orgrid/grid_base/diag/tnslsnr/ohs3/asmnet1lsnr_asm/alert/log.xml Listening Endpoints Summary... (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=ASMNET1LSNR_ASM))) (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=172.16.0.23)(PORT=10010))) Services Summary... Service "+ASM" has 3 instance(s). Instance "+ASM1", status READY, has 1 handler(s) for this service... Instance "+ASM2", status READY, has 1 handler(s) for this service... Instance "+ASM3", status READY, has 2 handler(s) for this service... The command completed successfully [orgrid@ohs3 ~]$ [orgrid@ohs3 ~]$
Connect the ASM instance through the service name on Node 1 and connect to + ASM3
[orgrid@ohs1 ~]$ sqlplus sys/oracle@172.16.0.21:10010/+ASM as sysasm SQL*Plus: Release 12.1.0.2.0 Production on Sun Sep 25 11:35:33 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- +ASM3
SQL>
ASM Monitoring service Status
[orgrid@ohs1 ~]$ lsnrctl service ASMNET1LSNR_ASM
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-SEP-2016 11:37:14 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) Services Summary... Service "+ASM" has 3 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.21)(PORT=10010))) "DEDICATED" established:18 refused:0 state:ready LOCAL SERVER Instance "+ASM2", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.22)(PORT=10010))) Instance "+ASM3", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:5 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.23)(PORT=10010))) The command completed successfully [orgrid@ohs1 ~]$
Connect the ASM instance through the service name and close it
[orgrid@ohs1 ~]$ sqlplus sys/oracle@172.16.0.22:10010/+ASM as sysasm SQL*Plus: Release 12.1.0.2.0 Production on Sun Sep 25 11:38:11 2016 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options SQL> select instance_name from v$instance; INSTANCE_NAME ---------------- +ASM2 SQL> shut immediate ASM diskgroups dismounted ASM instance shutdown SQL> exit Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Real Application Clusters and Automatic Storage Management options
[orgrid@ohs1 ~]$ lsnrctl service ASMNET1LSNR_ASM
LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 25-SEP-2016 11:38:51 Copyright (c) 1991, 2014, Oracle. All rights reserved. Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=ASMNET1LSNR_ASM))) Services Summary... Service "+ASM" has 2 instance(s). Instance "+ASM1", status READY, has 2 handler(s) for this service... Handler(s): "DEDICATED" established:0 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.21)(PORT=10010))) "DEDICATED" established:18 refused:0 state:ready LOCAL SERVER Instance "+ASM3", status READY, has 1 handler(s) for this service... Handler(s): "DEDICATED" established:5 refused:0 state:ready REMOTE SERVER (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=172.16.0.23)(PORT=10010))) The command completed successfully [orgrid@ohs1 ~]$