Whamcloud - gitweb
LUDOC-394 manual: Remove extra 'held' word
[doc/manual.git] / ConfiguringFailover.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook"
3  xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US"
4  xml:id="configuringfailover">
5   <title xml:id="configuringfailover.title">Configuring Failover in a Lustre
6   File System</title>
7   <para>This chapter describes how to configure failover in a Lustre file
8   system. It includes:</para>
9   <itemizedlist>
10     <listitem>
11       <para>
12         <xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_82389"/></para>
13     </listitem>
14     <listitem>
15       <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438188_92688"
16         /></para>
17     </listitem>
18     <listitem>
19       <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="section_tnq_kbr_xl"/></para>
20     </listitem>
21   </itemizedlist>
22   <para>For an overview of failover functionality in a Lustre file system, see <xref
23       xmlns:xlink="http://www.w3.org/1999/xlink" linkend="understandingfailover"/>.</para>
24   <section xml:id="dbdoclet.50438188_82389">
25     <title><indexterm>
26         <primary>High availability</primary>
27         <see>failover</see>
28       </indexterm><indexterm>
29         <primary>failover</primary>
30       </indexterm>Setting Up a Failover Environment</title>
31     <para>The Lustre software provides failover mechanisms only at the layer of the Lustre file
32       system. No failover functionality is provided for system-level components such as failing
33       hardware or applications, or even for the entire failure of a node, as would typically be
34       provided in a complete failover solution. Failover functionality such as node monitoring,
35       failure detection, and resource fencing must be provided by external HA software, such as
36       PowerMan or the open source Corosync and Pacemaker packages provided by Linux operating system
37       vendors. Corosync provides support for detecting failures, and Pacemaker provides the actions
38       to take once a failure has been detected.</para>
39     <section remap="h3">
40       <title><indexterm>
41           <primary>failover</primary>
42           <secondary>power control device</secondary>
43         </indexterm>Selecting Power Equipment</title>
44       <para>Failover in a Lustre file system requires the use of a remote power control (RPC)
45         mechanism, which comes in different configurations. For example, Lustre server nodes may be
46         equipped with IPMI/BMC devices that allow remote power control. In the past, software or
47         even “sneakerware” has been used, but these are not recommended. For recommended devices,
48         refer to the list of supported RPC devices on the website for the PowerMan cluster power
49         management utility:</para>
50       <para><link xmlns:xlink="http://www.w3.org/1999/xlink"
51           xlink:href="http://code.google.com/p/powerman/wiki/SupportedDevs"
52           >http://code.google.com/p/powerman/wiki/SupportedDevs</link></para>
53     </section>
54     <section remap="h3">
55       <title><indexterm>
56           <primary>failover</primary>
57           <secondary>power management software</secondary>
58         </indexterm>Selecting Power Management Software</title>
59       <para>Lustre failover requires RPC and management capability to verify that a failed node is
60         shut down before I/O is directed to the failover node. This avoids double-mounting the two
61         nodes and the risk of unrecoverable data corruption. A variety of power management tools
62         will work. Two packages that have been commonly used with the Lustre software are PowerMan
63         and Linux-HA (aka. STONITH ).</para>
64       <para>The PowerMan cluster power management utility is used to control RPC devices from a
65         central location. PowerMan provides native support for several RPC varieties and Expect-like
66         configuration simplifies the addition of new devices. The latest versions of PowerMan are
67         available at: </para>
68       <para><link xmlns:xlink="http://www.w3.org/1999/xlink"
69           xlink:href="http://code.google.com/p/powerman/"
70         >http://code.google.com/p/powerman/</link></para>
71       <para>STONITH, or “Shoot The Other Node In The Head”, is a set of power management tools
72         provided with the Linux-HA package prior to Red Hat Enterprise Linux 6. Linux-HA has native
73         support for many power control devices, is extensible (uses Expect scripts to automate
74         control), and provides the software to detect and respond to failures. With Red Hat
75         Enterprise Linux 6, Linux-HA is being replaced in the open source community by the
76         combination of Corosync and Pacemaker. For Red Hat Enterprise Linux subscribers, cluster
77         management using CMAN is available from Red Hat.</para>
78     </section>
79     <section>
80       <title><indexterm>
81           <primary>failover</primary>
82           <secondary>high-availability (HA)  software</secondary>
83         </indexterm>Selecting High-Availability (HA) Software</title>
84       <para>The Lustre file system must be set up with high-availability (HA) software to enable a
85         complete Lustre failover solution. Except for PowerMan, the HA software packages mentioned
86         above provide both power management and cluster management.  For information about setting
87         up failover with Pacemaker, see:</para>
88       <itemizedlist>
89         <listitem>
90           <para>Pacemaker Project website:  <link xmlns:xlink="http://www.w3.org/1999/xlink"
91               xlink:href="http://clusterlabs.org/"><link xlink:href="http://clusterlabs.org/"
92                 >http://clusterlabs.org/</link></link></para>
93         </listitem>
94         <listitem>
95           <para>Article <emphasis role="italic">Using Pacemaker with a Lustre File
96             System</emphasis>:  <link xmlns:xlink="http://www.w3.org/1999/xlink"
97               xlink:href="https://wiki.whamcloud.com/display/PUB/Using+Pacemaker+with+a+Lustre+File+System"
98                 ><link
99                 xlink:href="https://wiki.whamcloud.com/display/PUB/Using+Pacemaker+with+a+Lustre+File+System"
100                 >https://wiki.whamcloud.com/display/PUB/Using+Pacemaker+with+a+Lustre+File+System</link></link></para>
101         </listitem>
102       </itemizedlist>
103     </section>
104   </section>
105   <section xml:id="dbdoclet.50438188_92688">
106     <title><indexterm>
107         <primary>failover</primary>
108         <secondary>setup</secondary>
109       </indexterm>Preparing a Lustre File System for Failover</title>
110     <para>To prepare a Lustre file system to be configured and managed as an HA system by a
111       third-party HA application, each storage target (MGT, MGS, OST) must be associated with a
112       second node to create a failover pair. This configuration information is then communicated by
113       the MGS to a client when the client mounts the file system.</para>
114     <para>The per-target configuration is relayed to the MGS at mount time. Some rules related to
115       this are:<itemizedlist>
116         <listitem>
117           <para> When a target is <emphasis role="underline"><emphasis role="italic"
118                 >initially</emphasis></emphasis> mounted, the MGS reads the configuration
119             information from the target (such as mgt vs. ost, failnode, fsname) to configure the
120             target into a Lustre file system. If the MGS is reading the initial mount configuration,
121             the mounting node becomes that target's “primary” node.</para>
122         </listitem>
123         <listitem>
124           <para>When a target is <emphasis role="underline"><emphasis role="italic"
125                 >subsequently</emphasis></emphasis> mounted, the MGS reads the current configuration
126             from the target and, as needed, will reconfigure the MGS database target
127             information</para>
128         </listitem>
129       </itemizedlist></para>
130     <para>When the target is formatted using the <literal>mkfs.lustre</literal> command, the failover
131       service node(s) for the target are designated using the <literal>--servicenode</literal>
132       option. In the example below, an OST with index <literal>0</literal> in the  file system
133         <literal>testfs</literal> is formatted with two service nodes designated to serve as a
134       failover
135       pair:<screen>mkfs.lustre --reformat --ost --fsname testfs --mgsnode=192.168.10.1@o3ib \  
136               --index=0 --servicenode=192.168.10.7@o2ib \
137               --servicenode=192.168.10.8@o2ib \  
138               /dev/sdb</screen></para>
139     <para>More than two potential service nodes can be designated for a target. The target can then
140       be mounted on any of the designated service nodes.</para>
141     <para>When HA is configured on a storage target, the Lustre software enables multi-mount
142       protection (MMP) on that storage target. MMP prevents multiple nodes from simultaneously
143       mounting and thus corrupting the data on the target. For more about MMP, see <xref
144         xmlns:xlink="http://www.w3.org/1999/xlink" linkend="managingfailover"/>.</para>
145     <para>If the MGT has been formatted with multiple service nodes designated, this information
146       must be conveyed to the Lustre client in the mount command used to mount the file system. In
147       the example below, NIDs for two MGSs that have been designated as service nodes for the MGT
148       are specified in the mount command executed on the
149       client:<screen>mount -t lustre 10.10.120.1@tcp1:10.10.120.2@tcp1:/testfs /lustre/testfs</screen></para>
150     <para>When a client mounts the file system, the MGS provides configuration information to the
151       client for the MDT(s) and OST(s) in the file system along with the NIDs for all service nodes
152       associated with each target and the service node on which the target is mounted. Later, when
153       the client attempts to access data on a target, it will try the NID for each specified service
154       node until it connects to the target.</para>
155   </section>
156   <section xml:id="section_tnq_kbr_xl">
157     <title>Administering Failover in a Lustre File System</title>
158     <para>For additional information about administering failover features in a Lustre file system, see:<itemizedlist>
159         <listitem>
160           <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438194_57420"
161             /></para>
162         </listitem>
163         <listitem>
164           <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438194_41817"
165             /></para>
166         </listitem>
167         <listitem>
168           <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="lustremaint.ChangeAddrFailoverNode"
169             /></para>
170         </listitem>
171         <listitem>
172           <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="dbdoclet.50438219_75432"
173             /></para>
174         </listitem>
175       </itemizedlist></para>
176   </section>
177 </chapter>
178 <!--
179   vim:expandtab:shiftwidth=2:tabstop=8:
180   -->