ADMIN
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Tools<br />
OCFS2<br />
© Kheng Ho Toh, 123RF.com<br />
A simple approach to the OCFS2 cluster filesystem<br />
Divide and Conquer<br />
The vanilla kernel includes two cluster filesystems: OCFS2 has been around since 2.6.16 and is thus senior to<br />
GFS2. Although OCFS2 is non-trivial under the hood, it is fairly simple to deploy. By Udo Seidel<br />
Wherever two or more computers<br />
need to access the same set of data,<br />
Linux and Unix systems will have<br />
multiple competing approaches. (For<br />
an overview of the various technologies,<br />
see the “Shared Filesystems”<br />
box.) In this article, I take a close<br />
look at OCFS2, the Oracle Cluster File<br />
System shared disk filesystem [1]. As<br />
the name suggests, this filesystem<br />
is mainly suitable for cluster setups<br />
with multiple servers.<br />
Before you can set up a cluster filesystem<br />
based on shared disks, you<br />
need to look out for a couple of<br />
things. First, the administrator needs<br />
to establish the basic framework of a<br />
cluster, including stipulating the computers<br />
that belong to the cluster, how<br />
to access it via TCP/IP, and the cluster<br />
name. In OCFS2’s case, a single<br />
ASCII file is all it takes (Listing 1).<br />
The second task to tackle with a cluster<br />
filesystem is that of controlled and<br />
orderly access to the data with the<br />
use of file locking to avoid conflict situations.<br />
In OCFS2’s case, the Distributed<br />
Lock Manager (DLM) prevents<br />
filesystem inconsistencies. Initializing<br />
the OCFS2 cluster automatically<br />
launches DLM, so you don’t need to<br />
configure this separately. However,<br />
the best file locking is worthless if the<br />
computer writing to the filesystem<br />
goes haywire. The only way to prevent<br />
computers from writing is fenc-<br />
36 Admin 01 www.admin-magazine.com