Blame SOURCES/0032-convert_linux-remove-LVM2-devices-file.patch

696189
From 83fc438139c49ffae330d5caeece1e52bcb1d18e Mon Sep 17 00:00:00 2001
696189
From: Laszlo Ersek <lersek@redhat.com>
696189
Date: Fri, 5 Aug 2022 10:44:26 +0200
696189
Subject: [PATCH] convert_linux: remove LVM2 "devices file"
696189
696189
A recent feature of LVM2 is the "devices file"
696189
<https://man7.org/linux/man-pages/man8/lvmdevices.8.html>. It speeds up
696189
LVM2 PV discovery on a normal system, but an old devices file in a
696189
converted domain (with different hardware) can prevent the assembly of
696189
volume groups.
696189
696189
In particular, when converting a physical system to a guest with virt-p2v,
696189
the original system will have used "sys_wwid"-type identifiers in the LVM2
696189
devices file, and those are guaranteed not to match any virtio-blk disks
696189
in the output domain.
696189
696189
We've seen a similar issue in the past under RHBZ#1164853, so just extend
696189
the same scrubbing with the new pathname.
696189
696189
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2112801
696189
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
696189
Message-Id: <20220805084426.9200-1-lersek@redhat.com>
696189
Acked-by: Richard W.M. Jones <rjones@redhat.com>
696189
(cherry picked from commit 8e4b732e8b4343c169c658338da53fb0ede7e512)
696189
---
696189
 convert/convert_linux.ml | 4 ++--
696189
 1 file changed, 2 insertions(+), 2 deletions(-)
696189
696189
diff --git a/convert/convert_linux.ml b/convert/convert_linux.ml
696189
index a66ff1e4..2aaa438e 100644
696189
--- a/convert/convert_linux.ml
696189
+++ b/convert/convert_linux.ml
696189
@@ -1402,11 +1402,11 @@ let convert (g : G.guestfs) source inspect keep_serial_console _ =
696189
      * device names.  blkid will rebuild these on demand.
696189
      *
696189
      * Delete the LVM cache since it will contain references to the
696189
-     * old devices (RHBZ#1164853).
696189
+     * old devices (RHBZ#1164853, RHBZ#2112801).
696189
      *)
696189
     List.iter g#rm_f [
696189
       "/etc/blkid/blkid.tab"; "/etc/blkid.tab";
696189
-      "/etc/lvm/cache/.cache"
696189
+      "/etc/lvm/cache/.cache"; "/etc/lvm/devices/system.devices"
696189
     ];
696189
   in
696189