Planning for an OCFS2 Cluster
In addition to the hardware requirements for the cluster, you must also decide on the hostnames and IP addresses of the cluster members and which heartbeat mode the cluster uses.
In a cluster configuration, small packets travel throughout the entire setup over a specific UDP port, including all the networks configured for the cluster. These packets establish routes between the cluster nodes and show the health of the cluster network. For this reason, the packets are also called heartbeats.
You can configure a cluster to run in either of the following heartbeat modes:
-
Local heartbeat thread for each shared device (default heartbeat mode).
In this configuration, a node starts a heartbeat thread when it mounts an OCFS2 volume and stops the thread when it unmounts the volume. CPU overhead is large on nodes that mount many OCFS2 volumes because each mount requires a separate heartbeat thread. Likewise, many mounts increases the risk of a node becoming isolated from the cluster, because of a heartbeat I/O timeout on a single mount. This is known as fencing.
-
Global heartbeat on specific shared devices.
This mode lets you configure any OCFS2 volume as a global heartbeat device, if the volume occupies a whole disk device and not a partition. In this mode, the heartbeat to the device starts when the cluster becomes online and stops when the cluster goes offline. This mode is recommended for clusters that mount many OCFS2 volumes. A node fences itself out of the cluster if a heartbeat I/O timeout occurs on more than half the global heartbeat devices. To provide redundancy against failure of one of the devices, configure at least three global heartbeat devices.
The following figure shows a cluster with four nodes that are connected using a network switch to a LAN and a network storage server. The nodes and storage server are also connected using a switch to a private network that's used for the local cluster heartbeat.
Figure 3-1 Cluster Configuration by Using a Private Network

Although you can configure and use OCFS2 without using a private network, this increases the probability of a node fencing itself out of the cluster because of an I/O heartbeat timeout.
The following table provides recommendations for minimum cluster size settings for different file system size ranges:
File System Size | Suggested Minimum Cluster Size |
---|---|
1 GB - 10 GB |
8K |
10GB - 100 GB |
16K |
100 GB - 1 TB |
32K |
1 TB - 10 TB |
64K |
10 TB - 16 TB |
128K |