]> git.ipfire.org Git - thirdparty/samba.git/blame - ctdb/doc/ctdb-script.options.5.xml
ctdb-scripts: Add options to generate smb.conf interfaces include file
[thirdparty/samba.git] / ctdb / doc / ctdb-script.options.5.xml
CommitLineData
749bc568 1<?xml version="1.0" encoding="UTF-8"?>
a8ccf41b
MS
2<!DOCTYPE refentry
3 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
5
6<refentry id="ctdb-script.options.5">
7
8 <refmeta>
9 <refentrytitle>ctdb-script.options</refentrytitle>
10 <manvolnum>5</manvolnum>
11 <refmiscinfo class="source">ctdb</refmiscinfo>
12 <refmiscinfo class="manual">CTDB - clustered TDB database</refmiscinfo>
13 </refmeta>
14
15 <refnamediv>
16 <refname>ctdb-script.options</refname>
17 <refpurpose>CTDB scripts configuration files</refpurpose>
18 </refnamediv>
19
20 <refsect1>
21 <title>DESCRIPTION</title>
22
7c468d9d
MS
23 <refsect2>
24 <title>Location</title>
25 <para>
26 Each CTDB script has 2 possible locations for its configuration options:
27 </para>
28
29 <variablelist>
30
31 <varlistentry>
32 <term>
33 <filename>/usr/local/etc/ctdb/script.options</filename>
34 </term>
35 <listitem>
36 <para>
37 This is a catch-all global file for general purpose
38 scripts and for options that are used in multiple event
39 scripts.
40 </para>
41 </listitem>
42 </varlistentry>
43
44 <varlistentry>
45 <term>
46 <parameter>SCRIPT</parameter>.options
47 </term>
48 <listitem>
49 <para>
50 That is, options for
51 <filename><parameter>SCRIPT</parameter></filename> are
52 placed in a file alongside the script, with a ".script"
53 suffix added. This style is usually recommended for event
54 scripts.
55 </para>
56
57 <para>
58 Options in this script-specific file override those in
59 the global file.
60 </para>
61 </listitem>
62 </varlistentry>
63
64 </variablelist>
65 </refsect2>
66
67 <refsect2>
68 <title>Contents</title>
69
70 <para>
71 These files should include simple shell-style variable
72 assignments and shell-style comments.
73 </para>
74 </refsect2>
8303c3a5
MS
75
76 <refsect2>
77 <title>Monitoring Thresholds</title>
78
79 <para>
80 Event scripts can monitor resources or services. When a
81 problem is detected, it may be better to warn about a problem
82 rather than to immediately fail monitoring and mark a node as
83 unhealthy. CTDB provides support for event scripts to do
84 threshold-based monitoring.
85 </para>
86
87 <para>
88 A threshold setting looks like
89 <parameter>WARNING_THRESHOLD<optional>:ERROR_THRESHOLD</optional></parameter>.
90 If the number of problems is ≥ WARNING_THRESHOLD then the
91 script will log a warning and continue. If the number
92 problems is ≥ ERROR_THRESHOLD then the script will log an
93 error and exit with failure, causing monitoring to fail. Note
94 that ERROR_THRESHOLD is optional, and follows the optional
95 colon (:) separator.
96 </para>
97 </refsect2>
a8ccf41b
MS
98
99 </refsect1>
100
101 <refsect1>
102 <title>NETWORK CONFIGURATION</title>
103
104 <refsect2>
105 <title>10.interface</title>
106
107 <para>
108 This event script handles monitoring of interfaces using by
109 public IP addresses.
110 </para>
111
112 <variablelist>
113
114 <varlistentry>
115 <term>
116 CTDB_PARTIALLY_ONLINE_INTERFACES=yes|no
117 </term>
118 <listitem>
119 <para>
120 Whether one or more offline interfaces should cause a
121 monitor event to fail if there are other interfaces that
122 are up. If this is "yes" and a node has some interfaces
123 that are down then <command>ctdb status</command> will
124 display the node as "PARTIALLYONLINE".
125 </para>
126
127 <para>
128 Note that CTDB_PARTIALLY_ONLINE_INTERFACES=yes is not
129 generally compatible with NAT gateway or LVS. NAT
130 gateway relies on the interface configured by
131 CTDB_NATGW_PUBLIC_IFACE to be up and LVS replies on
132 CTDB_LVS_PUBLIC_IFACE to be up. CTDB does not check if
133 these options are set in an incompatible way so care is
134 needed to understand the interaction.
135 </para>
136
137 <para>
138 Default is "no".
139 </para>
140 </listitem>
141 </varlistentry>
142
143 </variablelist>
144 </refsect2>
145
146 <refsect2>
147 <title>11.natgw</title>
148
149 <para>
150 Provides CTDB's NAT gateway functionality.
151 </para>
152
153 <para>
154 NAT gateway is used to configure fallback routing for nodes
155 when they do not host any public IP addresses. For example,
156 it allows unhealthy nodes to reliably communicate with
157 external infrastructure. One node in a NAT gateway group will
16b84855 158 be designated as the NAT gateway leader node and other (follower)
a8ccf41b 159 nodes will be configured with fallback routes via the NAT
16b84855 160 gateway leader node. For more information, see the
a8ccf41b
MS
161 <citetitle>NAT GATEWAY</citetitle> section in
162 <citerefentry><refentrytitle>ctdb</refentrytitle>
163 <manvolnum>7</manvolnum></citerefentry>.
164 </para>
165
166 <variablelist>
167
168 <varlistentry>
169 <term>CTDB_NATGW_DEFAULT_GATEWAY=<parameter>IPADDR</parameter></term>
170 <listitem>
171 <para>
172 IPADDR is an alternate network gateway to use on the NAT
16b84855 173 gateway leader node. If set, a fallback default route
a8ccf41b
MS
174 is added via this network gateway.
175 </para>
176 <para>
177 No default. Setting this variable is optional - if not
16b84855 178 set that no route is created on the NAT gateway leader
a8ccf41b
MS
179 node.
180 </para>
181 </listitem>
182 </varlistentry>
183
184 <varlistentry>
185 <term>CTDB_NATGW_NODES=<parameter>FILENAME</parameter></term>
186 <listitem>
187 <para>
188 FILENAME contains the list of nodes that belong to the
189 same NAT gateway group.
190 </para>
191 <para>
192 File format:
193 <screen>
16b84855 194<parameter>IPADDR</parameter> <optional>follower-only</optional>
a8ccf41b
MS
195 </screen>
196 </para>
197 <para>
198 IPADDR is the private IP address of each node in the NAT
199 gateway group.
200 </para>
201 <para>
16b84855
MS
202 If "follower-only" is specified then the corresponding node
203 can not be the NAT gateway leader node. In this case
a8ccf41b
MS
204 <varname>CTDB_NATGW_PUBLIC_IFACE</varname> and
205 <varname>CTDB_NATGW_PUBLIC_IP</varname> are optional and
206 unused.
207 </para>
208 <para>
209 No default, usually
210 <filename>/usr/local/etc/ctdb/natgw_nodes</filename> when enabled.
211 </para>
212 </listitem>
213 </varlistentry>
214
215 <varlistentry>
216 <term>CTDB_NATGW_PRIVATE_NETWORK=<parameter>IPADDR/MASK</parameter></term>
217 <listitem>
218 <para>
219 IPADDR/MASK is the private sub-network that is
16b84855 220 internally routed via the NAT gateway leader node. This
a8ccf41b
MS
221 is usually the private network that is used for node
222 addresses.
223 </para>
224 <para>
225 No default.
226 </para>
227 </listitem>
228 </varlistentry>
229
230 <varlistentry>
231 <term>CTDB_NATGW_PUBLIC_IFACE=<parameter>IFACE</parameter></term>
232 <listitem>
233 <para>
234 IFACE is the network interface on which the
235 CTDB_NATGW_PUBLIC_IP will be configured.
236 </para>
237 <para>
238 No default.
239 </para>
240 </listitem>
241 </varlistentry>
242
243 <varlistentry>
244 <term>CTDB_NATGW_PUBLIC_IP=<parameter>IPADDR/MASK</parameter></term>
245 <listitem>
246 <para>
247 IPADDR/MASK indicates the IP address that is used for
248 outgoing traffic (originating from
16b84855 249 CTDB_NATGW_PRIVATE_NETWORK) on the NAT gateway leader
a8ccf41b
MS
250 node. This <emphasis>must not</emphasis> be a
251 configured public IP address.
252 </para>
253 <para>
254 No default.
255 </para>
256 </listitem>
257 </varlistentry>
258
259 <varlistentry>
260 <term>CTDB_NATGW_STATIC_ROUTES=<parameter>IPADDR/MASK[@GATEWAY]</parameter> ...</term>
261 <listitem>
262 <para>
263 Each IPADDR/MASK identifies a network or host to which
264 NATGW should create a fallback route, instead of
265 creating a single default route. This can be used when
266 there is already a default route, via an interface that
267 can not reach required infrastructure, that overrides
268 the NAT gateway default route.
269 </para>
270 <para>
271 If GATEWAY is specified then the corresponding route on
16b84855 272 the NATGW leader node will be via GATEWAY. Such routes
a8ccf41b
MS
273 are created even if
274 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is not
275 specified. If GATEWAY is not specified for some
276 networks then routes are only created on the NATGW
16b84855 277 leader node for those networks if
a8ccf41b
MS
278 <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
279 specified.
280 </para>
281 <para>
282 This should be used with care to avoid causing traffic
283 to unnecessarily double-hop through the NAT gateway
16b84855 284 leader, even when a node is hosting public IP addresses.
a8ccf41b
MS
285 Each specified network or host should probably have a
286 corresponding automatically created link route or static
287 route to avoid this.
288 </para>
289 <para>
290 No default.
291 </para>
292 </listitem>
293 </varlistentry>
294
295 </variablelist>
296
297 <refsect3>
298 <title>Example</title>
299 <screen>
300CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
301CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
302CTDB_NATGW_DEFAULT_GATEWAY=10.0.0.1
303CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
304CTDB_NATGW_PUBLIC_IFACE=eth0
305 </screen>
306
307 <para>
308 A variation that ensures that infrastructure (ADS, DNS, ...)
309 directly attached to the public network (10.0.0.0/24) is
310 always reachable would look like this:
311 </para>
312 <screen>
313CTDB_NATGW_NODES=/usr/local/etc/ctdb/natgw_nodes
314CTDB_NATGW_PRIVATE_NETWORK=192.168.1.0/24
315CTDB_NATGW_PUBLIC_IP=10.0.0.227/24
316CTDB_NATGW_PUBLIC_IFACE=eth0
317CTDB_NATGW_STATIC_ROUTES=10.0.0.0/24
318 </screen>
319 <para>
320 Note that <varname>CTDB_NATGW_DEFAULT_GATEWAY</varname> is
321 not specified.
322 </para>
323 </refsect3>
324
325 </refsect2>
326
327 <refsect2>
328 <title>13.per_ip_routing</title>
329
330 <para>
331 Provides CTDB's policy routing functionality.
332 </para>
333
334 <para>
335 A node running CTDB may be a component of a complex network
336 topology. In particular, public addresses may be spread
337 across several different networks (or VLANs) and it may not be
338 possible to route packets from these public addresses via the
339 system's default route. Therefore, CTDB has support for
340 policy routing via the <filename>13.per_ip_routing</filename>
341 eventscript. This allows routing to be specified for packets
342 sourced from each public address. The routes are added and
343 removed as CTDB moves public addresses between nodes.
344 </para>
345
346 <para>
347 For more information, see the <citetitle>POLICY
348 ROUTING</citetitle> section in
349 <citerefentry><refentrytitle>ctdb</refentrytitle>
350 <manvolnum>7</manvolnum></citerefentry>.
351 </para>
352
353 <variablelist>
354 <varlistentry>
355 <term>CTDB_PER_IP_ROUTING_CONF=<parameter>FILENAME</parameter></term>
356 <listitem>
357 <para>
358 FILENAME contains elements for constructing the desired
359 routes for each source address.
360 </para>
361
362 <para>
363 The special FILENAME value
364 <constant>__auto_link_local__</constant> indicates that no
365 configuration file is provided and that CTDB should
366 generate reasonable link-local routes for each public IP
367 address.
368 </para>
369
370 <para>
371 File format:
372 <screen>
373 <parameter>IPADDR</parameter> <parameter>DEST-IPADDR/MASK</parameter> <optional><parameter>GATEWAY-IPADDR</parameter></optional>
374 </screen>
375 </para>
376
377 <para>
378 No default, usually
379 <filename>/usr/local/etc/ctdb/policy_routing</filename>
380 when enabled.
381 </para>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry>
386 <term>
387 CTDB_PER_IP_ROUTING_RULE_PREF=<parameter>NUM</parameter>
388 </term>
389 <listitem>
390 <para>
391 NUM sets the priority (or preference) for the routing
392 rules that are added by CTDB.
393 </para>
394
395 <para>
396 This should be (strictly) greater than 0 and (strictly)
397 less than 32766. A priority of 100 is recommended, unless
398 this conflicts with a priority already in use on the
399 system. See
400 <citerefentry><refentrytitle>ip</refentrytitle>
401 <manvolnum>8</manvolnum></citerefentry>, for more details.
402 </para>
403 </listitem>
404 </varlistentry>
405
406 <varlistentry>
407 <term>
408 CTDB_PER_IP_ROUTING_TABLE_ID_LOW=<parameter>LOW-NUM</parameter>,
409 CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=<parameter>HIGH-NUM</parameter>
410 </term>
411 <listitem>
412 <para>
413 CTDB determines a unique routing table number to use for
414 the routing related to each public address. LOW-NUM and
415 HIGH-NUM indicate the minimum and maximum routing table
416 numbers that are used.
417 </para>
418
419 <para>
420 <citerefentry><refentrytitle>ip</refentrytitle>
421 <manvolnum>8</manvolnum></citerefentry> uses some
422 reserved routing table numbers below 255. Therefore,
423 CTDB_PER_IP_ROUTING_TABLE_ID_LOW should be (strictly)
424 greater than 255.
425 </para>
426
427 <para>
428 CTDB uses the standard file
429 <filename>/etc/iproute2/rt_tables</filename> to maintain
430 a mapping between the routing table numbers and labels.
431 The label for a public address
432 <replaceable>ADDR</replaceable> will look like
433 ctdb.<replaceable>addr</replaceable>. This means that
434 the associated rules and routes are easy to read (and
435 manipulate).
436 </para>
437
438 <para>
439 No default, usually 1000 and 9000.
440 </para>
441 </listitem>
442 </varlistentry>
443 </variablelist>
444
445 <refsect3>
446 <title>Example</title>
447 <screen>
448CTDB_PER_IP_ROUTING_CONF=/usr/local/etc/ctdb/policy_routing
449CTDB_PER_IP_ROUTING_RULE_PREF=100
450CTDB_PER_IP_ROUTING_TABLE_ID_LOW=1000
451CTDB_PER_IP_ROUTING_TABLE_ID_HIGH=9000
452 </screen>
453 </refsect3>
454
455 </refsect2>
456
457 <refsect2>
458 <title>91.lvs</title>
459
460 <para>
461 Provides CTDB's LVS functionality.
462 </para>
463
464 <para>
465 For a general description see the <citetitle>LVS</citetitle>
466 section in <citerefentry><refentrytitle>ctdb</refentrytitle>
467 <manvolnum>7</manvolnum></citerefentry>.
468 </para>
469
470 <variablelist>
471
472 <varlistentry>
473 <term>
474 CTDB_LVS_NODES=<parameter>FILENAME</parameter>
475 </term>
476 <listitem>
477 <para>
478 FILENAME contains the list of nodes that belong to the
479 same LVS group.
480 </para>
481 <para>
482 File format:
483 <screen>
f37b3cf2 484<parameter>IPADDR</parameter> <optional>follower-only</optional>
a8ccf41b
MS
485 </screen>
486 </para>
487 <para>
488 IPADDR is the private IP address of each node in the LVS
489 group.
490 </para>
491 <para>
f37b3cf2
MS
492 If "follower-only" is specified then the corresponding node
493 can not be the LVS leader node. In this case
a8ccf41b
MS
494 <varname>CTDB_LVS_PUBLIC_IFACE</varname> and
495 <varname>CTDB_LVS_PUBLIC_IP</varname> are optional and
496 unused.
497 </para>
498 <para>
499 No default, usually
500 <filename>/usr/local/etc/ctdb/lvs_nodes</filename> when enabled.
501 </para>
502 </listitem>
503 </varlistentry>
504
505 <varlistentry>
506 <term>
507 CTDB_LVS_PUBLIC_IFACE=<parameter>INTERFACE</parameter>
508 </term>
509 <listitem>
510 <para>
511 INTERFACE is the network interface that clients will use
512 to connection to <varname>CTDB_LVS_PUBLIC_IP</varname>.
f37b3cf2 513 This is optional for follower-only nodes.
a8ccf41b
MS
514 No default.
515 </para>
516 </listitem>
517 </varlistentry>
518
519 <varlistentry>
520 <term>
521 CTDB_LVS_PUBLIC_IP=<parameter>IPADDR</parameter>
522 </term>
523 <listitem>
524 <para>
525 CTDB_LVS_PUBLIC_IP is the LVS public address. No
526 default.
527 </para>
528 </listitem>
529 </varlistentry>
530
531 </variablelist>
532 </refsect2>
533
534 </refsect1>
535
536 <refsect1>
537 <title>SERVICE CONFIGURATION</title>
538
539 <para>
540 CTDB can be configured to manage and/or monitor various NAS (and
541 other) services via its eventscripts.
542 </para>
543
544 <para>
545 In the simplest case CTDB will manage a service. This means the
546 service will be started and stopped along with CTDB, CTDB will
547 monitor the service and CTDB will do any required
548 reconfiguration of the service when public IP addresses are
549 failed over.
550 </para>
551
552 <refsect2>
553 <title>20.multipathd</title>
554
555 <para>
556 Provides CTDB's Linux multipathd service management.
557 </para>
558
559 <para>
560 It can monitor multipath devices to ensure that active paths
561 are available.
562 </para>
563
564 <variablelist>
565 <varlistentry>
566 <term>
567 CTDB_MONITOR_MPDEVICES=<parameter>MP-DEVICE-LIST</parameter>
568 </term>
569 <listitem>
570 <para>
571 MP-DEVICE-LIST is a list of multipath devices for CTDB to monitor?
572 </para>
573 <para>
574 No default.
575 </para>
576 </listitem>
577 </varlistentry>
578 </variablelist>
579 </refsect2>
580
581 <refsect2>
582 <title>31.clamd</title>
583
584 <para>
585 This event script provide CTDB's ClamAV anti-virus service
586 management.
587 </para>
588
589 <para>
590 This eventscript is not enabled by default. Use <command>ctdb
591 enablescript</command> to enable it.
592 </para>
593
594 <variablelist>
595
a8ccf41b
MS
596 <varlistentry>
597 <term>
598 CTDB_CLAMD_SOCKET=<parameter>FILENAME</parameter>
599 </term>
600 <listitem>
601 <para>
602 FILENAME is the socket to monitor ClamAV.
603 </para>
604 <para>
605 No default.
606 </para>
607 </listitem>
608 </varlistentry>
609
610 </variablelist>
611
612 </refsect2>
613
3ee348a9
MS
614 <refsect2>
615 <title>40.vsftpd</title>
616
617 <para>
618 Provides CTDB's vsftpd service management.
619 </para>
620
621 <variablelist>
622 <varlistentry>
623 <term>
624 CTDB_VSFTPD_MONITOR_THRESHOLDS=<parameter>THRESHOLDS</parameter>
625 </term>
626 <listitem>
627 <para>
628 THRESHOLDS indicates how many consecutive monitoring
629 attempts need to report that vsftpd is not listening on
630 TCP port 21 before a warning is logged and before
631 monitoring fails. See the <citetitle>Monitoring
632 Thresholds</citetitle> for a description of how
633 monitoring thresholds work.
634 </para>
635 <para>
636 Default is 1:2.
637 </para>
638 </listitem>
639 </varlistentry>
640
641 </variablelist>
642
643 </refsect2>
644
959235ff
A
645 <refsect2>
646 <title>48.netbios</title>
647
648 <para>
649 Provides CTDB's NetBIOS service management.
650 </para>
651
652 <variablelist>
653 <varlistentry>
654 <term>
655 CTDB_SERVICE_NMB=<parameter>SERVICE</parameter>
656 </term>
657 <listitem>
658 <para>
659 Distribution specific SERVICE for managing nmbd.
660 </para>
661 <para>
662 Default is distribution-dependant.
663 </para>
664 </listitem>
665 </varlistentry>
666
667 </variablelist>
668
669 </refsect2>
670
a8ccf41b
MS
671 <refsect2>
672 <title>49.winbind</title>
673
674 <para>
675 Provides CTDB's Samba winbind service management.
676 </para>
677
678 <variablelist>
679
a8ccf41b
MS
680 <varlistentry>
681 <term>
682 CTDB_SERVICE_WINBIND=<parameter>SERVICE</parameter>
683 </term>
684 <listitem>
685 <para>
686 Distribution specific SERVICE for managing winbindd.
687 </para>
688 <para>
689 Default is "winbind".
690 </para>
691 </listitem>
692 </varlistentry>
693
f42c5802
VA
694 <varlistentry>
695 <term>
696 CTDB_SAMBA_INTERFACES_FILE=<parameter>FILENAME</parameter>
697 </term>
698 <listitem>
699 <para>
700 Generates FILENAME, containing an smb.conf snippet with
701 an interfaces setting that includes interfaces for
702 configured CTDB public IP addresses. This file then
703 needs to be explicitly included in smb.conf.
704 </para>
705 <para>
706 For example, if public IP addresses are defined on
707 interfaces eth0 and eth1, and this is set to
708 <filename>/etc/samba/interfaces.conf</filename>, then
709 that file will contain the following before smbd is
710 started:
711 </para>
712 <screen>
713 bind interfaces only = yes
714 interfaces = lo eth0 eth1
715 </screen>
716 <para>
717 This can be useful for limiting the interfaces used by
718 SMB multichannel.
719 </para>
720 <para>
721 Default is to not generate a file.
722 </para>
723 </listitem>
724 </varlistentry>
725
726 <varlistentry>
727 <term>
728 CTDB_SAMBA_INTERFACES_EXTRA=<parameter>INTERFACE-LIST</parameter>
729 </term>
730 <listitem>
731 <para>
732 A space separated list to provide additional interfaces to bind.
733 </para>
734 <para>
735 Default is empty - no extra interfaces are added.
736 </para>
737 </listitem>
738 </varlistentry>
a8ccf41b
MS
739 </variablelist>
740
741 </refsect2>
742
743 <refsect2>
744 <title>50.samba</title>
745
746 <para>
747 Provides the core of CTDB's Samba file service management.
748 </para>
749
750 <variablelist>
751
a8ccf41b
MS
752 <varlistentry>
753 <term>
754 CTDB_SAMBA_CHECK_PORTS=<parameter>PORT-LIST</parameter>
755 </term>
756 <listitem>
757 <para>
758 When monitoring Samba, check TCP ports in
759 space-separated PORT-LIST.
760 </para>
761 <para>
762 Default is to monitor ports that Samba is configured to listen on.
763 </para>
764 </listitem>
765 </varlistentry>
766
767 <varlistentry>
768 <term>
769 CTDB_SAMBA_SKIP_SHARE_CHECK=yes|no
770 </term>
771 <listitem>
772 <para>
773 As part of monitoring, should CTDB skip the check for
774 the existence of each directory configured as share in
775 Samba. This may be desirable if there is a large number
776 of shares.
777 </para>
778 <para>
779 Default is no.
780 </para>
781 </listitem>
782 </varlistentry>
783
a8ccf41b
MS
784 <varlistentry>
785 <term>
786 CTDB_SERVICE_SMB=<parameter>SERVICE</parameter>
787 </term>
788 <listitem>
789 <para>
790 Distribution specific SERVICE for managing smbd.
791 </para>
792 <para>
793 Default is distribution-dependant.
794 </para>
795 </listitem>
796 </varlistentry>
797
798 </variablelist>
799
800 </refsect2>
801
802 <refsect2>
803 <title>60.nfs</title>
804
805 <para>
2de2d5dd 806 This event script provides CTDB's NFS service management.
a8ccf41b
MS
807 </para>
808
809 <para>
810 This includes parameters for the kernel NFS server.
811 Alternative NFS subsystems (such as <ulink
812 url="https://github.com/nfs-ganesha/nfs-ganesha/wiki">NFS-Ganesha</ulink>)
813 can be integrated using <varname>CTDB_NFS_CALLOUT</varname>.
814 </para>
815
816 <variablelist>
817
a8ccf41b
MS
818 <varlistentry>
819 <term>
820 CTDB_NFS_CALLOUT=<parameter>COMMAND</parameter>
821 </term>
822 <listitem>
823 <para>
824 COMMAND specifies the path to a callout to handle
825 interactions with the configured NFS system, including
826 startup, shutdown, monitoring.
827 </para>
828 <para>
829 Default is the included
830 <command>nfs-linux-kernel-callout</command>.
831 </para>
832 </listitem>
833 </varlistentry>
834
835 <varlistentry>
836 <term>
837 CTDB_NFS_CHECKS_DIR=<parameter>DIRECTORY</parameter>
838 </term>
839 <listitem>
840 <para>
841 Specifies the path to a DIRECTORY containing files that
842 describe how to monitor the responsiveness of NFS RPC
843 services. See the README file for this directory for an
844 explanation of the contents of these "check" files.
845 </para>
846 <para>
847 CTDB_NFS_CHECKS_DIR can be used to point to different
848 sets of checks for different NFS servers.
849 </para>
850 <para>
851 One way of using this is to have it point to, say,
852 <filename>/usr/local/etc/ctdb/nfs-checks-enabled.d</filename>
853 and populate it with symbolic links to the desired check
854 files. This avoids duplication and is upgrade-safe.
855 </para>
856 <para>
857 Default is
858 <filename>/usr/local/etc/ctdb/nfs-checks.d</filename>,
859 which contains NFS RPC checks suitable for Linux kernel
860 NFS.
861 </para>
862 </listitem>
863 </varlistentry>
864
865 <varlistentry>
866 <term>
867 CTDB_NFS_SKIP_SHARE_CHECK=yes|no
868 </term>
869 <listitem>
870 <para>
871 As part of monitoring, should CTDB skip the check for
872 the existence of each directory exported via NFS. This
873 may be desirable if there is a large number of exports.
874 </para>
875 <para>
876 Default is no.
877 </para>
878 </listitem>
879 </varlistentry>
880
881 <varlistentry>
882 <term>
883 CTDB_RPCINFO_LOCALHOST=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter>
884 </term>
885 <listitem>
886 <para>
887 IPADDR or HOSTNAME indicates the address that
888 <command>rpcinfo</command> should connect to when doing
889 <command>rpcinfo</command> check on IPv4 RPC service during
890 monitoring. Optimally this would be "localhost".
891 However, this can add some performance overheads.
892 </para>
893 <para>
894 Default is "127.0.0.1".
895 </para>
896 </listitem>
897 </varlistentry>
898
899 <varlistentry>
900 <term>
901 CTDB_RPCINFO_LOCALHOST6=<parameter>IPADDR</parameter>|<parameter>HOSTNAME</parameter>
902 </term>
903 <listitem>
904 <para>
905 IPADDR or HOSTNAME indicates the address that
906 <command>rpcinfo</command> should connect to when doing
907 <command>rpcinfo</command> check on IPv6 RPC service
908 during monitoring. Optimally this would be "localhost6"
909 (or similar). However, this can add some performance
910 overheads.
911 </para>
912 <para>
913 Default is "::1".
914 </para>
915 </listitem>
916 </varlistentry>
917
918 <varlistentry>
919 <term>
920 CTDB_NFS_STATE_FS_TYPE=<parameter>TYPE</parameter>
921 </term>
922 <listitem>
923 <para>
924 The type of filesystem used for a clustered NFS' shared
925 state. No default.
926 </para>
927 </listitem>
928 </varlistentry>
929
930 <varlistentry>
931 <term>
932 CTDB_NFS_STATE_MNT=<parameter>DIR</parameter>
933 </term>
934 <listitem>
935 <para>
936 The directory where a clustered NFS' shared state will be
937 located. No default.
938 </para>
939 </listitem>
940 </varlistentry>
941
942 </variablelist>
943
944 </refsect2>
945
946 <refsect2>
947 <title>70.iscsi</title>
948
949 <para>
950 Provides CTDB's Linux iSCSI tgtd service management.
951 </para>
952
953 <variablelist>
954
a8ccf41b
MS
955 <varlistentry>
956 <term>
957 CTDB_START_ISCSI_SCRIPTS=<parameter>DIRECTORY</parameter>
958 </term>
959 <listitem>
960 <para>
961 DIRECTORY on shared storage containing scripts to start
962 tgtd for each public IP address.
963 </para>
964 <para>
965 No default.
966 </para>
967 </listitem>
968 </varlistentry>
969 </variablelist>
970 </refsect2>
971
972 </refsect1>
973
974 <refsect1>
975 <title>
976 DATABASE SETUP
977 </title>
978
979 <para>
980 CTDB checks the consistency of databases during startup.
981 </para>
982
983 <refsect2>
984 <title>00.ctdb</title>
985
986 <variablelist>
987
988 <varlistentry>
989 <term>CTDB_MAX_CORRUPT_DB_BACKUPS=<parameter>NUM</parameter></term>
990 <listitem>
991 <para>
992 NUM is the maximum number of volatile TDB database
993 backups to be kept (for each database) when a corrupt
994 database is found during startup. Volatile TDBs are
995 zeroed during startup so backups are needed to debug
996 any corruption that occurs before a restart.
997 </para>
998 <para>
999 Default is 10.
1000 </para>
1001 </listitem>
1002 </varlistentry>
1003
1004 </variablelist>
1005 </refsect2>
1006
1007 </refsect1>
1008
1009 <refsect1>
1010 <title>SYSTEM RESOURCE MONITORING</title>
1011
1012 <refsect2>
1013 <title>
1014 05.system
1015 </title>
1016
1017 <para>
1018 Provides CTDB's filesystem and memory usage monitoring.
1019 </para>
1020
1021 <para>
1022 CTDB can experience seemingly random (performance and other)
1023 issues if system resources become too constrained. Options in
1024 this section can be enabled to allow certain system resources
1025 to be checked. They allows warnings to be logged and nodes to
1026 be marked unhealthy when system resource usage reaches the
1027 configured thresholds.
1028 </para>
1029
1030 <para>
1031 Some checks are enabled by default. It is recommended that
1032 these checks remain enabled or are augmented by extra checks.
1033 There is no supported way of completely disabling the checks.
1034 </para>
1035
1036 <variablelist>
1037
1038 <varlistentry>
1039 <term>
1040 CTDB_MONITOR_FILESYSTEM_USAGE=<parameter>FS-LIMIT-LIST</parameter>
1041 </term>
1042 <listitem>
1043 <para>
1044 FS-LIMIT-LIST is a space-separated list of
1045 <parameter>FILESYSTEM</parameter>:<parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1046 triples indicating that warnings should be logged if the
1047 space used on FILESYSTEM reaches WARN_LIMIT%. If usage
1048 reaches UNHEALTHY_LIMIT then the node should be flagged
1049 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1050 left blank, meaning that check will be omitted.
1051 </para>
1052
1053 <para>
1054 Default is to warn for each filesystem containing a
409b0b79
MS
1055 database directory
1056 (<literal>volatile&nbsp;database&nbsp;directory</literal>,
1057 <literal>persistent&nbsp;database&nbsp;directory</literal>,
1058 <literal>state&nbsp;database&nbsp;directory</literal>)
1059 with a threshold of 90%.
a8ccf41b
MS
1060 </para>
1061 </listitem>
1062 </varlistentry>
1063
1064 <varlistentry>
1065 <term>
1066 CTDB_MONITOR_MEMORY_USAGE=<parameter>MEM-LIMITS</parameter>
1067 </term>
1068 <listitem>
1069 <para>
1070 MEM-LIMITS takes the form
1071 <parameter>WARN_LIMIT</parameter><optional>:<parameter>UNHEALTHY_LIMIT</parameter></optional>
1072 indicating that warnings should be logged if memory
1073 usage reaches WARN_LIMIT%. If usage reaches
1074 UNHEALTHY_LIMIT then the node should be flagged
1075 unhealthy. Either WARN_LIMIT or UNHEALTHY_LIMIT may be
1076 left blank, meaning that check will be omitted.
1077 </para>
1078 <para>
1079 Default is 80, so warnings will be logged when memory
1080 usage reaches 80%.
1081 </para>
1082 </listitem>
1083 </varlistentry>
1084
a8ccf41b
MS
1085 </variablelist>
1086 </refsect2>
1087
1088 </refsect1>
1089
1090
1091 <refsect1>
1092 <title>EVENT SCRIPT DEBUGGING</title>
1093
1094 <refsect2>
1095 <title>
1096 debug-hung-script.sh
1097 </title>
1098
1099 <variablelist>
1100
1101 <varlistentry>
1102 <term>CTDB_DEBUG_HUNG_SCRIPT_STACKPAT=<parameter>REGEXP</parameter></term>
1103 <listitem>
1104 <para>
1105 REGEXP specifies interesting processes for which stack
1106 traces should be logged when debugging hung eventscripts
1107 and those processes are matched in pstree output.
1108 REGEXP is an extended regexp so choices are separated by
1109 pipes ('|'). However, REGEXP should not contain
a44e6987
MS
1110 parentheses. See also the <citerefentry><refentrytitle>ctdb.conf</refentrytitle>
1111 <manvolnum>5</manvolnum></citerefentry>
1112 [event] "debug&nbsp;script" option.
a8ccf41b
MS
1113 </para>
1114 <para>
1115 Default is "exportfs|rpcinfo".
1116 </para>
1117 </listitem>
1118 </varlistentry>
1119
1120 </variablelist>
1121 </refsect2>
1122
1123 </refsect1>
1124
1125 <refsect1>
1126 <title>FILES</title>
1127
1128 <simplelist>
1129 <member><filename>/usr/local/etc/ctdb/script.options</filename></member>
1130 </simplelist>
1131 </refsect1>
1132
1133 <refsect1>
1134 <title>SEE ALSO</title>
1135 <para>
1136 <citerefentry><refentrytitle>ctdbd</refentrytitle>
1137 <manvolnum>1</manvolnum></citerefentry>,
1138
1139 <citerefentry><refentrytitle>ctdb</refentrytitle>
1140 <manvolnum>7</manvolnum></citerefentry>,
1141
1142 <ulink url="http://ctdb.samba.org/"/>
1143 </para>
1144 </refsect1>
1145
1146 <refentryinfo>
1147 <author>
1148 <contrib>
1149 This documentation was written by
1150 Amitay Isaacs,
1151 Martin Schwenke
1152 </contrib>
1153 </author>
1154
1155 <copyright>
1156 <year>2007</year>
1157 <holder>Andrew Tridgell</holder>
1158 <holder>Ronnie Sahlberg</holder>
1159 </copyright>
1160 <legalnotice>
1161 <para>
1162 This program is free software; you can redistribute it and/or
1163 modify it under the terms of the GNU General Public License as
1164 published by the Free Software Foundation; either version 3 of
1165 the License, or (at your option) any later version.
1166 </para>
1167 <para>
1168 This program is distributed in the hope that it will be
1169 useful, but WITHOUT ANY WARRANTY; without even the implied
1170 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
1171 PURPOSE. See the GNU General Public License for more details.
1172 </para>
1173 <para>
1174 You should have received a copy of the GNU General Public
1175 License along with this program; if not, see
1176 <ulink url="http://www.gnu.org/licenses"/>.
1177 </para>
1178 </legalnotice>
1179 </refentryinfo>
1180
1181</refentry>