s3: smbd: SMB2 close. If a file has delete on close, store the return info before...
[Samba.git] / ctdb / doc / ctdbd.1.xml
blob20f2d8bb85b094148b19c7936cc2d77e71fe6a95
1 <?xml version="1.0" encoding="iso-8859-1"?>
2 <!DOCTYPE refentry
3         PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4         "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
6 <refentry id="ctdbd.1">
8   <refmeta>
9     <refentrytitle>ctdbd</refentrytitle>
10     <manvolnum>1</manvolnum>
11     <refmiscinfo class="source">ctdb</refmiscinfo>
12     <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13   </refmeta>
15   <refnamediv>
16     <refname>ctdbd</refname>
17     <refpurpose>The CTDB cluster daemon</refpurpose>
18   </refnamediv>
20   <refsynopsisdiv>
21     <cmdsynopsis>
22       <command>ctdbd</command>
23       <arg rep="repeat"><replaceable>OPTION</replaceable></arg>
24     </cmdsynopsis>
25   </refsynopsisdiv>
27   <refsect1>
28     <title>DESCRIPTION</title>
29     <para>
30       ctdbd is the main CTDB daemon.
31     </para>
33     <para>
34       Note that ctdbd is not usually invoked directly.  It is invoked
35       via <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
36       <manvolnum>1</manvolnum></citerefentry> or via the initscript.
37     </para>
39     <para>
40       See <citerefentry><refentrytitle>ctdb</refentrytitle>
41       <manvolnum>7</manvolnum></citerefentry> for an overview of CTDB.
42     </para>
43   </refsect1>
45   <refsect1>
46     <title>GENERAL OPTIONS</title>
48     <variablelist>
49       <varlistentry>
50         <term>-d, --debug=<parameter>DEBUGLEVEL</parameter></term>
51         <listitem>
52           <para>
53             This option sets the debug level to DEBUGLEVEL, which
54             controls what will be written to the logfile. The default is
55             0 which will only log important events and errors. A larger
56             number will provide additional logging.
57           </para>
58           <para>
59             See the <citetitle>DEBUG LEVELS</citetitle> section in
60             <citerefentry><refentrytitle>ctdb</refentrytitle>
61             <manvolnum>7</manvolnum></citerefentry> for more
62             information.
63           </para>
64         </listitem>
65       </varlistentry>
67       <varlistentry>
68         <term>--dbdir=<parameter>DIRECTORY</parameter></term>
69         <listitem>
70           <para>
71             DIRECTORY on local storage where ctdbd keeps a local copy of
72             TDB databases.  This directory is local for each node and
73             should not be stored on the shared cluster filesystem.
74           </para>
75           <para>
76             This directory would usually be <filename>/var/lib/ctdb</filename>
77           </para>
78         </listitem>
79       </varlistentry>
81       <varlistentry>
82         <term>--dbdir-persistent=<parameter>DIRECTORY</parameter></term>
83         <listitem>
84           <para>
85             DIRECTORY on local storage where ctdbd keeps a local copy of
86             persistent TDB databases.  This directory is local for each
87             node and should not be stored on the shared cluster
88             filesystem.
89           </para>
90           <para>
91             This directory would usually be
92             <filename>/var/lib/ctdb/persistent</filename>
93           </para>
94         </listitem>
95       </varlistentry>
97       <varlistentry>
98         <term>--dbdir-state=<parameter>DIRECTORY</parameter></term>
99         <listitem>
100           <para>
101             DIRECTORY on local storage where ctdbd keep internal state
102             TDB files.  This directory is local for each node and
103             should not be stored on the shared cluster filesystem.
104           </para>
105           <para>
106             This directory would usually be
107             <filename>/var/lib/ctdb/state</filename>
108           </para>
109         </listitem>
110       </varlistentry>
112       <varlistentry>
113         <term>--event-script-dir=<parameter>DIRECTORY</parameter></term>
114         <listitem>
115           <para>
116             DIRECTORY where the CTDB event scripts are stored.  See the
117             <citetitle>EVENT SCRIPTS</citetitle> section in
118             <citerefentry><refentrytitle>ctdb</refentrytitle>
119             <manvolnum>7</manvolnum></citerefentry> for more information.
120           </para>
121           <para>
122             Default is <envar>CTDB_BASE</envar>/events.d, so usually
123             <filename>/etc/ctdb/events.d</filename>, which is part of
124             the CTDB installation.
125           </para>
126         </listitem>
127       </varlistentry>
129       <varlistentry>
130         <term>--logfile=<parameter>FILENAME</parameter></term>
131         <listitem>
132           <para>
133             FILENAME where ctdbd will write its log. This is usually
134             <filename>/var/log/log.ctdb</filename>.
135           </para>
136         </listitem>
137       </varlistentry>
139       <varlistentry>
140         <term>--lvs</term>
141         <listitem>
142           <para>
143             This option is used to activate the LVS capability on a CTDB
144             node.  Please see the <citetitle>LVS</citetitle> section in
145             <citerefentry><refentrytitle>ctdb</refentrytitle>
146             <manvolnum>7</manvolnum></citerefentry> for more
147             information.
148           </para>
149         </listitem>
150       </varlistentry>
152       <varlistentry>
153         <term>--max-persistent-check-errors=<parameter>NUM</parameter></term>
154         <listitem>
155           <para>
156             NUM specifies the maximum number of health check failures
157             allowed for persistent databases during startup.
158           </para>
159           <para>
160             The default value is 0.  Setting this to non-zero allows a
161             node with unhealthy persistent databases to startup and
162             join the cluster as long as there is another node with
163             healthy persistent databases.
164           </para>
165         </listitem>
166       </varlistentry>
168       <varlistentry>
169         <term>--nlist=<parameter>FILENAME</parameter></term>
170         <listitem>
171           <para>
172             FILENAME containing a list of the private IP addresses, one
173             per line, for each node in the cluster.  This file
174             <emphasis>must be the same on each node</emphasis> in the
175             cluster.
176           </para>
177           <para>
178             Default is <envar>CTDB_BASE</envar>/nodes, so usually
179             <filename>/etc/ctdb/nodes</filename>.
180           </para>
181         </listitem>
182       </varlistentry>
184       <varlistentry>
185         <term>--no-lmaster</term>
186         <listitem>
187           <para>
188             This argument specifies that this node can NOT become an lmaster
189             for records in the database. This means that it will never show up
190             in the vnnmap. This feature is primarily used for making a cluster
191             span across a WAN link and use CTDB as a WAN-accelerator.
192           </para>
193           <para>
194             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
195             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
196             <manvolnum>7</manvolnum></citerefentry> for more
197             information.
198           </para>
199         </listitem>
200       </varlistentry>
202       <varlistentry>
203         <term>--no-recmaster</term>
204         <listitem>
205           <para>
206             This argument specifies that this node can NOT become a recmaster
207             for the database. This feature is primarily used for making a cluster
208             span across a WAN link and use CTDB as a WAN-accelerator.
209           </para>
210           <para>
211             Please see the <citetitle>REMOTE CLUSTER NODES</citetitle>
212             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
213             <manvolnum>7</manvolnum></citerefentry> for more
214             information.
215           </para>
216         </listitem>
217       </varlistentry>
219       <varlistentry>
220         <term>--notification-script=<parameter>FILENAME</parameter></term>
221         <listitem>
222           <para>
223             FILENAME specifying a script to be invoked by ctdbd when
224             certain state changes occur.
225           </para>
226           <para>
227             This file is usually
228             <filename>/etc/ctdb/notify.sh</filename>.
229           </para>
230           <para>
231             Please see the <citetitle>NOTIFICATION SCRIPT</citetitle>
232             section in <citerefentry><refentrytitle>ctdb</refentrytitle>
233             <manvolnum>7</manvolnum></citerefentry> for more
234             information.
235           </para>
236         </listitem>
237       </varlistentry>
239       <varlistentry>
240         <term>--pidfile=<parameter>FILENAME</parameter></term>
241         <listitem>
242           <para>
243             FILENAME for file containing process ID of main CTDB
244             daemon.  This file is automatically created and removed by
245             CTDB.
246           </para>
247           <para>
248             The default is to not create a PID file.
249           </para>
250         </listitem>
251       </varlistentry>
253       <varlistentry>
254         <term>--public_addresses=<parameter>FILENAME</parameter></term>
255         <listitem>
256           <para>
257             FILENAME specifying a file containing the public IP
258             addresses to use on the cluster when CTDB should use IP
259             takeover. This file contains a list of IP addresses,
260             netmasks and interfaces.  CTDB will distribute these public
261             IP addresses appropriately across the available nodes.
262           </para>
263           <para>
264             The IP addresses specified in this file can differ across
265             nodes.
266           </para>
267           <para>
268             This is usually the file
269             <filename>/etc/ctdb/public_addresses</filename>
270           </para>
271         </listitem>
272       </varlistentry>
274       <varlistentry>
275         <term>--public-interface=<parameter>INTERFACE</parameter></term>
276         <listitem>
277           <para>
278             INTERFACE on which to attach public IP addresses or on which
279             to attach the single-public-ip when used.
280           </para>
281           <para>
282             When using public IP addresses, this is only required if
283             interfaces are not explicitly specified in the public
284             addresses file.
285           </para>
286         </listitem>
287       </varlistentry>
289       <varlistentry>
290         <term>--reclock=<parameter>FILENAME</parameter></term>
291         <listitem>
292           <para>
293             FILENAME is the name of the recovery lock file stored in
294             <emphasis>shared storage</emphasis> that ctdbd uses to
295             prevent split brains from occuring.
296           </para>
297           <para>
298             It is possible to run CTDB without a recovery lock file, but
299             then there will be no protection against split brain if the
300             cluster/network becomes partitioned. Using CTDB without a
301             reclock file is strongly discouraged.
302           </para>
303         </listitem>
304       </varlistentry>
306       <varlistentry>
307         <term>--single-public-ip=<parameter>IPADDR</parameter></term>
308         <listitem>
309           <para>
310             IPADDR specifies the single IP that CTDB will use in
311             conjuction with LVS.
312           </para>
313           <para>
314             Please see the <citetitle>LVS</citetitle> section in
315             <citerefentry><refentrytitle>ctdb</refentrytitle>
316             <manvolnum>7</manvolnum></citerefentry> for more
317             information.
318           </para>
319         </listitem>
320       </varlistentry>
322       <varlistentry>
323         <term>--start-as-disabled</term>
324         <listitem>
325           <para>
326             This makes ctdbd start in the DISABLED state.
327           </para>
328           <para>
329             To allow the node to host public IP addresses and
330             services, it must be manually enabled using the
331             <command>ctdb enable</command> command.
332           </para>
333           <para>
334             Please see the <citetitle>NODE STATES</citetitle> section
335             in <citerefentry><refentrytitle>ctdb</refentrytitle>
336             <manvolnum>7</manvolnum></citerefentry> for more
337             information about the DISABLED state.
338           </para>
339         </listitem>
340       </varlistentry>
342       <varlistentry>
343         <term>--start-as-stopped</term>
344         <listitem>
345           <para>
346             This makes ctdbd start in the STOPPED state.
347           </para>
348           <para>
349             To allow the node to take part in the cluster it must be
350             manually continued with the the <command>ctdb
351             enable</command> command.
352           </para>
353           <para>
354             Please see the <citetitle>NODE STATES</citetitle> section
355             in <citerefentry><refentrytitle>ctdb</refentrytitle>
356             <manvolnum>7</manvolnum></citerefentry> for more
357             information about the STOPPED state.
358           </para>
359         </listitem>
360       </varlistentry>
362       <varlistentry>
363         <term>--syslog</term>
364         <listitem>
365           <para>
366             Send log messages to syslog instead of the CTDB logfile.
367             This option overrides --logfile.  The default is to log to
368             a file.
369           </para>
370         </listitem>
371       </varlistentry>
373       <varlistentry>
374         <term>--transport=tcp|infiniband</term>
375         <listitem>
376           <para>
377             This option specifies which transport to use for ctdbd
378             internode communications. The default is "tcp".
379           </para>
380           <para>
381             The "infiniband" support is not regularly tested.
382           </para>
383         </listitem>
384       </varlistentry>
386       <varlistentry>
387         <term>-?, --help</term>
388         <listitem>
389           <para>
390             Display a summary of options.
391           </para>
392         </listitem>
393       </varlistentry>
395     </variablelist>
396   </refsect1>
398   <refsect1>
399     <title>DEBUGGING OPTIONS</title>
401     <variablelist>
403       <varlistentry>
404         <term>-i, --interactive</term>
405         <listitem>
406           <para>
407             Enable interactive mode.  This will make ctdbd run in the
408             foreground and not detach from the terminal.  By default
409             ctdbd will detach itself and run in the background as a
410             daemon.
411           </para>
412         </listitem>
413       </varlistentry>
415       <varlistentry>
416         <term>--listen=<parameter>IPADDR</parameter></term>
417         <listitem>
418           <para>
419             This specifies which IP address that ctdbd will bind to.
420           </para>
421           <para>
422             By default ctdbd will bind to the first address it finds in
423             the <filename>/etc/ctdb/nodes</filename> file that is also
424             present on the local system.
425           </para>
426           <para>
427             This option is only required when you want to run multiple
428             ctdbd daemons/nodes on the same physical host in which case
429             there would be multiple entries in
430             <filename>/etc/ctdb/nodes</filename> that would match a
431             local interface.
432           </para>
433         </listitem>
434       </varlistentry>
436       <varlistentry>
437         <term>--nopublicipcheck</term>
438         <listitem>
439           <para>
440             This option is used when testing with multiple local
441             daemons on a single machine.  It disables checks related
442             to public IP addresses.
443           </para>
444         </listitem>
445       </varlistentry>
447       <varlistentry>
448         <term>--nosetsched</term>
449         <listitem>
450           <para>
451             This is a debugging option. This option is only used when
452             debugging ctdbd.
453           </para>
454           <para>
455             Normally ctdbd will change its scheduler to run as a
456             real-time process. This is the default mode for a normal
457             ctdbd operation to gurarantee that ctdbd always gets the CPU
458             cycles that it needs.
459           </para>
460           <para>
461             This option is used to tell ctdbd to
462             <emphasis>not</emphasis> run as a real-time process and
463             instead run ctdbd as a normal userspace process.  This is
464             useful for debugging and when you want to run ctdbd under
465             valgrind or gdb. (You don't want to attach valgrind or gdb
466             to a real-time process.)
467           </para>
468         </listitem>
469       </varlistentry>
471       <varlistentry>
472         <term>--socket=<parameter>FILENAME</parameter></term>
473         <listitem>
474           <para>
475             FILENAME specifies the name of the Unix domain socket that
476             ctdbd will create. This socket is used by local clients to
477             communicate with ctdbd.
478           </para>
479           <para>
480             The default is <filename>/tmp/ctdb.socket</filename> . You
481             only need to use this option if you plan to run multiple
482             ctdbd daemons on the same physical host, usually for
483             testing.
484           </para>
485         </listitem>
486       </varlistentry>
488       <varlistentry>
489         <term>--script-log-level=<parameter>DEBUGLEVEL</parameter></term>
490         <listitem>
491           <para>
492             This option sets the debug level of event script output to
493             DEBUGLEVEL.  The default is ERR (0).
494           </para>
495           <para>
496             See the <citetitle>DEBUG LEVELS</citetitle> section in
497             <citerefentry><refentrytitle>ctdb</refentrytitle>
498             <manvolnum>7</manvolnum></citerefentry> for more
499             information.
500           </para>
501         </listitem>
502       </varlistentry>
504       <varlistentry>
505         <term>--sloppy-start</term>
506         <listitem>
507           <para>
508             This is debugging option.  This speeds up the initial
509             recovery during startup at the expense of some consistency
510             checking.  <emphasis>Don't use this option in
511             production</emphasis>.
512           </para>
513         </listitem>
514       </varlistentry>
516       <varlistentry>
517         <term>--torture</term>
518         <listitem>
519           <para>
520             This option is only used for development and testing of
521             CTDB.  It adds artificial errors and failures to the
522             common codepaths in ctdbd to verify that ctdbd can recover
523             correctly from failures.
524           </para>
525           <para>
526             <emphasis>Do not use this option</emphasis> unless you are
527             developing and testing new functionality in CTDB.
528           </para>
529         </listitem>
530       </varlistentry>
532       <varlistentry>
533         <term>--valgrinding</term>
534         <listitem>
535           <para>
536             This is a debugging option. This option is only used when
537             debugging ctdbd.  This enables additional debugging
538             capabilities and implies --nosetsched.
539           </para>
540         </listitem>
541       </varlistentry>
543     </variablelist>
544   </refsect1>
546   <refsect1>
547     <title>SEE ALSO</title>
548     <para>
549       <citerefentry><refentrytitle>ctdb</refentrytitle>
550       <manvolnum>1</manvolnum></citerefentry>,
552       <citerefentry><refentrytitle>ctdbd_wrapper</refentrytitle>
553       <manvolnum>1</manvolnum></citerefentry>,
555       <citerefentry><refentrytitle>onnode</refentrytitle>
556       <manvolnum>1</manvolnum></citerefentry>,
558       <citerefentry><refentrytitle>ctdb</refentrytitle>
559       <manvolnum>7</manvolnum></citerefentry>,
561       <citerefentry><refentrytitle>ctdb-tunables</refentrytitle>
562       <manvolnum>7</manvolnum></citerefentry>,
564       <ulink url="http://ctdb.samba.org/"/>
565     </para>
566   </refsect1>
568   <refentryinfo>
569     <author>
570       <contrib>
571         This documentation was written by
572         Ronnie Sahlberg,
573         Amitay Isaacs,
574         Martin Schwenke
575       </contrib>
576     </author>
578     <copyright>
579       <year>2007</year>
580       <holder>Andrew Tridgell</holder>
581       <holder>Ronnie Sahlberg</holder>
582     </copyright>
583     <legalnotice>
584       <para>
585         This program is free software; you can redistribute it and/or
586         modify it under the terms of the GNU General Public License as
587         published by the Free Software Foundation; either version 3 of
588         the License, or (at your option) any later version.
589       </para>
590       <para>
591         This program is distributed in the hope that it will be
592         useful, but WITHOUT ANY WARRANTY; without even the implied
593         warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
594         PURPOSE.  See the GNU General Public License for more details.
595       </para>
596       <para>
597         You should have received a copy of the GNU General Public
598         License along with this program; if not, see
599         <ulink url="http://www.gnu.org/licenses"/>.
600       </para>
601     </legalnotice>
602   </refentryinfo>
604 </refentry>