[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[PATCH] allow kickstart to preexisting LV w/ encrypted PV (448129)
- From: Dave Lehman <dlehman redhat com>
- To: Discussion of Development and Customization of the Red Hat Linux Installer <anaconda-devel-list redhat com>
- Subject: [PATCH] allow kickstart to preexisting LV w/ encrypted PV (448129)
- Date: Mon, 17 Nov 2008 12:10:41 -0600
The referenced bug is a failure to kickstart when the user specifies
that we install to a pre-existing logical volume which contains one or
more encrypted physical volumes.
Joel's recent patch to Partitions.setFromDisk gets us part of the way
there by prompting for a passphrase so we can look at the pv.
The second problem comes when lvm, in all it's brilliance, returns
'/dev/dm-0' from pvdisplay instead of '/dev/mapper/foo'. I have a little
patch to resolve /dev/dm-X to a useful (ie: persistent) device mapper
name.
Comments, suggestions?
I'm also curious whether people think we should stuff this into F10. I
think we should, assuming we will be building for it again anyhow.
diff --git a/lvm.py b/lvm.py
index d1de501..00f7c02 100644
--- a/lvm.py
+++ b/lvm.py
@@ -373,6 +373,19 @@ def pvlist():
size = long(math.floor(long(size) / (1024 * 1024)))
except:
continue
+
+ if dev.startswith("/dev/dm-"):
+ from block import dm
+ try:
+ sb = os.stat(dev)
+ (major, minor) = (os.major(sb.st_rdev),
os.minor(sb.st_rdev))
+ for map in dm.maps():
+ if map.dev.major == major and map.dev.minor ==
minor:
+ dev = "/dev/mapper/%s" % map.name
+ break
+ except:
+ pass
+
log.info("pv is %s in vg %s, size is %s" %(dev, vg, size))
pvs.append( (dev, vg, size) )
Dave
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]