]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
ext2fs: add multi-mount protection (INCOMPAT_MMP)
authorAndreas Dilger <adilger@whamcloud.com>
Sat, 24 Sep 2011 17:48:55 +0000 (13:48 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 25 Sep 2011 05:55:23 +0000 (01:55 -0400)
commit0f5eba7501f467f757792ee449d16c9259b994fd
tree017ff4ababf519440760ecb49bcc43a5cd618d15
parent6747ac86b9b4eac864af768a2fa09b8a22e363a5
ext2fs: add multi-mount protection (INCOMPAT_MMP)

Multi-mount protection is feature that allows mke2fs, e2fsck, and
others to detect if the filesystem is mounted on a remote node (on
SAN disks) and avoid corrupting the filesystem.  For e2fsprogs this
means that it checks the MMP block to see if the filesystem is in use,
and marks the filesystem busy while e2fsck is running on the system.

This is useful on SAN disks that are shared between high-availability
servers, or accessible by multiple nodes that aren't in HA pairs.  MMP
isn't intended to serve as a primary HA exclusion mechanism, but as a
failsafe to protect against user, software, or hardware errors.

There is no requirement that e2fsck updates the MMP block at regular
intervals, but e2fsck does this occasionally to provide useful
information to the sysadmin in case of a detected conflict.

For the kernel (since Linux 3.0) MMP adds a "heartbeat" mechanism to
periodically write to disk (every few seconds by default) to notify
other nodes that the filesystem is still in use and unsafe to modify.

Originally-by: Kalpak Shah <kalpak@clusterfs.com>
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
30 files changed:
debugfs/debug_cmds.ct
debugfs/debugfs.c
debugfs/set_fields.c
e2fsck/e2fsck.c
e2fsck/e2fsck.h
e2fsck/journal.c
e2fsck/pass1.c
e2fsck/pass1b.c
e2fsck/problem.c
e2fsck/problem.h
e2fsck/unix.c
e2fsck/util.c
lib/e2p/feature.c
lib/e2p/ls.c
lib/ext2fs/Makefile.in
lib/ext2fs/closefs.c
lib/ext2fs/ext2_err.et.in
lib/ext2fs/ext2_fs.h
lib/ext2fs/ext2fs.h
lib/ext2fs/freefs.c
lib/ext2fs/mmp.c [new file with mode: 0644]
lib/ext2fs/openfs.c
lib/ext2fs/swapfs.c
lib/ext2fs/tst_super_size.c
misc/mke2fs.8.in
misc/mke2fs.c
misc/tune2fs.8.in
misc/tune2fs.c
misc/util.c
misc/util.h