]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mdmon.8
mdmon: insist on creating .pid file at startup.
[thirdparty/mdadm.git] / mdmon.8
diff --git a/mdmon.8 b/mdmon.8
index c9cb5de8561b6e618a3afe9067cf117645913506..2720b45257bae68e3c4601e48dd7c2d3c748f995 100644 (file)
--- a/mdmon.8
+++ b/mdmon.8
@@ -1,11 +1,11 @@
 .\" See file COPYING in distribution for details.
-.TH MDMON 8 "" v3.0-rc1
+.TH MDMON 8 "" v3.1.1
 .SH NAME
 mdmon \- monitor MD external metadata arrays
 
 .SH SYNOPSIS
 
-.BI mdmon " CONTAINER [NEWROOT]"
+.BI mdmon " [--all] [--takeover] CONTAINER"
 
 .SH OVERVIEW
 The 2.6.27 kernel brings the ability to support external metadata arrays.
@@ -128,26 +128,36 @@ device>/<member index>" if the array is to remain readonly.
 CONTAINER
 The
 .B container
-device to monitor.  It can be a full path like /dev/md/container, a simple md
-device name like md127, or /proc/mdstat which tells
-.I mdmon
-to scan for containers and launch an
-.I mdmon
-instance for each one found.
+device to monitor.  It can be a full path like /dev/md/container, or a
+simple md device name like md127.
 .TP
-[NEWROOT]
-In order to support an external metadata raid array as the rootfs
+.B \-\-takeover
+This instructs
 .I mdmon
-needs to be started in the initramfs environment.  Once the initramfs
-environment mounts the final rootfs
+to replace any active
 .I mdmon
-needs to be restarted in the new namespace.  When NEWROOT is specified
+which is currently monitoring the array.  This is primarily used late
+in the boot process to replace any
 .I mdmon
-will terminate any
+which was started from an
+.B initramfs
+before the root filesystem was mounted.  This avoids holding a
+reference on that
+.B initramfs
+indefinitely and ensures that the
+.I pid
+and
+.I sock
+files used to communicate with
 .I mdmon
-instances that are running in the current namespace,
-.IR chroot (2)
-to NEWROOT, and continue monitoring the container.
+are in a standard place.
+.TP
+.B \-\-all
+This tells mdmon to find any active containers and start monitoring
+each of them if appropriate.  This is normally used with
+.B \-\-takeover
+late in the boot sequence.
+
 .PP
 Note that
 .I mdmon
@@ -159,6 +169,16 @@ RAID arrays.  The only times it is run other that by
 is when the boot scripts need to restart it after mounting the new
 root filesystem.
 
+.SH EXAMPLES
+
+.B "  mdmon \-\-all \-\-takeover"
+.br
+Any
+.I mdmon
+which is currently running is killed and a new instance is started.
+This should be run late in the boot sequence and particularly after
+.B /var
+is mounted and writable.
 .SH SEE ALSO
 .IR mdadm (8),
 .IR md (4).