Whamcloud - gitweb
LUDOC-173 trademarks: Completed second pass of Intel trademark compliance review.
[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>A computer system is &apos;&apos;highly available&apos;&apos; when the services it provides are available with minimal downtime. In a highly-available system, if a failure condition occurs, such as the loss of a server or a network or software fault, the system&apos;s services continue without interruption. Generally, we measure availability by the percentage of time the system is required to be available.</para>
20     <para>Availability is accomplished by replicating hardware and/or software so that when a primary server fails or is unavailable, a standby server can be switched into its place to run applications and associated resources. This process, called <emphasis role="italic">failover</emphasis>, should be automatic and, in most cases, completely application-transparent.</para>
21     <para>A failover hardware setup requires a pair of servers with a shared resource (typically a physical storage device, which may be based on SAN, NAS, hardware RAID, SCSI or FC technology). The method of sharing storage should be essentially transparent at the device level; the same physical logical unit number (LUN) should be visible from both servers. To ensure high availability at the physical storage level, we encourage the use of RAID arrays to protect against drive-level failures.</para>
22     <note>
23       <para>The Lustre software does not provide redundancy for data; it depends exclusively on
24         redundancy of backing storage devices. The backing OST storage should be RAID 5 or,
25         preferably, RAID 6 storage. MDT storage should be RAID 1 or RAID 0+1.</para>
26     </note>
27     <section remap="h3">
28       <title><indexterm><primary>failover</primary><secondary>capabilities</secondary></indexterm>Failover Capabilities</title>
29       <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>
30       <itemizedlist>
31         <listitem>
32           <para><emphasis role="bold">Resource fencing</emphasis>  - Protects physical storage from simultaneous access by two nodes.</para>
33         </listitem>
34         <listitem>
35           <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>
36         </listitem>
37         <listitem>
38           <para><emphasis role="bold">Health monitoring</emphasis> - Verifies the availability of
39             hardware and network resources and responds to health indications provided by the Lustre
40             software.</para>
41         </listitem>
42       </itemizedlist>
43       <para>These capabilities can be provided by a variety of software and/or hardware solutions.
44         For more information about using power management software or hardware and high availability
45         (HA) software with the Lustre software, see <xref linkend="configuringfailover"/>.</para>
46       <para>HA software is responsible for detecting failure of the primary Lustre server node and
47         controlling the failover. The Lustre software works with any HA software that includes
48         resource (I/O) fencing. For proper resource fencing, the HA software must be able to
49         completely power off the failed server or disconnect it from the shared storage device. If
50         two active nodes have access to the same storage device, data may be severely
51         corrupted.</para>
52     </section>
53     <section remap="h3">
54       <title><indexterm><primary>failover</primary><secondary>configuration</secondary></indexterm>Types of Failover Configurations</title>
55       <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>
56       <itemizedlist>
57         <listitem>
58           <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>
59         </listitem>
60         <listitem>
61           <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>
62         </listitem>
63       </itemizedlist>
64       <para>Before Lustre software release 2.4, MDSs are configured as an active/passive pair, while
65         OSSs are deployed in an active/active configuration that provides redundancy without extra
66         overhead. Often the standby MDS is the active MDS for another Lustre file system or the MGS,
67         so no nodes are idle in the cluster.</para>
68         <para condition="l24">Lustre software release 2.4 introduces metadata targets for individual
69         sub-directories. Active-active failover configurations are available for MDSs that serve
70         MDTs on shared storage.</para>
71     </section>
72   </section>
73   <section xml:id="dbdoclet.50540653_97944">
74     <title><indexterm>
75         <primary>failover</primary>
76         <secondary>and Lustre</secondary>
77       </indexterm>Failover Functionality in a Lustre File System</title>
78     <para>The failover functionality provided in the Lustre software can be used for the following
79       failover scenario. When a client attempts to do I/O to a failed Lustre target, it continues to
80       try until it receives an answer from any of the configured failover nodes for the Lustre
81       target. A user-space application does not detect anything unusual, except that the I/O may
82       take longer to complete.</para>
83     <para>Lustre failover requires two nodes configured as a failover pair, which must share one or
84       more storage devices. A Lustre file system can be configured to provide MDT or OST
85       failover.</para>
86     <itemizedlist>
87       <listitem>
88         <para>For MDT failover, two MDSs are configured to serve the same MDT. Only one MDS node can serve an MDT at a time.</para>
89         <para condition="l24">Lustre software release 2.4 allows multiple MDTs. By placing two or
90           more MDT partitions on storage shared by two MDSs, one MDS can fail and the remaining MDS
91           can begin serving the unserved MDT. This is described as an active/active failover
92           pair.</para>
93       </listitem>
94       <listitem>
95         <para>For OST failover, multiple OSS nodes are configured to be able to serve the same OST. However, only one OSS node can serve the OST at a time. An OST can be moved between OSS nodes that have access to the same storage device using <literal>umount/mount</literal> commands.</para>
96       </listitem>
97     </itemizedlist>
98     <para>To add a failover partner to a Lustre file system configuration, the
99         <literal>--failnode</literal> or <literal>--servicenode</literal> option is used. This can
100       be done at creation time (using <literal>mkfs.lustre</literal>) or later when the Lustre file
101       system is active (using <literal>tunefs.lustre</literal>). For explanations of these
102       utilities, see <xref linkend="dbdoclet.50438219_75432"/> and <xref
103         linkend="dbdoclet.50438219_39574"/>.</para>
104     <para>Lustre failover capability can be used to upgrade the Lustre software between successive minor versions without cluster downtime. For more information, see <xref linkend="upgradinglustre"/>.</para>
105     <para>For information about configuring failover, see <xref linkend="configuringfailover"/>.</para>
106     <note>
107       <para>Failover functionality  is provided only at the file system level in the Lustre
108         software. In a complete failover solution, failover functionality for system-level
109         components, such as node failure detection or power control, must be provided by a
110         third-party tool.</para>
111     </note>
112     <caution>
113       <para>OST failover functionality does not protect against corruption caused by a disk failure.
114         If the storage media (i.e., physical disk) used for an OST fails, the Lustre software does
115         not provide a means to recover it. We strongly recommend that some form of RAID be used for
116         OSTs. Failover functionality provided in the Lustre software assumes that the storage is
117         reliable, so no extra reliability features are included.</para>
118     </caution>
119     <section remap="h3">
120       <title><indexterm><primary>failover</primary><secondary>MDT</secondary></indexterm>MDT Failover Configuration (Active/Passive)</title>
121       <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>
122       <note>
123         <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>
124       </note>
125       <figure>
126         <title xml:id="understandingfailover.fig.configmdt"> Lustre failover configuration for a active/passive MDT</title>
127         <mediaobject>
128           <imageobject>
129             <imagedata fileref="./figures/MDT_Failover.png"/>
130           </imageobject>
131           <textobject>
132             <phrase>Lustre failover configuration for an MDT </phrase>
133           </textobject>
134         </mediaobject>
135       </figure>
136     </section>
137     <section xml:id='dbdoclet.mdtactiveactive' condition='l24'>
138       <title><indexterm><primary>failover</primary><secondary>MDT</secondary></indexterm>MDT Failover Configuration (Active/Active)</title>
139       <para>Multiple MDTs became available with the advent of Lustre software release 2.4. MDTs can
140         be setup as an active/active failover configuration. A failover cluster is built from two
141         MDSs as shown in <xref linkend="understandingfailover.fig.configmdts"/>.</para>
142       <figure>
143         <title xml:id="understandingfailover.fig.configmdts"> Lustre failover configuration for a active/active MDTs </title>
144         <mediaobject>
145           <imageobject>
146             <imagedata scalefit="1" width="50%" fileref="./figures/MDTs_Failover.svg"/>
147           </imageobject>
148           <textobject>
149             <phrase>Lustre failover configuration for two MDTs</phrase>
150           </textobject>
151         </mediaobject>
152       </figure>
153     </section>
154     <section remap="h3">
155       <title><indexterm><primary>failover</primary><secondary>OST</secondary></indexterm>OST Failover Configuration (Active/Active)</title>
156       <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>
157       <note>
158         <para>OSSs configured as a failover pair must have shared disks/RAID.</para>
159       </note>
160       <figure>
161         <title xml:id="understandingfailover.fig.configost"> Lustre failover configuration for an OSTs </title>
162         <mediaobject>
163           <imageobject>
164             <imagedata scalefit="1" width="100%" fileref="./figures/OST_Failover.png"/>
165           </imageobject>
166           <textobject>
167             <phrase>Lustre failover configuration for an OSTs </phrase>
168           </textobject>
169         </mediaobject>
170       </figure>
171       <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>
172       <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>
173     </section>
174   </section>
175 </chapter>