diff options
author | David Lehman <dlehman@redhat.com> | 2008-03-26 13:42:03 -0500 |
---|---|---|
committer | David Lehman <dlehman@redhat.com> | 2008-03-28 11:14:39 -0500 |
commit | 37ac28ff3109f307311d595172714588501ee33b (patch) | |
tree | 26a042d7e47c302416a75ef20c91c8a762718c0f /partedUtils.py | |
parent | 74b4d56dc0ec5b33430a98895945e70c6c1682be (diff) | |
download | anaconda-37ac28ff3109f307311d595172714588501ee33b.tar.gz anaconda-37ac28ff3109f307311d595172714588501ee33b.tar.xz anaconda-37ac28ff3109f307311d595172714588501ee33b.zip |
Support discovery of preexisting rootfs on LV.
Add another pass at opening encrypted devices after starting RAID and LVM so that we can see what's on encrypted high-level devices. Also look for the correct key in the encryptedDevices dict when checking for encryption info.
Diffstat (limited to 'partedUtils.py')
-rw-r--r-- | partedUtils.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/partedUtils.py b/partedUtils.py index 4c050efa5..6cb4830bf 100644 --- a/partedUtils.py +++ b/partedUtils.py @@ -809,6 +809,11 @@ class DiskSet: lvm.vgscan() lvm.vgactivate() + for dev, crypto in self.anaconda.id.partitions.encryptedDevices.items(): + # FIXME: order these so LVM and RAID always work on the first try + if crypto.openDevice(): + log.error("failed to open encrypted device %s" % (dev,)) + for (vg, lv, size, lvorigin) in lvm.lvlist(): if lvorigin: continue @@ -816,7 +821,8 @@ class DiskSet: found = 0 theDev = dev node = "%s/%s" % (vg, lv) - crypto = self.anaconda.id.partitions.encryptedDevices.get(node) + dmnode = "mapper/%s-%s" % (vg, lv) + crypto = self.anaconda.id.partitions.encryptedDevices.get(dmnode) if crypto and not crypto.openDevice(): theDev = "/dev/%s" % (crypto.getDevice(),) elif crypto: |