Whamcloud - gitweb
LUDOC-75 lnet: Add lst utility environment variable LST_FEATURES
[doc/manual.git] / ManagingFailover.xml
1 <?xml version='1.0' encoding='UTF-8'?>
2 <!-- This document was created with Syntext Serna Free. --><chapter xmlns="http://docbook.org/ns/docbook" xmlns:xl="http://www.w3.org/1999/xlink" version="5.0" xml:lang="en-US" xml:id="managingfailover">
3   <title xml:id="managingfailover.title">Managing Failover</title>
4   <para>This chapter describes failover in a Lustre system and includes the following sections:</para>
5   <itemizedlist>
6     <listitem>
7       <para><xref linkend="dbdoclet.50438213_13563"/></para>
8     </listitem>
9   </itemizedlist>
10   <note>
11     <para>For information about high availability(HA) management software, see the Lustre wiki topic <link xl:href="http://wiki.lustre.org/index.php/Using_Red_Hat_Cluster_Manager_with_Lustre">Using Red Hat Cluster Manager with Lustre</link> or the Lustre wiki topic <link xl:href="http://wiki.lustre.org/index.php/Using_Pacemaker_with_Lustre">LuUsing Pacemaker with stre</link>.</para>
12   </note>
13   <section xml:id="dbdoclet.50438213_13563">
14       <title>
15           <indexterm><primary>multiple-mount protection</primary><see>failover</see></indexterm>
16           <indexterm><primary>failover</primary></indexterm>
17           Lustre Failover and Multiple-Mount Protection</title>
18     <para>The failover functionality in Lustre is implemented with the multiple-mount protection (MMP) feature, which protects the file system from being mounted simultaneously to more than one node. This feature is important in a shared storage environment (for example, when a failover pair of OSTs share a partition).</para>
19     <para>Lustre&apos;s backend file system, <literal>ldiskfs</literal>, supports the MMP mechanism. A block in the file system is updated by a <literal>kmmpd</literal> daemon at one second intervals, and a sequence number is written in this block. If the file system is cleanly unmounted, then a special &quot;clean&quot; sequence is written to this block. When mounting the file system, <literal>ldiskfs</literal> checks if the MMP block has a clean sequence or not.</para>
20     <para>Even if the MMP block has a clean sequence, <literal>ldiskfs</literal> waits for some interval to guard against the following situations:</para>
21     <itemizedlist>
22       <listitem>
23         <para> If I/O traffic is heavy, it may take longer for the MMP block to be updated.</para>
24       </listitem>
25       <listitem>
26         <para> If another node is trying to mount the same file system, a &quot;race&quot; condition may occur.</para>
27       </listitem>
28     </itemizedlist>
29     <para>With MMP enabled, mounting a clean file system takes at least 10 seconds. If the file system was not cleanly unmounted, then the file system mount may require additional time.</para>
30     <note>
31       <para>The MMP feature is only supported on Linux kernel versions &gt;= 2.6.9.</para>
32     </note>
33     <section remap="h3">
34       <title><indexterm><primary>failover</primary><secondary>multiple-mount protection</secondary></indexterm>Working with Multiple-Mount Protection</title>
35       <para>On a new Lustre file system, MMP is automatically enabled by mkfs.lustre at format time if failover is being used and the kernel and <literal>e2fsprogs</literal> version support it. On an existing file system, a Lustre administrator can manually enable MMP when the file system is unmounted.</para>
36       <para>Use the following commands to determine whether MMP is running in Lustre and to enable or disable the MMP feature.</para>
37       <para>To determine if MMP is enabled, run:</para>
38       <screen>dumpe2fs -h &lt;device&gt;|grep mmp</screen>
39       <para>Here is a sample command:</para>
40       <screen>dumpe2fs -h /dev/sdc | grep mmp 
41 Filesystem features: has_journal ext_attr resize_inode dir_index 
42 filetype extent mmp sparse_super large_file uninit_bg</screen>
43       <para>To manually disable MMP, run:</para>
44       <screen>tune2fs -O ^mmp &lt;device&gt; </screen>
45       <para>To manually enable MMP, run:</para>
46       <screen>tune2fs -O mmp &lt;device&gt;</screen>
47       <para>When MMP is enabled, if <literal>ldiskfs</literal> detects multiple mount attempts after the file system is mounted, it blocks these later mount attempts and reports the time when the MMP block was last updated, the node name, and the device name of the node where the file system is currently mounted.</para>
48     </section>
49   </section>
50 </chapter>