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