Whamcloud - gitweb
Lustre 2.x Operations Manual as Docbook 5.0
[doc/manual.git] / ConfiguringStorage.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <article version="5.0" xml:lang="en-US" xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink">
3   <info>
4     <title></title>
5   </info>
6   <informaltable frame="none">
7     <tgroup cols="2">
8       <colspec colname="c1" colwidth="50*"/>
9       <colspec colname="c2" colwidth="50*"/>
10       
11       
12       <tbody>
13         <row>
14           <entry align="left"><para>Lustre 2.0 Operations Manual</para></entry>
15           <entry align="right" valign="top"><para><link xl:href="index.html"><inlinemediaobject><imageobject role="html">
16                     <imagedata contentdepth="26" contentwidth="30" fileref="./shared/toc01.gif" scalefit="1"/>
17                   </imageobject>
18 <imageobject role="fo">
19                     <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/toc01.gif" scalefit="1" width="100%"/>
20                   </imageobject>
21 </inlinemediaobject></link><link xl:href="SettingUpLustreSystem.html"><inlinemediaobject><imageobject role="html">
22                     <imagedata contentdepth="26" contentwidth="30" fileref="./shared/prev01.gif" scalefit="1"/>
23                   </imageobject>
24 <imageobject role="fo">
25                     <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/prev01.gif" scalefit="1" width="100%"/>
26                   </imageobject>
27 </inlinemediaobject></link><link xl:href="SettingUpBonding.html"><inlinemediaobject><imageobject role="html">
28                     <imagedata contentdepth="26" contentwidth="30" fileref="./shared/next01.gif" scalefit="1"/>
29                   </imageobject>
30 <imageobject role="fo">
31                     <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/next01.gif" scalefit="1" width="100%"/>
32                   </imageobject>
33 </inlinemediaobject></link><link xl:href="ix.html"><inlinemediaobject><imageobject role="html">
34                     <imagedata contentdepth="26" contentwidth="30" fileref="./shared/index01.gif" scalefit="1"/>
35                   </imageobject>
36 <imageobject role="fo">
37                     <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/index01.gif" scalefit="1" width="100%"/>
38                   </imageobject>
39 </inlinemediaobject></link></para></entry>
40         </row>
41       </tbody>
42     </tgroup>
43   </informaltable>
44   <para><link xl:href=""/></para>
45   <informaltable frame="none">
46     <tgroup cols="1">
47       <colspec colname="c1" colwidth="100*"/>
48       
49       <tbody>
50         <row>
51           <entry align="right"><para><anchor xml:id="dbdoclet.50438208_pgfId-874" xreflabel=""/>C H A P T E R  6<anchor xml:id="dbdoclet.50438208_36899" xreflabel=""/></para></entry>
52         </row>
53       </tbody>
54     </tgroup>
55   </informaltable>
56   <para><anchor xml:id="dbdoclet.50438208_pgfId-1287519" xreflabel=""/> </para>
57   <informaltable frame="none">
58     <tgroup cols="1">
59       <colspec colname="c1" colwidth="100*"/>
60       
61       <tbody>
62         <row>
63           <entry align="right"><para><anchor xml:id="dbdoclet.50438208_pgfId-1289851" xreflabel=""/><anchor xml:id="dbdoclet.50438208_70525" xreflabel=""/>Configuring Storage on a Lustre File System</para></entry>
64         </row>
65       </tbody>
66     </tgroup>
67   </informaltable>
68   <para><anchor xml:id="dbdoclet.50438208_pgfId-1291547" xreflabel=""/>This chapter describes best practices for storage selection and file system options to optimize perforance on RAID, and includes the following sections:</para>
69   <itemizedlist><listitem>
70       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291551" xreflabel=""/><link xl:href="ConfiguringStorage.html#50438208_60972">Selecting Storage for the MDT and OSTs</link></para>
71     </listitem>
72 <listitem>
73       <para> </para>
74     </listitem>
75 <listitem>
76       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291555" xreflabel=""/><link xl:href="ConfiguringStorage.html#50438208_23285">Reliability Best Practices</link></para>
77     </listitem>
78 <listitem>
79       <para> </para>
80     </listitem>
81 <listitem>
82       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291559" xreflabel=""/><link xl:href="ConfiguringStorage.html#50438208_40705">Performance Tradeoffs</link></para>
83     </listitem>
84 <listitem>
85       <para> </para>
86     </listitem>
87 <listitem>
88       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291563" xreflabel=""/><link xl:href="ConfiguringStorage.html#50438208_51921">Formatting Options for RAID Devices</link></para>
89     </listitem>
90 <listitem>
91       <para> </para>
92     </listitem>
93 <listitem>
94       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291890" xreflabel=""/><link xl:href="ConfiguringStorage.html#50438208_88516">Connecting a SAN to a Lustre File System</link></para>
95     </listitem>
96 <listitem>
97       <para> </para>
98     </listitem>
99 </itemizedlist>
100    <informaltable frame="none">
101     <tgroup cols="1">
102       <colspec colname="c1" colwidth="100*"/>
103       <tbody>
104         <row>
105           <entry><para><emphasis role="bold">Note -</emphasis><anchor xml:id="dbdoclet.50438208_pgfId-1291564" xreflabel=""/><emphasis role="bold">It is strongly recommended that hardware RAID be used with Lustre.</emphasis> Lustre currently does not support any redundancy at the file system level and RAID is required to protect agains disk failure.</para></entry>
106         </row>
107       </tbody>
108     </tgroup>
109   </informaltable>
110   <section remap="h2">
111     <title><anchor xml:id="dbdoclet.50438208_pgfId-1291568" xreflabel=""/></title>
112     <section remap="h2">
113       <title>6.1 <anchor xml:id="dbdoclet.50438208_60972" xreflabel=""/><anchor xml:id="dbdoclet.50438208_72075" xreflabel=""/>Selecting <anchor xml:id="dbdoclet.50438208_marker-1291567" xreflabel=""/>Storage for the MDT and OSTs</title>
114       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291569" xreflabel=""/>The Lustre architecture allows the use of any kind of block device as backend storage. The characteristics of such devices, particularly in the case of failures, vary significantly and have an impact on configuration choices.</para>
115       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291570" xreflabel=""/>This section describes issues and recommendations regarding backend storage.</para>
116       <section remap="h3">
117         <title><anchor xml:id="dbdoclet.50438208_pgfId-1291571" xreflabel=""/>6.1.1 Metadata Target (MDT)</title>
118         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291572" xreflabel=""/>I/O on the MDT is typically mostly reads and writes of small amounts of data. For this reason, we recommend that you use RAID 1 for MDT storage. If you require more capacity for an MDT than one disk provides, we recommend RAID 1 + 0 or RAID 10.</para>
119       </section>
120       <section remap="h3">
121         <title><anchor xml:id="dbdoclet.50438208_pgfId-1291573" xreflabel=""/>6.1.2 Object Storage Server (OST)</title>
122         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291574" xreflabel=""/>A quick calculation makes it clear that without further redundancy, RAID 6 is required for large clusters and RAID 5 is not acceptable:</para>
123         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291575" xreflabel=""/>For a 2 PB file system (2,000 disks of 1 TB capacity) assume the mean time to failure (MTTF) of a disk is about 1,000 days. This means that the expected failure rate is 2000/1000 = 2 disks per day. Repair time at 10% of disk bandwidth is 1000 GB at 10MB/sec = 100,000 sec, or about 1 day.</para>
124         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291576" xreflabel=""/>For a RAID 5 stripe that is 10 disks wide, during 1 day of rebuilding, the chance that a second disk in the same array will fail is about 9/1000 or about 1% per day. After 50 days, you have a 50% chance of a double failure in a RAID 5 array leading to data loss.</para>
125         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291577" xreflabel=""/>Therefore, RAID 6 or another double parity algorithm is needed to provide sufficient redundancy for OST storage.</para>
126         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291578" xreflabel=""/>For better performance, we recommend that you create RAID sets with 4 or 8 data disks plus one or two parity disks. Using larger RAID sets will negatively impact performance compared to having multiple independent RAID sets.</para>
127         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291579" xreflabel=""/>To maximize performance for small I/O request sizes, storage configured as RAID 1+0 can yield much better results but will increase cost or reduce capacity.</para>
128       </section>
129     </section>
130     <section remap="h2">
131       <title>6.2 <anchor xml:id="dbdoclet.50438208_23285" xreflabel=""/>Reliability <anchor xml:id="dbdoclet.50438208_marker-1291581" xreflabel=""/>Best Practices</title>
132       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291583" xreflabel=""/>RAID monitoring software is recommended to quickly detect faulty disks and allow them to be replaced to avoid double failures and data loss. Hot spare disks are recommended so that rebuilds happen without delays.</para>
133       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291587" xreflabel=""/>Backups of the metadata file systems are recommended. For details, see <link xl:href="BackupAndRestore.html#50438207_37220">Chapter 17</link>: <link xl:href="BackupAndRestore.html#50438207_66186">Backing Up and Restoring a File System</link>.</para>
134     </section>
135     <section remap="h2">
136       <title>6.3 <anchor xml:id="dbdoclet.50438208_40705" xreflabel=""/>Performance <anchor xml:id="dbdoclet.50438208_marker-1291593" xreflabel=""/>Tradeoffs</title>
137       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291595" xreflabel=""/>A writeback cache can dramatically increase write performance on many types of RAID arrays if the writes are not done at full stripe width. Unfortunately, unless the RAID array has battery-backed cache (a feature only found in some higher-priced hardware RAID arrays), interrupting the power to the array may result in out-of-sequence writes or corruption of RAID parity and future data loss.</para>
138       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291596" xreflabel=""/>If writeback cache is enabled, a file system check is required after the array loses power. Data may also be lost because of this.</para>
139       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291597" xreflabel=""/>Therefore, we recommend against the use of writeback cache when data integrity is critical. You should carefully consider whether the benefits of using writeback cache outweigh the risks.</para>
140     </section>
141     <section remap="h2">
142       <title>6.4 <anchor xml:id="dbdoclet.50438208_51921" xreflabel=""/>Formatting Options for <anchor xml:id="dbdoclet.50438208_marker-1291599" xreflabel=""/>RAID Devices</title>
143       <para><anchor xml:id="dbdoclet.50438208_pgfId-1289920" xreflabel=""/>When formatting a file system on a RAID device, it is beneficial to ensure that I/O requests are aligned with the underlying RAID geometry. This ensures that the Lustre RPCs do not generate unnecessary disk operations which may reduce performance dramatically. Use the --mkfsoptions parameter to specify additional parameters when formatting the OST or MDT.</para>
144       <para><anchor xml:id="dbdoclet.50438208_pgfId-1289921" xreflabel=""/>For RAID 5, RAID 6, or RAID 1+0 storage, specifying the following option to the --mkfsoptions parameter option improves the layout of the file system metadata, ensuring that no single disk contains all of the allocation bitmaps:</para>
145       <screen><anchor xml:id="dbdoclet.50438208_pgfId-1290699" xreflabel=""/>-Estride=&lt;chunk_blocks&gt; 
146 </screen>
147       <para><anchor xml:id="dbdoclet.50438208_pgfId-1290704" xreflabel=""/>The &lt;chunk_blocks&gt; variable is in units of 4096-byte blocks and represents the amount of contiguous data written to a single disk before moving to the next disk. This is alternately referred to as the RAID stripe size. This is applicable to both MDT and OST file systems.</para>
148       <para><anchor xml:id="dbdoclet.50438208_pgfId-1289922" xreflabel=""/>For more information on how to override the defaults while formatting MDT or OST file systems, see <link xl:href="SettingUpLustreSystem.html#50438256_84701">Setting File System Formatting Options</link>.</para>
149       <section remap="h3">
150         <title><anchor xml:id="dbdoclet.50438208_pgfId-1290843" xreflabel=""/>6.4.1 Computing file system parameters for mkfs</title>
151         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291294" xreflabel=""/>For best results, use RAID 5 with 5 or 9 disks or RAID 6 with 6 or 10 disks, each on a different controller. The stripe width is the optimal minimum I/O size. Ideally, the RAID configuration should allow 1 MB Lustre RPCs to fit evenly on a single RAID stripe without an expensive read-modify-write cycle. Use this formula to determine the <emphasis>&lt;stripe_width&gt;</emphasis>, where <emphasis>&lt;number_of_data_disks&gt;</emphasis> does <emphasis>not</emphasis> include the RAID parity disks (1 for RAID 5 and 2 for RAID 6):</para>
152         <screen><anchor xml:id="dbdoclet.50438208_pgfId-1290351" xreflabel=""/><emphasis>&lt;stripe_width_blocks&gt;</emphasis> = <emphasis>&lt;chunk_blocks&gt;</emphasis> * <emphasis>&lt;number_of_data_disks&gt;</emphasis> = 1 MB 
153 </screen>
154         <para><anchor xml:id="dbdoclet.50438208_pgfId-1290352" xreflabel=""/>If the RAID configuration does not allow <emphasis>&lt;chunk_blocks&gt;</emphasis> to fit evenly into 1 MB, select <emphasis>&lt;chunkblocks&gt;</emphasis>, such that <emphasis>&lt;stripe_width_blocks&gt;</emphasis> is close to 1 MB, but not larger.</para>
155         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291369" xreflabel=""/>The <emphasis>&lt;stripe_width_blocks&gt;</emphasis>value must equal <emphasis>&lt;chunk_blocks&gt;</emphasis>*<emphasis>&lt;number_of_data_disks&gt;</emphasis>. Specifying the <emphasis>&lt;stripe_width_blocks&gt;</emphasis> parameter is only relevant for RAID 5 or RAID 6, and is not needed for RAID 1 plus 0.</para>
156         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291443" xreflabel=""/>Run --reformat on the file system device (/dev/sdc), specifying the RAID geometry to the underlying ldiskfs file system, where:</para>
157         <screen><anchor xml:id="dbdoclet.50438208_pgfId-1291453" xreflabel=""/>--mkfsoptions &quot;<emphasis>&lt;other options&gt;</emphasis> -E stride=<emphasis>&lt;chunk_blocks&gt;</emphasis>, <anchor xml:id="dbdoclet.50438208_pgfId-1291454" xreflabel=""/>stripe_width=<emphasis>&lt;stripe_width_blocks&gt;</emphasis>&quot;
158 </screen>
159         <para><anchor xml:id="dbdoclet.50438208_pgfId-1290353" xreflabel=""/>Example:</para>
160         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291464" xreflabel=""/>A RAID 6 configuration with 6 disks has 4 data and 2 parity disks. The <emphasis>&lt;chunk_blocks&gt;</emphasis> &lt;= 1024KB/4 = 256KB.</para>
161         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291362" xreflabel=""/>Because the number of data disks is equal to the power of 2, the stripe width is equal to 1 MB.</para>
162         <screen><anchor xml:id="dbdoclet.50438208_pgfId-1291335" xreflabel=""/>--mkfsoptions &quot;<emphasis>&lt;other options&gt;</emphasis> -E stride=<emphasis>&lt;chunk_blocks&gt;</emphasis>, <anchor xml:id="dbdoclet.50438208_pgfId-1291486" xreflabel=""/>stripe_width=<emphasis>&lt;stripe_width_blocks&gt;</emphasis>&quot;...
163 </screen>
164       </section>
165       <section remap="h3">
166         <title><anchor xml:id="dbdoclet.50438208_pgfId-1291318" xreflabel=""/>6.4.2 Choosing Parameters for an External <anchor xml:id="dbdoclet.50438208_marker-1289927" xreflabel=""/>Journal</title>
167         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289929" xreflabel=""/>If you have configured a RAID array and use it directly as an OST, it contains both data and metadata. For better performance, we recommend putting the OST journal on a separate device, by creating a small RAID 1 array and using it as an external journal for the OST.</para>
168         <para><anchor xml:id="dbdoclet.50438208_pgfId-1290391" xreflabel=""/>Lustre&apos;s default journal size is 400 MB. A journal size of up to 1 GB has shown increased performance but diminishing returns are seen for larger journals. Additionally, a copy of the journal is kept in RAM. Therefore, make sure you have enough memory available to hold copies of all the journals.</para>
169         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291643" xreflabel=""/>The file system journal options are specified to mkfs.luster using the --mkfsoptions parameter. For example:</para>
170         <screen><anchor xml:id="dbdoclet.50438208_pgfId-1291786" xreflabel=""/>--mkfsoptions &quot;&lt;other options&gt; -j -J device=/dev/mdJ&quot; 
171 </screen>
172         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289935" xreflabel=""/>To create an external journal, perform these steps for each OST on the OSS:</para>
173         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289936" xreflabel=""/> 1. Create a 400 MB (or larger) journal partition (RAID 1 is recommended).</para>
174         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289937" xreflabel=""/>In this example, /dev/sdb is a RAID 1 device.</para>
175         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291721" xreflabel=""/> 2. Create a journal device on the partition. Run:</para>
176         <screen><anchor xml:id="dbdoclet.50438208_pgfId-1289942" xreflabel=""/>[oss#] mke2fs -b 4096 -O journal_dev /dev/sdb <emphasis>&lt;journal_size&gt;</emphasis></screen>
177         <para><anchor xml:id="dbdoclet.50438208_pgfId-1291739" xreflabel=""/>The value of <emphasis>&lt;journal_size&gt;</emphasis> is specified in units of 4096-byte blocks. For example, 262144 for a 1 GB journal size.</para>
178         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289943" xreflabel=""/> 3. Create the OST.</para>
179         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289944" xreflabel=""/>In this example, /dev/sdc is the RAID 6 device to be used as the OST, run:</para>
180         <screen><anchor xml:id="dbdoclet.50438208_pgfId-1289945" xreflabel=""/>[oss#] mkfs.lustre --ost --mgsnode=mds@osib --mkfsoptions=&quot;-J device=/dev/sd\
181 b1&quot; /dev/sdc
182 </screen>
183         <para><anchor xml:id="dbdoclet.50438208_pgfId-1289946" xreflabel=""/> 4. Mount the OST as usual.</para>
184       </section>
185     </section>
186     <section remap="h2">
187       <title>6.5 <anchor xml:id="dbdoclet.50438208_88516" xreflabel=""/>Connecting a SAN to a Lustre File System</title>
188       <para><anchor xml:id="dbdoclet.50438208_pgfId-1291861" xreflabel=""/>Depending on your cluster size and workload, you may want to connect a SAN to a Lustre file system. Before making this connection, consider the following:</para>
189       <itemizedlist><listitem>
190           <para><anchor xml:id="dbdoclet.50438208_pgfId-1291862" xreflabel=""/> In many SAN file systems without Lustre, clients allocate and lock blocks or inodes individually as they are updated. The Lustre design avoids the high contention that some of these blocks and inodes may have.</para>
191         </listitem>
192 <listitem>
193           <para> </para>
194         </listitem>
195 <listitem>
196           <para><anchor xml:id="dbdoclet.50438208_pgfId-1291863" xreflabel=""/> Lustre is highly scalable and can have a very large number of clients. SAN switches do not scale to a large number of nodes, and the cost per port of a SAN is generally higher than other networking.</para>
197         </listitem>
198 <listitem>
199           <para> </para>
200         </listitem>
201 <listitem>
202           <para><anchor xml:id="dbdoclet.50438208_pgfId-1291864" xreflabel=""/> File systems that allow direct-to-SAN access from the clients have a security risk because clients can potentially read any data on the SAN disks, and misbehaving clients can corrupt the file system for many reasons like improper file system, network, or other kernel software, bad cabling, bad memory, and so on. The risk increases with increase in the number of clients directly accessing the storage.</para>
203         </listitem>
204 <listitem>
205           <para> </para>
206         </listitem>
207 </itemizedlist>
208       <!--
209 Begin SiteCatalyst code version: G.5.
210 -->
211       <!--
212 End SiteCatalyst code version: G.5.
213 -->
214         <informaltable frame="none">
215         <tgroup cols="3">
216           <colspec colname="c1" colwidth="33*"/>
217           <colspec colname="c2" colwidth="33*"/>
218           <colspec colname="c3" colwidth="33*"/>
219           
220           
221           
222           <tbody>
223             <row>
224               <entry align="left"><para>Lustre 2.0 Operations Manual</para></entry>
225               <entry align="right"><para>821-2076-10</para></entry>
226               <entry align="right" valign="top"><para><link xl:href="index.html"><inlinemediaobject><imageobject role="html">
227                         <imagedata contentdepth="26" contentwidth="30" fileref="./shared/toc01.gif" scalefit="1"/>
228                       </imageobject>
229 <imageobject role="fo">
230                         <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/toc01.gif" scalefit="1" width="100%"/>
231                       </imageobject>
232 </inlinemediaobject></link><link xl:href="SettingUpLustreSystem.html"><inlinemediaobject><imageobject role="html">
233                         <imagedata contentdepth="26" contentwidth="30" fileref="./shared/prev01.gif" scalefit="1"/>
234                       </imageobject>
235 <imageobject role="fo">
236                         <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/prev01.gif" scalefit="1" width="100%"/>
237                       </imageobject>
238 </inlinemediaobject></link><link xl:href="SettingUpBonding.html"><inlinemediaobject><imageobject role="html">
239                         <imagedata contentdepth="26" contentwidth="30" fileref="./shared/next01.gif" scalefit="1"/>
240                       </imageobject>
241 <imageobject role="fo">
242                         <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/next01.gif" scalefit="1" width="100%"/>
243                       </imageobject>
244 </inlinemediaobject></link><link xl:href="ix.html"><inlinemediaobject><imageobject role="html">
245                         <imagedata contentdepth="26" contentwidth="30" fileref="./shared/index01.gif" scalefit="1"/>
246                       </imageobject>
247 <imageobject role="fo">
248                         <imagedata contentdepth="100%" contentwidth="" depth="" fileref="./shared/index01.gif" scalefit="1" width="100%"/>
249                       </imageobject>
250 </inlinemediaobject></link></para></entry>
251             </row>
252           </tbody>
253         </tgroup>
254       </informaltable>
255       <para><link xl:href=""/></para>
256       <para><link xl:href="copyright.html">Copyright</link> © 2011, Oracle and/or its affiliates. All rights reserved.</para>
257     </section>
258   </section>
259 </article>