Blame SOURCES/0021-man-add-section-about-static-autoactivation.patch

429878
From 7631c5b826b5a3eddfcd22db9b80574b249794c1 Mon Sep 17 00:00:00 2001
429878
From: David Teigland <teigland@redhat.com>
429878
Date: Mon, 6 Dec 2021 13:20:32 -0600
ab86b0
Subject: [PATCH 21/54] man: add section about static autoactivation
429878
429878
---
429878
 man/lvmautoactivation.7_main | 48 ++++++++++++++++++++++++++++++------
429878
 1 file changed, 41 insertions(+), 7 deletions(-)
429878
429878
diff --git a/man/lvmautoactivation.7_main b/man/lvmautoactivation.7_main
429878
index 87c15a3d1..bf885991d 100644
429878
--- a/man/lvmautoactivation.7_main
429878
+++ b/man/lvmautoactivation.7_main
429878
@@ -14,14 +14,16 @@ activated.
429878
 Autoactivation of VGs, or specific LVs, can be prevented using vgchange or
429878
 lvchange --setautoactivation n.  The lvm.conf auto_activation_volume_list
429878
 is another way to limit autoactivation.
429878
+.
429878
+.SS event autoactivation
429878
 .P
429878
 The most common form of autoactivation is "event based", in which complete
429878
 VGs are activated in response to uevents which occur during system startup
429878
 or at any time after the system has started.  Another form of
429878
-autoactivation is "service based" in which complete VGs are activated at a
429878
-fixed point during system startup by a systemd service, and are not
429878
-activated in response to uevents.  This can be controlled with the
429878
-lvm.conf setting event_activation.
429878
+autoactivation is "static" in which complete VGs are activated at a fixed
429878
+point during system startup by a systemd service, and not in response to
429878
+events.  This can be controlled with the lvm.conf setting
429878
+event_activation.
429878
 .P
429878
 Event based autoactivation is driven by udev, udev rules, and systemd.
429878
 When a device is attached to a machine, a uevent is generated by the
429878
@@ -30,8 +32,8 @@ rules to process the new device.  Udev rules use blkid to identify the
429878
 device as an LVM PV and then execute the lvm-specific udev rule for the
429878
 device, which triggers autoactivation.
429878
 .P
429878
-There are two variations of event based autoactivation that may be used a
429878
-system, depending on the LVM udev rule that is installed (found in
429878
+There are two variations of event baed autoactivation that may be used on
429878
+a system, depending on the LVM udev rule that is installed (found in
429878
 /lib/udev/rules.d/.)  The following summarizes the steps in each rule
429878
 which lead to autoactivation:
429878
 .P
429878
@@ -149,7 +151,7 @@ using the udev environment key format, i.e. NAME='value'.
429878
 Send standard command output to the journal (when stdout
429878
 is reserved for udev output.)
429878
 .P
429878
-.SS Temp files
429878
+.SS run files
429878
 .P
429878
 Autoactivation commands use a number of temp files in /run/lvm (with the
429878
 expectation that /run is cleared between boots.)
429878
@@ -175,6 +177,38 @@ The first activation command (pvscan or vgchange) to create a file here,
429878
 named for the VG, will activate the VG.  This resolves a race when
429878
 concurrent commands attempt to activate a VG at once.
429878
 .
429878
+.SS static autoactivation
429878
+.P
429878
+When event autoactivation is disabled by setting lvm.conf
429878
+event_activation=0, autoactivation is performed at one or more static
429878
+points during system startup. At these points, a vgchange -aay command is
429878
+run to activate complete VGs from devices that are present on the system
429878
+at that time. pvscan commands (and lvm2-pvscan services) do not perform
429878
+autoactivation in this mode.  pvscan commands may still be run from
429878
+uevents but will do nothing when they read the event_activation=0 setting.
429878
+.P
429878
+The static vgchange -aay commands are run by three systemd services at
429878
+three points during startup: lvm2-activation-early, lvm2-activation, and
429878
+lvm2-activation-net. These static activation services are "generated
429878
+services", so the service files are created at run time by the
429878
+lvm2-activation-generator command (run by systemd).
429878
+lvm2-activation-generator creates the services if lvm.conf
429878
+event_activation=0.
429878
+.P
429878
+The limitation of this method is that devices may not be attached to the
429878
+system (or set up) at a reliable point in time during startup, and they
429878
+may not be present when the services run vgchange.  In this case, the VGs
429878
+will not be autoactivated.  So, the timing of device attachment/setup
429878
+determines whether static autoactivation will produce the same results as
429878
+event autoactivation.  For this reason, static autoactivation is not
429878
+recommended.
429878
+.P
429878
+Sometimes, static autoactivation is mistakenly expected to disable all
429878
+autoactivation of particular VGs. This may appear to be effective if those
429878
+VGs are slow to be attached or set up. But, the only correct and reliable
429878
+way to disable autoactivation is using vgchange/lvchange
429878
+--setautoactivation n, or lvm.conf auto_activation_volume_list.
429878
+.
429878
 .SH EXAMPLES
429878
 .P
429878
 VG "vg" contains two PVs:
429878
-- 
ab86b0
2.34.3
429878