Blob Blame History Raw
From a55c1655eb6115b5656a7c1c76246fa48f65a56d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Thu, 20 Nov 2014 11:22:32 +0000
Subject: [PATCH] v2v: linux: Delete the LVM cache which may reference old
 devices (RHBZ#1164853).

Thanks: Bryn M. Reeves
(cherry picked from commit 63d67ac8ac6ae609514c995704a4dbd6f5ff5647)
---
 v2v/convert_linux.ml | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
index e85a0d5..6e45ac8 100644
--- a/v2v/convert_linux.ml
+++ b/v2v/convert_linux.ml
@@ -1373,8 +1373,14 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
 
     (* Delete blkid caches if they exist, since they will refer to the old
      * device names.  blkid will rebuild these on demand.
+     *
+     * Delete the LVM cache since it will contain references to the
+     * old devices (RHBZ#1164853).
      *)
-    List.iter g#rm_f ["/etc/blkid/blkid.tab"; "/etc/blkid.tab"]
+    List.iter g#rm_f [
+      "/etc/blkid/blkid.tab"; "/etc/blkid.tab";
+      "/etc/lvm/cache/.cache"
+    ];
   in
 
   augeas_grub_configuration ();
-- 
1.8.3.1