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

Purpose: To present the benefits and reasons for using ACFS and to initially configure ACFS for use.

The Automatic Storage Management Cluster File System (ACFS) was introduced in the second release of Oracle 11g in 2009 and initially there was no licensing cost as well as the other components of the Grid Infrastructure product. In version 11.2.0.2 it was renamed CloudFS and next to it came a licensing cost. In September 2014 Oracle did it again for no cost and remains so until now. You do not have a license fee to use any of the Grid Infrastructure components, but you can only do so if you have another licensed product such as Oracle Database or Oracle Enterprise Linux Premier Support.

In the latest versions of the Oracle Database Appliance CloudFS (ACFS) has become the default file system.

ACFS extends the capabilities of using ASM and provides a multi-platform and scalable file system for the purpose of storing any type of file, including audio, video or image files. It complies with POSIX standards for Linux and Unix operating systems and also with Windows standards.

For the operation of ACFS we need to configure ADVM (AMS Dynamic Volume Manager, which is responsible for delivering and managing volumes.) These volumes can be part of a cluster and can also be formatted on other file systems, in addition to ACFS, such as EXT4, EXT3, etc.

The following figure exemplifies the layers involved when we have ASM with ADVM and ACFS configured:

To use ACFS we need to have Grid Infrastructure configured, so we can not use ACFS to store Voting Disk, OCR and Grid Infrastructure Home and Diagnostic Dest. As the figure shows, ACFS is above ASM. Starting with version 12.1.0.1, ACFS now supports storing datafiles for databases of versions 11.2.0.4 or above.

There are some advanced features that bring advantages in using ACFS:

  • Snapshots;
  • Cryptography;
  • Safety;
  • Audit;
  • Replication;
  • HANFS;
  • Tagging.

Some of these features have special issues in the handling of user licenses. See the table below that is presented in the documentation:

Note that all features are free from licensing if they are not used for database files

There are several benefits to using ACFS, and these benefits also add to those of ASM and ADVM:

  • No need to purchase any other volume managers;
  • Being part of a cluster, we gain in availability;
  • It is easy to manage and eases administration;
  • Monitoring can be centralized;
  • Streamlines the provisioning and copying of databases;
  • It can be easily displayed on all cluster nodes, including hub and leaf nodes in Flex Clusters.

If one of the hindrances would be the consumption of resources for the use of the ASM instance, now from version 12c this is no longer an excuse, because with the Flex ASM architecture no more is needed one instance per server.

 

In the figure above there are 5 nodes and only 3 of them have an ASM instance, the others access using the internal ASM network, which facilitates communication between the instances.

The step by step approach to having an ACFS filesystem is simple:

  • Install the Grid Infrastructure;
  • Configure ASM;
  • Create the disk groups;
  • Create the ADVM volumes;
  • Format the volumes as ACFS;
  • Create the directories that will be used by filesystems;
  • Mount the filesystems.

After this brief introduction on ACFS we will see how to create the volumes in ADVM to then format them and mount the filesystems.

Initially, I have a new disk added to my Linux servers srv1 and srv2 (this operation should be performed from one of the nodes, only), so I will create a partition:

Let’s check if the partition was created:

Done this we will create the disk in ASM with the name of ADVMVOL1:

Let’s list the discs to see what we have:

 

Now we switch to the oracle user to access ASM:

We go to the ASM instance:

Now let’s list the disks to create the diskgroup:

Next we create the diskgroup, I’ll call it ADVM:

Now, let’s create a volume using ASMCMD, and to create the volume we have to change the attributes of the diskgroup:

Let’s go back to SQL * Plus and change some attributes of our diskgroup so we can use ADVM. Oracle by default returns the compatibility for an earlier version, in our case as we want to have all the new features of 12c we will set everything to 12.1.0.2:

Now let’s create our volume:

Let’s see the volumes created in the ADVM diskgroup:

I’m going back to SQL * Plus to show that it’s also possible to create volumes:

For SQL*Plus itself, we were also able to query information from our volumes in the v$ASM_VOLUME view:

Now through the operating system we can see the volumes created:

We have the 2 volumes listed, Oracle inserts a suffix in the name of the volumes to guarantee their unique names. Notice in the first character the letter “b” which means that this file is a block device in the operating system.

Now let’s format these volumes. The first one will format as ACFS and for this I need to do the operation as root:

The other volume I will format as EXT4 to demonstrate that this can also be done:

Note the difference in the output of the two commands. To format in EXT4 is not used any utility of Oracle but of the own Linux that is who formats for this type of filesystem. Formatting on any other filesystem other than ACFS we have lost the ability to use the ACFS snapshot, replication, encryption, and so on the feature on this volume.

Let’s now mount these filesystems in some directory:

Note that when I tried to mount advmvol2 it was not possible as this is formatted for EXT4 and I tried to mount it as ACFS. I’m going to mount it now as EXT4:

Now it worked. Let’s list our assembly points:

And how did it get on the srv2 server? Let’s check:

There are none of the volumes assembled. Let’s create the directories and mount them:

Success. Let’s do a test generating a file on the srv1 server:

Because / mnt / advm / fs1 is an ACFS filesystem this directory is in the cluster and the created file must also be visible from srv2. Let’s check

Great! It worked. The file is appearing on the 2 nodes of the cluster.

Let’s do the same test for the filesystem formatted in EXT4:

In srv1 ok, we will see list in srv2 to see if it appears:

Looks like you screwed up our filesystem, did not it? As it is EXT4 it is not clustered and should only be presented to the server which will be used, so let’s take it out of srv2:

We have seen a very simple example of using ACFS. This is how we started learning this fantastic filesystem. ACFS can also be used to centralize the database and application logs and can also be used as a shared Oracle Home for the Oracle Database installation binaries.

I will bring in a few more articles using the advanced features of ACFS.

ACFS is already a well-developed filesystem and has many features that in other Clustered Filesystems such as IBM GPFS, Red Hat GFS or Veritas CFS would have licensing costs.

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