OCFS 配置

OCFS 配置

我正在设置虚拟机,并尝试让 OCFS 允许跨两个设备冗余。配置似乎可以正常工作,但实际上并没有同步文件:

/etc/ocfs2/cluster.conf

cluster:
        node_count = 2
        name = vmcluster

node:
        ip_port = 7777
        ip_address = 198.18.0.25
        number = 1
        name = vm1
        cluster = vmcluster

node:
        ip_port = 7777
        ip_address = 198.18.0.26
        number = 2
        name = vm2
        cluster = vmcluster

/etc/sysconfig/o2cb

# O2CB_ENABLED: 'true' means to load the driver on boot.
O2CB_ENABLED=true

# O2CB_STACK: The name of the cluster stack backing O2CB.
O2CB_STACK=o2cb

# O2CB_BOOTCLUSTER: If not empty, the name of a cluster to start.
O2CB_BOOTCLUSTER=vmcluster

# O2CB_HEARTBEAT_THRESHOLD: Iterations before a node is considered dead.
O2CB_HEARTBEAT_THRESHOLD=

# O2CB_IDLE_TIMEOUT_MS: Time in ms before a network connection is considered dead.
O2CB_IDLE_TIMEOUT_MS=

# O2CB_KEEPALIVE_DELAY_MS: Max time in ms before a keepalive packet is sent
O2CB_KEEPALIVE_DELAY_MS=

# O2CB_RECONNECT_DELAY_MS: Min time in ms between connection attempts
O2CB_RECONNECT_DELAY_MS=

OCFS 程序的状态:

[root@vm1 ~]# /etc/init.d/ocfs2 status
Configured OCFS2 mountpoints:  /cluster1 /cluster2
Active OCFS2 mountpoints:  /cluster1 /cluster2

[root@vm1 ~]# /etc/init.d/o2cb 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 "vmcluster": Online
  Heartbeat dead threshold: 31
  Network idle timeout: 30000
  Network keepalive delay: 2000
  Network reconnect delay: 2000
  Heartbeat mode: Local
Checking O2CB heartbeat: Active

我看到心跳模式显示“本地”。我查阅了以下文档:http://oss.oracle.com/projects/ocfs2/dist/documentation/v1.6/ocfs2-1_6-usersguide.pdf以及旧教程http://www.hbyconsultancy.com/blog/shared-ocfs2-partition-on-ubuntu-server-10-04-x64.html和其他地方。我似乎没有看到全貌……

我正在使用 Oracle Linux 3.0.1,它是 RHEL6 的修改版本。

答案1

最好将其保留为注释,但我没有选择。无论如何,关于您的 ocfs2 配置文件,节点编号从 0 开始,而不是 1;因此您将拥有节点 0 和 1,而不是 1 和 2。我不能说这会解决您的问题,但无论如何......

相关内容