Chinaunix

标题: 请教一个分布式锁的问题(DLM) [打印本页]

作者: asdf2110    时间: 2010-09-26 15:33
标题: 请教一个分布式锁的问题(DLM)
我要单独测试一下这个分布式锁(DLM),但是按照dlm源码中的说明搭建不起来这个环境。
有谁搞过这个,帮偶解释一下,不胜感激~

附上一段测试说明:

The dlm is configured and controlled from user space through sysfs and a
couple of ioctl's.  A command line program, dlm_tool, can be used to do
everything manually.

Here are the dlm_tool config/control actions that will be used:

set_local  <nodeid> <ipaddr> [<weight>]
set_node   <nodeid> <ipaddr> [<weight>]
stop       <ls_name>
terminate  <ls_name>
start      <ls_name> <event_nr> <type> <nodeid>...
get_done   <ls_name>
finish     <ls_name> <event_nr>
set_id     <ls_name> <id>

For testing and illustration, some actions have been added to dlm_tool to use
the libdlm API.

create     <ls_name>
release    <ls_name>
lock       <ls_name> <res_name> <mode> [<flag>,...]
unlock     <ls_name> <lkid>            [<flag>,...]
convert    <ls_name> <lkid> <mode>     [<flag>,...]

So, dlm_tool is standing in for what would usually be two different entities.
The first set of config/control actions would usually be performed by a system
daemon associated with a cluster membership manager.  The second set of libdlm
actions would usually be performed by an application that wants to use the dlm
for synchronization.




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2