Follow the procedures in this section to configure your system to use OCFS2 and to create OCFS2 volumes.
Before you begin, do the following:
Initialize, carve, or configure RAIDs on the SAN disks, as needed, to prepare the devices you plan to use for your OCFS2 volumes. Leave the devices as free space.
We recommend that you store application files and data files on different OCFS2 volumes, but it is only mandatory to do so if your application volumes and data volumes have different requirements for mounting. For example, the Oracle RAC database volume requires the datavolume and nointr mounting options, but the Oracle Home volume should never use these options.
Make sure that the ocfs2console
, and
ocfs2-tools
packages are installed. Use YaST or
command line methods to install them if they are not. For YaST
instructions, see
Section 14.1.6, “OCFS2 Packages”.
Before you can create OCFS2 volumes, you must configure OCFS2 services.
In the following procedure, you generate the
/etc/ocfs2/cluster.conf
file, save the
cluster.conf
file on all nodes, and create and
start the O2CB cluster service (o2cb).
Follow the procedure in this section for one node in the cluster.
Open a terminal window and log in as the
root
user or equivalent.
If the o2cb cluster service is not already enabled, enter
chkconfig --add o2cb
When you add a new service, chkconfig ensures that the service has either a start or a kill entry in every run level.
If the ocfs2 service is not already enabled, enter
chkconfig --add ocfs2
Configure the o2cb cluster service driver to load on boot.
Enter
/etc/init.d/o2cb configure
At the Load O2CB driver on boot (y/n) [n]
prompt, enter
y
(yes) to enable load on boot.
At the Cluster to start on boot (Enter “none”
to clear) [ocfs2]
prompt, enter
none
This choice presumes that you are setting up OCFS2 for the first
time or resetting the service. You specify a cluster name in the
next step when you set up the
/etc/ocfs2/cluster.conf
file.
Use the ocfs2console utility to set up and save
the /etc/ocfs2/cluster.conf
file to
all member nodes of the cluster.
This file should be the same on all the nodes in the cluster. Use the
following steps to set up the first node. Later, you can use the
ocfs2console to add new nodes to the cluster
dynamically and to propagate the modified
cluster.conf
file to all nodes.
However, if you change other settings, such as the cluster name and IP address, you must restart the cluster for the changes to take effect, as described in Step 6.
Open the ocfs2console GUI by entering
ocfs2console
In the ocfs2console, select + .
If cluster.conf is not present, the console will create one with a
default cluster name of ocfs2
. Modify the
cluster name as desired.
In the Node Configuration dialog box, click
to open the Add Node dialog box.
In the Add Node dialog box, specify the unique name of your primary
node, a unique IP address (such as
192.168.1.1
), and the port number
(optional, default is 7777), then click .
The ocfs2console console assigns node slot numbers sequentially from 0 to 254.
In the Node Configuration dialog box, click
, then click to dismiss the Add Node dialog box.
Click cluster.conf
file to all nodes.
If you need to restart the OCFS2 cluster for the changes to take effect, enter the following lines, waiting in between for the process to return a status of
./etc/init.d/o2cb stop
/etc/init.d/o2cb start
Creating an OCFS2 file system and adding new nodes to the cluster should be performed on only one of the nodes in the cluster.
Open a terminal window and log in as the
root
user or equivalent.
If the O2CB cluster service is offline, start it by entering the following command, then wait for the process to return a status of
.
/etc/init.d/o2cb online ocfs2
Replace
with
the actual cluster name of your OCFS2 cluster.
ocfs2
The OCFS2 cluster must be online, because the format operation must first ensure that the volume is not mounted on any node in the cluster.
Create and format the volume using one of the following methods:
In EVMSGUI, go to the Volumes page, select
+ , then specify the configuration settings.Use the mkfs.ocfs2 utility. For information about the syntax for this command, refer to the mkfs.ocfs2 man page.
In the ocfs2console, click + , select a device in the Available Devices list that you want to use for your OCFS2 volume, specify the configuration settings for the volume, then click to format the volume.
See the following table for recommended settings.