OCFS2- Introduction….

OCFS2 is a general-purpose, POSIX-compliant, and shared disk cluster file system. It allows multiple nodes to read from and write to files on the same disk at the same time. It behaves on all nodes exactly like a local file system and can be used in a nonclustered environment. Files, directories, and their content are always in sync across all nodes regardless of which node updates the files. For example, if you add a line to a file on node 1, it appears immediately on node 2.

OCFS (Release 1) was released in December 2002 to enable Oracle Real Application Cluster (RAC) users to run the clustered database without having to deal with RAW devices. The file system was designed to store database-related files, such as data files, control files, redo logs, and archive logs. OCFS refers to the file system in the 2.4 Linux Kernel.

OCFS2 is the next generation of the Oracle Cluster File System. It is designed to be a general-purpose cluster file system. You can store any files on OCFS2 and interact with it the same way you do on a regular file system. OCFS2 is being used in middleware clusters (Oracle E-Business Suite), appliances such as SAP’s Business Intelligence Accelerator, and virtualization with Oracle VM Server for x86.

OCFS2 was developed as a native Linux cluster file system at Oracle. It was submitted for inclusion and accepted into the mainline kernel in January 2006. It was included in the 2.6.16 kernel and is the first native cluster file system to be included in the Linux kernel.

Oracle has done a number of releases. OCFS2 Release 1.4 added new features such as sparse files, unwritten extents, inline data, and shared writeable mmap. OCFS2 Release 1.6 added REFLINKs, indexed directories, metadata checksums, extended attributes, quotas, POSIX ACLs, and allocation reservations. OCFS2 is now available to customers who use the Unbreakable Enterprise Kernel.

Both on-disk and network protocol compatibility is maintained across all releases of the file system. The on-disk format changes are managed by a set of feature flags that you can turn on and off. The file system in the kernel detects these features during the mount operation and continues only if it understands all the features. In the event of feature incompatibility, you have the option of either disabling the feature or upgrading the file system to a new release.

The network protocol version is negotiated by the nodes to ensure that all nodes understand the active protocol version. OCFS2 file systems can be mounted and used across multiple architectures at the same time. For example, you can mount a volume on a cluster with x86, ia64, or ppc nodes at the same time.

OCFS2 is currently being used in Oracle VM Server for x86 in both the management domain, to host virtual machine images, and in the guest domain, to allow virtual machines to share a file system. The following example shows mounted OCFS2 file systems and is for Oracle VM 3 where the shared storage for the cluster is NFS based

# mount |grep ocfs2

ocfs2_dlmfs on /dlm type ocfs2_dlmfs (rw,relatime)

/dev/mapper/ovspoolfs on /poolfsmnt/0004fb000005000031bfbabbc596af47 type ocfs2 (rw,_netdev,heartbeat=global)

/dev/mapper/SATA_ST3500320AS_5QM1EYTX on /OVS/Repositories/0004fb0000030000a826cf5f901b13de type ocfs2 (rw,heartbeat=none)

Since its inclusion in the mainline Linux kernel, other developers and companies have contributed to the development efforts. All new features are included in the mainline Linux kernel tree, and all bug fixes are applied to all active kernel trees. The source code of the OCFS2 file system is available under the GNU General Public License (GPL) version 2. Support for the file system is included as part of the Oracle Linux support contract. The OCFS2 development community also provides email support for all users via the ocfs2-users@oss.oracle.com mailing list.

The OCFS2 home page is http://oss.oracle.com/projects/ocfs2/