Blame SOURCES/0064-Update-mdadm-Monitor-manual.patch

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