Whamcloud - gitweb
LUDOC-69 failover: Updated failover documentation globally across 6 chapters.
[doc/manual.git] / UnderstandingFailover.xml
1 <?xml version='1.0' encoding='UTF-8'?><chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="understandingfailover">
2   <title xml:id="understandingfailover.title">Understanding Failover in a Lustre File System</title>
3   <para>This chapter describes failover in a Lustre file system. It includes:</para>
4   <itemizedlist>
5     <listitem>
6       <para>
7               <xref linkend="dbdoclet.50540653_59957"/>
8           </para>
9     </listitem>
10     <listitem>
11       <para>
12               <xref linkend="dbdoclet.50540653_97944"/>
13           </para>
14     </listitem>
15   </itemizedlist>
16   <section xml:id="dbdoclet.50540653_59957">
17       <title><indexterm><primary>failover</primary></indexterm>
18           What is Failover?</title>
19     <para>In a high-availability (HA) system, unscheduled downtime is minimized by using redundant
20       hardware and software components and software components that automate recovery when a failure
21       occurs. If a failure condition occurs, such as the loss of a server or storage device or a
22       network or software fault, the system&apos;s services continue with minimal interruption.
23       Generally, availability is specified as the percentage of time the system is required to be
24       available.</para>
25     <para>Availability is accomplished by replicating hardware and/or software so that when a
26       primary server fails or is unavailable, a standby server can be switched into its place to run
27       applications and associated resources. This process, called <emphasis role="italic"
28         >failover</emphasis>, is automatic in an HA system and, in most cases, completely
29       application-transparent.</para>
30     <para>A failover hardware setup requires a pair of servers with a shared resource (typically a
31       physical storage device, which may be based on SAN, NAS, hardware RAID, SCSI or Fibre Channel
32       (FC) technology). The method of sharing storage should be essentially transparent at the
33       device level; the same physical logical unit number (LUN) should be visible from both servers.
34       To ensure high availability at the physical storage level, we encourage the use of RAID arrays
35       to protect against drive-level failures.</para>
36     <note>
37       <para>The Lustre software does not provide redundancy for data; it depends exclusively on
38         redundancy of backing storage devices. The backing OST storage should be RAID 5 or,
39         preferably, RAID 6 storage. MDT storage should be RAID 1 or RAID 10.</para>
40     </note>
41     <section remap="h3">
42       <title><indexterm><primary>failover</primary><secondary>capabilities</secondary></indexterm>Failover Capabilities</title>
43       <para>To establish a highly-available Lustre file system, power management software or hardware and high availability (HA) software are used to provide the following failover capabilities:</para>
44       <itemizedlist>
45         <listitem>
46           <para><emphasis role="bold">Resource fencing</emphasis>  - Protects physical storage from simultaneous access by two nodes.</para>
47         </listitem>
48         <listitem>
49           <para><emphasis role="bold">Resource management</emphasis>  - Starts and stops the Lustre resources as a part of failover, maintains the cluster state, and carries out other resource management tasks.</para>
50         </listitem>
51         <listitem>
52           <para><emphasis role="bold">Health monitoring</emphasis> - Verifies the availability of
53             hardware and network resources and responds to health indications provided by the Lustre
54             software.</para>
55         </listitem>
56       </itemizedlist>
57       <para>These capabilities can be provided by a variety of software and/or hardware solutions.
58         For more information about using power management software or hardware and high availability
59         (HA) software with a Lustre file system, see <xref linkend="configuringfailover"/>.</para>
60       <para>HA software is responsible for detecting failure of the primary Lustre server node and
61         controlling the failover.The Lustre software works with any HA software that includes
62         resource (I/O) fencing. For proper resource fencing, the HA software must be able to
63         completely power off the failed server or disconnect it from the shared storage device. If
64         two active nodes have access to the same storage device, data may be severely
65         corrupted.</para>
66     </section>
67     <section remap="h3">
68       <title><indexterm><primary>failover</primary><secondary>configuration</secondary></indexterm>Types of Failover Configurations</title>
69       <para>Nodes in a cluster can be configured for failover in several ways. They are often configured in pairs (for example, two OSTs attached to a shared storage device), but other failover configurations are also possible. Failover configurations include:</para>
70       <itemizedlist>
71         <listitem>
72           <para><emphasis role="bold">Active/passive</emphasis>  pair - In this configuration, the active node provides resources and serves data, while the passive node is usually standing by idle. If the active node fails, the passive node takes over and becomes active.</para>
73         </listitem>
74         <listitem>
75           <para><emphasis role="bold">Active/active</emphasis>  pair - In this configuration, both nodes are active, each providing a subset of resources. In case of a failure, the second node takes over resources from the failed node.</para>
76         </listitem>
77       </itemizedlist>
78       <para>In Lustre software releases previous to Lustre software release 2.4, MDSs can be
79         configured as an active/passive pair, while OSSs can be deployed in an active/active
80         configuration that provides redundancy without extra overhead. Often the standby MDS is the
81         active MDS for another Lustre file system or the MGS, so no nodes are idle in the
82         cluster.</para>
83         <para condition="l24">Lustre software release 2.4 introduces metadata targets for individual
84         sub-directories. Active-active failover configurations are available for MDSs that serve
85         MDTs on shared storage.</para>
86     </section>
87   </section>
88   <section xml:id="dbdoclet.50540653_97944">
89     <title><indexterm>
90         <primary>failover</primary>
91         <secondary>and Lustre</secondary>
92       </indexterm>Failover Functionality in a Lustre File System</title>
93     <para>The failover functionality provided by the Lustre software can be used for the following
94       failover scenario. When a client attempts to do I/O to a failed Lustre target, it continues to
95       try until it receives an answer from any of the configured failover nodes for the Lustre
96       target. A user-space application does not detect anything unusual, except that the I/O may
97       take longer to complete.</para>
98     <para>Failover in a Lustre file system requires that two nodes be configured as a failover pair,
99       which must share one or more storage devices. A Lustre file system can be configured to
100       provide MDT or OST failover.</para>
101     <itemizedlist>
102       <listitem>
103         <para>For MDT failover, two MDSs can be configured to serve the same MDT. Only one MDS node
104           can serve an MDT at a time.</para>
105         <para condition="l24">Lustresoftware release 2.4 allows multiple MDTs. By placing two or
106           more MDT partitions on storage shared by two MDSs, one MDS can fail and the remaining MDS
107           can begin serving the unserved MDT. This is described as an active/active failover
108           pair.</para>
109       </listitem>
110       <listitem>
111         <para>For OST failover, multiple OSS nodes can be configured to be able to serve the same
112           OST. However, only one OSS node can serve the OST at a time. An OST can be moved between
113           OSS nodes that have access to the same storage device using
114             <literal>umount/mount</literal> commands.</para>
115       </listitem>
116     </itemizedlist>
117     <para>The <literal>--servicenode</literal> option is used to set up nodes in a Lustre file
118       system for failover at creation time (using <literal>mkfs.lustre</literal>) or later when the
119       Lustre file system is active (using <literal>tunefs.lustre</literal>). For explanations of
120       these utilities, see <xref linkend="dbdoclet.50438219_75432"/> and <xref
121         linkend="dbdoclet.50438219_39574"/>.</para>
122     <para>Failover capability in a Lustre file system can be used to upgrade the Lustre software
123       between successive minor versions without cluster downtime. For more information, see <xref
124         linkend="upgradinglustre"/>.</para>
125     <para>For information about configuring failover, see <xref linkend="configuringfailover"/>.</para>
126     <note>
127       <para>The Lustre software provides failover functionality only at the file system level. In a
128         complete failover solution, failover functionality for system-level components, such as node
129         failure detection or power control, must be provided by a third-party tool.</para>
130     </note>
131     <caution>
132       <para>OST failover functionality does not protect against corruption caused by a disk failure.
133         If the storage media (i.e., physical disk) used for an OST fails, it cannot be recovered by
134         functionality provided in the Lustre software. We strongly recommend that some form of RAID
135         be used for OSTs. Lustre functionality assumes that the storage is reliable, so it adds no
136         extra reliability features.</para>
137     </caution>
138     <section remap="h3">
139       <title><indexterm><primary>failover</primary><secondary>MDT</secondary></indexterm>MDT Failover Configuration (Active/Passive)</title>
140       <para>Two MDSs are typically configured as an active/passive failover pair as shown in <xref linkend="understandingfailover.fig.configmdt"/>. Note that both nodes must have access to shared storage for the MDT(s) and the MGS. The primary (active) MDS manages the Lustre system metadata resources. If the primary MDS fails, the secondary (passive) MDS takes over these resources and serves the MDTs and the MGS.</para>
141       <note>
142         <para>In an environment with multiple file systems, the MDSs can be configured in a quasi active/active configuration, with each MDS managing metadata for a subset of the Lustre file system.</para>
143       </note>
144       <figure>
145         <title xml:id="understandingfailover.fig.configmdt"> Lustre failover configuration for a active/passive MDT</title>
146         <mediaobject>
147           <imageobject>
148             <imagedata fileref="./figures/MDT_Failover.png"/>
149           </imageobject>
150           <textobject>
151             <phrase>Lustre failover configuration for an MDT </phrase>
152           </textobject>
153         </mediaobject>
154       </figure>
155     </section>
156     <section xml:id='dbdoclet.mdtactiveactive' condition='l24'>
157       <title><indexterm><primary>failover</primary><secondary>MDT</secondary></indexterm>MDT Failover Configuration (Active/Active)</title>
158       <para>Multiple MDTs became available with the advent of Lustre software release 2.4. MDTs can
159         be setup as an active/active failover configuration. A failover cluster is built from two
160         MDSs as shown in <xref linkend="understandingfailover.fig.configmdts"/>.</para>
161       <figure>
162         <title xml:id="understandingfailover.fig.configmdts"> Lustre failover configuration for a active/active MDTs </title>
163         <mediaobject>
164           <imageobject>
165             <imagedata scalefit="1" width="50%" fileref="figures/MDTs_Failover.png"/>
166           </imageobject>
167           <textobject>
168             <phrase>Lustre failover configuration for two MDTs</phrase>
169           </textobject>
170         </mediaobject>
171       </figure>
172     </section>
173     <section remap="h3">
174       <title><indexterm><primary>failover</primary><secondary>OST</secondary></indexterm>OST Failover Configuration (Active/Active)</title>
175       <para>OSTs are usually configured in a load-balanced, active/active failover configuration. A failover cluster is built from two OSSs as shown in <xref linkend="understandingfailover.fig.configost"/>.</para>
176       <note>
177         <para>OSSs configured as a failover pair must have shared disks/RAID.</para>
178       </note>
179       <figure>
180         <title xml:id="understandingfailover.fig.configost"> Lustre failover configuration for an OSTs </title>
181         <mediaobject>
182           <imageobject>
183             <imagedata scalefit="1" width="100%" fileref="./figures/OST_Failover.png"/>
184           </imageobject>
185           <textobject>
186             <phrase>Lustre failover configuration for an OSTs </phrase>
187           </textobject>
188         </mediaobject>
189       </figure>
190       <para>In an active configuration, 50% of the available OSTs are assigned to one OSS and the remaining OSTs are assigned to the other OSS. Each OSS serves as the primary node for half the OSTs and as a failover node for the remaining OSTs.</para>
191       <para>In this mode, if one OSS fails, the other OSS takes over all of the failed OSTs. The clients attempt to connect to each OSS serving the OST, until one of them responds. Data on the OST is written synchronously, and the clients replay transactions that were in progress and uncommitted to disk before the OST failure.</para>
192       <para>For more information about configuring failover, see <xref linkend="configuringfailover"
193         />.</para>
194     </section>
195   </section>
196 </chapter>