summaryrefslogtreecommitdiffstats
path: root/ctdb/doc/ctdb.sysconfig.5.xml
blob: b4cdaaf633ee17f10885240ae12486b528c0e5f1 (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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry
	PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
	"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">

<refentry id="ctdb.sysconfig.5">

  <refmeta>
    <refentrytitle>ctdb.sysconfig</refentrytitle>
    <manvolnum>5</manvolnum>
    <refmiscinfo class="source">ctdb</refmiscinfo>
    <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
  </refmeta>

  <refnamediv>
    <refname>ctdb.sysconfig</refname>
    <refpurpose>CTDB daemon configuration file</refpurpose>
  </refnamediv>

  <refsect1>
    <title>DESCRIPTION</title>

    <para>
      This file contains configuration that affects the operation of
      CTDB.  This is a distribution-specific service configuration
      file such as <filename>/etc/sysconfig/ctdb</filename> (Red Hat)
      or <filename>/etc/default/ctdb</filename> (Debian) and is a
      shell script (see
      <citerefentry><refentrytitle>sh</refentrytitle>
      <manvolnum>1</manvolnum></citerefentry>).
    </para>

  </refsect1>

  <refsect1>
    <title>
      GLOBAL CONFIGURATION
    </title>

    <variablelist>

      <varlistentry>
	<term>CTDB_INIT_STYLE=debian|redhat|suse</term>
	<listitem>
	  <para>
	    This is the init style used by the Linux distribution (or
	    other operating system) being used.  This is usually
	    determined dynamically by checking the system.  This
	    variable is used by the initscript to determine which init
	    system primitives to use.  It is also used by some
	    eventscripts to choose the name of initscripts for certain
	    services, since these can vary between distributions.
	  </para>
	  <para>
	    If using CTDB's event scripts are unable to determine an
	    appropriate default then this option can also be placed in
	    a relevant
	    <citerefentry><refentrytitle>ctdb-script.options</refentrytitle>
	    <manvolnum>5</manvolnum></citerefentry> file.
	  </para>
	  <para>
	    Default: NONE.  Guessed, based on features of
	    distribution.
	  </para>
	</listitem>
      </varlistentry>

    </variablelist>
  </refsect1>

  <refsect1>
    <title>
      RESOURCE LIMITS
    </title>

    <refsect2>
      <title>
	Maximum number of open files
      </title>

      <para>
	CTDB can use a lot of file descriptors, especially when used
	with Samba.  If there are thousands of smbd processes
	connected to CTDB when this can mean that thousands of file
	descriptors are used.  For CTDB, it is often necessary to
	increase limit on the maximum number of open files.
      </para>

      <para>
	The maximum number of open files should be configured using an
	operating system mechanism.
      </para>

      <variablelist>

	<varlistentry>
	  <term>
	    systemd
	  </term>
	  <listitem>
	    <para>
	      The
	      <literal>LimitNOFILE=<option>LIMIT</option></literal>
	      option can be used in a unit/service file increase the
	      maximum number of open files.  See
	      <citerefentry><refentrytitle>systemd.exec</refentrytitle>
	      <manvolnum>5</manvolnum></citerefentry> for details.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>
	    SYSV init
	  </term>
	  <listitem>
	    <para>
	      Use a command like <command>ulimit -n
	      <option>LIMIT</option></command> to increase the maximum
	      number of open files.  This command can be put in the
	      relevant distribution-specific service configuration file.
	    </para>
	  </listitem>
	</varlistentry>

      </variablelist>

    </refsect2>

    <refsect2>
      <title>
	Allowing core dumps
      </title>

      <para>
	Many distributions do not allow core dump files to be
	generated by default.  To assist with debugging, core files
	can be enabled.  This should be configured using an operating
	system mechanism.
      </para>

      <variablelist>

	<varlistentry>
	  <term>
	    systemd
	  </term>
	  <listitem>
	    <para>
	      The <literal>LimitCORE=0|unlimited</literal> option can
	      be used in a unit/service file.  <literal>0</literal>
	      disallows core files, <literal>unlimited</literal>
	      allows them.  maximum number of open files.  See
	      <citerefentry><refentrytitle>systemd.exec</refentrytitle>
	      <manvolnum>5</manvolnum></citerefentry> for details.
	    </para>
	  </listitem>
	</varlistentry>

	<varlistentry>
	  <term>
	    SYSV init
	  </term>
	  <listitem>
	    <para>
	      Use a command like <command>ulimit -c 0|unlimited</command>
	      to disable or enable core files as required.  This
	      command can be put in the relevant distribution-specific
	      service configuration file.
	    </para>
	  </listitem>
	</varlistentry>

      </variablelist>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>FILES</title>

    <simplelist>
      <member><filename>/etc/sysconfig/ctdb</filename></member>
      <member><filename>/etc/default/ctdb</filename></member>
      <member><filename>/usr/local/etc/ctdb/script.options</filename></member>
    </simplelist>
  </refsect1>

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

      <citerefentry><refentrytitle>ctdb-script.options</refentrytitle>
      <manvolnum>5</manvolnum></citerefentry>,

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

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

  <refentryinfo>
    <author>
      <contrib>
	This documentation was written by
	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>