歡迎您光臨本站 註冊首頁

請教一個分散式鎖的問題(DLM)

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

請教一個分散式鎖的問題(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.

[火星人 ] 請教一個分散式鎖的問題(DLM)已經有632次圍觀

http://coctec.com/docs/service/show-post-5431.html