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

Objective: Explain and demonstrate the use of ACFS for storing Oracle Home binaries and the database itself, registering the ACFS filesystem to start automatically, configuring the logs to be generated in a unified directory, and displaying ACFS behavior with the Flex ASM architecture.

In the first article, I approached the benefits, some of the architecture of ACFS and also demonstrated how to configure it. In this we will see how to install and create a database in ACFS, how to register ACFS to automatically start and mount its filesystems, how to unify the logs and traces and also how ACFS works in the Flex ASM architecture.

For this article not to be so extensive I will address the following topics:

  • ACFSUtil to mount ACFS;
  • Shared Oracle Home;
  • Database on ACFS;
  • Unifying diagnostic files;
  • ACFS on Flex ASM Architecture.

ACFSUtil to mount ACFS

I finished the previous article by mounting ACFS with the mount command of Linux itself and passing the “-t acfs” parameter. I will demonstrate here the use of the ACFS utility to mount and register the assembly of Filesystems ACFS automatically at the boot of Clusterware.

Run the command below to register the ACFS filesystem:

If we try to do the same for our EXT4 volume see what happens:

See the errors, ACFS complains that it is an EXT4 filesystem. So we set up the right way for an EXT4:

We will reboot the servers to see if the filesystems are back mounted:

Note that the ACFS filesystem is mounted correctly after booting, but for the EXT4 filesystem we need to create some script to mount it automatically after ASM and ADVM start, because we can not include it in the / etc / fstab file due to This file will be read when the server boots when ASM is not yet available.

hared Oracle Home

Now I will demonstrate how to install your database on a shared Oracle Home and then how to create your database on the same filesytem.

For this activity, I will add new disks and create a new disk group, because for some activities that will be presented we will need a bigger disk group.

I’m going to skip the part of partitioning the disk and adding it to ASM and only presenting what matters, so with the disk already presented to the server and created in ASM Library, I will create a new disk group. This time I will perform the procedure via ASMCA for you to observe that it is also possible to work with GUI.

Click “Create” to create a new disk group:

Give a name to your disk group, in my case I put the name “DB”, so change the compatibility parameters by accessing the advanced options for at least “12.1.0.0.0”, this way we will have access to the advanced functionality of ACFS that I go Presented in the next article.If you want to give a name to the disk you are using to create the new disk group, select the type of redundancy, in my case I am choosing “external” because I do not want redundancy in ASM for this disk group. The “Allocation Unit” can be left with the standard size of 1MB in this scenario. Then after everything is set just click “OK”, you should receive a message that the disk group was created successfully.

 

We have the new disk group created.
Now let’s go to asmcmd to create our new volume.

With the volume DBVOL1 created now we will create a directory for our Shared Oracle Home and remember to create it on all servers where this directory will be shared, in my cluster I have only 2 nodes, so I will create in 2:

Now let’s go back to ASMCA to set up our new ACFS.
We accessed the “ASM Cluster File Systems” tab in ASMCA to create our filesystem.

 

Click “Create” and fill in the fields according to your environment.

If you click on “Show Command” the required command sequence will be displayed. This will be the script generated when we also click on “OK”:

Create ACFS Command:

Following commands should be run as privileged user:

Click “OK.”

Run the ASMCA-generated script as root:

Now we just need to install our software on this shared Oracle Home and then create our new database.

I will only show here what changes from a normal installation to Shared Oracle Home, because this is not an article about installing Oracle Database itself but about the functionality of ACFS.

 

 

In this screen shown below you must insert the directory created in ACFS. This is the only difference in installing Oracle Database software.

 

 

If a message like the one below appears, make sure there is nothing inside the directory and if there is only the lost + found directory of Linux, then click “Yes”.

 

 

 

Once this is done, proceed to your installation until it finishes. This way you will have your shared binaries and also your entire Oracle Home.

Database on ACFS

Let’s then create our database. I’ll create it inside this same filesystem, but you can create a new filesystem if you want. I will use the DBCA to create the database to facilitate the demonstration; Again I will only present what changes in the creation of the database on ACFS.

Create the directory where the database will be stored and also the Fast Recovery Area:

 

Since the filesystem is now shared it is only necessary to create the directories from one of the nodes. It is a single filesystem presented to all nodes in my cluster.

 

Here’s how the configuration was in DBCA:

Now just proceed with the installation to the end and wait for it to complete.
This way your database will be stored on an ACFS filesystem. Note that we only point to the directory where the database files are stored and in the “drop-down box” we select “File System” instead of the “ASM” standard.
This type of implementation is quite common for SAP application databases. SAP itself needs shared directories on database servers when we have a cluster.

Let’s check how our database was and where the files were stored:

 

See that the datafiles, controlfiles and logfiles were all stored in our ACFS and included the spfile and also the passwordfile.

Unifying diagnostic files

All okay up here, but the diagnostic directories are still missing, right? Where are the logs and traces going? Let’s check:

 

You can see that Base ADR is pointing to Oracle Base, which is the default destination for these files. So let’s change this and make them unified in our ACFS:

Ready. Logs and traces all unified in our ACFS filesystem.

ACFS on Flex ASM Architecture

In version 12c of the Grid Infrastructure, when we use Flex ASM we benefit from the ACFS mounted on the diskgroup in question, if there is a failure of the local ASM instance where an ACFS resides the connection is directed to some surviving ASM instance on another node through the ASM Proxy And ASM Network. The same flow occurs in case there is no local ASM instance, including this is the purpose of Flex ASM, to decrease the number of ASM instances in a cluster, thus reducing the amount of resources needed to maintain a Grid Infrastructure environment. If ACFS is not in use the ASM Proxy instance can be turned off, but remember that for the database stored on ACFS to keep online the ACFS resource must be available and in case of a drop in this feature or even in the instance ASM Proxy the ACFS will be affected and consequently the database stored in it.

This image briefly presents the architecture of ACFS in a cluster with Flex ASM:

 

 

Note below where the +APX2 instance is receiving the metadata for ACFS:

When stopping the + ASM2 instance, see who will provide the metadata for the server’s ACFS srv2, whose ASM Proxy is the + APX2 instance:

Note that the + ASM1 instance of server srv1 assumed the APX2 + instance as client, ie, there was a failover in this demonstration and throughout this period the database was kept online on both servers.

In this scenario we have seen how to install the Oracle Database software and also how to create a database, both on ACFS. This type of configuration is quite common in some environments and as I mentioned in part I of this content the Oracle Database Appliance from version 12.1.2.0.0 stores the database on ACFS filesystems. I also showed at the beginning of this article how to register ACFS for automatic assembly in the cluster startup, and finally I presented a little about how ACFS works in the new Flex ASM architecture and how to configure the logs and traces to be generated in a unified directory. Wait for the next related content.

References:
Https://docs.oracle.com/cd/E11882_01/server.112/e18951/whatsnew.htm#OSTMG94051
Http://www.oracle.com/technetwork/database/database-technologies/cloud-storage/cloudfs-datasheet-279846.pdf
Http://www.oracle.com/technetwork/database/database-technologies/cloud-storage/cloudfs-overview-wp-279856.pdf
Http://www.oracle.com/technetwork/products/cloud-storage/cloudfs-12c-overview-wp-1965426.pdf
Https://docs.oracle.com/database/121/OSTMG/GUID-C91D3A8E-F329-44BE-97B7-8AB41897D8E1.htm#OSTMG31000
Https://docs.oracle.com/database/121/DBLIC/editions.htm#CIHDDJCJ
Http://www.oracle.com/technetwork/database/database-technologies/cloud-storage/benefits-of-oracle-acfs-2379064.pdf

Leave a Reply

Your email address will not be published. Required fields are marked *