我正在尝试创建一个卷组,可以使用 clvm 在两台服务器上访问该卷组。我读到了它,看起来使用 cman 来做到这一点是最容易的。但经过几个小时的测试后,我无法实现有效的设置。我无法启动 clvmd,我很沮丧,因为我找不到原因。为什么它说无法连接到本地套接字?它的socket是什么意思?几秒钟后,dlm 出现问题(见下文)。
# clvmd -fd2 -I cman
local socket: connect failed: No such file or directory
clvmd could not connect to cluster manager
Consult syslog for more information
# tail /var/log/syslog
... clvmd[765]: CLVMD started
... clvmd[765]: Connected to CMAN
... clvmd[765]: CMAN initialisation complete
... kernel: [ 1069.787540] dlm: Using TCP for communications
... kernel: [ 1069.787874] dlm: c: joining the lockspace group...
... kernel: [ 1069.795626] dlm: c: group event done 0 0
... kernel: [ 1069.795628] dlm: c: dlm_recover 1
... kernel: [ 1069.795674] dlm: c: add member 1
... kernel: [ 1069.795676] dlm: c: dlm_recover_members 1 nodes
... kernel: [ 1069.795678] dlm: c: generation 1 slots 1 1:1
... kernel: [ 1069.795679] dlm: c: dlm_recover_directory
... kernel: [ 1069.795679] dlm: c: dlm_recover_directory 0 in 0 new
... kernel: [ 1069.795680] dlm: c: dlm_recover_directory 0 out 0 messages
... kernel: [ 1069.795705] dlm: c: dlm_recover 1 generation 1 done: 0 ms
... kernel: [ 1069.797183] dlm: c: join complete
... clvmd[765]: Unable to create DLM lockspace for CLVM: No such file or directory
... clvmd[765]: Can't initialise cluster interface
我阅读了一些描述 dlm 设置问题的互联网资源。但对我来说,这似乎没有问题:
# ls -l /dev/dlm*
crw-rw---- 1 root root 10, 56 Apr 3 10:22 /dev/dlm_c
crw-rw-rw- 1 root root 10, 59 Apr 3 10:20 /dev/dlm-control
crw-rw-rw- 1 root root 10, 58 Apr 3 10:20 /dev/dlm-monitor
crw-rw---- 1 root root 10, 57 Apr 3 10:20 /dev/dlm_plock
# lsmod|grep dlm
dlm 157924 13
sctp 299454 3 dlm
configfs 31664 2 dlm
也许我忘记创建一个重要的配置条目。我对这个话题很陌生。我的测试环境由两个虚拟 Debian 主机(test1 和 test2)组成。 cman_tool 表明它们已正确连接在一起。这是我的 /etc/cluster/cluster.conf
<cluster name="mycluster" config_version="4">
<cman two_node="1" expected_votes="1"/>
<clusternodes>
<clusternode name="test1" nodeid="1">
<fence>
</fence>
</clusternode>
<clusternode name="test2" nodeid="2">
<fence>
</fence>
</clusternode>
</clusternodes>
<fencedevices>
</fencedevices>
<rm>
</rm>
</cluster>
非常欢迎任何让我更接近问题根源的提示!