 |
|
Installing OCFS
Software
Oracle Database Tips by Donald Burleson |
The instructions for downloading and burning to
disk all of the elements required to install OCFS can be found in
Chapter 4. Review Chapter 4 and copy the files into the /tmp
directory.
OCFS software must be installed as root using the
rpm -ivh command. Do not login as another user and use the
sucommand to install and configure OCFS! Make sure
you login directly as root. There are four elements that need to be
installed. Some of the files installed are dependent upon others, so
install them in the order shown in Figure 5.6, and install the
software on all nodes.
OCFS requires a version of modutils that is older
than the one already installed with the Fedora kernel, so it must be
forced in with the --force switch as shown in Figure 5.6. The
necessary version of modutils is included in the code depot.
Configuring OCFS
Once installed, OCFS can be configured by the root
user. Launch the OCFS Tool with the command
ocfstool.
Click tasks, and then select generate config. As long as the network
has been set up properly, the default values will be correct. This
will create the text file /etc/ocfs.conf. Generate a configuration
file and then quit the OCFS tool program. Viewing the configuration
file is easy to do with the more command as seen in Figure 5.8. Finish
this step on each node.
The parameter
comm_voting= 1 tells
OCFS to prefer the network to share voting information among the
nodes. With this configuration if the network becomes unavailable, it
will fail over to sharing voting information via the disk. If
comm_voting = 0, voting
information will be shared via the disk only. Using the network is
preferred because it is faster and offers a fail-over option.
With the config file generated on each node, run
the command load_ocfson each node as shown in Figure 5.9.
The module will load with warnings. This is
expected on Fedora Core 1. The
load_ocfscommand does not need to be run after rebooting
because OCFS will be loaded automatically from the script /etc/init.d/ocfs,
which was written to disk and turned on with chkconfig when OCFS was
installed.
Create the directories to be used as mount points.
Use the mkdir command and the chowncommand as shown in Figure 5.10 to create and
change ownership of the directories on each node.
The directories /u02 and /u03 will be used to
mount the shared partitions on the external drive.
With OCFS configured and loaded on each node in
the cluster, ocfstool can now be used
to format a partition on the shared fire-wire disk. Formatting a
partition needs to be done from only one node. To do this, launch the
OCFS tool again with the command
ocfstool. Using the OCFS toolbar, choose Preferences and switch
to Advanced as shown in Figure 5.11. This will add a few more options
such as the force command.
From the toolbar, choose Tasks and then Format. A
new window will appear as shown in Figure 5.12.
M
Warning - when attempting to format a partition
that has been previously formatted with OCFS, the formatter may get
stuck, even if the force option is included. To overcome this
problem, you can format the given partition with the ext3 file
system using the command mkfs ‑t ext3 /dev/sda5 (replacing
sda5 with the partition in question). This will overwrite any header
on that partition and subsequently allow the OCFS formatter to
complete its task quickly. This is a valuable trick for starting
from scratch on a previously used partition.
Use the settings shown in Figure 5.12 for the
partition /dev/sda5, and use the mount-point /u03 for the partition
/dev/sda6. The force option is useful when overwriting a pre-existing
OCFS partition.
 |
If you want to learn RAC at home, get the bestselling book "Personal
Oracle Real Application Clusters" by Edward Stoever.
You can buy it direct from the publisher for 30%-off and get
instant access to the code depot of Oracle tuning scripts. |
|