This action might not be possible to undo. Are you sure you want to continue?
Oracle in 11gR2 extends the functionality of ASM and introduces a new ASM Cluster File System (ACFS) based on ASM. ACFS is a general purpose cluster file system that allows storing all type of data files in similar manner to any Linux file system for example ext3. Oracle recommends using ASM for storing database files as it was conceptually done since the first introduction of ASM in release10g. ACFS cannot be used to install the Oracle 11gR2 Grid Infrastructure that is, Oracle 11gR2 also uses ASM to store the Grid Infrastructure OCR and the voting disk if a shared file system option is not used while installing Grid Infrastructure. ACFS can be used as a file system for Oracle homes storing the Oracle binaries. In Oracle 11gR2 ASM is already a part of the Grid Infrastructure and is installed with Grid Infrastructure in comparison to earlier releases where ASM was part of RDBMS. Oracle 11gR2 new features enable us to create, mount and manage ACFS using familiar Linux commands. ACFS supports snapshots and dynamically online resizing of existing file systems using internally ASM Dynamic Volume Manager (ADVM). ACFS is based on volumes that are created in a disk group. Once created volume is identified by a volume device, that is used by Linux to address the volume and this volume device is used to create the ACFS. In the article we will look at how to create volumes and ACFS based on the volumes. We will look at various ways to create ASM volumes such as: • • • • ASMCA OEM ASMCMD sqlplus
To use and deploy ACFS the compatibility in ASM has to be at least 11.2 for ASM, RDBMS and ADVM. The article is based on two node RAC cluster on OEL 5.5. All utilities and commands will be executed while logged in as Linux user owner of Oracle Grid Infrastructure. In order to create and manage ACFS Oracle Grid Infrastructure must be started on the cluster as ADVM and ASM drivers and libraries are loaded. Similar Approach can be used in Oracle Restart to manage ACFS though there some limitations related to automatically performed tasks such as: • • Loading ACFS drivers Mounting ACFS systems registered with acfsutil utility.
In Oracle Restart the libraries and ACFS drivers need to be loaded using acfsload start –s as a root user. The latter does not need to be done if using RAC.
1. Using ASMCA for ACFS creation.
Start asmca from Linux command line. Once loaded all tabs will be available if the ADVM drivers are loaded on all nodes of the cluster, otherwise the tabs will be dimmed and not available for access.
Disk Groups tab shows the available disk groups along with their properties and state. Here we can create new disk groups or mount or dismount existing disk groups.
Volumes tab shows existing volumes and their properties and state. Here we can create new volumes and respectively enable or disable existing volumes. Press the Create button to create a new volume.
Enter the volume name. . specify the disk group where the volume will be created and specify the size of the volume.
Wait for the volume to be created. .Press Show Advanced Options if you want to modify the defaults. Here we will keep the defaults and will press OK to continue.
. The newly create volume ASM_VOL1 is listed in the Volumes tab.Acknowledge the message for the successful completion.
. We will use the newly created volume ASM_VOL1 to create a new ACFS. Here we see the existing ACFS. Press Create button.Select the ASM Cluster File Systems tab.
.As the volume is already created we select the ASM_VOL1 and specify General purpose file system while leaving the default mount point.
Press Show Command to see the steps involved to create and register the ACFS. .
Press OK to exit and OK to start the ACFS creation. Wait for the process to complete. .
.The new ACFS based on ASM_VOL1 is created and listed in the ASM Cluster File System tab.
Note that acfsutil registers and mounts the ACFS. Query V$ASM_VOLUME for the volume name and volume device. 2. after restart of the Oracle Grid Infrastructure the ACFS will be mounted. . The output confirms that the volume is created successfully. Thus. Create a volume ACFS_VOL2 with 2GB size as shown below. Using sqlplus to create an ACFS volume. Invoke sqlplus while logged in as Linux user owner of Grid Infrastructure.
Use the asmcmd volinfo command to obtain information related to the newly created volume ACFS_VOL1. . Use the asmcmd volcreate command to create a volume ACFS_VOL1 with 1GB size in disk group DATA as shown in the example.3. Using ASMCMD to create an ACFS volume. Invoke asmcmd while logged in as a Linux user owner of the Oracle Grid Infrastructure.
In similar fashion use the volinfo command to obtain information related to the ACFS_VOL2 volume created with sqlplus. .
. The –t option specifies that the file system is ACFS type.Use the mkfs command to make the file systems based on the ACFS volumes that we created with sqlplus and asmcmd.
Note that.Create /u01/acfs1 and /u01/acfs2 directories. . The acfsutil needs the ACFS volume device and the mount point. The registry serves a similar purpose to /etc/fstab in that the file systems get mounted automatically upon Oracle Grid Infrastructure restart. when registering an ACFS file system acfsutil mounts the ACFS file system as well. Use the acfsutil utility to register the created ACFS file systems in the registry.
Look at the example below. 4. . Resize ACFS file systems The acfsutil utility can be used to resize the ACFS utility online.The new ACFS file systems /u01/acfs1 and /u01/acfs2 are now available. We can dynamically resize the ACFS on the fly as shown below.
Upon creation of ACFS file system a . In the .ACFS directory there are two directories snaps and repl. In the example below a snapshot named snap1 is created for the ACFS mounted on /u01/acfs1. The snaps directory is used to store the snapshots. The information for the snap1 snapshot is stored in /u01/acfs1/. The test confirms that ACFS snapshot behaves as expected as the snapshot cannot be deleted if the current directory is the directory dedicated to store the snapshot data.ACFS/snaps/snap1.5. Creating Snapshots The acfsutil utility can be used to create a snapshot of the ACFS system. . ACFS directory is created as a subdirectory to the ACFS file system.
ACFS/snaps/snap1 directory. If we delete the rpm from /u01/acfs1 we can always restore the file from the snapshot snap1.ACFS/snaps/snap1. The snapshot snap1 is created. it can be restored from the snapshot. . The rpm is transferred to /u01/acfs1/. If the file is deleted then.Here we create a snapshot named snap1 for the ACFS system /u01/acfs1. Automatically with the creation of the snapshot the existing file is transferred to the snapshots directory /u01/acfs1/. In the example we have an existing rpm file in the ACFS file system /u01/acfs1.
The acfsutil utility can also be used to gather information about a specific ACFS file system as specified in the example below. .
.The acfsutil utility can be used to query the content of the registry. Note that the pupose of the registry is similar to /etc/fstab in Linux file systems that is. to ensure that ACFS file systems are mounted either on node reboot or upon Oracle Grid Infrastructure restart.
Using OEM Grid Control to manage ACFS OEM Grid control can also be used to create and manage ACFS volumes and file systems.6. . From the ASM page on OEM Grid Control navigate to Disk Groups tab.
We can see that the DATA disk Group is mounted. . Here we have different options to manage ACFS. Press Create button. Navigate to ASM Cluster File System.
Press Create ASM Volume. We will create a volume named ASM_VOLOEM with size 2GB within the DATA disk group. .
We specify the directory to serve as a mount point (pre-created prior to ACFS creation).The Show Command button shows the SQL statement to create the volume. . Upon successful volume creation we continue with ACFS creation. Press Return to return to ACFS creation. the volume device and the volume label.
Enter the Grid Infrastructure Linux credentials for the creation and registration of the ACFS. . Return to the Create ASM Cluster File System page and press OK.Show Command displays the steps to make the ACFS and to register it.
If it takes time to get mounted we can opt to mount it explicitly. .The ACFS is created. Specify the mount point. Select the newly created ACFS and press Mount button. Press Generate Command to see the command.
Press Return. . The /u01/acfs3 ACFS based on ASM_VOLOEM volume is mounted as shown below.
.We can use OEM Grid Control to resize the ACFS /u01/acfs3 from 2GB to 6GB. Press Return and Press OK to continue. On the page that appears enter 6GB size as shown. This is the Linux command that will be executed as show below. Select the /u01/acfs3 ACFS and in the Actions choose Resize and press Go. Press Show Command.
. The ACFS file system /u01/acfs3 is now 6GB from the initial size of2GB. OEM Grid Control resizes the ACFS as requested and we can see the result below.Enter the Oracle Grid Infrastructure owner credentials and press Continue.
OEM Grid Control and sqlplus. We explored the acfsutil utility enabling ACFS management and registration. . asmcmd. Summary We looked at the ASM volume creation using asmca.This concludes how to use the OEM Grid Control for managing ACFS. We created ACFS based on the ASM volume using mkfs. We resized online ACFS file system and created a snapshot to restore files residing on ACFS using acfsutil utility.