Create OCFS2 Clustered File Systems on shared storage


parent child cluster symbol icon

Oracle Cluster File System (OCFS) presents a consistent file system image across the servers in a cluster. OCFS allows administrators to take advantage of a files system for the Oracle database files (data files, control files, and archive logs) and configuration files. This eases administration of the Oracle Real Application Clusters.

Install the ocfs2 packages

Use the ocfs2console gui to create the cluster.conf for you. Your first problem may be in creating the config by hand. Even if everything looks right including the permissions to the files and directories, the ocfs2 daemons may still not see the configuration at all. I just deleted the file and used the gui to create it for me and had no problems after that.

First from the ocfs2 console you’ll need to create the configuration. Under “Cluster”, click on “Configure Nodes”. Add at least two node names and ip addresses. Leave the port alone, the default 7777 should be fine. If this is a dedicated private network, then it really doesn’t matter which port you use. Quit the ocfs2console application and go back to your bash console.

Stop ocfs2 and o2cb services.

Load o2cb on all nodes before creating the file system.

You may find the cluster has automagically mounted at this time. If not, mount the cluster manually like this:

Or to mount it automatically using an fstab entry add this line to /etc/fstab:

That concludes a very basic setup.

Depending on what you have planned for your cluster, you may need additional file locking between nodes, or something like sanlock for running file based virtual machines to ensure multiple nodes don’t try to run the same VM at the same time.


Posted on June 25th, by admica in storage.

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">