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="managingfailover">
5 <title xml:id="managingfailover.title">Lustre File System Failover and Multiple-Mount Protection</title>
6 <para>This chapter describes the multiple-mount protection (MMP) feature, which protects the file
7 system from being mounted simultaneously to more than one node. It includes the following
11 <para><xref linkend="dbdoclet.50438213_13563"/></para>
14 <para><xref xmlns:xlink="http://www.w3.org/1999/xlink" linkend="section_etn_4zf_tl"/></para>
18 <para>For information about configuring a Lustre file system for failover, see <xref
19 xmlns:xlink="http://www.w3.org/1999/xlink" linkend="configuringfailover"/></para>
21 <section xml:id="dbdoclet.50438213_13563">
24 <primary>multiple-mount protection</primary>
25 </indexterm> Overview of Multiple-Mount Protection</title>
26 <para>The multiple-mount protection (MMP) feature protects the Lustre file system from being
27 mounted simultaneously to more than one node. This feature is important in a shared storage
28 environment (for example, when a failover pair of OSSs share a LUN).</para>
29 <para>The backend file system, <literal>ldiskfs</literal>, supports the MMP mechanism. A block
30 in the file system is updated by a <literal>kmmpd</literal> daemon at one second intervals,
31 and a sequence number is written in this block. If the file system is cleanly unmounted, then
32 a special "clean" sequence is written to this block. When mounting the file system,
33 <literal>ldiskfs</literal> checks if the MMP block has a clean sequence or not.</para>
34 <para>Even if the MMP block has a clean sequence, <literal>ldiskfs</literal> waits for some interval to guard against the following situations:</para>
37 <para> If I/O traffic is heavy, it may take longer for the MMP block to be updated.</para>
40 <para> If another node is trying to mount the same file system, a "race" condition may occur.</para>
43 <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>
45 <para>The MMP feature is only supported on Linux kernel versions newer than 2.6.9.</para>
48 <section xml:id="section_etn_4zf_tl">
49 <title>Working with Multiple-Mount Protection</title>
50 <para>On a new Lustre file system, MMP is automatically enabled by
51 <literal>mkfs.lustre</literal> at format time if failover is being used and the kernel and
52 <literal>e2fsprogs</literal> version support it. On an existing file system, a Lustre file
53 system administrator can manually enable MMP when the file system is unmounted.</para>
54 <para>Use the following commands to determine whether MMP is running in the Lustre file system
55 and to enable or disable the MMP feature.</para>
56 <para>To determine if MMP is enabled, run:</para>
57 <screen>dumpe2fs -h <replaceable>/dev/block_device</replaceable> | grep mmp</screen>
58 <para>Here is a sample command:</para>
59 <screen>dumpe2fs -h /dev/sdc | grep mmp
60 Filesystem features: has_journal ext_attr resize_inode dir_index
61 filetype extent mmp sparse_super large_file uninit_bg</screen>
62 <para>To manually disable MMP, run:</para>
63 <screen>tune2fs -O ^mmp <replaceable>/dev/block_device</replaceable></screen>
64 <para>To manually enable MMP, run:</para>
65 <screen>tune2fs -O mmp <replaceable>/dev/block_device</replaceable></screen>
66 <para>When MMP is enabled, if <literal>ldiskfs</literal> detects multiple mount attempts after
67 the file system is mounted, it blocks these later mount attempts and reports the time when the
68 MMP block was last updated, the node name, and the device name of the node where the file
69 system is currently mounted.</para>
73 vim:expandtab:shiftwidth=2:tabstop=8: