summaryrefslogtreecommitdiff
path: root/mdmon.8
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-02-04 16:31:49 +1100
committerNeilBrown <neilb@suse.de>2010-02-04 16:47:28 +1100
commit5d4d1b26d3da8b489ed7e2f5a38f7d90b7f4008f (patch)
tree86261d4f1521d7953bdbde959fd96bd0fb744d9c /mdmon.8
parent24f6f99b3630b1a89aaa57930c5c9de8a3df9ded (diff)
mdmon: allow pid to be stored in different directory.
/var/run probably doesn't persist from early boot. So if necessary, store in in /lib/init/rw or somewhere else that does persist. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdmon.8')
-rw-r--r--mdmon.852
1 files changed, 51 insertions, 1 deletions
diff --git a/mdmon.8 b/mdmon.8
index 05aaa50f..1dc7844e 100644
--- a/mdmon.8
+++ b/mdmon.8
@@ -5,7 +5,7 @@ mdmon \- monitor MD external metadata arrays
.SH SYNOPSIS
-.BI mdmon " CONTAINER [NEWROOT]"
+.BI mdmon " CONTAINER [NEWROOT | PID]"
.SH OVERVIEW
The 2.6.27 kernel brings the ability to support external metadata arrays.
@@ -148,6 +148,45 @@ will terminate any
instances that are running in the current namespace,
.IR chroot (2)
to NEWROOT, and continue monitoring the container.
+
+Alternately the new
+.I mdmon
+can be started after the new root has been installed with
+.I pivotroot
+by passing
+.B /
+as the NEWROOT. For
+.I mdmon
+to be able to find and kill the old
+.I mdmon
+there must be some part of the filesystem that persists from before
+the
+.I pivotroot
+to afterwards. This can be
+.B /var/run/mdadm
+or some other directory. The default other directory is
+.B /lib/init/rw/mdadm
+but this can easily be changed when
+.I mdmon
+is compiled.
+If
+.I mdmon
+cannot store the pid file in
+.B /var/run/mdadm
+it will store it in the other directory until
+.B /var/run/mdadm
+becomes available, or until it is killed.
+.TP
+[PID]
+If the second argument to
+.I mdmon
+does not start with a slash it is assumed to be the pid of a previous
+instance of
+.I mdmon
+to kill. This is used internally by
+.I mdmon
+to pass the pid across a chroot/exec and should not be used otherwise.
+
.PP
Note that
.I mdmon
@@ -159,6 +198,17 @@ 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 EXMAPLES
+
+.B " mdmon /proc/mdstat /"
+.br
+Any
+.I mdmon
+which is currently running is killed and a new instance is started.
+This should be run early in the boot sequence after a
+.I pivotroot
+to the final root filesystem, but before that filesystem is remounted
+read-write.
.SH SEE ALSO
.IR mdadm (8),
.IR md (4).