Set OCFS2 1.8 with mulitpath LUN

Recently I have been testing OCFS2 as a shared file system solution for Oracle ECM. The testing has gone well. But I must say the documentation is fragmented and confusing. Some docs say online resize is not supported, others say it is with a clustered LVM, and still another states that it is supported. So I am testing version 1.8. Here is a quick setup. It's pretty simple.

UPDATE: you should install ocfs2-tools first.

1. Get your SAN group to present a LUN to all the servers in your cluster.

2. Setup multipathing for the LUN on both servers. I would suggest using an alias to help differntiate LUNs. From /etc/multipath.conf

multipaths {
        multipath {
                wwid                    350002acf17241340
                alias                   ocfs_test
}
 3. use o2cb to create a cluster

# o2cb add-cluster cluster_name

   run the following for each node that you will add:

o2cb add-node cluster_name node_name --ip ip_address
4. Copy /etc/ocfs2/cluster.conf to the other nodes. You will have to create the directory /etc/ocfs2 on each node.

5. Run the following on each node

# service o2cb configure

6. Now create a filesystem on the shared LUN. No options in this case. Just keeping it simple.

mkfs.ocfs2 /dev/mapper/ocfs_test
7. add an entry to /etc/fstab on all the nodes.

 /dev/mapper/ocfs_test   /ocfs_test              ocfs2   _netdev,defaults        0 0
8. mount -a

That's pretty much it.

For my purposes, I used a LUN with no partitioning.  I just don't see the value in it. I have tested both online and offline resizing of the file system and have had no issues. I even put a load on the file system from both nodes with bonnie++ and did an online resize. So far no issues. My next test is replicating the LUN to a DR array and seeing how a remote host will do with the volume.

Comments