Blame SOURCES/0056-v2v-linux-Delete-the-LVM-cache-which-may-reference-o.patch

0d20ef
From a55c1655eb6115b5656a7c1c76246fa48f65a56d Mon Sep 17 00:00:00 2001
0d20ef
From: "Richard W.M. Jones" <rjones@redhat.com>
0d20ef
Date: Thu, 20 Nov 2014 11:22:32 +0000
0d20ef
Subject: [PATCH] v2v: linux: Delete the LVM cache which may reference old
0d20ef
 devices (RHBZ#1164853).
0d20ef
0d20ef
Thanks: Bryn M. Reeves
0d20ef
(cherry picked from commit 63d67ac8ac6ae609514c995704a4dbd6f5ff5647)
0d20ef
---
0d20ef
 v2v/convert_linux.ml | 8 +++++++-
0d20ef
 1 file changed, 7 insertions(+), 1 deletion(-)
0d20ef
0d20ef
diff --git a/v2v/convert_linux.ml b/v2v/convert_linux.ml
0d20ef
index e85a0d5..6e45ac8 100644
0d20ef
--- a/v2v/convert_linux.ml
0d20ef
+++ b/v2v/convert_linux.ml
0d20ef
@@ -1373,8 +1373,14 @@ let rec convert ~verbose ~keep_serial_console (g : G.guestfs) inspect source =
0d20ef
 
0d20ef
     (* Delete blkid caches if they exist, since they will refer to the old
0d20ef
      * device names.  blkid will rebuild these on demand.
0d20ef
+     *
0d20ef
+     * Delete the LVM cache since it will contain references to the
0d20ef
+     * old devices (RHBZ#1164853).
0d20ef
      *)
0d20ef
-    List.iter g#rm_f ["/etc/blkid/blkid.tab"; "/etc/blkid.tab"]
0d20ef
+    List.iter g#rm_f [
0d20ef
+      "/etc/blkid/blkid.tab"; "/etc/blkid.tab";
0d20ef
+      "/etc/lvm/cache/.cache"
0d20ef
+    ];
0d20ef
   in
0d20ef
 
0d20ef
   augeas_grub_configuration ();
0d20ef
-- 
0d20ef
1.8.3.1
0d20ef