Systems Engineering and RDBMS

Archive for November 12th, 2007

OCFS, ASM, RAW Devices and Regular FileSystem

Posted by decipherinfosys on November 12, 2007

Oracle, as a multi-platform product, must to have the ability to function with more than one file system and drive device configuration.  There are several different storage options for a Database administrator to choose from.  It is important to understand what the storage options are available to you and what the pros and cons are.  In this post, we will be discussing the different options that are available with an Oracle implementation.  The different options are:

  1. Raw Devices.
  2. Cooked file systems.
  3. OCFS (Oracle Clustered file system)
  4. ASM
  5. NFS

Raw Devices

A raw device is either an entire disk, or a partition of a disk, that is not written to or controlled directly by the OS.  From the OS, the contents of RAW devices are not visible from the command line.  In the case of Oracle, this means you cannot view or manipulate the data files in the raw partition using standard UNIX commands.  This in itself, makes RAW devices a bit scary if you have not dealt with them before.  Also, with the advent of ASM, Oracle actually prefers the use of ASM over the direct use of Raw devices


  1. Raw devices tend to be faster in I/O than with “cooked” files systems, because the writing of data to disk is done by Oracle and skips the Operating systems I/O buffer.  Also, typical file system maintenance is not required by the operating system, there by reducing this overhead.
  2. Very good for REDO files, as they are very write intensive.


  1. The data files in a RAW partition/device cannot be viewed or manipulated through the OS command line.
  2. Due to the in ability to view or manipulate the data files, databases on Raw devices can be more difficult to maintain.

Cooked file systems

A cooked file system, is a regular file system that is managed by the operating system.  In layman’s terms, it is the file system used when installing your OS and creating partitions in the OS.  Nothing other than a standard installation needs to be done the DBA/SA.  Any OS operation can be performed in these files systems.  You can browse the directories and manipulate the files from the operating system interface.  It is very common to use cooked file systems with oracle.  More than likely, that is what you currently have your database on.


  1. The DBA can view and manipulated the database files.  This is much easier when needing move data file, or backup and restore data files.
  2. This is the default method of installation and management for Oracle.


  1. I/0 may be slower due to the fact that Oracle must use the operating system disk cache, instead of writing to disk directly.  The OS becomes and extra step when writing to disc.


Oracle Clustered File System, is a file system format that is proprietary to Oracle.  This file system is designed with clustering in mind, hence the name.  OCFS was designed by oracle to make it possible for DBA’s to run a RAC on a shared file system, without having to use RAW devices.  There are other clustered file systems on the market, however oracle offers OCFS at no cost.  The initial version of OCFS (OCFS 1) targeted making clustered data storage easier to manage.  Only database files, such as data files, control files, and redo log files (archived also) can be stored in these files system (in addition to the files the file system keeps their to maintain the shared cluster storage).  Oracle has now release OCFS2, which has been expanded to include the storage of Oracle binaries and scripts.  OCFS is not included with every operating system.  Certain OS’s are now including OCFS as an option for file system formatting, but for others the OCFS software will need to be downloaded from Oracle.


  1. The file system was designed with Oracle clustering in mind and it is free.
  2. Eliminates the need to use RAW devices or other expensive clustered file systems.
  3. With the advent of OCFS2, binaries, scripts, and configuration files (shared Oracle home) can be stored in the file system.  Making the management of RAC easier.


  1. With OCFS version 1, regular files cannot be store in the file system, however this issue is eliminated with OCFS2.


Automatic Storage Management is a feature of Oracle that allows the Database administrator to manage logical volumes for the database.  When setting up ASM, the disk groups that are managed are place on a raw partition.  During ASM set up, the installation software will perform a “disk discovery” for raw partitions available.  Because ASM does not use the OS file system, you get the same I/O performance benefits as you do with standard RAW devices.  In addition to the performance benefits, ASM by design, makes the management of the contents of the raw device easier, by acting as the volume manager (actually it is the volume manager).  ASM runs as a separate instance from Oracle (it is recommended to have a separate home, for upgrade and maintenance reasons).  Oracle accesses the ASM instance in order to read from the disk.  In order for Oracle to see the contents on the RAW partition(s), ASM must be up and running.  This differs for standard RAW devices, because ASM is accessing the devices, not the Oracle instance.  The ASM instance is what manages the disk groups where the data is stored.  Also, ASM for both single instance databases as well as clustered databases and is the preferred storage method for Clustering by Oracle.


  1. Same I/O benefits as with RAW devices.
  2. Oracle provides an interface to manage disk groups.
  3. ASM provides file level striping and mirroring.


  1. ASM only support data base files.  Standard files are not allowed.
  2. ASM files can only be managed using RMAN.  These management tasks include moving files from one disk group to another as well as backup and recovery operations.
  3. The files maintained by ASM are not visible to the OS.


Network File Systems are also used by Oracle as a storage options.  These file systems are stored on NAS (Network Attached Storage) devices/fliers.  Netapp and EMC are providers of NAS products.   NFS mounts are seen as remote devices, and not local to the machine as with a SAN.  Because NFS is stored on a remote device on the Network, through put may not be as good as with a SAN or local device, so systems with a high number of transactions may not benefit from this.  Oracle as a list of certified NFS configurations.


  1. The cost of NAS products is generally cheaper.


  1. There is a finite list of certified configurations by Oracle.
  2. I/O through put can be slower, and can be effected by additional network traffic if not isolated.

ASM is the most popular choice from Oracle 10g onwards and for RAC as well as non-RAC environments, it’s adoption has been really big.  Every environment is different though and you would need to weigh the pros and cons of each option.

Posted in Oracle | Leave a Comment »