[rhel5-branch][PATCH] Fix LVM reuse failing on HP CCISS Hardware (#751351)

Martin Kolman mkolman at gmail.com
Wed May 29 16:08:45 UTC 2013


The output of the lvm tool, used to detect LVM volumes
for reuse is ! delimited, but anaconda expect the path to be
delimited by a slash.

Replacing the ! with a / fixes the issue and enables correct
volume reuse.

Signed-off-by: Martin Kolman <mkolman at gmail.com>
---
 lvm.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/lvm.py b/lvm.py
index 64f6afe..952c1e6 100644
--- a/lvm.py
+++ b/lvm.py
@@ -260,6 +260,15 @@ def pvlist():
     for line in scanout.split("\n"):
         try:
             (dev, vg, size) = line.strip().split(':')
+            # the lvm tool returns path to cciss pvs,
+            # which is delimited by !, example:
+            # /dev/cciss!c0d0p1
+            # but everywhere else Anaconda uses a slash delimited paths
+            # the above example should hterefore look like this:
+            # /dev/cciss/c0d0p1
+            # replacing cciss! with cciss/ in the device name
+            # returned by pvlist fixes this inconsistency
+            dev = dev.replace("cciss!", "cciss/")
             size = long(math.floor(long(size) / (1024 * 1024)))
         except:
             continue
-- 
1.8.1.4



More information about the anaconda-patches mailing list