The Blog from the DBA Classroom

By: Joel Goodman

Archive for October 13th, 2009

Using ASM’s Cluster File System (ACFS) & Dynamic Volume Manager (ADVM) on a Single Node

Posted by Joel Goodman on 13/10/2009

Oracle 11gR2 ASM supports a new type of file called a “volume file” which may be created in its own DISK GROUP or which may share space in another disk group. Volume files are externalised to the Unix operating system by the oracleadvm device driver and appear dynamically as special files in the /dev/asm directory.

These volumes may be used as block devices, may contain a file system such as an ext3 system or the ASM cluster file system, or ACFS may be used in which case the oracleacfs driver is also used for IO to the file system.

In Single node configurations these Oracle supplied device drivers are not loaded automatically, but the system administrator may use the acfsload utility in the $ORACLE_HOME/bin directory of the Grid Infrastructure installation from where the ASM instance executes. This may be done as follows:

# /u01/app/oracle/product/11.2.0/grid/bin/acfsload start

Alternatively creating a script, which is invoked automatically by init at system startup, and setting the script as a service may automate this. The script which would be placed in the /etc/init.d directory and which could be called for example “acfsdrivers” would look something like this to perform the load silently:


# chkconfig: 2345 30 21

# description: Load Oracle ACFS drivers at system boot

/u01/app/oracle/product/11.2.0/grid/bin/acfsload start -s

To automate this at boot time one would do the following as root:

# chmod u+x /etc/init.d/acfsdrivers

# chkconfig –add acfsdrivers

Accompanying this post is a demonstration script designed to run from SQLPLUS logged in the ASM instance on a single node running 11gR2 under Linux. In order to use it the Grid Infrastructure home owner must be added to /etc/sudoers, permitting execution of the utilities used in the demo with the sudo command, without requiring a password. In addition the name of the disk group should be changed to one that is present in your system and the name of the volume file changed to match the one created.

The demo is commented and does the following:

1.    Demonstrates the command line use of the following utilities

  • “acfsload” –  to start and stop the drivers
  • “advmutil” – to display ASM dynamic volume details
  • “acfsutil” –   to register and unregister acfs mount points, display the “registry” contents, display acfs file system metadata and create and remove acfs snapshots.
  • “asmcmd” –   to create and delete asm dynamic volumes, display volume metadata, list disk groups anddisplay volume statistics

2.    Creates an asm dynamic volume and file system

3.    Uses standard Linux utilities on these ASM components:

  • “mkfs” – to create the asm file system
  • “fsck”  – to check the file system
  • “lsmod” – to display the loaded kernel modules
  • “mount” – to mount the file system
  • “umount” – to unmount the file system
  • “mount.acfs” – to mount acfs file systems based on the registry

4.    Uses several new v$ views relevant to ADVM and ACFS.

You may download the script from here and the spooled output from advm_spool


Posted in Oracle | 1 Comment »