~ubuntu-branches/ubuntu/trusty/dlm/trusty

« back to all changes in this revision

Viewing changes to dlm_controld/dlm.conf.5

  • Committer: Package Import Robot
  • Author(s): Andres Rodriguez
  • Date: 2013-07-23 15:50:10 UTC
  • Revision ID: package-import@ubuntu.com-20130723155010-khpwf6vc04wjho2a
Tags: upstream-4.0.1
ImportĀ upstreamĀ versionĀ 4.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH DLM.CONF 5 2012-04-09 dlm dlm
 
2
 
 
3
.SH NAME
 
4
dlm.conf \- dlm_controld configuration file
 
5
 
 
6
.SH DESCRIPTION
 
7
The configuration options in dlm.conf mirror the dlm_controld
 
8
command line options.  The config file additionally allows
 
9
advanced fencing and lockspace configuration that are not
 
10
supported on the command line.
 
11
 
 
12
.SH Command line equivalents
 
13
 
 
14
If an option is specified on the command line and in the config file, the
 
15
command line setting overrides the config file setting.
 
16
See
 
17
.BR dlm_controld (8)
 
18
for descriptions and dlm_controld -h for defaults.
 
19
 
 
20
Format:
 
21
 
 
22
key=val
 
23
 
 
24
Example:
 
25
 
 
26
log_debug=1
 
27
.br
 
28
post_join_delay=10
 
29
.br
 
30
protocol=tcp
 
31
 
 
32
Options:
 
33
 
 
34
daemon_debug
 
35
.br
 
36
log_debug
 
37
.br
 
38
protocol
 
39
.br
 
40
debug_logfile
 
41
.br
 
42
enable_plock
 
43
.br
 
44
plock_debug
 
45
.br
 
46
plock_rate_limit
 
47
.br
 
48
plock_ownership
 
49
.br
 
50
drop_resources_time
 
51
.br
 
52
drop_resources_count
 
53
.br
 
54
drop_resources_age
 
55
.br
 
56
post_join_delay
 
57
.br
 
58
enable_fencing
 
59
.br
 
60
enable_concurrent_fencing
 
61
.br
 
62
enable_startup_fencing
 
63
.br
 
64
enable_quorum_fencing
 
65
.br
 
66
enable_quorum_lockspace
 
67
.br
 
68
 
 
69
.SH Fencing
 
70
 
 
71
A fence device definition begins with a
 
72
.B device
 
73
line, followed by a number of
 
74
.B connect
 
75
lines, one for each node connected to the device.
 
76
 
 
77
A blank line separates device definitions.
 
78
 
 
79
Devices are used in the order they are listed.
 
80
 
 
81
The
 
82
.B device
 
83
key word is followed by a unique
 
84
.IR dev_name ,
 
85
the
 
86
.I agent
 
87
program to be used, and
 
88
.IR args ,
 
89
which are agent arguments specific to the device.
 
90
 
 
91
The
 
92
.B connect
 
93
key word is followed by the
 
94
.I dev_name
 
95
of the device section, the node ID of the connected node in the format
 
96
.BI node= nodeid
 
97
and
 
98
.IR args ,
 
99
which are agent arguments specific to the node for the given device.
 
100
 
 
101
The format of
 
102
.I args
 
103
is key=val on both device and connect lines, each pair separated by a space,
 
104
e.g. key1=val1 key2=val2 key3=val3.
 
105
 
 
106
Format:
 
107
 
 
108
.B device
 
109
.I " dev_name"
 
110
.I agent
 
111
[args]
 
112
.br
 
113
.B connect
 
114
.I dev_name
 
115
.BI node= nodeid
 
116
[args]
 
117
.br
 
118
.B connect
 
119
.I dev_name
 
120
.BI node= nodeid
 
121
[args]
 
122
.br
 
123
.B connect
 
124
.I dev_name
 
125
.BI node= nodeid
 
126
[args]
 
127
.br
 
128
 
 
129
Example:
 
130
 
 
131
device  foo fence_foo ipaddr=1.1.1.1 login=x password=y
 
132
.br
 
133
connect foo node=1 port=1
 
134
.br
 
135
connect foo node=2 port=2
 
136
.br
 
137
connect foo node=3 port=3
 
138
 
 
139
device  bar fence_bar ipaddr=2.2.2.2 login=x password=y
 
140
.br
 
141
connect bar node=1 port=1
 
142
.br
 
143
connect bar node=2 port=2
 
144
.br
 
145
connect bar node=3 port=3
 
146
 
 
147
.SS Parallel devices
 
148
 
 
149
Some devices, like dual power or dual path, must all be turned off in
 
150
parallel for fencing to succeed.  To define multiple devices as being
 
151
parallel to each other, use the same base dev_name with different
 
152
suffixes and a colon separator between base name and suffix.
 
153
 
 
154
Format:
 
155
 
 
156
.B device
 
157
.IR " dev_name" :1
 
158
.IR agent
 
159
[args]
 
160
.br
 
161
.B connect
 
162
.IR dev_name :1
 
163
.BI node= nodeid
 
164
[args]
 
165
.br
 
166
.B connect
 
167
.IR dev_name :1
 
168
.BI node= nodeid
 
169
[args]
 
170
.br
 
171
.B connect
 
172
.IR dev_name :1
 
173
.BI node= nodeid
 
174
[args]
 
175
 
 
176
.B device
 
177
.IR " dev_name" :2
 
178
.I agent
 
179
[args]
 
180
.br
 
181
.B connect
 
182
.IR dev_name :2
 
183
.BI node= nodeid
 
184
[args]
 
185
.br
 
186
.B connect
 
187
.IR dev_name :2
 
188
.BI node= nodeid
 
189
[args]
 
190
.br
 
191
.B connect
 
192
.IR dev_name :2
 
193
.BI node= nodeid
 
194
[args]
 
195
 
 
196
Example:
 
197
 
 
198
device  foo:1 fence_foo ipaddr=1.1.1.1 login=x password=y
 
199
.br
 
200
connect foo:1 node=1 port=1
 
201
.br
 
202
connect foo:2 node=2 port=2
 
203
.br
 
204
connect foo:3 node=3 port=3
 
205
 
 
206
device  foo:2 fence_foo ipaddr=5.5.5.5 login=x password=y
 
207
.br
 
208
connect foo:2 node=1 port=1
 
209
.br
 
210
connect foo:2 node=2 port=2
 
211
.br
 
212
connect foo:2 node=3 port=3
 
213
 
 
214
.SS Unfencing
 
215
 
 
216
A node may sometimes need to "unfence" itself when starting.  The
 
217
unfencing command reverses the effect of a previous fencing operation
 
218
against it.  An example would be fencing that disables a port on a SAN
 
219
switch.  A node could use unfencing to re-enable its switch port when
 
220
starting up after rebooting.  (Care must be taken to ensure it's safe for
 
221
a node to unfence itself.  A node often needs to be cleanly rebooted
 
222
before unfencing itself.)
 
223
 
 
224
To specify that a node should unfence itself for a given
 
225
.BR device, 
 
226
the
 
227
.B unfence
 
228
line is added after the
 
229
.B connect
 
230
lines.
 
231
 
 
232
Format:
 
233
 
 
234
.B device
 
235
.I " dev_name"
 
236
.I agent
 
237
[args]
 
238
.br
 
239
.B connect
 
240
.I dev_name
 
241
.BI node= nodeid
 
242
[args]
 
243
.br
 
244
.B connect
 
245
.I dev_name
 
246
.BI node= nodeid
 
247
[args]
 
248
.br
 
249
.B connect
 
250
.I dev_name
 
251
.BI node= nodeid
 
252
[args]
 
253
.br
 
254
.BI "unfence " dev_name
 
255
 
 
256
Example:
 
257
 
 
258
device  foo fence_foo ipaddr=1.1.1.1 login=x password=y
 
259
.br
 
260
connect foo node=1 port=1
 
261
.br
 
262
connect foo node=2 port=2
 
263
.br
 
264
connect foo node=3 port=3
 
265
.br
 
266
unfence foo
 
267
 
 
268
.SS Simple devices
 
269
 
 
270
In some cases, a single fence device is used for all nodes, and it
 
271
requires no node-specific args.  This would typically be a "bridge" fence
 
272
device in which an agent is passing a fence request to another subsystem
 
273
to handle.  (Note that a "node=nodeid" arg is always automatically
 
274
included in agent args, so a node-specific nodeid is always present to
 
275
minimally identify the victim.)
 
276
 
 
277
In such a case, a simplified, single-line fence configuration is possible,
 
278
with format:
 
279
 
 
280
.B fence_all
 
281
.I agent
 
282
[args]
 
283
 
 
284
Example:
 
285
 
 
286
fence_all dlm_stonith
 
287
 
 
288
A fence_all configuration is not compatible with a fence device
 
289
configuration (above).
 
290
 
 
291
Unfencing can optionally be applied with:
 
292
 
 
293
.B fence_all
 
294
.I agent
 
295
[args]
 
296
.br
 
297
.B unfence_all
 
298
 
 
299
.SH Lockspace configuration
 
300
 
 
301
A lockspace definition begins with a
 
302
.B lockspace
 
303
line, followed by a number of
 
304
.B master
 
305
lines.  A blank line separates lockspace definitions.
 
306
 
 
307
Format:
 
308
 
 
309
.B lockspace
 
310
.I ls_name
 
311
[ls_args]
 
312
.br
 
313
.B master
 
314
.I "   ls_name"
 
315
.BI node= nodeid
 
316
[node_args]
 
317
.br
 
318
.B master
 
319
.I "   ls_name"
 
320
.BI node= nodeid
 
321
[node_args]
 
322
.br
 
323
.B master
 
324
.I "   ls_name"
 
325
.BI node= nodeid
 
326
[node_args]
 
327
.br
 
328
 
 
329
.SS Disabling resource directory
 
330
 
 
331
Lockspaces usually use a resource directory to keep track of which node is
 
332
the master of each resource.  The dlm can operate without the resource
 
333
directory, though, by statically assigning the master of a resource using
 
334
a hash of the resource name.  To enable, set the per-lockspace
 
335
.B nodir
 
336
option to 1.
 
337
 
 
338
Example:
 
339
 
 
340
lockspace foo nodir=1
 
341
 
 
342
.SS Lock-server configuration
 
343
 
 
344
The nodir setting can be combined with node weights to create a
 
345
configuration where select node(s) are the master of all resources/locks.
 
346
These master nodes can be viewed as "lock servers" for the other nodes.
 
347
 
 
348
Example of nodeid 1 as master of all resources:
 
349
 
 
350
lockspace foo nodir=1
 
351
.br
 
352
master node=1
 
353
 
 
354
Example of nodeid's 1 and 2 as masters of all resources:
 
355
 
 
356
lockspace foo nodir=1
 
357
.br
 
358
master node=1
 
359
.br
 
360
master node=2
 
361
 
 
362
Lock management will be partitioned among the available masters.  There
 
363
can be any number of masters defined.  The designated master nodes will
 
364
master all resources/locks (according to the resource name hash).  When no
 
365
masters are members of the lockspace, then the nodes revert to the common
 
366
fully-distributed configuration.  Recovery is faster, with little
 
367
disruption, when a non-master node joins/leaves.
 
368
 
 
369
There is no special mode in the dlm for this lock server configuration,
 
370
it's just a natural consequence of combining the "nodir" option with node
 
371
weights.  When a lockspace has master nodes defined, the master has a
 
372
default weight of 1 and all non-master nodes have weight of 0.  An explicit
 
373
non-zero
 
374
.B weight
 
375
can also be assigned to master nodes, e.g.
 
376
 
 
377
lockspace foo nodir=1
 
378
.br
 
379
master node=1 weight=2
 
380
.br
 
381
master node=2 weight=1
 
382
 
 
383
In which case node 1 will master 2/3 of the total resources and node 2
 
384
will master the other 1/3.
 
385
 
 
386
.SH SEE ALSO
 
387
.BR dlm_controld (8),
 
388
.BR dlm_tool (8)
 
389