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>
7 <xref linkend="dbdoclet.50540653_59957"/>
12 <xref linkend="dbdoclet.50540653_97944"/>
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's services continue with minimal interruption.
23 Generally, availability is specified as the percentage of time the system is required to be
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>
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>
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>
46 <para><emphasis role="bold">Resource fencing</emphasis> - Protects physical storage from simultaneous access by two nodes.</para>
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>
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
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
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>
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>
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>
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
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>
88 <section xml:id="dbdoclet.50540653_97944">
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>
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
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>
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>
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>
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>
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>
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>
145 <title xml:id="understandingfailover.fig.configmdt"> Lustre failover configuration for a active/passive MDT</title>
148 <imagedata fileref="./figures/MDT_Failover.png"/>
151 <phrase>Lustre failover configuration for an MDT </phrase>
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>
162 <title xml:id="understandingfailover.fig.configmdts"> Lustre failover configuration for a active/active MDTs </title>
165 <imagedata scalefit="1" width="50%" fileref="figures/MDTs_Failover.png"/>
168 <phrase>Lustre failover configuration for two MDTs</phrase>
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>
177 <para>OSSs configured as a failover pair must have shared disks/RAID.</para>
180 <title xml:id="understandingfailover.fig.configost"> Lustre failover configuration for an OSTs </title>
183 <imagedata scalefit="1" width="100%" fileref="./figures/OST_Failover.png"/>
186 <phrase>Lustre failover configuration for an OSTs </phrase>
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"