This chapter describes the multiple-mount protection (MMP) feature, which protects the file system from being mounted simultaneously to more than one node. It includes the following sections:
- the section called “ Overview of Multiple-Mount Protection”
- the section called “ Working with Multiple-Mount Protection”
Note For information about configuring a Lustre file system for failover, see Configuring Failover in a Lustre File System
The multiple-mount protection (MMP) feature protects the Lustre 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 OSSs share a LUN).
The backend file system, ldiskfs
, supports the MMP mechanism. A block in the file system is updated by a kmmpd
daemon at one second intervals, and a sequence number is written in this block. If the file system is cleanly unmounted, then a special "clean" sequence is written to this block. When mounting the file system, ldiskfs
checks if the MMP block has a clean sequence or not.
Even if the MMP block has a clean sequence, ldiskfs
waits for some interval to guard against the following situations:
- If I/O traffic is heavy, it may take longer for the MMP block to be updated.
- If another node is trying to mount the same file system, a "race" condition may occur.
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.
Note
The MMP feature is only supported on Linux kernel versions newer than 2.6.9.
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 e2fsprogs
version support it. On an existing file system, a Lustre file system administrator can manually enable MMP when the file system is unmounted.
Use the following commands to determine whether MMP is running in the Lustre file system and to enable or disable the MMP feature.
To determine if MMP is enabled, run:
dumpe2fs -h /dev/block_device | grep mmp
Here is a sample command:
dumpe2fs -h /dev/sdc | grep mmp
Filesystem features: has_journal ext_attr resize_inode dir_index
filetype extent mmp sparse_super large_file uninit_bg
To manually disable MMP, run:
tune2fs -O ^mmp /dev/block_device
To manually enable MMP, run:
tune2fs -O mmp /dev/block_device
When MMP is enabled, if ldiskfs
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.