Pages

Sunday, February 23, 2014

ASM Cluster File System (ACFS)



Automatic Storage Management Cluster File System (ACFS)

When ASM was first introduced in Oracle 10g, it was strictly intended for managing Oracle database-related files only. However, an ASM Cluster File System (ACFS), a new feature in Oracle 11g R2 Grid Infrastructure, extends ASM's capabilities significantly to manage all types of data.

Oracle ACFS is designed as a general purpose, standalone, and cluster-wide filesystem solution, which now supports the data that is maintained outside the Oracle database. Apart from Oracle database datafiles, ACFS can also be used to store Oracle binaries, application files, executables, database trace and log files, BFILEs, video, audio, and other configuration files. The following diagram illustrates the Oracle ASM storage layers:














Practical Usages of ACFS
 
        Oracle database installation binaries
-   RAC or single instance ORACLE_HOME directories
        Database exports
        Database logs and trace files (Automatic Diagnostic Repository (ADR))
        File based database objects
-   UTL_FILE_DIR location
-   Directories used by EXTPROC routines
-   Directory objects for external BFILES and external tables
        Application logs & Report output
        Middle-tier shared filesystem for Oracle Applications.




Oracle ACFS drivers
 
The following mandatory drivers are installed as part of the Grid Infrastructure installation and must be loaded into the operating system  to support ACFS and ADVM functionality:

  • oracleacfs (oracleacfs.ko): The ACFS filesystem module manages all ACFS filesystem operations 
  •  oracleavdm (oracleavdm.ko): The AVDM module provides capabilities to directly interface with the filesystem 
  •  oracleoks (oracleoks.ko): The kernel services module provides memory management, and lock and cluster synchronization

 



To utilize ACFS the ACFS drivers and modules must be loaded into the operating system

  •  For Grid Infrastructure installations in a cluster the drivers and modules are loaded automatically
  • Single instance Grid Infrastructure installations the ACFS Drivers/Modules must be loaded manually

Load ACFS Drivers/Modules Manually
          -   Log into the host operating system as root
          -   <GRIDHOME>/bin/acfsload start
          -   Place the load command into /etc/rc.d/rc.local for the load to be persistent across node restarts
 
ACFS Deployment

There are two types of ACFS filesystems: CRS Managed ACFS and General Purpose ACFS. CRS Managed ACFS filesystems have associated Oracle Clusterware resources and generally have defined interdependencies with other Oracle Clusterware resources; e.g., database, ASM disk group, etc. CRS Managed ACFS is specifically beneficial for shared ORACLE_HOME filesystems. General Purpose ACFS are general-purpose filesystems that are completely transparent to Oracle Clusterware and its resources.

Creating an ACFS filesystem for General Purpose FileSystem using ASMCA
 
        Run $GRID_HOME/bin/asmca at a command prompt from the console. When ASMCA is initiated, it will take you to the main screen where you need to click on the ASM Cluster File Systems tab and then click on the Create button
        On the Create ASM Cluster File System screen, select any existing volume from the drop-down list on which you need to configure the ACFS filesystem. In addition, there is also an option available in the drop-down list to create a new volume.
        You have the option to create a filesystem to use either for Oracle Binaries (shared Oracle Home) or a General Purpose File System (GPFS). When you choose a filesystem type for GPFS, the filesystem is created under $ORACLE_BASE/acfsmounts (non-CRS ORACLE_BASE).
 


 
 
 
 
Creating an ACFS filesystem with ASMCMD
 
ASMCMD is a command-line utility and another way to create and manage an Oracle ACFS filesystem. When you decide to create the ACFS filesystem using ASMCMD, you need to complete the following steps:
        Before we start creating the ACFS with ASMCMD, ensure the ADVM is already configured. If no ADVM was configured before, then create one.
        Create a filesystem using the operating system-specific filesystem creation command.
        Map the mount point through the Oracle ACFS mount registry.
        Mount the specific mount point using the operating system-specific command, for example, the mount command.
 
Create a new volume
 
asmcmd volcreate -G DATA_DG -s 1g advm_vg2
 














Create a new ACFS filesystem

mkfs -t acfs -b 4k /dev/asm/advm_vg2-74
 
 
 
 
 
 
 
Mount the filesystem
 
mount -t acfs /dev/asm/advm_vg2-74 /d01/ahfathi
 
 






ACFS Mount Registry

An ACFS Mount Registry is used to provide a persistent entry for each General Purpose ACFS filesystem that needs to be mounted after a reboot. This ACFS Mount Registry is very similar to the /etc/fstab on
Linux, The ACFS Mount Registry can be probed, using the acfsutil command, to obtain filesystem, mount, and file information.

/sbin/acfsutil registry -a -f -n node1,node2 /dev/asm/advm_vg2-74 /d01/ahfathi 
/sbin/acfsutil size +2G /d01/ahfathi 
/sbin/acfsutil info fs /d01/ahfathi
 






No comments:

Post a Comment