1 .. SPDX-License-Identifier: GPL-2.0 2 3 Multiple Mount Protection 4 ------------------------- 5 6 Multiple mount protection (MMP) is a feature t 7 filesystem against multiple hosts trying to us 8 simultaneously. When a filesystem is opened (f 9 etc.), the MMP code running on the node (call 10 sequence number. If the sequence number is EXT 11 open continues. If the sequence number is EXT4 12 fsck is (hopefully) running, and open fails im 13 open code will wait for twice the specified MM 14 the sequence number again. If the sequence num 15 filesystem is active on another machine and th 16 code passes all of those checks, a new MMP seq 17 and written to the MMP block, and the mount pr 18 19 While the filesystem is live, the kernel sets 20 MMP block at the specified MMP check interval. 21 the MMP sequence number is re-read; if it does 22 MMP sequence number, then another node (node B 23 filesystem, and node A remounts the filesystem 24 sequence numbers match, the sequence number is 25 memory and on disk, and the re-check is comple 26 27 The hostname and device filename are written i 28 an open operation succeeds. The MMP code does 29 are provided purely for informational purposes 30 31 The checksum is calculated against the FS UUID 32 The MMP structure (``struct mmp_struct``) is a 33 34 .. list-table:: 35 :widths: 8 12 20 40 36 :header-rows: 1 37 38 * - Offset 39 - Type 40 - Name 41 - Description 42 * - 0x0 43 - __le32 44 - mmp_magic 45 - Magic number for MMP, 0x004D4D50 (“MM 46 * - 0x4 47 - __le32 48 - mmp_seq 49 - Sequence number, updated periodically. 50 * - 0x8 51 - __le64 52 - mmp_time 53 - Time that the MMP block was last update 54 * - 0x10 55 - char[64] 56 - mmp_nodename 57 - Hostname of the node that opened the fi 58 * - 0x50 59 - char[32] 60 - mmp_bdevname 61 - Block device name of the filesystem. 62 * - 0x70 63 - __le16 64 - mmp_check_interval 65 - The MMP re-check interval, in seconds. 66 * - 0x72 67 - __le16 68 - mmp_pad1 69 - Zero. 70 * - 0x74 71 - __le32[226] 72 - mmp_pad2 73 - Zero. 74 * - 0x3FC 75 - __le32 76 - mmp_checksum 77 - Checksum of the MMP block.
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.