This post will describe how to install and configure OCFS2, the Oracle Cluster File System, a shared disk file system developed by Oracle Corporation and released under the GNU General Public License.
First of all download and install on both nodes the requested rpm files from the Oracle website: http://oss.oracle.com/projects/ocfs2/files/
Then run the console using the following command as root just from one node:
ocfs2console &
Then select Cluster->Configure Nodes... from menu
and the following window will appear
Press tha ADD button
And insert all details of your node (specifing the private IP address)
Again ADD button to add details for the second node
Click the APPLY button
The select Cluster->Propagate Configuration... from menu
Type YES and the root password when asked. When FINISHED! is showned, click on CLOSE button
Now from first node type:
/etc/init.d/o2cb configure
Answer Y to load O2CB driver on boot, then use default value for cluster name, then 61 as heartbeat dead threshold and then accept all default values.
The same steps for the second node
Now it's time to format, selecting Tasks->Format from menu
A list of available devices will appear. Use a Volume label and then press OK. I will setup TWO devices to share disks
First devices is formatted
Proceed with the second one
Quit OCFS2 console
Now on both nodes, run:
mkdir -p /u02/ocfs2/
mkdir -p /u02/ocfs2_mirror/
mount -t ocfs2 -o datavolume,nointr /dev/emcpowerb1 /u02/ocfs2/
mount -t ocfs2 -o datavolume,nointr /dev/emcpowerd1 /u02/ocfs2_mirror/
echo "/dev/emcpowerb1 /u02/ocfs2/ ocfs2 _netdev,datavolume,nointr 0 0" >> /etc/fstab
echo "/dev/emcpowerd1 /u02/ocfs2_mirror/ ocfs2 _netdev,datavolume,nointr 0 0" >> /etc/fstab
reboot