Follow the procedures in this section to configure your system to use OCFS2 and to create OCFS2 volumes.
Before you begin, do the following:
Prepare the block 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.
Make sure that the
ocfs2-tools package is installed. Use YaST or
command line methods to install them if they are not. For YaST
instructions, see Section 9.3, “OCFS2 Packages”.
Before you can create OCFS2 volumes, you must configure OCFS2 services. .
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.
Add the distributed lock manager configuration.
Start the crm shell and create a new scratch configuration:
crm
cib new stack-glue
Create the DLM service and have it run on all machines in the cluster:
configure
primitive dlm ocf:pacemaker:controld op monitor interval=120s
clone dlm-clone dlm meta globally-unique=false interleave=true
end
Verify the changes you made to the cluster before commiting them:
cib diff
configure verify
Upload the configuration to the cluster and quit the shell:
cib commit stack-glue
quit
Add the O2CB configuration with .
Start the crm shell and create a new scratch configuration:
crm
cib new oracle-glue
Configure Pacemaker to start the o2cb service on every node in the cluster.
configure
primitive o2cb ocf:ocfs2:o2cb op monitor interval=120s
clone o2cb-clone o2cb meta globally-unique=false interleave=true
Make sure that Pacemaker only starts the o2cb service on nodes that also have a copy of the dlm service already running:
colocation o2cb-with-dlm INFINITY: o2cb-clone dlm-clone
order start-o2cb-after-dlm mandatory: dlm-clone o2cb-clone
end
Upload the configuration to the cluster and quit the shell:
cib commit stack-glue
quit
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.
Check if the cluster is online with the command crm_mon.
Create and format the volume using one of the following methods:
Use the mkfs.ocfs2 utility. For information about the syntax for this command, refer to the mkfs.ocfs2 man page.
To create a new OCFS2 file system on /dev/sdb1
that supports up to 16 cluster nodes, use
mkfs.ocfs2 -N 16 /dev/sdb1
See the following table for recommended settings.
|
OCFS2 Parameter |
Description and Recommendation |
|---|---|
|
Volume label |
A descriptive name for the volume to make it uniquely identifiable when it is mounted on different nodes. Use the tunefs.ocfs2 utility to modify the label as needed. |
|
Cluster size |
Cluster size is the smallest unit of space allocated to a file to hold the data. Options are 4, 8, 16, 32, 64, 128, 256, 512, and 1024 KB. Cluster size cannot be modified after the volume is formatted. Oracle recommends a cluster size of 128 KB or larger for database volumes. Oracle also recommends a cluster size of 32 or 64 KB for Oracle Home. |
|
Number of node slots |
The maximum number of nodes that can concurrently mount a volume. For each of the nodes, OCFS2 creates separate system files, such as the journals, for each of the nodes. Nodes that access the volume can be a combination of little-endian architectures (such as x86, x86-64, and ia64) and big-endian architectures (such as ppc64 and s390x). Node-specific files are referred to as local files. A node slot number is appended to the local file. For example: journal:0000 belongs to whatever node is assigned to slot number 0. Set each volume’s maximum number of node slots when you create it, according to how many nodes that you expect to concurrently mount the volume. Use the tunefs.ocfs2 utility to increase the number of node slots as needed; the value cannot be decreased. |
|
Block size |
The smallest unit of space addressable by the file system. Specify the block size when you create the volume. Options are 512 bytes (not recommended), 1 KB, 2 KB, or 4 KB (recommended for most volumes). Block size cannot be modified after the volume is formatted. |