Whamcloud - gitweb
LUDOC-376 build: add condition 'l2A' for 2.10
[doc/manual.git] / UpgradingLustre.xml
1 <?xml version='1.0' encoding='utf-8'?>
2 <chapter xmlns="http://docbook.org/ns/docbook"
3 xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US"
4 xml:id="upgradinglustre">
5   <title xml:id="upgradinglustre.title">Upgrading a Lustre File System</title>
6   <para>This chapter describes interoperability between Lustre software
7   releases. It also provides procedures for upgrading from Lustre software
8   release 1.8 to Lustre software release 2.x , from a Lustre software release
9   2.x to a more recent Lustre software release 2.x (major release upgrade), and
10   from a a Lustre software release 2.x.y to a more recent Lustre software
11   release 2.x.y (minor release upgrade). It includes the following
12   sections:</para>
13   <itemizedlist>
14     <listitem>
15       <para>
16         <xref linkend="dbdoclet.50438205_82079" />
17       </para>
18     </listitem>
19     <listitem>
20       <para>
21         <xref xmlns:xlink="http://www.w3.org/1999/xlink"
22         linkend="Upgrading_2.x" />
23       </para>
24     </listitem>
25     <listitem>
26       <para>
27         <xref xmlns:xlink="http://www.w3.org/1999/xlink"
28         linkend="Upgrading_2.x.x" />
29       </para>
30     </listitem>
31   </itemizedlist>
32   <section xml:id="dbdoclet.50438205_82079">
33     <title>
34     <indexterm>
35       <primary>Lustre</primary>
36       <secondary>upgrading</secondary>
37       <see>upgrading</see>
38     </indexterm>
39     <indexterm>
40       <primary>upgrading</primary>
41     </indexterm>Release Interoperability and Upgrade Requirements</title>
42     <para>
43       <emphasis role="italic">
44         <emphasis role="bold">Lustre software release 2.x (major)
45         upgrade:</emphasis>
46       </emphasis>
47       <itemizedlist>
48         <listitem>
49           <para>All servers must be upgraded at the same time, while some or
50           all clients may be upgraded independently of the servers.</para>
51         </listitem>
52         <listitem>
53           <para>All servers must be be upgraded to a Linux kernel supported by
54           the Lustre software. See the Lustre Release Notes for your Lustre
55           version for a list of tested Linux distributions.</para>
56         </listitem>
57         <listitem>
58           <para>Clients to be upgraded must be running a compatible Linux
59           distribution as described in the Release Notes.</para>
60         </listitem>
61       </itemizedlist>
62     </para>
63     <para>
64       <emphasis role="italic">
65         <emphasis role="bold">Lustre software release 2.x.y release (minor)
66         upgrade:</emphasis>
67       </emphasis>
68     </para>
69     <itemizedlist>
70       <listitem>
71         <para>All servers must be upgraded at the same time, while some or all
72         clients may be upgraded.</para>
73       </listitem>
74       <listitem>
75         <para>Rolling upgrades are supported for minor releases allowing
76         individual servers and clients to be upgraded without stopping the
77         Lustre file system.</para>
78       </listitem>
79     </itemizedlist>
80   </section>
81   <section xml:id="Upgrading_2.x">
82     <title>
83     <indexterm>
84       <primary>upgrading</primary>
85       <secondary>major release (2.x to 2.x)</secondary>
86     </indexterm>
87     <indexterm>
88       <primary>wide striping</primary>
89     </indexterm>
90     <indexterm>
91       <primary>MDT</primary>
92       <secondary>multiple MDSs</secondary>
93     </indexterm>
94     <indexterm>
95       <primary>large_xattr</primary>
96       <secondary>ea_inode</secondary>
97     </indexterm>
98     <indexterm>
99       <primary>wide striping</primary>
100       <secondary>large_xattr</secondary>
101       <tertiary>ea_inode</tertiary>
102     </indexterm>Upgrading to Lustre Software Release 2.x (Major
103     Release)</title>
104     <para>The procedure for upgrading from a Lustre software release 2.x to a
105     more recent 2.x release of the Lustre software is described in this
106     section.</para>
107     <note>
108       <para>This procedure can also be used to upgrade Lustre software release
109       1.8.6-wc1 or later to any Lustre software release 2.x. To upgrade other
110       versions of Lustre software release 1.8.x, contact your support
111       provider.</para>
112     </note>
113     <note>
114       <para>In Lustre software release 2.2, a feature has been added for
115       ldiskfs-based MDTs that allows striping a single file across up to 2000
116       OSTs. By default, this "wide striping" feature is disabled. It is
117       activated by setting the <literal>ea_inode</literal> option on the MDT
118       using either <literal>mkfs.lustre</literal> or <literal>tune2fs</literal>.
119       For example after upgrading an existing file system to Lustre software
120       release 2.2 or later, wide striping can be enabled by running the
121       following command on the MDT device before mounting it:
122       <screen>tune2fs -O large_xattr</screen>
123       Once the wide striping feature is enabled and in use on the MDT, it is
124       not possible to directly downgrade the MDT file system to an earlier 
125       version of the Lustre software that does not support wide striping. To 
126       disable wide striping:
127       <orderedlist>
128         <listitem>
129           <para>Delete all wide-striped files, <emphasis>OR</emphasis>
130           use <literal>lfs_migrate -c 160</literal> (or fewer stripes)
131           to migrate the files to use fewer OSTs. This does not affect the
132           total number of OSTs that the whole filesystem can access.</para>
133         </listitem>
134         <listitem>
135           <para>Unmount the MDT.</para>
136         </listitem>
137         <listitem>
138           <para>Run the following command to turn off the 
139           <literal>large_xattr</literal> option:
140           <screen>tune2fs -O ^large_xattr</screen></para>
141         </listitem>
142       </orderedlist>Using either 
143       <literal>mkfs.lustre</literal> or 
144       <literal>tune2fs</literal> with 
145       <literal>large_xattr</literal> or 
146       <literal>ea_inode</literal> option reseults in 
147       <literal>ea_inode</literal> in the file system feature list.</para>
148     </note>
149     <note condition="l23">
150       <para>To generate a list of all files with more than 160 stripes use 
151       <literal>lfs find</literal> with the 
152       <literal>--stripe-count</literal> option:
153       <screen>lfs find ${mountpoint} --stripe-count=+160</screen></para>
154     </note>
155     <note condition="l24">
156       <para>In Lustre software release 2.4, a new feature allows using multiple
157       MDTs, which can each serve one or more remote sub-directories in the file
158       system. The 
159       <literal>root</literal> directory is always located on MDT0.</para>
160       <para>Note that clients running a release prior to the Lustre software
161       release 2.4 can only see the namespace hosted by MDT0 and will return an
162       IO error if an attempt is made to access a directory on another
163       MDT.</para>
164     </note>
165     <para>To upgrade a Lustre software release 2.x to a more recent major
166     release, complete these steps:</para>
167     <orderedlist>
168       <listitem>
169         <para>Create a complete, restorable file system backup.</para>
170         <caution>
171           <para>Before installing the Lustre software, back up ALL data. The
172           Lustre software contains kernel modifications that interact with
173           storage devices and may introduce security issues and data loss if
174           not installed, configured, or administered properly. If a full backup
175           of the file system is not practical, a device-level backup of the MDT
176           file system is recommended. See 
177           <xref linkend="backupandrestore" /> for a procedure.</para>
178         </caution>
179       </listitem>
180       <listitem>
181         <para>Shut down the file system by unmounting all clients and servers
182         in the order shown below (unmounting a block device causes the Lustre
183         software to be shut down on that node):</para>
184         <orderedlist numeration="loweralpha">
185           <listitem>
186             <para>Unmount the clients. On each client node, run:</para>
187             <screen>umount -a -t lustre</screen>
188           </listitem>
189           <listitem>
190             <para>Unmount the MDT. On the MDS node, run:</para>
191             <screen>umount -a -t lustre</screen>
192           </listitem>
193           <listitem>
194             <para>Unmount all the OSTs. On each OSS node, run:</para>
195             <screen>umount -a -t lustre</screen>
196           </listitem>
197         </orderedlist>
198       </listitem>
199       <listitem>
200         <para>Upgrade the Linux operating system on all servers to a compatible
201         (tested) Linux distribution and reboot.</para>
202       </listitem>
203       <listitem>
204         <para>Upgrade the Linux operating system on all clients to Red Hat
205         Enterprise Linux 6 or other compatible (tested) distribution and
206         reboot.</para>
207       </listitem>
208       <listitem>
209         <para>Download the Lustre server RPMs for your platform from the 
210         <link xl:href="https://wiki.hpdd.intel.com/display/PUB/Lustre+Releases">
211         Lustre Releases</link>repository. See 
212         <xref xmlns:xlink="http://www.w3.org/1999/xlink"
213         linkend="table_cnh_5m3_gk" />for a list of required packages.</para>
214       </listitem>
215       <listitem>
216         <para>Install the Lustre server packages on all Lustre servers (MGS,
217         MDSs, and OSSs).</para>
218         <orderedlist numeration="loweralpha">
219           <listitem>
220             <para>Log onto a Lustre server as the 
221             <literal>root</literal> user</para>
222           </listitem>
223           <listitem>
224             <para>Use the 
225             <literal>yum</literal> command to install the packages:</para>
226             <para>
227               <screen># yum --nogpgcheck install pkg1.rpm pkg2.rpm ... </screen>
228             </para>
229           </listitem>
230           <listitem>
231             <para>Verify the packages are installed correctly:</para>
232             <para>
233               <screen>rpm -qa|egrep "lustre|wc"</screen>
234             </para>
235           </listitem>
236           <listitem>
237             <para>Repeat these steps on each Lustre server.</para>
238           </listitem>
239         </orderedlist>
240       </listitem>
241       <listitem>
242         <para>Download the Lustre client RPMs for your platform from the 
243         <link xl:href="https://wiki.hpdd.intel.com/display/PUB/Lustre+Releases">
244         Lustre Releases</link>repository. See 
245         <xref xmlns:xlink="http://www.w3.org/1999/xlink"
246         linkend="table_j3r_ym3_gk" />for a list of required packages.</para>
247         <note>
248           <para>The version of the kernel running on a Lustre client must be
249           the same as the version of the 
250           <literal>lustre-client-modules-</literal>
251           <replaceable>ver</replaceable>package being installed. If not, a
252           compatible kernel must be installed on the client before the Lustre
253           client packages are installed.</para>
254         </note>
255       </listitem>
256       <listitem>
257         <para>Install the Lustre client packages on each of the Lustre clients
258         to be upgraded.</para>
259         <orderedlist numeration="loweralpha">
260           <listitem>
261             <para>Log onto a Lustre client as the 
262             <literal>root</literal> user.</para>
263           </listitem>
264           <listitem>
265             <para>Use the 
266             <literal>yum</literal> command to install the packages:</para>
267             <para>
268               <screen># yum --nogpgcheck install pkg1.rpm pkg2.rpm ... </screen>
269             </para>
270           </listitem>
271           <listitem>
272             <para>Verify the packages were installed correctly:</para>
273             <para>
274               <screen># rpm -qa|egrep "lustre|kernel"</screen>
275             </para>
276           </listitem>
277           <listitem>
278             <para>Repeat these steps on each Lustre client.</para>
279           </listitem>
280         </orderedlist>
281       </listitem>
282       <listitem>
283         <para>(Optional) For upgrades to Lustre software release 2.2 or higher,
284         to enable wide striping on an existing MDT, run the following command
285         on the MDT:
286         <screen>tune2fs -O ea_inode /dev/<replaceable>mdtdev</replaceable></screen>
287         </para>
288         <para>For more information about wide striping, see 
289         <xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="wide_striping" />.</para>
290       </listitem>
291       <listitem>
292         <para>(Optional) For upgrades to Lustre software release 2.4 or higher,
293         to format an additional MDT, complete these steps:
294         <orderedlist numeration="loweralpha">
295           <listitem>
296             <para>Determine the index used for the first MDT (each MDT must
297             have unique index). Enter:
298             <screen>client$ lctl dl | grep mdc
299 36 UP mdc lustre-MDT0000-mdc-ffff88004edf3c00 
300       4c8be054-144f-9359-b063-8477566eb84e 5</screen></para>
301             <para>In this example, the next available index is 1.</para>
302           </listitem>
303           <listitem>
304             <para>Add the new block device as a new MDT at the next available
305             index by entering (on one line):
306             <screen>mds# mkfs.lustre --reformat --fsname=<replaceable>filesystem_name</replaceable> --mdt \
307     --mgsnode=<replaceable>mgsnode</replaceable> --index <replaceable>1</replaceable> 
308 <replaceable>/dev/mdt1_device</replaceable></screen></para>
309           </listitem>
310         </orderedlist></para>
311       </listitem>
312       <listitem>
313         <para>(Optional) If you are upgrading to Lustre software release 2.3 or
314         higher from Lustre software release 2.2 or earlier and want to enable
315         the quota feature, complete these steps: 
316         <orderedlist numeration="loweralpha">
317           <listitem>
318             <para>Before setting up the file system, enter on both the MDS and
319             OSTs:
320             <screen>tunefs.lustre --quota</screen></para>
321           </listitem>
322           <listitem>
323             <para>When setting up the file system, enter:
324             <screen>conf_param $FSNAME.quota.mdt=$QUOTA_TYPE
325 conf_param $FSNAME.quota.ost=$QUOTA_TYPE</screen></para>
326           </listitem>
327         </orderedlist></para>
328       </listitem>
329       <listitem>
330         <para>(Optional) If you are upgrading from Lustre software release 1.8,
331         you must manually enable the FID-in-dirent feature. On the MDS, enter:
332         <screen>tune2fs –O dirdata /dev/<replaceable>mdtdev</replaceable></screen></para>
333         <warning>
334           <para>This step is not reversible. Do not complete this step until
335           you are sure you will not be downgrading the Lustre software.</para>
336         </warning>
337         <para condition='l24'>This step only enables FID-in-dirent for newly
338         created files. If you are upgrading to Lustre software release 2.4,
339         you can use namespace LFSCK to enable FID-in-dirent for the existing
340         files. For the case of upgrading from Lustre software release 1.8, it is
341     important to note that if you do NOT enable <literal>dirdata</literal> via
342     the <literal>tune2fs</literal> command above, the namespace LFSCK will NOT
343         generate FID-in-dirent for the existing files. For more information about
344         FID-in-dirent and related functionalities in LFSCK, see
345     <xref xmlns:xlink="http://www.w3.org/1999/xlink"
346     linkend="understandinglustre.storageio" />.</para>
347       </listitem>
348       <listitem>
349         <para>Start the Lustre file system by starting the components in the
350         order shown in the following steps:</para>
351         <orderedlist numeration="loweralpha">
352           <listitem>
353             <para>Mount the MGT. On the MGS, run
354             <screen>mgs# mount -a -t lustre</screen></para>
355           </listitem>
356           <listitem>
357             <para>Mount the MDT(s). On each MDT, run:
358             <screen>mds# mount -a -t lustre</screen></para>
359           </listitem>
360           <listitem>
361             <para>Mount all the OSTs. On each OSS node, run:</para>
362             <screen>oss# mount -a -t lustre</screen>
363             <note>
364               <para>This command assumes that all the OSTs are listed in the 
365               <literal>/etc/fstab</literal> file. OSTs that are not listed in
366               the 
367               <literal>/etc/fstab</literal> file, must be mounted individually
368               by running the mount command:</para>
369               <screen>mount -t lustre <replaceable>/dev/block_device</replaceable><replaceable>/mount_point</replaceable></screen>
370             </note>
371           </listitem>
372           <listitem>
373             <para>Mount the file system on the clients. On each client node,
374             run:</para>
375             <screen>client# mount -a -t lustre</screen>
376           </listitem>
377         </orderedlist>
378       </listitem>
379     </orderedlist>
380     <note>
381       <para>The mounting order described in the steps above must be followed
382       for the initial mount and registration of a Lustre file system after an
383       upgrade. For a normal start of a Lustre file system, the mounting order
384       is MGT, OSTs, MDT(s), clients.</para>
385     </note>
386     <para>If you have a problem upgrading a Lustre file system, see 
387     <xref xmlns:xlink="http://www.w3.org/1999/xlink"
388     linkend="dbdoclet.50438198_30989" />for some ways to get help.</para>
389   </section>
390   <section xml:id="Upgrading_2.x.x">
391     <title>
392     <indexterm>
393       <primary>upgrading</primary>
394       <secondary>2.X.y to 2.X.y (minor release)</secondary>
395     </indexterm>Upgrading to Lustre Software Release 2.x.y (Minor
396     Release)</title>
397     <para>Rolling upgrades are supported for upgrading from any Lustre software
398     release 2.x.y to a more recent Lustre software release 2.X.y. This allows
399     the Lustre file system to continue to run while individual servers (or
400     their failover partners) and clients are upgraded one at a time. The
401     procedure for upgrading a Lustre software release 2.x.y to a more recent
402     minor release is described in this section.</para>
403     <para>To upgrade Lustre software release 2.x.y to a more recent minor
404     release, complete these steps:</para>
405     <orderedlist>
406       <listitem>
407         <para>Create a complete, restorable file system backup.</para>
408         <caution>
409           <para>Before installing the Lustre software, back up ALL data. The
410           Lustre software contains kernel modifications that interact with
411           storage devices and may introduce security issues and data loss if
412           not installed, configured, or administered properly. If a full backup
413           of the file system is not practical, a device-level backup of the MDT
414           file system is recommended. See 
415           <xref linkend="backupandrestore" /> for a procedure.</para>
416         </caution>
417       </listitem>
418       <listitem>
419         <para>Download the Lustre server RPMs for your platform from the 
420         <link xl:href="https://wiki.hpdd.intel.com/display/PUB/Lustre+Releases">
421         Lustre Releases</link>repository. See 
422         <xref xmlns:xlink="http://www.w3.org/1999/xlink"
423         linkend="table_cnh_5m3_gk" />for a list of required packages.</para>
424       </listitem>
425       <listitem>
426         <para>For a rolling upgrade, complete any procedures required to keep
427         the Lustre file system running while the server to be upgraded is
428         offline, such as failing over a primary server to its secondary
429         partner.</para>
430       </listitem>
431       <listitem>
432         <para>Unmount the Lustre server to be upgraded (MGS, MDS, or
433         OSS)</para>
434       </listitem>
435       <listitem>
436         <para>Install the Lustre server packages on the Lustre server.</para>
437         <orderedlist numeration="loweralpha">
438           <listitem>
439             <para>Log onto the Lustre server as the 
440             <literal>root</literal> user</para>
441           </listitem>
442           <listitem>
443             <para>Use the 
444             <literal>yum</literal> command to install the packages:</para>
445             <para>
446               <screen># yum --nogpgcheck install pkg1.rpm pkg2.rpm ... </screen>
447             </para>
448           </listitem>
449           <listitem>
450             <para>Verify the packages are installed correctly:</para>
451             <para>
452               <screen>rpm -qa|egrep "lustre|wc"</screen>
453             </para>
454           </listitem>
455           <listitem>
456             <para>Mount the Lustre server to restart the Lustre software on the
457             server:
458             <screen>server# mount -a -t lustre</screen></para>
459           </listitem>
460           <listitem>
461             <para>Repeat these steps on each Lustre server.</para>
462           </listitem>
463         </orderedlist>
464       </listitem>
465       <listitem>
466         <para>Download the Lustre client RPMs for your platform from the 
467         <link xl:href="https://wiki.hpdd.intel.com/display/PUB/Lustre+Releases">
468         Lustre Releases</link>repository. See 
469         <xref xmlns:xlink="http://www.w3.org/1999/xlink"
470         linkend="table_j3r_ym3_gk" />for a list of required packages.</para>
471       </listitem>
472       <listitem>
473         <para>Install the Lustre client packages on each of the Lustre clients
474         to be upgraded.</para>
475         <orderedlist numeration="loweralpha">
476           <listitem>
477             <para>Log onto a Lustre client as the 
478             <literal>root</literal> user.</para>
479           </listitem>
480           <listitem>
481             <para>Use the 
482             <literal>yum</literal> command to install the packages:</para>
483             <para>
484               <screen># yum --nogpgcheck install pkg1.rpm pkg2.rpm ... </screen>
485             </para>
486           </listitem>
487           <listitem>
488             <para>Verify the packages were installed correctly:</para>
489             <para>
490               <screen># rpm -qa|egrep "lustre|kernel"</screen>
491             </para>
492           </listitem>
493           <listitem>
494             <para>Mount the Lustre client to restart the Lustre software on the
495             client:
496             <screen>client# mount -a -t lustre</screen></para>
497           </listitem>
498           <listitem>
499             <para>Repeat these steps on each Lustre client.</para>
500           </listitem>
501         </orderedlist>
502       </listitem>
503     </orderedlist>
504     <para>If you have a problem upgrading a Lustre file system, see 
505     <xref xmlns:xlink="http://www.w3.org/1999/xlink"
506     linkend="dbdoclet.50438198_30989" />for some suggestions for how to get
507     help.</para>
508   </section>
509 </chapter>