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