Linux : Oracle unbreakable kernel and OCFS2 on CentOS/RHEL6

By | August 8, 2014

Oracle Cluster File System 2 (well known as OCFS2) is a pretty decent choice when come to chose a filesystem that need to be accessed and written using several server nodes. Unfortunately, RedHat do not support by default OCFS2 in their kernel since they are using GFS instead.

I am not aware of any unofficial kmod-ocfs2 module available for RHEL6. It seem that Oracle is making life more difficult to implement it in the kernel, forcing people to use their “UBLK” kernel instead. Compiling from source might work, however since my current use case will be for database server, Oracle kernel database optimized will be just fine!

Here is the procedure how to install Oracle UBK and OCFS2 on CentOS / RedHat Enterprise Linux 6.

1. First add the Oracle Yum repository for RHEL 6 :

And append the following :

2. Install the kernel and OCFS2 tools :

3. Restart your system and boot on your new kernel.

5. Make folder /etc/ocfs2 and create cluster.conf :

Then append the following :

Example :

6. Configure the Oracle Cluster Stack for OCFS2 (which is called o2cb) :

Then answer the questions that suite well your setup and match your “cluster.conf” settings (values assume the example mentioned above) :

This will actually write a file under the following path :

And should look like :

NOTE : Both configuration above (cluster.conf and o2cb) have to be copied on all nodes.

7. Format your OCFS2 filesystem :

(See ocfs2 man page for more details and options, you may want to go through the whole list to tune it according your needs.)

Here is an example of what I used :

Then just mount your volume :

Be Sociable, Share!