Whamcloud - gitweb
LUDOC-108 dne: Manual includes DNE usage instructions.
[doc/manual.git] / UnderstandingFailover.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <!-- This document was created with Syntext Serna Free. --><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">
3   <title xml:id="understandingfailover.title">Understanding Failover in Lustre</title>
4   <para>This chapter describes failover in a Lustre system. It includes:</para>
5   <itemizedlist>
6     <listitem>
7       <para>
8               <xref linkend="dbdoclet.50540653_59957"/>
9           </para>
10     </listitem>
11     <listitem>
12       <para>
13               <xref linkend="dbdoclet.50540653_97944"/>
14           </para>
15     </listitem>
16   </itemizedlist>
17   <section xml:id="dbdoclet.50540653_59957">
18       <title><indexterm><primary>failover</primary></indexterm>
19           What is Failover?</title>
20     <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>
21     <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>
22     <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>
23     <note>
24       <para>Lustre does not provide redundancy for data; it depends exclusively on redundancy of backing storage devices. The backing OST storage should be RAID 5 or, preferably, RAID 6 storage. MDT storage should be RAID 1 or RAID 0+1.</para>
25     </note>
26     <section remap="h3">
27       <title><indexterm><primary>failover</primary><secondary>capabilities</secondary></indexterm>Failover Capabilities</title>
28       <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>
29       <itemizedlist>
30         <listitem>
31           <para><emphasis role="bold">Resource fencing</emphasis>  - Protects physical storage from simultaneous access by two nodes.</para>
32         </listitem>
33         <listitem>
34           <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>
35         </listitem>
36         <listitem>
37           <para><emphasis role="bold">Health monitoring</emphasis>  - Verifies the availability of hardware and network resources and responds to health indications provided by Lustre.</para>
38         </listitem>
39       </itemizedlist>
40       <para>These capabilities can be provided by a variety of software and/or hardware solutions. For more information about using power management software or hardware and high availability (HA) software with Lustre, see <xref linkend="configuringfailover"/>.</para>
41       <para>HA software is responsible for detecting failure of the primary Lustre server node and controlling the failover. Lustre works with any HA software that includes resource (I/O) fencing. For proper resource fencing, the HA software must be able to completely power off the failed server or disconnect it from the shared storage device. If two active nodes have access to the same storage device, data may be severely corrupted.</para>
42     </section>
43     <section remap="h3">
44       <title><indexterm><primary>failover</primary><secondary>configuration</secondary></indexterm>Types of Failover Configurations</title>
45       <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>
46       <itemizedlist>
47         <listitem>
48           <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>
49         </listitem>
50         <listitem>
51           <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>
52         </listitem>
53       </itemizedlist>
54       <para>Before Lustre 2.4 MDSs are configured as an active/passive pair, while OSSs are deployed in an active/active configuration that provides redundancy without extra overhead. Often the standby MDS is the active MDS for another Lustre file system or the MGS, so no nodes are idle in the cluster.</para>
55         <para condition='l24'>Lustre 2.4 introduces metadata targets for individual sub-directories. Active-active failover configurations are available for MDSs that serve MDTs on shared storage.</para>
56     </section>
57   </section>
58   <section xml:id="dbdoclet.50540653_97944">
59     <title><indexterm><primary>failover</primary><secondary>and Lustre</secondary></indexterm>Failover Functionality in Lustre</title>
60     <para>The failover functionality provided in Lustre can be used for the following failover scenario. When a client attempts to do I/O to a failed Lustre target, it continues to try until it receives an answer from any of the configured failover nodes for the Lustre target. A user-space application does not detect anything unusual, except that the I/O may take longer to complete.</para>
61     <para>Lustre failover requires two nodes configured as a failover pair, which must share one or more storage devices. Lustre can be configured to provide MDT or OST failover.</para>
62     <itemizedlist>
63       <listitem>
64         <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>
65         <para condition='l24'>Lustre 2.4 allows multiple MDTs. By placing two or more MDT partitions on storage shared by two MDSs, one MDS can fail and the remaining MDS can begin serving the unserved MDT. This is described as an active/active failover pair.</para>
66       </listitem>
67       <listitem>
68         <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>
69       </listitem>
70     </itemizedlist>
71     <para>To add a failover partner to a Lustre configuration, the <literal>--failnode</literal> or <literal>--servicenode</literal> option is used. This can be done at creation time (using <literal>mkfs.lustre</literal>) or later when the Lustre system is active (using <literal>tunefs.lustre</literal>). For explanations of these utilities, see <xref linkend="dbdoclet.50438219_75432"/> and <xref linkend="dbdoclet.50438219_39574"/>.</para>
72     <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>
73     <para>For information about configuring failover, see <xref linkend="configuringfailover"/>.</para>
74     <note>
75       <para>Failover functionality in Lustre is provided only at the file system level. In a complete failover solution, failover functionality for system-level components, such as node failure detection or power control, must be provided by a third-party tool.</para>
76     </note>
77     <caution>
78       <para>OST failover functionality does not protect against corruption caused by a disk failure. If the storage media (i.e., physical disk) used for an OST fails, Lustre cannot recover it. We strongly recommend that some form of RAID be used for OSTs. Lustre functionality assumes that the storage is reliable, so it adds no extra reliability features.</para>
79     </caution>
80     <section remap="h3">
81       <title><indexterm><primary>failover</primary><secondary>MDT</secondary></indexterm>MDT Failover Configuration (Active/Passive)</title>
82       <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>
83       <note>
84         <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>
85       </note>
86       <figure>
87         <title xml:id="understandingfailover.fig.configmdt"> Lustre failover configuration for a active/passive MDT</title>
88         <mediaobject>
89           <imageobject>
90             <imagedata fileref="./figures/MDT_Failover.png"/>
91           </imageobject>
92           <textobject>
93             <phrase>Lustre failover configuration for an MDT </phrase>
94           </textobject>
95         </mediaobject>
96       </figure>
97     </section>
98     <section xml:id='dbdoclet.mdtactiveactive' condition='l24'>
99       <title><indexterm><primary>failover</primary><secondary>MDT</secondary></indexterm>MDT Failover Configuration (Active/Active)</title>
100       <para>Multiple MDTs became available with the advent of Lustre 2.4. MDTs can be setup as an active/active failover configuration. A failover cluster is built from two MDSs as shown in <xref linkend="understandingfailover.fig.configmdts"/>.</para>
101       <figure>
102         <title xml:id="understandingfailover.fig.configmdts"> Lustre failover configuration for a active/active MDTs </title>
103         <mediaobject>
104           <imageobject>
105             <imagedata scalefit="1" width="50%" fileref="./figures/MDTs_Failover.svg"/>
106           </imageobject>
107           <textobject>
108             <phrase>Lustre failover configuration for two MDTs</phrase>
109           </textobject>
110         </mediaobject>
111       </figure>
112     </section>
113     <section remap="h3">
114       <title><indexterm><primary>failover</primary><secondary>OST</secondary></indexterm>OST Failover Configuration (Active/Active)</title>
115       <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>
116       <note>
117         <para>OSSs configured as a failover pair must have shared disks/RAID.</para>
118       </note>
119       <figure>
120         <title xml:id="understandingfailover.fig.configost"> Lustre failover configuration for an OSTs </title>
121         <mediaobject>
122           <imageobject>
123             <imagedata scalefit="1" width="100%" fileref="./figures/OST_Failover.png"/>
124           </imageobject>
125           <textobject>
126             <phrase>Lustre failover configuration for an OSTs </phrase>
127           </textobject>
128         </mediaobject>
129       </figure>
130       <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>
131       <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>
132     </section>
133   </section>
134 </chapter>