summaryrefslogtreecommitdiffstats
path: root/ctdb/doc/ctdbd.1.xml
blob: 402f083cc419698099135f4e368e951bfc0725d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE refentry
	PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
	"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">

<refentry id="ctdbd.1">

  <refmeta>
    <refentrytitle>ctdbd</refentrytitle>
    <manvolnum>1</manvolnum>
    <refmiscinfo class="source">ctdb</refmiscinfo>
    <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>ctdbd</refname>
    <refpurpose>The CTDB cluster daemon</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>ctdbd</command>
      <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>DESCRIPTION</title>
    <para>
      ctdbd is the main CTDB daemon.
    </para>

    <para>
      Note that ctdbd is not usually invoked directly.  It is invoked
      via <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
      <manvolnum>1</manvolnum></citerefentry> or via the initscript.
    </para>

    <para>
      See <citerefentry><refentrytitle>ctdb</refentrytitle>
      <manvolnum>7</manvolnum></citerefentry> for an overview of CTDB.
    </para>
  </refsect1>

  <refsect1>
    <title>GENERAL OPTIONS</title>

    <variablelist>
      <varlistentry>
	<term>-d, --debug=<parameter>DEBUGLEVEL</parameter></term>
	<listitem>
	  <para>
	    This option sets the debug level to DEBUGLEVEL, which
	    controls what will be written to the logfile. The default is
	    0 which will only log important events and errors. A larger
	    number will provide additional logging.
	  </para>
	  <para>
	    See the <citetitle>DEBUG LEVELS</citetitle> section in
	    <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--dbdir=<parameter>DIRECTORY</parameter></term>
	<listitem>
	  <para>
	    DIRECTORY on local storage where ctdbd keeps a local copy of
	    TDB databases.  This directory is local for each node and
	    should not be stored on the shared cluster filesystem.
	  </para>
	  <para>
	    This directory would usually be <filename>/var/ctdb</filename>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--dbdir-persistent=<parameter>DIRECTORY</parameter></term>
	<listitem>
	  <para>
	    DIRECTORY on local storage where ctdbd keeps a local copy of
	    persistent TDB databases.  This directory is local for each
	    node and should not be stored on the shared cluster
	    filesystem.
	  </para>
	  <para>
	    This directory would usually be
	    <filename>/etc/ctdb/persistent</filename>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
	<listitem>
	  <para>
	    DIRECTORY on local storage where ctdbd keep internal state
	    TDB files.  This directory is local for each node and
	    should not be stored on the shared cluster filesystem.
	  </para>
	  <para>
	    This directory would usually be
	    <filename>/var/ctdb/state</filename>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--event-script-dir=<parameter>DIRECTORY</parameter></term>
	<listitem>
	  <para>
	    DIRECTORY where the CTDB event scripts are stored.  See the
	    <citetitle>EVENT SCRIPTS</citetitle> section in
	    <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more information.
	  </para>
	  <para>
	    Default is <envar>CTDB_BASE</envar>/events.d, so usually
	    <filename>/etc/ctdb/events.d</filename>, which is part of
	    the CTDB installation.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--logfile=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME where ctdbd will write its log. This is usually
	    <filename>/var/log/log.ctdb</filename>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--log-ringbuf-size=<parameter>NUM</parameter></term>
	<listitem>
	  <para>
	    Set the size of the log ringbuffer to NUM entries.
	  </para>
	  <para>
	    CTDB uses an in-memory ringbuffer containing NUM most
	    recent log entries for all log levels (except DEBUG).  The
	    ringbugger can be useful for extracting detailed logs even
	    if some entries are not logged to the regular logs.
	  </para>
	  <para>
	    Use the <command>ctdb getlog</command> command to retrieve
	    log entries from the ringbuffer.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--lvs</term>
	<listitem>
	  <para>
	    This option is used to activate the LVS capability on a CTDB
	    node.  Please see the <citetitle>LVS</citetitle> section in
	    <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
	<listitem>
	  <para>
	    NUM specifies the maximum number of health check failures
	    allowed for persistent databases during startup.
	  </para>
	  <para>
	    The default value is 0.  Setting this to non-zero allows a
	    node with unhealthy persistent databases to startup and
	    join the cluster as long as there is another node with
	    healthy persistent databases.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--nlist=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME containing a list of the private IP addresses, one
	    per line, for each node in the cluster.  This file
	    <emphasis>must be the same on each node</emphasis> in the
	    cluster.
	  </para>
	  <para>
	    Default is <envar>CTDB_BASE</envar>/nodes, so usually
	    <filename>/etc/ctdb/nodes</filename>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--no-lmaster</term>
	<listitem>
	  <para>
	    This argument specifies that this node can NOT become an lmaster
	    for records in the database. This means that it will never show up
	    in the vnnmap. This feature is primarily used for making a cluster
	    span across a WAN link and use CTDB as a WAN-accelerator.
	  </para>
	  <para>
	    Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
	    section in <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--no-recmaster</term>
	<listitem>
	  <para>
	    This argument specifies that this node can NOT become a recmaster
	    for the database. This feature is primarily used for making a cluster
	    span across a WAN link and use CTDB as a WAN-accelerator.
	  </para>
	  <para>
	    Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
	    section in <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--notification-script=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME specifying a script to be invoked by ctdbd when
	    certain state changes occur.
	  </para>
	  <para>
	    This file is usually
	    <filename>/etc/ctdb/notify.sh</filename>.
	  </para>
	  <para>
	    Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
	    section in <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--pidfile=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME for file containing process ID of main CTDB
	    daemon.  This file is automatically created and removed by
	    CTDB.
	  </para>
	  <para>
	    The default is to not create a PID file.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--public_addresses=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME specifying a file containing the public IP
	    addresses to use on the cluster when CTDB should use IP
	    takeover. This file contains a list of IP addresses,
	    netmasks and interfaces.  CTDB will distribute these public
	    IP addresses appropriately across the available nodes.
	  </para>
	  <para>
	    The IP addresses specified in this file can differ across
	    nodes.
	  </para>
	  <para>
	    This is usually the file
	    <filename>/etc/ctdb/public_addresses</filename>
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--public-interface=<parameter>INTERFACE</parameter></term>
	<listitem>
	  <para>
	    INTERFACE on which to attach public IP addresses or on which
	    to attach the single-public-ip when used.
	  </para>
	  <para>
	    When using public IP addresses, this is only required if
	    interfaces are not explicitly specified in the public
	    addresses file.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--reclock=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME is the name of the recovery lock file stored in
	    <emphasis>shared storage</emphasis> that ctdbd uses to
	    prevent split brains from occuring.
	  </para>
	  <para>
	    It is possible to run CTDB without a recovery lock file, but
	    then there will be no protection against split brain if the
	    cluster/network becomes partitioned. Using CTDB without a
	    reclock file is strongly discouraged.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--single-public-ip=<parameter>IPADDR</parameter></term>
	<listitem>
	  <para>
	    IPADDR specifies the single IP that CTDB will use in
	    conjuction with LVS.
	  </para>
	  <para>
	    Please see the <citetitle>LVS</citetitle> section in
	    <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--start-as-disabled</term>
	<listitem>
	  <para>
	    This makes ctdbd start in the DISABLED state.
	  </para>
	  <para>
	    To allow the node to host public IP addresses and
	    services, it must be manually enabled using the
	    <command>ctdb enable</command> command.
	  </para>
	  <para>
	    Please see the <citetitle>NODE STATES</citetitle> section
	    in <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information about the DISABLED state.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--start-as-stopped</term>
	<listitem>
	  <para>
	    This makes ctdbd start in the STOPPED state.
	  </para>
	  <para>
	    To allow the node to take part in the cluster it must be
	    manually continued with the the <command>ctdb
	    enable</command> command.
	  </para>
	  <para>
	    Please see the <citetitle>NODE STATES</citetitle> section
	    in <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information about the STOPPED state.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--syslog</term>
	<listitem>
	  <para>
	    Send log messages to syslog instead of the CTDB logfile.
	    This option overrides --logfile.  The default is to log to
	    a file.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--transport=tcp|infiniband</term>
	<listitem>
	  <para>
	    This option specifies which transport to use for ctdbd
	    internode communications. The default is "tcp".
	  </para>
	  <para>
	    The "infiniband" support is not regularly tested.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>-?, --help</term>
	<listitem>
	  <para>
	    Display a summary of options.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1>
    <title>DEBUGGING OPTIONS</title>

    <variablelist>

      <varlistentry>
	<term>-i, --interactive</term>
	<listitem>
	  <para>
	    Enable interactive mode.  This will make ctdbd run in the
	    foreground and not detach from the terminal.  By default
	    ctdbd will detach itself and run in the background as a
	    daemon.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--listen=<parameter>IPADDR</parameter></term>
	<listitem>
	  <para>
	    This specifies which IP address that ctdbd will bind to.
	  </para>
	  <para>
	    By default ctdbd will bind to the first address it finds in
	    the <filename>/etc/ctdb/nodes</filename> file that is also
	    present on the local system.
	  </para>
	  <para>
	    This option is only required when you want to run multiple
	    ctdbd daemons/nodes on the same physical host in which case
	    there would be multiple entries in
	    <filename>/etc/ctdb/nodes</filename> that would match a
	    local interface.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--nopublicipcheck</term>
	<listitem>
	  <para>
	    This option is used when testing with multiple local
	    daemons on a single machine.  It disables checks related
	    to public IP addresses.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--nosetsched</term>
	<listitem>
	  <para>
	    This is a debugging option. This option is only used when
	    debugging ctdbd.
	  </para>
	  <para>
	    Normally ctdbd will change its scheduler to run as a
	    real-time process. This is the default mode for a normal
	    ctdbd operation to gurarantee that ctdbd always gets the CPU
	    cycles that it needs.
	  </para>
	  <para>
	    This option is used to tell ctdbd to
	    <emphasis>not</emphasis> run as a real-time process and
	    instead run ctdbd as a normal userspace process.  This is
	    useful for debugging and when you want to run ctdbd under
	    valgrind or gdb. (You don't want to attach valgrind or gdb
	    to a real-time process.)
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--socket=<parameter>FILENAME</parameter></term>
	<listitem>
	  <para>
	    FILENAME specifies the name of the Unix domain socket that
	    ctdbd will create. This socket is used by local clients to
	    communicate with ctdbd.
	  </para>
	  <para>
	    The default is <filename>/tmp/ctdb.socket</filename> . You
	    only need to use this option if you plan to run multiple
	    ctdbd daemons on the same physical host, usually for
	    testing.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
	<listitem>
	  <para>
	    This option sets the debug level of event script output to
	    DEBUGLEVEL.  The default is ERR (0).
	  </para>
	  <para>
	    See the <citetitle>DEBUG LEVELS</citetitle> section in
	    <citerefentry><refentrytitle>ctdb</refentrytitle>
	    <manvolnum>7</manvolnum></citerefentry> for more
	    information.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--sloppy-start</term>
	<listitem>
	  <para>
	    This is debugging option.  This speeds up the initial
	    recovery during startup at the expense of some consistency
	    checking.  <emphasis>Don't use this option in
	    production</emphasis>.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--torture</term>
	<listitem>
	  <para>
	    This option is only used for development and testing of
	    CTDB.  It adds artificial errors and failures to the
	    common codepaths in ctdbd to verify that ctdbd can recover
	    correctly from failures.
	  </para>
	  <para>
	    <emphasis>Do not use this option</emphasis> unless you are
	    developing and testing new functionality in CTDB.
	  </para>
	</listitem>
      </varlistentry>

      <varlistentry>
	<term>--valgrinding</term>
	<listitem>
	  <para>
	    This is a debugging option. This option is only used when
	    debugging ctdbd.  This enables additional debugging
	    capabilities and implies --nosetsched.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry><refentrytitle>ctdb</refentrytitle>
      <manvolnum>1</manvolnum></citerefentry>,

      <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
      <manvolnum>1</manvolnum></citerefentry>,

      <citerefentry><refentrytitle>onnode</refentrytitle>
      <manvolnum>1</manvolnum></citerefentry>,

      <citerefentry><refentrytitle>ctdb</refentrytitle>
      <manvolnum>7</manvolnum></citerefentry>,

      <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
      <manvolnum>7</manvolnum></citerefentry>,

      <ulink url="http://ctdb.samba.org/"/>
    </para>
  </refsect1>

  <refentryinfo>
    <author>
      <contrib>
	This documentation was written by
	Ronnie Sahlberg,
	Amitay Isaacs,
	Martin Schwenke
      </contrib>
    </author>

    <copyright>
      <year>2007</year>
      <holder>Andrew Tridgell</holder>
      <holder>Ronnie Sahlberg</holder>
    </copyright>
    <legalnotice>
      <para>
	This program is free software; you can redistribute it and/or
	modify it under the terms of the GNU General Public License as
	published by the Free Software Foundation; either version 3 of
	the License, or (at your option) any later version.
      </para>
      <para>
	This program is distributed in the hope that it will be
	useful, but WITHOUT ANY WARRANTY; without even the implied
	warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
	PURPOSE.  See the GNU General Public License for more details.
      </para>
      <para>
	You should have received a copy of the GNU General Public
	License along with this program; if not, see
	<ulink url="http://www.gnu.org/licenses"/>.
      </para>
    </legalnotice>
  </refentryinfo>

</refentry>