In addition to configuring the cluster layout in the /etc/ocfs2/cluster.conf file, the O2CB cluster stack configuration consists of cluster timeout configuration. O2CB has four configurable cluster timeouts that are specified in the /etc/sysconfig/o2cb file:
- Heartbeat Dead Threshold – Specifies the number of two-second iterations before a node is considered dead. To convert the timeout in seconds to the number of iterations, divide the timeout in seconds by 2 and add 1. For example, to specify a 60-second timeout, set the threshold to 31 ((60 / 2) + 1). This is the default timeout value. To specify a timeout value of 120 seconds, set the threshold to 61. The heartbeat threshold must be the same on all nodes of the cluster.
- Network Idle Timeout – Specifies the time in milliseconds (ms) before a network connection is considered dead. The default is 30,000 ms.
- Network Keepalive Delay – Specifies the maximum delay in milliseconds before a keepalive packet is sent to another node. If the node is alive, it is expected to respond. The default is 2,000 ms.
- Network Reconnect Delay – Specifies the minimum delay in milliseconds between connection attempts. It defaults to 2,000 ms.
Cluster timeouts are configured by using the /sbin/o2cb.init initialization script.
Use the /sbin/o2cb.init initialization script to configure the cluster stack and cluster timeout values and to view the status and settings of the cluster. Run the initialization script commands on each node of the cluster.
The following command allows you to configure the cluster stack and the cluster timeout values:
# service o2cb configure
Configuring the O2CB driver.
This will configure the on-boot properties of the O2CB driver. The following questions will determine whether the driver is loaded on boot. The current values will be shown in brackets (‘[]’). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort.
Specify whether to load the O2CB cluster stack driver at boot time. The default is no.
Load O2CB driver on boot (y/n) [n]: y
Provide the name of the cluster stack service. The default and correct response is o2cb.
Cluster stack backing O2CB [o2cb]: ENTER
Provide the name of the cluster that you created in the cluster layout configuration file.
Cluster to start on boot (Enter “none” to clear) [ocfs2]: mycluster
The cluster stack configuration continues as follows, prompting for cluster timeout information:
Specify heartbeat dead threshold (>=7) [31]: ENTER
Specify network idle timeout in ms (>=5000) [30000]: ENTER
Specify network keepalive delay in ms (>=1000) [2000]: ENTER
Specify network reconnect delay in ms (>=2000) [2000]: ENTER
After responding to all the queries, additional information appears.
Writing O2CB configuration: OK
checking debugfs…
Loading stack plugin “o2cb”: OK
Loading filesystem “ocfs2_dlmfs”: OK
Creating directory ‘/dlm’: OK
Mounting ocfs2_dlmfs filesystem at /dlm: OK
Setting cluster stack “o2cb”: OK
Registering O2CB cluster “mycluster”: OK
Setting O2CB cluster timeouts : OK
Use the following command to view the settings for the cluster stack:
# /sbin/o2cb.init status
Driver for “configfs”: Loaded
Filesystem “configfs”: Mounted
Stack glue driver: Loaded
Stack plugin “o2cb”: Loaded
Driver for “ocfs2_dlmfs”: Loaded
Filesystem “ocfs2_dlmfs”: Mounted
Checking O2CB cluster “mycluster”: Online
Heartbeat dead threshold: 31
Network idle timeout: 30000
Network keepalive delay: 2000
Network reconnect delay: 2000
Heartbeat mode: Local
Checking O2CB heartbeat: Not active
Debug file system at /sys/kernel/debug: mounted
The configfs file system is loaded and mounted on /sys/kernel/config. Another synthetic or virtual file system, ocfs2_dlmfs, is loaded and mounted on /dlm. OCFS2 uses DLM to manage concurrent access from cluster nodes. DLM itself uses ocfs2_dlmfs, which is separate from the actual OCFS2 file systems on your system.
Recent Comments