merge from tridge
[sahlberg/ctdb.git] / web / ftp.html
1 <!--#set var="TITLE" value="CTDB and ftp" -->
2 <!--#include virtual="header.html" -->
3
4 <h1>Setting up clustered FTP</h1>
5
6 <h2>Prereqs</h2>
7 Configure CTDB as above and set it up to use public ipaddresses.<br>
8 Verify that the CTDB cluster works.
9
10 <h2>Configuration</h2>
11
12 Setting up a vsftpd cluster is really easy.<br>
13 Configure vsftpd on each node on the cluster.<br><br>
14 Set up vsftpd to export directories from the shared cluster filesystem.
15
16 <h2>/etc/sysconfig/vsftpd</h2>
17
18 Create the file /etc/sysconfig/vsftpd with the content :
19 <pre>
20   CTDB_MANAGES_VSFTPD=yes
21 </pre>
22
23 Disable vsftpd in chkconfig so that it does not start by default. Instead CTDB will start/stop vsftdp as required.
24 <pre>
25   chkconfig vsftpd off
26 </pre>
27
28 <h2>Events script</h2>
29
30 The CTDB distribution already comes with an events script for vsftp in the file /etc/ctdb/events.d/40.vsftpd<br><br>
31 There should not be any need to edit this file.
32
33
34 <h2>Restart your cluster</h2>
35 Next time your cluster restarts, CTDB will start managing the vsftp service.<br><br>
36 If the cluster is already in production you may not want to restart the entire cluster since this would disrupt services.<br>
37
38 Insted you can just disable/enable the nodes one by one. Once a node becomes enabled again it will start the vsftp service.<br><br>
39
40 Follow the procedure below for each node, one node at a time :
41
42 <h3>1 Disable the node</h3>
43 Use the ctdb command to disable the node :
44 <pre>
45   ctdb -n NODE disable
46 </pre>
47
48 <h3>2 Wait until the cluster has recovered</h3>
49
50 Use the ctdb tool to monitor until the cluster has recovered, i.e. Recovery mode is NORMAL. This should happen within seconds of when you disabled the node.
51 <pre>
52   ctdb status
53 </pre>
54
55 <h3>3 Enable the node again</h3>
56
57 Re-enable the node again which will start the newly configured vsftp service.
58 <pre>
59   ctdb -n NODE enable
60 </pre>
61
62 <!--#include virtual="footer.html" -->
63