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

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