OCFS, ASM, RAW Devices and Regular FileSystem ? Systems Engineering and RDBMS

来源:百度文库 编辑:神马文学网 时间:2024/04/29 08:24:29

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 withmore than one file system and drive device configuration.  There areseveral different storage options for a Database administrator tochoose from.  It is important to understand what the storage optionsare available to you and what the pros and cons are.  In this post, wewill be discussing the different options that are available with anOracle 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.  Inthe case of Oracle, this means you cannot view or manipulate the datafiles in the raw partition using standard UNIX commands.  This initself, makes RAW devices a bit scary if you have not dealt with thembefore.  Also, with the advent of ASM, Oracle actually prefers the useof ASM over the direct use of Raw devices

Pros:

  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.

Cons:

  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 bythe operating system.  In layman’s terms, it is the file system usedwhen installing your OS and creating partitions in the OS.  Nothingother than a standard installation needs to be done the DBA/SA.  Any OSoperation can be performed in these files systems.  You can browse thedirectories and manipulate the files from the operating systeminterface.  It is very common to use cooked file systems with oracle. More than likely, that is what you currently have your database on.

Pros:

  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.

Cons:

  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.

OCFS

Oracle Clustered File System,is a file system format that is proprietary to Oracle.  This filesystem is designed with clustering in mind, hence the name.  OCFS wasdesigned by oracle to make it possible for DBA’s to run a RAC on ashared file system, without having to use RAW devices.  There are otherclustered file systems on the market, however oracle offers OCFS at nocost.  The initial version of OCFS (OCFS 1) targeted making clustereddata storage easier to manage.  Only database files, such as datafiles, control files, and redo log files (archived also) can be storedin these files system (in addition to the files the file system keepstheir to maintain the shared cluster storage).  Oracle has now releaseOCFS2, which has been expanded to include the storage of Oraclebinaries and scripts.  OCFS is not included with every operatingsystem.  Certain OS’s are now including OCFS as an option for filesystem formatting, but for others the OCFS software will need to bedownloaded from Oracle.

Pros:

  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.

Cons:

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

ASM

Automatic Storage Managementis a feature of Oracle that allows the Database administrator to managelogical volumes for the database.  When setting up ASM, the disk groupsthat are managed are place on a raw partition.  During ASM set up, theinstallation software will perform a “disk discovery” for rawpartitions available.  Because ASM does not use the OS file system, youget the same I/O performance benefits as you do with standard RAWdevices.  In addition to the performance benefits, ASM by design, makesthe management of the contents of the raw device easier, by acting asthe volume manager (actually it is the volume manager).  ASM runs as aseparate instance from Oracle (it is recommended to have a separatehome, for upgrade and maintenance reasons).  Oracle accesses the ASMinstance in order to read from the disk.  In order for Oracle to seethe contents on the RAW partition(s), ASM must be up and running.  Thisdiffers for standard RAW devices, because ASM is accessing the devices,not the Oracle instance.  The ASM instance is what manages the diskgroups where the data is stored.  Also, ASM for both single instancedatabases as well as clustered databases and is the preferred storagemethod for Clustering by Oracle.

Pros:

  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.

Cons:

  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.

NFS

Network File Systemsare also used by Oracle as a storage options.  These file systems arestored on NAS (Network Attached Storage) devices/fliers.  Netapp andEMC are providers of NAS products.   NFS mounts are seen as remotedevices, and not local to the machine as with a SAN.  Because NFS isstored on a remote device on the Network, through put may not be asgood as with a SAN or local device, so systems with a high number oftransactions may not benefit from this.  Oracle as a list of certifiedNFS configurations.

Pros:

  1. The cost of NAS products is generally cheaper.

Cons:

  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 RACas well as non-RAC environments, it’s adoption has been really big. Every environment is different though and you would need to weigh thepros and cons of each option.