summaryrefslogtreecommitdiff
path: root/mdmon.8
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2010-02-08 14:08:13 +1100
committerNeilBrown <neilb@suse.de>2010-02-08 14:08:13 +1100
commitb5c727dc1a55323f02e5f60a50bcecb866dd51ea (patch)
tree85ef79c62ace2c5d548ff1430039faa234351482 /mdmon.8
parenta9596b79a316404bbb4e3792c97b3d0a597ec885 (diff)
mdmon: remove switch-root functionality.
Using switch-root and then creating files in /var/run once that location is writable is racing as most distro clean out /var/run shortly after it is mounted. This can cause the .pid and .sock files to be deleted shortly after they are created. This option doesn't seem to be used at all any, and the alternative of communicating the pid etc in some preserved directory and then restarting mdmon once all is settled seems simpler. So remove the code for supporting switchroot and update man page accordingly. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdmon.8')
-rw-r--r--mdmon.898
1 files changed, 33 insertions, 65 deletions
diff --git a/mdmon.8 b/mdmon.8
index 9be03271..2720b452 100644
--- a/mdmon.8
+++ b/mdmon.8
@@ -5,7 +5,7 @@ mdmon \- monitor MD external metadata arrays
.SH SYNOPSIS
-.BI mdmon " CONTAINER [NEWROOT | PID]"
+.BI mdmon " [--all] [--takeover] CONTAINER"
.SH OVERVIEW
The 2.6.27 kernel brings the ability to support external metadata arrays.
@@ -128,66 +128,35 @@ 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
-.I \-\-all
- 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
-.I mdmon
-needs to be started in the initramfs environment. Once the initramfs
-environment mounts the final rootfs
-.I mdmon
-needs to be restarted in the new namespace. When NEWROOT is specified
-.I mdmon
-will terminate any
-.I mdmon
-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.
+.B \-\-takeover
+This instructs
+.I mdmon
+to replace any active
+.I mdmon
+which is currently monitoring the array. This is primarily used late
+in the boot process to replace any
+.I mdmon
+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
+are in a standard place.
.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.
+.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
@@ -200,17 +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 EXMAPLES
+.SH EXAMPLES
-.B " mdmon --all /"
+.B " mdmon \-\-all \-\-takeover"
.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.
+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).