Overview of OCFS2

OCFS2 is a clustered file system for use with Linux®. OCFS2 allows multiple users on physically separated servers to read and write to the same files on the same physical disks at the same time. Access to shared files is coordinated, so that at any moment only one server is actually writing to a block of the file. The integrity of the write operation, the file contents, and the file system structure are protected.

The challenge to shared file systems in general is to make it possible for multiple servers to simultaneously mount the same file structure and to open the same files with read and write access, a scenario that in an unshared file system would lead to corruption of the file and the file system structure. OCFS2 uses a distributed lock manager to organize access and a network interconnect to share the information between clustered servers when a file is changed. When a file is resident in the memory of one of the servers in the cluster, its view of the file content does not change, and that version can be written to the shared file.

A shared file system on clustered servers can be the foundation of a clustered database design, but clustered database instances also communicate with each other, sharing cached data and metadata. Those types of cluster functions are typically part of a database application's cluster stack, and not that of OCFS2. The operation of an OCFS2 file system is managed using several services in the O2CB stack. The O2CB stack must be loaded, started, and brought online before anything can be done with the OCFS2 clustered file system.

Shared file systems are also used for creating high availability (HA) systems, where redundant access to data or executable files in storage provides failover access to SAN storage or local disk storage.

The shared file system can be used simply for the economy that comes from maintaining data in a single location rather than multiple locations.

This study is based on OCFS2 Version 1.2 distributed by Novell, with the SUSE Linux Enterprise Server (SLES) kernel version 10 SP1 on IBM® System z®. This version of OCFS2 was developed to support clustered databases in an enterprise environment.

The Novell distributions of OCFS2 are fully supported by Novell. OCFS2 is also available on Red Hat Enterprise Linux and Oracle Enterprise Linux, and both of those distributions are supported by Oracle when used with Oracle products.