|
|
37f2b0 |
From 725e37cd14866906ba28c970394b9f7a4cd97413 Mon Sep 17 00:00:00 2001
|
|
|
37f2b0 |
From: Blazej Kucman <blazej.kucman@intel.com>
|
|
|
37f2b0 |
Date: Mon, 19 Dec 2022 11:21:58 +0100
|
|
|
37f2b0 |
Subject: [PATCH 64/83] Update mdadm Monitor manual.
|
|
|
37f2b0 |
|
|
|
37f2b0 |
- describe monitor work modes,
|
|
|
37f2b0 |
- clarify the turning off condition,
|
|
|
37f2b0 |
- describe the mdmonitor.service as a prefered management way.
|
|
|
37f2b0 |
|
|
|
37f2b0 |
Signed-off-by: Blazej Kucman <blazej.kucman@intel.com>
|
|
|
37f2b0 |
Signed-off-by: Jes Sorensen <jes@trained-monkey.org>
|
|
|
37f2b0 |
---
|
|
|
37f2b0 |
mdadm.8.in | 71 ++++++++++++++++++++++++++++++++++++++----------------
|
|
|
37f2b0 |
1 file changed, 50 insertions(+), 21 deletions(-)
|
|
|
37f2b0 |
|
|
|
37f2b0 |
diff --git a/mdadm.8.in b/mdadm.8.in
|
|
|
37f2b0 |
index 70c79d1e..64f71ed1 100644
|
|
|
37f2b0 |
--- a/mdadm.8.in
|
|
|
37f2b0 |
+++ b/mdadm.8.in
|
|
|
37f2b0 |
@@ -2548,13 +2548,33 @@ Usage:
|
|
|
37f2b0 |
.I options... devices...
|
|
|
37f2b0 |
|
|
|
37f2b0 |
.PP
|
|
|
37f2b0 |
-This usage causes
|
|
|
37f2b0 |
+Monitor option can work in two modes:
|
|
|
37f2b0 |
+.IP \(bu 4
|
|
|
37f2b0 |
+system wide mode, follow all md devices based on
|
|
|
37f2b0 |
+.B /proc/mdstat,
|
|
|
37f2b0 |
+.IP \(bu 4
|
|
|
37f2b0 |
+follow only specified MD devices in command line.
|
|
|
37f2b0 |
+.PP
|
|
|
37f2b0 |
+
|
|
|
37f2b0 |
+.B \-\-scan -
|
|
|
37f2b0 |
+indicates system wide mode. Option causes the
|
|
|
37f2b0 |
+.I monitor
|
|
|
37f2b0 |
+to track all md devices that appear in
|
|
|
37f2b0 |
+.B /proc/mdstat.
|
|
|
37f2b0 |
+If it is not set, then at least one
|
|
|
37f2b0 |
+.B device
|
|
|
37f2b0 |
+must be specified.
|
|
|
37f2b0 |
+
|
|
|
37f2b0 |
+Monitor usage causes
|
|
|
37f2b0 |
.I mdadm
|
|
|
37f2b0 |
to periodically poll a number of md arrays and to report on any events
|
|
|
37f2b0 |
noticed.
|
|
|
37f2b0 |
-.I mdadm
|
|
|
37f2b0 |
-will never exit once it decides that there are arrays to be checked,
|
|
|
37f2b0 |
-so it should normally be run in the background.
|
|
|
37f2b0 |
+
|
|
|
37f2b0 |
+In both modes,
|
|
|
37f2b0 |
+.I monitor
|
|
|
37f2b0 |
+will work as long as there is an active array with redundancy and it is defined to follow (for
|
|
|
37f2b0 |
+.B \-\-scan
|
|
|
37f2b0 |
+every array is followed).
|
|
|
37f2b0 |
|
|
|
37f2b0 |
As well as reporting events,
|
|
|
37f2b0 |
.I mdadm
|
|
|
37f2b0 |
@@ -2565,15 +2585,6 @@ or
|
|
|
37f2b0 |
.B domain
|
|
|
37f2b0 |
and if the destination array has a failed drive but no spares.
|
|
|
37f2b0 |
|
|
|
37f2b0 |
-If any devices are listed on the command line,
|
|
|
37f2b0 |
-.I mdadm
|
|
|
37f2b0 |
-will only monitor those devices, otherwise, all arrays listed in the
|
|
|
37f2b0 |
-configuration file will be monitored. Further, if
|
|
|
37f2b0 |
-.B \-\-scan
|
|
|
37f2b0 |
-is given, then any other md devices that appear in
|
|
|
37f2b0 |
-.B /proc/mdstat
|
|
|
37f2b0 |
-will also be monitored.
|
|
|
37f2b0 |
-
|
|
|
37f2b0 |
The result of monitoring the arrays is the generation of events.
|
|
|
37f2b0 |
These events are passed to a separate program (if specified) and may
|
|
|
37f2b0 |
be mailed to a given E-mail address.
|
|
|
37f2b0 |
@@ -2586,16 +2597,34 @@ device if relevant (such as a component device that has failed).
|
|
|
37f2b0 |
|
|
|
37f2b0 |
If
|
|
|
37f2b0 |
.B \-\-scan
|
|
|
37f2b0 |
-is given, then a program or an E-mail address must be specified on the
|
|
|
37f2b0 |
-command line or in the config file. If neither are available, then
|
|
|
37f2b0 |
+is given, then a
|
|
|
37f2b0 |
+.B program
|
|
|
37f2b0 |
+or an
|
|
|
37f2b0 |
+.B e-mail
|
|
|
37f2b0 |
+address must be specified on the
|
|
|
37f2b0 |
+command line or in the config file. If neither are available, then
|
|
|
37f2b0 |
.I mdadm
|
|
|
37f2b0 |
will not monitor anything.
|
|
|
37f2b0 |
-Without
|
|
|
37f2b0 |
-.B \-\-scan,
|
|
|
37f2b0 |
-.I mdadm
|
|
|
37f2b0 |
-will continue monitoring as long as something was found to monitor. If
|
|
|
37f2b0 |
-no program or email is given, then each event is reported to
|
|
|
37f2b0 |
-.BR stdout .
|
|
|
37f2b0 |
+For devices given directly in command line, without
|
|
|
37f2b0 |
+.B program
|
|
|
37f2b0 |
+or
|
|
|
37f2b0 |
+.B email
|
|
|
37f2b0 |
+specified, each event is reported to
|
|
|
37f2b0 |
+.BR stdout.
|
|
|
37f2b0 |
+
|
|
|
37f2b0 |
+Note: For systems where
|
|
|
37f2b0 |
+.If mdadm monitor
|
|
|
37f2b0 |
+is configured via systemd,
|
|
|
37f2b0 |
+.B mdmonitor(mdmonitor.service)
|
|
|
37f2b0 |
+should be configured. The service is designed to be primary solution for array monitoring,
|
|
|
37f2b0 |
+it is configured to work in system wide mode.
|
|
|
37f2b0 |
+It is automatically started and stopped according to current state and types of MD arrays in system.
|
|
|
37f2b0 |
+The service may require additional configuration, like
|
|
|
37f2b0 |
+.B e-mail
|
|
|
37f2b0 |
+or
|
|
|
37f2b0 |
+.B delay.
|
|
|
37f2b0 |
+That should be done in
|
|
|
37f2b0 |
+.B mdadm.conf.
|
|
|
37f2b0 |
|
|
|
37f2b0 |
The different events are:
|
|
|
37f2b0 |
|
|
|
37f2b0 |
--
|
|
|
37f2b0 |
2.38.1
|
|
|
37f2b0 |
|