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="lustremaintenance">
2 <title xml:id="lustremaintenance.title">Lustre Maintenance</title>
3 <para>Once you have the Lustre file system up and running, you can use the procedures in this section to perform these basic Lustre maintenance tasks:</para>
6 <para><xref linkend="dbdoclet.50438199_42877"/></para>
9 <para><xref linkend="dbdoclet.50438199_15240"/></para>
12 <para><xref linkend="dbdoclet.50438199_26070"/></para>
15 <para><xref linkend="dbdoclet.50438199_54623"/></para>
18 <para><xref linkend="dbdoclet.50438199_31353"/></para>
21 <para><xref linkend="dbdoclet.addingamdt"/></para>
24 <para><xref linkend="dbdoclet.50438199_22527"/></para>
27 <para><xref linkend="dbdoclet.50438199_14978"/></para>
30 <para><xref linkend="dbdoclet.rmremotedir"/></para>
33 <para><xref linkend="dbdoclet.inactivemdt"/>\</para>
36 <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="section_k3l_4gt_tl"/></para>
39 <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="section_ydg_pgt_tl"/></para>
42 <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="section_kzs_pgt_tl"/></para>
45 <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="section_ucf_qgt_tl"/></para>
48 <para><xref linkend="dbdoclet.50438199_77819"/></para>
51 <para><xref linkend="dbdoclet.50438199_12607"/></para>
54 <para><xref linkend="dbdoclet.50438199_62333"/></para>
57 <para><xref linkend="dbdoclet.50438199_62545"/></para>
60 <section xml:id="dbdoclet.50438199_42877">
62 <indexterm><primary>maintenance</primary></indexterm>
63 <indexterm><primary>maintenance</primary><secondary>inactive OSTs</secondary></indexterm>
64 Working with Inactive OSTs</title>
65 <para>To mount a client or an MDT with one or more inactive OSTs, run commands similar to this:</para>
66 <screen>client# mount -o exclude=testfs-OST0000 -t lustre \
67 uml1:/testfs /mnt/testfs
68 client# cat /proc/fs/lustre/lov/testfs-clilov-*/target_obd</screen>
69 <para>To activate an inactive OST on a live client or MDT, use the <literal>lctl activate</literal> command on the OSC device. For example:</para>
70 <screen>lctl --device 7 activate</screen>
72 <para>A colon-separated list can also be specified. For example, <literal>exclude=testfs-OST0000:testfs-OST0001</literal>.</para>
75 <section xml:id="dbdoclet.50438199_15240">
76 <title><indexterm><primary>maintenance</primary><secondary>finding nodes</secondary></indexterm>
77 Finding Nodes in the Lustre File System</title>
78 <para>There may be situations in which you need to find all nodes in your Lustre file system or get the names of all OSTs.</para>
79 <para>To get a list of all Lustre nodes, run this command on the MGS:</para>
80 <screen># cat /proc/fs/lustre/mgs/MGS/live/*</screen>
82 <para>This command must be run on the MGS.
85 <para>In this example, file system <literal>testfs</literal> has three nodes,
86 <literal>testfs-MDT0000</literal>, <literal>testfs-OST0000</literal>, and
87 <literal>testfs-OST0001</literal>.</para>
88 <screen>cfs21:/tmp# cat /proc/fs/lustre/mgs/MGS/live/*
93 testfs-OST0001 </screen>
94 <para>To get the names of all OSTs, run this command on the MDS:</para>
95 <screen># cat /proc/fs/lustre/lov/<replaceable>fsname</replaceable>-mdtlov/target_obd </screen>
97 <para>This command must be run on the MDS.
100 <para>In this example, there are two OSTs, testfs-OST0000 and testfs-OST0001, which are both
102 <screen>cfs21:/tmp# cat /proc/fs/lustre/lov/testfs-mdtlov/target_obd
103 0: testfs-OST0000_UUID ACTIVE
104 1: testfs-OST0001_UUID ACTIVE </screen>
106 <section xml:id="dbdoclet.50438199_26070">
107 <title><indexterm><primary>maintenance</primary><secondary>mounting a server</secondary></indexterm>
108 Mounting a Server Without Lustre Service</title>
109 <para>If you are using a combined MGS/MDT, but you only want to start the MGS and not the MDT, run this command:</para>
110 <screen>mount -t lustre <replaceable>/dev/mdt_partition</replaceable> -o nosvc <replaceable>/mount_point</replaceable></screen>
111 <para>The <literal><replaceable>mdt_partition</replaceable></literal> variable is the combined MGS/MDT block device.</para>
112 <para>In this example, the combined MGS/MDT is <literal>testfs-MDT0000</literal> and the mount point is <literal>/mnt/test/mdt</literal>.</para>
113 <screen>$ mount -t lustre -L testfs-MDT0000 -o nosvc /mnt/test/mdt</screen>
115 <section xml:id="dbdoclet.50438199_54623">
116 <title><indexterm><primary>maintenance</primary><secondary>regenerating config logs</secondary></indexterm>
117 Regenerating Lustre Configuration Logs</title>
118 <para>If the Lustre file system configuration logs are in a state where the file system cannot
119 be started, use the <literal>writeconf</literal> command to erase them. After the
120 <literal>writeconf</literal> command is run and the servers restart, the configuration logs
121 are re-generated and stored on the MGS (as in a new file system).</para>
122 <para>You should only use the <literal>writeconf</literal> command if:</para>
125 <para>The configuration logs are in a state where the file system cannot start</para>
128 <para>A server NID is being changed</para>
131 <para>The <literal>writeconf</literal> command is destructive to some configuration items (i.e., OST pools information and items set via <literal>conf_param</literal>), and should be used with caution. To avoid problems:</para>
134 <para>Shut down the file system before running the <literal>writeconf</literal> command</para>
137 <para>Run the <literal>writeconf</literal> command on all servers (MDT first, then OSTs)</para>
140 <para>Start the file system in this order:</para>
143 <para>MGS (or the combined MGS/MDT)</para>
152 <para>Lustre clients</para>
158 <para>The OST pools feature enables a group of OSTs to be named for file striping purposes. If you use OST pools, be aware that running the <literal>writeconf</literal> command erases <emphasis role="bold">all</emphasis> pools information (as well as any other parameters set via <literal>lctl conf_param</literal>). We recommend that the pools definitions (and <literal>conf_param</literal> settings) be executed via a script, so they can be reproduced easily after a <literal>writeconf</literal> is performed.</para>
160 <para>To regenerate Lustre file system configuration logs:</para>
163 <para>Shut down the file system in this order.</para>
166 <para>Unmount the clients.</para>
169 <para>Unmount the MDT.</para>
172 <para>Unmount all OSTs.</para>
177 <para>Make sure the the MDT and OST devices are available.</para>
180 <para>Run the <literal>writeconf</literal> command on all servers.</para>
181 <para>Run writeconf on the MDT first, and then the OSTs.</para>
184 <para>On the MDT, run:</para>
185 <screen>mdt# tunefs.lustre --writeconf <replaceable>/dev/mdt_device</replaceable></screen>
191 <screen>ost# tunefs.lustre --writeconf <replaceable>/dev/ost_device</replaceable></screen>
197 <para>Restart the file system in this order.</para>
200 <para>Mount the MGS (or the combined MGS/MDT).</para>
203 <para>Mount the MDT.</para>
206 <para>Mount the OSTs.</para>
209 <para>Mount the clients.</para>
214 <para>After the <literal>writeconf</literal> command is run, the configuration logs are re-generated as servers restart.</para>
216 <section xml:id="dbdoclet.50438199_31353">
217 <title><indexterm><primary>maintenance</primary><secondary>changing a NID</secondary></indexterm>
218 Changing a Server NID</title>
219 <para>In Lustre software release 2.3 or earlier, the <literal>tunefs.lustre
220 --writeconf</literal> command is used to rewrite all of the configuration files.</para>
221 <para condition="l24">If you need to change the NID on the MDT or OST, a new
222 <literal>replace_nids</literal> command was added in Lustre software release 2.4 to simplify
223 this process. The <literal>replace_nids</literal> command differs from <literal>tunefs.lustre
224 --writeconf</literal> in that it does not erase the entire configuration log, precluding the
225 need the need to execute the <literal>writeconf</literal> command on all servers and
226 re-specify all permanent parameter settings. However, the <literal>writeconf</literal> command
227 can still be used if desired.</para>
228 <para>Change a server NID in these situations:</para>
231 <para>New server hardware is added to the file system, and the MDS or an OSS is being moved to the new machine.</para>
234 <para>New network card is installed in the server.</para>
237 <para>You want to reassign IP addresses.</para>
240 <para>To change a server NID:</para>
243 <para>Update the LNET configuration in the <literal>/etc/modprobe.conf</literal> file so the list of server NIDs is correct. Use <literal>lctl list_nids</literal> to view the list of server NIDS.</para>
244 <para>The <literal>lctl list_nids</literal> command indicates which network(s) are
245 configured to work with the Lustre file system.</para>
248 <para>Shut down the file system in this order:</para>
251 <para>Unmount the clients.</para>
254 <para>Unmount the MDT.</para>
257 <para>Unmount all OSTs.</para>
262 <para>If the MGS and MDS share a partition, start the MGS only:</para>
263 <screen>mount -t lustre <replaceable>MDT partition</replaceable> -o nosvc <replaceable>mount_point</replaceable></screen>
266 <para>Run the <literal>replace_nids</literal> command on the MGS:</para>
267 <screen>lctl replace_nids <replaceable>devicename</replaceable> <replaceable>nid1</replaceable>[,nid2,nid3 ...]</screen>
268 <para>where <replaceable>devicename</replaceable> is the Lustre target name, e.g.
269 <literal>testfs-OST0013</literal></para>
272 <para>If the MGS and MDS share a partition, stop the MGS:</para>
273 <screen>umount <replaceable>mount_point</replaceable></screen>
276 <note><para>The <literal>replace_nids</literal> command also cleans
277 all old, invalidated records out of the configuration log, while
278 preserving all other current settings.</para></note>
279 <note><para>The previous configuration log is backed up on the MGS
280 disk with the suffix <literal>'.bak'</literal>.</para></note>
282 <section xml:id="dbdoclet.addingamdt" condition='l24'>
284 <primary>maintenance</primary>
285 <secondary>adding an MDT</secondary>
286 </indexterm>Adding a New MDT to a Lustre File System</title>
287 <para>Additional MDTs can be added using the DNE feature to serve one
288 or more remote sub-directories within a filesystem, in order to
289 increase the total number of files that can be created in the
290 filesystem, to increase aggregate metadata performance, or to isolate
291 user or application workloads from other users of the filesystem. It
292 is possible to have multiple remote sub-directories reference the
293 same MDT. However, the root directory will always be located on
294 MDT0. To add a new MDT into the file system:</para>
297 <para>Discover the maximum MDT index. Each MDTs must have unique index.</para>
299 client$ lctl dl | grep mdc
300 36 UP mdc testfs-MDT0000-mdc-ffff88004edf3c00 4c8be054-144f-9359-b063-8477566eb84e 5
301 37 UP mdc testfs-MDT0001-mdc-ffff88004edf3c00 4c8be054-144f-9359-b063-8477566eb84e 5
302 38 UP mdc testfs-MDT0002-mdc-ffff88004edf3c00 4c8be054-144f-9359-b063-8477566eb84e 5
303 39 UP mdc testfs-MDT0003-mdc-ffff88004edf3c00 4c8be054-144f-9359-b063-8477566eb84e 5
307 <para>Add the new block device as a new MDT at the next available
308 index. In this example, the next available index is 4.</para>
310 mds# mkfs.lustre --reformat --fsname=<replaceable>testfs</replaceable> --mdt --mgsnode=<replaceable>mgsnode</replaceable> --index 4 <replaceable>/dev/mdt4_device</replaceable>
314 <para>Mount the MDTs.</para>
316 mds# mount –t lustre <replaceable>/dev/mdt4_blockdevice</replaceable> /mnt/mdt4
321 <section xml:id="dbdoclet.50438199_22527">
322 <title><indexterm><primary>maintenance</primary><secondary>adding a OST</secondary></indexterm>
323 Adding a New OST to a Lustre File System</title>
324 <para>To add an OST to existing Lustre file system:</para>
327 <para> Add a new OST by passing on the following commands, run:</para>
328 <screen>oss# mkfs.lustre --fsname=spfs --mgsnode=mds16@tcp0 --ost --index=12 /dev/sda
329 oss# mkdir -p /mnt/test/ost12
330 oss# mount -t lustre /dev/sda /mnt/test/ost12</screen>
333 <para> Migrate the data (possibly).</para>
334 <para>The file system is quite unbalanced when new empty OSTs are added. New file creations are automatically balanced. If this is a scratch file system or files are pruned at a regular interval, then no further work may be needed.</para>
335 <para>New files being created will preferentially be placed on the empty OST. As old files are deleted, they will release space on the old OST.</para>
336 <para>Files existing prior to the expansion can optionally be rebalanced with an in-place copy, which can be done with a simple script. The basic method is to copy existing files to a temporary file, then move the temp file over the old one. This should not be attempted with files which are currently being written to by users or applications. This operation redistributes the stripes over the entire set of OSTs.</para>
337 <para>For example, to rebalance all files within <literal>/mnt/lustre/dir</literal>, enter:</para>
338 <screen>client# lfs_migrate /mnt/lustre/file</screen>
339 <para>To migrate files within the <literal>/test</literal> file system on
340 <literal>OST0004</literal> that are larger than 4GB in size, enter:</para>
341 <screen>client# lfs find /test -obd test-OST0004 -size +4G | lfs_migrate -y</screen>
342 <para>See <xref linkend="dbdoclet.50438206_42260"/> for more details.</para>
346 <section xml:id="dbdoclet.50438199_14978">
347 <title><indexterm><primary>maintenance</primary><secondary>restoring a OST</secondary></indexterm>
348 <indexterm><primary>maintenance</primary><secondary>removing a OST</secondary></indexterm>
349 Removing and Restoring OSTs</title>
350 <para>OSTs can be removed from and restored to a Lustre file system. Removing a OST means the
351 OST is <emphasis role="italic">deactivated</emphasis> in the file system, not permanently
353 <note><para>A removed OST still appears in the file system; do not create a new OST with the same name.</para></note>
354 <para>You may want to remove (deactivate) an OST and prevent new files from being written to it in several situations:</para>
357 <para>Hard drive has failed and a RAID resync/rebuild is underway</para>
360 <para>OST is nearing its space capacity</para>
363 <para>OST storage has failed permanently</para>
366 <section condition="l24" xml:id="dbdoclet.rmremotedir">
367 <title><indexterm><primary>maintenance</primary><secondary>removing a MDT</secondary></indexterm>Removing a MDT from the File System</title>
368 <para>If the MDT is permanently inaccessible, <literal>lfs rmdir {directory}</literal> can be used to delete the directory entry. A normal <literal>rmdir</literal> will report an IO error due to the remote MDT being inactive. After the remote directory has been removed, the administrator should mark the MDT as permanently inactive with:</para>
369 <screen>lctl conf_param {MDT name}.mdc.active=0
371 <para>A user can identify the location of a remote sub-directory using the <literal>lfs</literal> utility. For example:</para>
372 <screen>client$ lfs getstripe -M /mnt/lustre/remote_dir1
374 client$ mkdir /mnt/lustre/local_dir0
375 client$ lfs getstripe -M /mnt/lustre/local_dir0
378 <para>The <literal>getstripe -M</literal> parameters return the index of the MDT that is serving the given directory.</para>
380 <section xml:id="dbdoclet.inactivemdt" condition='l24'>
382 <indexterm><primary>maintenance</primary></indexterm>
383 <indexterm><primary>maintenance</primary><secondary>inactive MDTs</secondary></indexterm>Working with Inactive MDTs</title>
384 <para>Files located on or below an inactive MDT are inaccessible until the MDT is activated again. Clients accessing an inactive MDT will receive an EIO error.</para></section>
385 <section remap="h3" xml:id="section_k3l_4gt_tl">
387 <primary>maintenance</primary>
388 <secondary>removing a OST</secondary>
389 </indexterm> Removing an OST from the File System</title>
390 <para>When removing an OST, remember that the MDT does not communicate directly with OSTs.
391 Rather, each OST has a corresponding OSC which communicates with the MDT. It is necessary to
392 determine the device number of the OSC that corresponds to the OST. Then, you use this
393 device number to deactivate the OSC on the MDT.</para>
394 <para>To remove an OST from the file system:</para>
397 <para>For the OST to be removed, determine the device number of the corresponding OSC on
401 <para>List all OSCs on the node, along with their device numbers. Run:</para>
402 <screen>lctl dl | grep osc</screen>
403 <para>For example: <literal>lctl dl | grep</literal></para>
404 <screen>11 UP osc testfs-OST-0000-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5
405 12 UP osc testfs-OST-0001-osc-cac94211 4ea5b30f-6a8e-55a0-7519-2f20318ebdb4 5
406 13 IN osc testfs-OST-0000-osc testfs-MDT0000-mdtlov_UUID 5
407 14 UP osc testfs-OST-0001-osc testfs-MDT0000-mdtlov_UUID 5</screen>
410 <para>Determine the device number of the OSC that corresponds to the OST to be
416 <para>Temporarily deactivate the OSC on the MDT. On the MDT, run: </para>
417 <screen>mds# lctl --device <replaceable>lustre_devno</replaceable> deactivate</screen>
418 <para>For example, based on the command output in Step 1, to deactivate device 13 (the
419 MDT’s OSC for <literal>OST-0000</literal>), the command would be: </para>
420 <screen>mds# lctl --device 13 deactivate</screen>
421 <para>This marks the OST as inactive on the MDS, so no new objects are assigned to the
422 OST. This does not prevent use of existing objects for reads or writes. </para>
424 <para>Do not deactivate the OST on the clients. Do so causes errors (EIOs), and the copy
428 <para>Do not use <literal>lctl conf_param</literal> to deactivate the OST. It
429 permanently sets a parameter in the file system configuration.</para>
433 <para>Discover all files that have objects residing on the deactivated OST. </para>
434 <para>Depending on whether the deactivated OST is available or not, the data from that OST
435 may be migrated to other OSTs, or may need to be restored from backup. </para>
438 <para>If the OST is still online and available, find all files with objects on the
439 deactivated OST, and copy them to other OSTs in the file system to: </para>
440 <screen>client# lfs find --obd <replaceable>ost_name</replaceable> <replaceable>/mount/point</replaceable> | lfs_migrate -y</screen>
443 <para>If the OST is no longer available, delete the files on that OST and restore them
445 <screen>client# lfs find --obd <replaceable>ost_uuid</replaceable> -print0 <replaceable>/mount/point</replaceable> | \
446 tee /tmp/files_to_restore | xargs -0 -n 1 unlink</screen>
447 The list of files that need to be restored from backup is stored in
448 <literal>/tmp/files_to_restore</literal>. Restoring these files is beyond the
449 scope of this document.</para>
454 <para>Deactivate the OST.</para>
457 <para>To temporarily disable the deactivated OST, enter:
458 <screen>[client]# lctl set_param osc.<replaceable>fsname</replaceable>-<replaceable>OSTnumber</replaceable>-*.active=0</screen>If
459 there is expected to be a replacement OST in some short time (a few days), the OST
460 can temporarily be deactivated on the clients: <note>
461 <para>This setting is only temporary and will be reset if the clients or MDS are
462 rebooted. It needs to be run on all clients.</para>
466 <para>If there is not expected to be a replacement for this OST in the near future,
467 permanently deactivate the OST on all clients and the MDS:
468 <screen>[mgs]# lctl conf_param <replaceable>ost_name</replaceable>.osc.active=0</screen></para>
470 <para>A removed OST still appears in the file system; do not create a new OST with the
476 <section remap="h3" xml:id="section_ydg_pgt_tl">
478 <primary>maintenance</primary>
479 <secondary>backing up OST config</secondary>
482 <primary>backup</primary>
483 <secondary>OST config</secondary>
484 </indexterm> Backing Up OST Configuration Files</title>
485 <para>If the OST device is still accessible, then the Lustre configuration files on the OST
486 should be backed up and saved for future use in order to avoid difficulties when a
487 replacement OST is returned to service. These files rarely change, so they can and should be
488 backed up while the OST is functional and accessible. If the deactivated OST is still
489 available to mount (i.e. has not permanently failed or is unmountable due to severe
490 corruption), an effort should be made to preserve these files. </para>
493 <para>Mount the OST file system.
494 <screen>oss# mkdir -p /mnt/ost
495 [oss]# mount -t ldiskfs <replaceable>/dev/ost_device</replaceable> /mnt/ost</screen>
499 <para>Back up the OST configuration files.
500 <screen>oss# tar cvf <replaceable>ost_name</replaceable>.tar -C /mnt/ost last_rcvd \
501 CONFIGS/ O/0/LAST_ID</screen>
505 <para> Unmount the OST file system. <screen>oss# umount /mnt/ost</screen>
510 <section xml:id="section_kzs_pgt_tl">
512 <primary>maintenance</primary>
513 <secondary>restoring OST config</secondary>
516 <primary>backup</primary>
517 <secondary>restoring OST config</secondary>
518 </indexterm> Restoring OST Configuration Files</title>
519 <para>If the original OST is still available, it is best to follow the OST backup and restore
520 procedure given in either <xref linkend="dbdoclet.50438207_71633"/>, or <xref
521 linkend="dbdoclet.50438207_21638"/> and <xref linkend="dbdoclet.50438207_22325"/>. </para>
522 <para>To replace an OST that was removed from service due to corruption or hardware failure,
523 the file system needs to be formatted using <literal>mkfs.lustre</literal>, and the Lustre
524 file system configuration should be restored, if available. </para>
525 <para>If the OST configuration files were not backed up, due to the OST file system being
526 completely inaccessible, it is still possible to replace the failed OST with a new one at
527 the same OST index. </para>
530 <para> Format the OST file system.
531 <screen>oss# mkfs.lustre --ost --index=<replaceable>old_ost_index</replaceable> <replaceable>other_options</replaceable> \
532 <replaceable>/dev/new_ost_dev</replaceable></screen>
536 <para> Mount the OST file system.
537 <screen>oss# mkdir /mnt/ost
538 oss# mount -t ldiskfs <replaceable>/dev/new_ost_dev</replaceable> <replaceable>/mnt/ost</replaceable></screen>
542 <para>Restore the OST configuration files, if available.
543 <screen>oss# tar xvf <replaceable>ost_name</replaceable>.tar -C /mnt/ost</screen></para>
546 <para>Recreate the OST configuration files, if unavailable. </para>
547 <para>Follow the procedure in <xref linkend="dbdoclet.50438198_69657"/> to recreate the
548 LAST_ID file for this OST index. The <literal>last_rcvd</literal> file will be recreated
549 when the OST is first mounted using the default parameters, which are normally correct
550 for all file systems. The <literal>CONFIGS/mountdata</literal> file is created by
551 <literal>mkfs.lustre</literal> at format time, but has flags set that request it to
552 register itself with the MGS. It is possible to copy these flags from another working
553 OST (which should be the same):
554 <screen>oss1# debugfs -c -R "dump CONFIGS/mountdata /tmp/ldd" <replaceable>/dev/other_osdev</replaceable>
555 oss1# scp /tmp/ldd oss0:/tmp/ldd
556 oss0# dd if=/tmp/ldd of=/mnt/ost/CONFIGS/mountdata bs=4 count=1 seek=5 skip=5 conv=notrunc</screen></para>
559 <para> Unmount the OST file system. <screen>oss# umount /mnt/ost</screen>
564 <section xml:id="section_ucf_qgt_tl">
566 <primary>maintenance</primary>
567 <secondary>reintroducing an OSTs</secondary>
568 </indexterm> Returning a Deactivated OST to Service</title>
569 <para> If the OST was permanently deactivated, it needs to be reactivated in the MGS
571 <screen>mgs# lctl conf_param <replaceable>ost_name</replaceable>.osc.active=1</screen> If
572 the OST was temporarily deactivated, it needs to be reactivated on the MDS and clients.
573 <screen>mds# lctl --device <replaceable>lustre_devno</replaceable> activate
574 client# lctl set_param osc.<replaceable>fsname</replaceable>-<replaceable>OSTnumber</replaceable>-*.active=0</screen></para>
577 <section xml:id="dbdoclet.50438199_77819">
578 <title><indexterm><primary>maintenance</primary><secondary>aborting recovery</secondary></indexterm>
579 <indexterm><primary>backup</primary><secondary>aborting recovery</secondary></indexterm>
580 Aborting Recovery</title>
581 <para>You can abort recovery with either the <literal>lctl</literal> utility or by mounting the target with the <literal>abort_recov</literal> option (<literal>mount -o abort_recov</literal>). When starting a target, run: <screen>mds# mount -t lustre -L <replaceable>mdt_name</replaceable> -o abort_recov <replaceable>/mount_point</replaceable></screen></para>
583 <para>The recovery process is blocked until all OSTs are available. </para>
586 <section xml:id="dbdoclet.50438199_12607">
587 <title><indexterm><primary>maintenance</primary><secondary>identifying OST host</secondary></indexterm>
588 Determining Which Machine is Serving an OST </title>
589 <para>In the course of administering a Lustre file system, you may need to determine which
590 machine is serving a specific OST. It is not as simple as identifying the machine’s IP
591 address, as IP is only one of several networking protocols that the Lustre software uses and,
592 as such, LNET does not use IP addresses as node identifiers, but NIDs instead. To identify the
593 NID that is serving a specific OST, run one of the following commands on a client (you do not
594 need to be a root user):
595 <screen>client$ lctl get_param osc.<replaceable>fsname</replaceable>-<replaceable>OSTnumber</replaceable>*.ost_conn_uuid</screen>For
597 <screen>client$ lctl get_param osc.*-OST0000*.ost_conn_uuid
598 osc.testfs-OST0000-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp</screen>-
600 <screen>client$ lctl get_param osc.*.ost_conn_uuid
601 osc.testfs-OST0000-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp
602 osc.testfs-OST0001-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp
603 osc.testfs-OST0002-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp
604 osc.testfs-OST0003-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp
605 osc.testfs-OST0004-osc-f1579000.ost_conn_uuid=192.168.20.1@tcp</screen></para>
607 <section xml:id="dbdoclet.50438199_62333">
608 <title><indexterm><primary>maintenance</primary><secondary>changing failover node address</secondary></indexterm>
609 Changing the Address of a Failover Node</title>
610 <para>To change the address of a failover node (e.g, to use node X instead of node Y), run
611 this command on the OSS/OST partition (depending on which option was used to originally
613 <screen>oss# tunefs.lustre --erase-params --servicenode=<replaceable>NID</replaceable> <replaceable>/dev/ost_device</replaceable></screen>
615 <screen>oss# tunefs.lustre --erase-params --failnode=<replaceable>NID</replaceable> <replaceable>/dev/ost_device</replaceable></screen>
616 For more information about the <literal>--servicenode</literal> and
617 <literal>--failnode</literal> options, see <xref xmlns:xlink="http://www.w3.org/1999/xlink"
618 linkend="configuringfailover"/>.</para>
620 <section xml:id="dbdoclet.50438199_62545">
621 <title><indexterm><primary>maintenance</primary><secondary>separate a combined MGS/MDT</secondary></indexterm>
622 Separate a combined MGS/MDT</title>
623 <para>These instructions assume the MGS node will be the same as the MDS node. For instructions on how to move MGS to a different node, see <xref linkend="dbdoclet.50438199_31353"/>.</para>
624 <para>These instructions are for doing the split without shutting down other servers and clients.</para>
627 <para>Stop the MDS.</para>
628 <para>Unmount the MDT</para>
629 <screen>umount -f <replaceable>/dev/mdt_device</replaceable> </screen>
632 <para>Create the MGS.</para>
633 <screen>mds# mkfs.lustre --mgs --device-size=<replaceable>size</replaceable> <replaceable>/dev/mgs_device</replaceable></screen>
636 <para>Copy the configuration data from MDT disk to the new MGS disk.</para>
637 <screen>mds# mount -t ldiskfs -o ro <replaceable>/dev/mdt_device</replaceable> <replaceable>/mdt_mount_point</replaceable></screen>
638 <screen>mds# mount -t ldiskfs -o rw <replaceable>/dev/mgs_device</replaceable> <replaceable>/mgs_mount_point</replaceable> </screen>
639 <screen>mds# cp -r <replaceable>/mdt_mount_point</replaceable>/CONFIGS/<replaceable>filesystem_name</replaceable>-* <replaceable>/mgs_mount_point</replaceable>/CONFIGS/. </screen>
640 <screen>mds# umount <replaceable>/mgs_mount_point</replaceable></screen>
641 <screen>mds# umount <replaceable>/mdt_mount_point</replaceable></screen>
642 <para>See <xref linkend="dbdoclet.50438199_54623"/> for alternative method.</para>
645 <para>Start the MGS.</para>
646 <screen>mgs# mount -t lustre <replaceable>/dev/mgs_device</replaceable> <replaceable>/mgs_mount_point</replaceable></screen>
647 <para>Check to make sure it knows about all your file system</para>
648 <screen>cat /proc/fs/lustre/mgs/MGS/filesystems</screen>
651 <para>Remove the MGS option from the MDT, and set the new MGS nid.</para>
652 <screen>mds# tunefs.lustre --nomgs --mgsnode=<replaceable>new_mgs_nid</replaceable> <replaceable>/dev/mdt-device</replaceable></screen>
655 <para>Start the MDT.</para>
656 <screen>mds# mount -t lustre <replaceable>/dev/mdt_device /mdt_mount_point</replaceable></screen>
657 <para>Check to make sure the MGS configuration look right</para>
658 <screen>mds# cat /proc/fs/lustre/mgs/MGS/live/<replaceable>filesystem_name</replaceable></screen>