In Oracle Database Releases earlier than 12c, an Automatic Storage Management (ASM) instance runs on every node in the cluster, and ASM Cluster File System (ACFS) Service on a node connects to the local ASM instance running on the same host. If the ASM instance on a node were to fail, then the shared Disk Groups and hence ACFS file systems can no longer be accessed on that node.
With introduction of Flex ASM in Oracle 12c, the hard dependency between ASM and its clients has been relaxed and a smaller number of ASM instances need run on a subset of servers in a cluster. In this scenario, when there might be nodes without an ASM instance, a new instance type has been introduced by Flex ASM – ASM proxy instance which gets metadata information from ASM instance on behalf of ACFS. If ASM instance is not available locally, ASM proxy instance connects to other ASM instances over the network to fetch the metadata. Moreover, if the local ASM instance fails, then ASM proxy instance can failover to another surviving ASM instance on a different server resulting in uninterrupted availability of shared storage and ACFS file systems. However, I/O to the underlying storage does not go through Oracle ASM, but goes directly through the Oracle ASM proxy instance. An ASM proxy instance must be running on a node which needs to provide ACFS service.
Figure 1 shows that as an ASM instance is not running on Hub Node 2, ADVM / ACFS services on Hub Node 2l utilize the ASM proxy instance (+APX2) to access the metadata from the remote ASM instance (+ASM1) running on Hub Node 1.
Figure 1.
Flex ASM can be configured on either a standard cluster or a Flex Cluster. When Flex ASM runs on a standard cluster, ASM services can run on a subset of cluster nodes servicing clients across the cluster. When Flex ASM runs on a Flex Cluster, ASM services can run on a subset of Hub Nodes servicing clients across all of the Hub Nodes in the Flex Cluster. Besides, in a flex cluster, only hub nodes can host the ACFS services because hub nodes have direct access to storage.
A Demonstration
To explore how ADVM / ACFS can leverage Flex ASM features, we will use an ASM Flex Cluster that is configured with two hub nodes (host01 and host02). Our first set of tasks is to create an ACFS file system resource.
Check Prerequisites
First, let’s verify that all kernel modules needed for ACFS and ADVM are loaded on both the nodes.
1 2 3 4 5 6 7 8 9 10 11 |
[root@host01 ~]# lsmod |grep oracle <span style="color:red">oracleacfs</span> 2837904 1 <span style="color:red">oracleadvm</span> 342512 1 <span style="color:red">oracleoks</span> 409560 2 oracleacfs,oracleadvm <span style="color:red">oracleasm</span> 84136 1 [root@host02 ~]# lsmod |grep oracle <span style="color:red">oracleacfs</span> 2837904 1 <span style="color:red">oracleadvm</span> 342512 1 <span style="color:red">oracleoks</span> 409560 2 oracleacfs,oracleadvm oracleasm 84136 1 |
The ASM Dynamic Volume Manager (ADVM) proxy instance is a special Oracle instance which enables ADVM to connect to Flex ASM and is required to run on the same node as ADVM and ACFS. For a volume device to be visible on a node, an ASM proxy instance must be running on that node. Let’s verify that an ASM proxy instance is running on both the nodes.
1 2 3 4 5 6 7 8 9 |
[root@host02 ~]# crsctl stat res <span style="color:red">ora.proxy_advm</span> -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Local Resources ---------------------------------------------------------------- ora.proxy_advm ONLINE <span style="color:red">ONLINE</span> <span style="color:red">host01</span> STABLE ONLINE <span style="color:red">ONLINE</span> <span style="color:red">host02</span> STABLE |
Create the ADVM Volume
We’ll next modify the compatible.advm attribute of the DATA ASM disk group to enable all the new ASM Dynamic Volume (ADVM) features included in release 12.1, and then create a new volume – VOL1 within the DATA disk group with a volume size of 300 MB.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
[grid@host01 root]$ asmcmd setattr -G DATA compatible.advm 12.1.0.0.0 [grid@host01 root]$ asmcmd volcreate -G DATA -s 300m <span style="color:red">VOL1</span> [grid@host01 root]$ asmcmd volinfo -G DATA VOL1 Diskgroup Name: DATA Volume Name: <span style="color:red">VOL1</span> Volume Device: <span style="color:red">/dev/asm/vol1-106</span> State: ENABLED Size (MB): 320 Resize Unit (MB): 32 Redundancy: MIRROR Stripe Columns: 4 Stripe Width (K): 128 Usage: ACFS Mountpath: |
Create ACFS File System and Corresponding Mount Point
Now let’s construct an ACFS file system on the newly-created volume VOL1 and also create a mount point on both the nodes to mount the ACFS file system.
1 2 3 |
[root@host01 ~]# mkfs -t acfs /dev/asm/vol1-106 [root@host01 ~]# mkdir -p /mnt/acfsmounts/acfs1 [root@host02 ~]# mkdir -p /mnt/acfsmounts/acfs1 |
Configure Cloud File System Resource For ACFS File System
Now using the srvctl commands, we will create an Oracle Cloud File System resource on the volume device VOL1 with the mount point /mnt/acfsmounts/acfs1:
1 2 3 4 5 6 7 8 9 |
[root@host01 ~]# srvctl add filesystem -m /mnt/acfsmounts/acfs1 -d /dev/asm/vol1-106 [root@host01 ~]# srvctl status filesystem -d /dev/asm/vol1-106 ACFS file system /mnt/acfsmounts/acfs2 is <span style="color:red">not mounted</span> [root@host01 ~]# mount | grep vol1 [root@host02 ~]# mount | grep vol1 |
We need to start the file system resource to mount the ACFS file system.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@host01 ~]# srvctl start filesystem -d /dev/asm/vol1-106 [root@host01 ~]# srvctl status filesystem -d /dev/asm/vol1-106 ACFS file system /mnt/acfsmounts/acfs2 is <span style="color:red">mounted on nodes host01,host02</span> [root@host01 ~]# mount | grep vol1 <span style="color:red">/dev/asm/vol1-106 on /mnt/acfsmounts/acfs1 type acfs (rw)</span> [root@host02 ~]# mount | grep vol1 <span style="color:red">/dev/asm/vol1-106 on /mnt/acfsmounts/acfs1 type acfs (rw)</span> |
Verify The Cloud File System Resource
It can be verified that the new Cloud File System is indeed working properly as a small text file created on it from host01 can be successfully accessed from host02.
1 2 3 4 5 |
[root@host01 ~]# echo <strong>"Test File on ACFS"</strong> > /mnt/acfsmounts/acfs1/testfile.txt [root@host02 asm]# cat /mnt/acfsmounts/acfs1/testfile.txt <strong>Test File on ACFS</strong> |
Leveraging Flex ASM
To demonstrate how ACFS / ADVM leverages these Flex ASM capabilities, let us first have a look at the current state of various cluster resources in our two node cluster.
View Baseline Status of Various Cluster Resources
It can be seen that currently:
- An ASM instance is running on both the nodes
- DATA disk group, volume VOL1 on DATA diskgroup and ACFS file system on VOL1 are all online on both the nodes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
[root@host01 ~]# crsctl stat res ora.asm -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Cluster Resources ---------------------------------------------------------------- <span style="color:red">ora.asm</span> 1 ONLINE <span style="color:red">ONLINE</span> host01 STABLE 1 ONLINE <span style="color:red">ONLINE</span> host02 STABLE ---------------------------------------------------------------- [root@host01 ~]# crsctl stat res ora.DATA.dg -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Local Resources ---------------------------------------------------------------- <span style="color:red">ora.DATA.dg</span> ONLINE ONLINE <span style="color:red">host01</span> STABLE ONLINE ONLINE <span style="color:red">host02</span> STABLE ---------------------------------------------------------------- [root@host01 ~]# crsctl stat res ora.DATA.VOL1.advm -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Local Resources ---------------------------------------------------------------- <span style="color:red">ora.DATA.VOL1.advm</span> ONLINE <span style="color:red">ONLINE host01</span> Volume device /dev/a sm/vol1-106 is online,STABLE ONLINE <span style="color:red">ONLINE host02</span> Volume device /dev/a sm/vol1-106 is online,STABLE [root@host01 ~]# crsctl stat res ora.data.vol1.acfs NAME=<span style="color:red">ora.data.vol1.acfs</span> TYPE=ora.acfs.type TARGET=ONLINE , ONLINE STATE=<span style="color:red">ONLINE on host01, ONLINE on host02</span> |
Confirm Flex ASM Proxy Instances
Let’s also verify that ASM proxy instances +APX1 running on host01 and +APX2 running on host02 are using ASM instances +ASM1 and +ASM2 running locally on their corresponding nodes.
1 2 3 4 5 6 7 8 9 10 |
SQL> col client_instance_name format a20 col asm_host_name for a20 SELECT DISTINCT i.instance_name asm_instance_name, i.host_name asm_host_name, c.instance_name client_instance_name, c.status FROM gv$instance i, gv$asm_client c WHERE i.inst_id = c.inst_id; |
1 2 3 4 5 |
ASM_INSTANCE_NAM ASM_HOST_NAME CLIENT_INSTANCE_NAME STATUS ---------------- -------------------- -------------------- ------------ <span style="color:red">+ASM1 host01.example.com +APX1</span> CONNECTED +ASM1 host01.example.com +ASM1 CONNECTED <span style="color:red">+ASM2 host02.example.com +APX2</span> CONNECTED |
To make ACFS / ADVM leverage Flex ASM capabilities, we can perform a simple test: On stopping the ASM instance on node host02 we should observe that ACFS / ADVM services will continue to run on host02 while utilizing an ASM proxy instance to satisfy metadata requests to a remote ASM instance – in this case, +ASM1 running on host01.
Halt ASM Instance On host02
Let’s halt ASM instance +ASM2 running on node host02.
1 2 3 4 5 6 7 8 9 10 |
[root@host01 ~]# srvctl stop asm -n host02 PRCR-1014 : Failed to stop resource ora.asm PRCR-1065 : Failed to stop resource ora.asm CRS-2529: Unable to act on 'ora.asm' because that would require stopping or relocating 'ora.DATA.dg', but the force option was not specified [root@host01 ~]# srvctl stop asm -n host02 -f [root@host01 ~]# srvctl status asm ASM is running on host01 |
Verify Availability of VOL1 On host02
If we now check we’ll find that even though the +ASM2 instance and the DATA disk group are not available on host02, volume VOL1 created on the DATA disk group is still mounted on host02 because of Flex ASM. Node host02 connects to the remote ASM instance +ASM1 running on host01 using its ASM proxy instance +APX2 to access the metadata, and that keeps volume VOL1 online.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
[root@host01 ~]# crsctl stat res ora.asm -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Cluster Resources ---------------------------------------------------------------- <span style="color:red">ora.asm</span> 1 ONLINE ONLINE host01 STABLE 2 ONLINE <span style="color:red">OFFLINE host02</span> STABLE ---------------------------------------------------------------- [root@host01 ~]# crsctl stat res ora.DATA.dg -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Local Resources ---------------------------------------------------------------- <span style="color:red">ora.DATA.dg</span> ONLINE ONLINE host01 STABLE OFFLINE <span style="color:red">OFFLINE host02</span> STABLE ---------------------------------------------------------------- [root@host01 ~]# crsctl stat res ora.DATA.VOL1.advm -t ---------------------------------------------------------------- Name Target State Server State details ---------------------------------------------------------------- Local Resources ---------------------------------------------------------------- <span style="color:red">ora.DATA.VOL1.advm</span> ONLINE ONLINE host01 Volume device /dev/a sm/vol1-106 is online,STABLE <span style="color:red">ONLINE ONLINE host02 Volume device /dev/a</span> <span style="color:red">sm/vol1-106 is</span> <span style="color:red">online,STABLE</span> |
Verify Availability of Cloud File System acfs1 On host02
We can also verify that the file on cloud file system acfs1 is visible from both host01 and host02.
1 2 3 4 5 6 7 |
[root@host01 acfs1]# cat /mnt/acfsmounts/acfs1/testfile.txt <strong>“Test File on ACFS”</strong> [root@host02 asm]# cat /mnt/acfsmounts/acfs1/testfile.txt <strong>“Test File on ACFS”</strong> |
Confirm Flex ASM Proxy Instances
We can also verify that since ASM instance +ASM2 running on host02 is no longer available, ACFS / ADVM leverages Flex ASM and ASM proxy instance +APX2 running on host02 accesses the metadata from remote ASM instance +ASM1 that is running on host01 to access volume VOL1 present on the DATA disk group.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
SQL> col client_instance_name format a20 col asm_host_name for a20 SELECT DISTINCT i.instance_name asm_instance_name, i.host_name asm_host_name, c.instance_name client_instance_name, c.status FROM gv$instance i, gv$asm_client c WHERE i.inst_id = c.inst_id; ASM_INSTANCE_NAM ASM_HOST_NAME CLIENT_INSTANCE_NAME STATUS ---------------- -------------------- -------------------- ------------ +ASM1 host01.example.com +APX1 CONNECTED +ASM1 host01.example.com +ASM1 CONNECTED <span style="color:red">+ASM1 host01.example.com +APX2</span> CONNECTED |
Summary
- A new instance type has been introduced by Flex ASM – ASM proxy instance, which gets metadata information from ASM instance on behalf of ACFS.
- If an ASM instance is not available locally, ASM proxy instance connects to other ASM instances over the network resulting in uninterrupted availability of shared storage and ACFS file systems.
- This provides a much higher degree of flexibility, scalability and availability for file services to clients.
Load comments