52537418e6
Historically, with CentOS, we had issues related to LV activation occurring in a non-deterministic way and causing an assortment of provisioning issues. More deterministic LV activation was achieved by setting use_lvmetad = 0 in /etc/lvm/lvm.conf In the migration to Debian, a much more recent version of the lvm2 package is in use. In the intervening versions of lvm2, lvmetad was removed making use_lvmetad and the associated behavior now obsolete. In some current random testing scenarios, emergency mode is seen when booting the Debian ISO. Reviewing the systemd dump of services initiating when emergency mode occurs, it is observed that LV activation is occurring at a different time and order vs. a successful boot. The Debian lvm2 version provides configuration parameter global/event_activation which when set to 0 will change LV activation behavior when a PV appears. No noticable change was observed when this variable is set. The current upstream version from Debian Bullseye is missing an lvm2 upstream patch the should address this issue. Patch the Debian lvm2 version with this upstream patch to enable testing with this enabled. Test Plan: PASS - Build ISO, install/provision in AIO-SX virtual/hardware labs PASS - Perform numerous reboot cycles an observe no issues PASS - Test on H/W setup that has shown energency mode behavior to confirm that this version and associated config file change resolved emergency mode PV/LV activation issues Change-Id: If22e446126f33c2155bd70988ed9b0444d230730 Partial-Bug: #1979105 Signed-off-by: Robert Church <robert.church@windriver.com>
38 lines
1.1 KiB
Diff
38 lines
1.1 KiB
Diff
From da88d405f414c864857fd63aeddf4e3125bd166f Mon Sep 17 00:00:00 2001
|
|
From: Zdenek Kabelac <zkabelac@redhat.com>
|
|
Date: Mon, 8 Feb 2021 16:28:18 +0100
|
|
Subject: [PATCH] pvscan: support disabled event_activation
|
|
|
|
In past we had this control with use_lvmetad check for
|
|
pvscan --cache -aay
|
|
|
|
Howerer this got lost with lvmetad removal commit:
|
|
117160b27e510dceb1ed6acf995115c040acd88d
|
|
|
|
When user sets lvm.conf global/event_activation=0
|
|
pvscan service will no longer auto activate any LVs on appeared PVs.
|
|
---
|
|
tools/pvscan.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/tools/pvscan.c b/tools/pvscan.c
|
|
index 55c708682..7493c402b 100644
|
|
--- a/tools/pvscan.c
|
|
+++ b/tools/pvscan.c
|
|
@@ -1575,6 +1575,12 @@ int pvscan_cache_cmd(struct cmd_context *cmd, int argc, char **argv)
|
|
|
|
dm_list_init(&complete_vgnames);
|
|
|
|
+ if (do_activate &&
|
|
+ !find_config_tree_bool(cmd, global_event_activation_CFG, NULL)) {
|
|
+ log_verbose("Ignoring pvscan --cache -aay because event_activation is disabled.");
|
|
+ return ECMD_PROCESSED;
|
|
+ }
|
|
+
|
|
if (arg_is_set(cmd, major_ARG) + arg_is_set(cmd, minor_ARG))
|
|
devno_args = 1;
|
|
|
|
--
|
|
2.16.6
|
|
|