summaryrefslogtreecommitdiffstats
path: root/partitioning.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-01-25 08:16:30 +0000
committerJeremy Katz <katzj@redhat.com>2002-01-25 08:16:30 +0000
commitbe5b687ba39eb7e8e8650384850e541df73c6cf0 (patch)
treeba08f1f6a88f9712db6ca18d035ca52091693c38 /partitioning.py
parent1f43e5e7b546fe7cafca8163f62f51e504e07eb7 (diff)
downloadanaconda-be5b687ba39eb7e8e8650384850e541df73c6cf0.tar.gz
anaconda-be5b687ba39eb7e8e8650384850e541df73c6cf0.tar.xz
anaconda-be5b687ba39eb7e8e8650384850e541df73c6cf0.zip
we can actually create logical volumes now
Diffstat (limited to 'partitioning.py')
-rw-r--r--partitioning.py37
1 files changed, 30 insertions, 7 deletions
diff --git a/partitioning.py b/partitioning.py
index a4510a566..645614da3 100644
--- a/partitioning.py
+++ b/partitioning.py
@@ -772,7 +772,8 @@ class PartitionSpec:
constraint = None, migrate = None,
raidmembers = None, raidlevel = None,
raidspares = None, badblocks = None, fslabel = None,
- physvolumes = None, vgname = None, volgroup = None):
+ physvolumes = None, vgname = None,
+ volgroup = None, volname = None):
#
# requesttype: REQUEST_PREEXIST or REQUEST_NEW or REQUEST_RAID
#
@@ -815,7 +816,8 @@ class PartitionSpec:
self.volumeGroupName = vgname
# logical volume specific. volgroup is the uniqueID of the VG
- self.volumeGroup = volgroup
+ self.volumeGroup = volgroup
+ self.logicalVolumeName = volname
# fs label (if pre-existing, otherwise None)
self.fslabel = fslabel
@@ -854,7 +856,10 @@ class PartitionSpec:
" raidspares: %s" % (self.raidspares)+\
" raidmembers: %s\n" % (raidmem)+\
" vgname: %s" % (self.volumeGroupName)+\
- " physical volumes: %s" % (self.physicalVolumes)
+ " physical volumes: %s\n" % (self.physicalVolumes)+\
+ " parent volume group: %s" % (self.volumeGroup)+\
+ " logical volume name: %s" % (self.logicalVolumeName)
+
# turn a partition request into a fsset entry
def toEntry(self, partitions):
@@ -866,8 +871,20 @@ class PartitionSpec:
raidmems,
spares = self.raidspares)
# XXX need to handle this obviously
- elif self.type == REQUEST_LV or self.type == REQUEST_VG:
- return None
+ elif self.type == REQUEST_VG:
+ pvs = []
+ for pv in self.physicalVolumes:
+ pvs.append(partitions.getRequestByID(pv).device)
+ device = fsset.VolumeGroupDevice(self.volumeGroupName, pvs)
+ print "found volume group %s" % (self.volumeGroupName)
+ print "pvs are ", pvs
+ elif self.type == REQUEST_LV:
+ device = fsset.LogicalVolumeDevice(
+ partitions.getRequestByID(self.volumeGroup).volumeGroupName,
+ self.size,
+ self.logicalVolumeName)
+ print "found logical volume %s, vg is %s" % (self.logicalVolumeName,
+ self.volumeGroup)
else:
device = fsset.PartitionDevice(self.device)
@@ -1944,8 +1961,14 @@ def partitioningComplete(bl, fsset, diskSet, partitions, intf, instPath, dir):
# XXX hack for lvm not being complete, *must* be error condition pre-release
if entry:
fsset.add (entry)
-## else:
-## raise RuntimeError, "Managed to not get an entry back from request.toEntry"
+ else:
+ raise RuntimeError, "Managed to not get an entry back from request.toEntry"
+ print entry, entry.fsystem.name,
+ if entry.mountpoint:
+ print entry.mountpoint
+ else:
+ print ""
+
if iutil.memInstalled() > isys.EARLY_SWAP_RAM:
return
# XXX this attribute is probably going away