diff options
author | Jeremy Katz <katzj@redhat.com> | 2004-10-19 20:30:56 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2004-10-19 20:30:56 +0000 |
commit | f406739beead2da7d90cf2c03e48654da6d3bdcf (patch) | |
tree | e384025e357b9e35552bf5dc3d8973cc99fabe23 | |
parent | 39dc5ac7ca7b8352af0c450217dd9e46f0784170 (diff) | |
download | anaconda-f406739beead2da7d90cf2c03e48654da6d3bdcf.tar.gz anaconda-f406739beead2da7d90cf2c03e48654da6d3bdcf.tar.xz anaconda-f406739beead2da7d90cf2c03e48654da6d3bdcf.zip |
2004-10-19 Jeremy Katz <katzj@redhat.com>
* autopart.py (doAutoPartition): Don't hard code VG name for
auto-partitioned volume groups as VolGroup00 (#134263)
* partRequests.py (VolumeGroupRequestSpec.__init__): Add autoname
hack for autopart + lvm.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | autopart.py | 25 | ||||
-rw-r--r-- | partRequests.py | 4 |
3 files changed, 29 insertions, 6 deletions
@@ -1,5 +1,11 @@ 2004-10-19 Jeremy Katz <katzj@redhat.com> + * autopart.py (doAutoPartition): Don't hard code VG name for + auto-partitioned volume groups as VolGroup00 (#134263) + + * partRequests.py (VolumeGroupRequestSpec.__init__): Add autoname + hack for autopart + lvm. + * packages.py (handleX11Packages): Make sure that we don't do a graphical startup if people run out of space and then go back to unselect stuff (#135895) diff --git a/autopart.py b/autopart.py index fecdd171e..ca3434bae 100644 --- a/autopart.py +++ b/autopart.py @@ -1374,15 +1374,29 @@ def doAutoPartition(dir, diskset, partitions, intf, instClass, dispatch): if valid: req.physicalVolumes.append(r.uniqueID) + # FIXME: this is a hack so that autopartition'd vgs + # can have a unique name + if req.autoname == 1 and req.volumeGroupName == "lvm": + n = lvm.createSuggestedVGName(partitions) + req.volumeGroupName = n + + if (isinstance(req, partRequests.LogicalVolumeRequestSpec)): # if the volgroup is set to a string, we probably need # to find that volgroup and use it's id if type(req.volumeGroup) == type(""): - r = partitions.getRequestByVolumeGroupName(req.volumeGroup) + r = None + if req.volumeGroup == "lvm": + for p in partitions.requests: + if isinstance(p, partRequests.VolumeGroupRequestSpec) and p.autoname == 1: + r = p + break + else: + r = partitions.getRequestByVolumeGroupName(req.volumeGroup) if r is not None: req.volumeGroup = r.uniqueID else: - raise RuntimeError, "we got screwed" + raise RuntimeError, "Unable to find the volume group for logical volume %s" %(req.logicalVolumeName,) partitions.addRequest(req) @@ -1510,12 +1524,11 @@ def autoCreateLVMPartitionRequests(autoreq): format = 1, multidrive = 1) requests.append(nr) - # FIXME: need to make this name change since they could have an existing - # VolGroup00 nr = partRequests.VolumeGroupRequestSpec(fstype = None, - vgname = "VolGroup00", + vgname = "lvm", physvols = [], format = 1) + nr.autoname = 1 requests.append(nr) volnum = 0 @@ -1540,7 +1553,7 @@ def autoCreateLVMPartitionRequests(autoreq): grow = grow, format = format, lvname = "LogVol%02d" %(volnum,), - volgroup = "VolGroup00") + volgroup = "lvm") volnum += 1 diff --git a/partRequests.py b/partRequests.py index 78e64e2b1..1d55a2a8a 100644 --- a/partRequests.py +++ b/partRequests.py @@ -702,6 +702,10 @@ class VolumeGroupRequestSpec(RequestSpec): self.pesize = pesize self.preexist = preexist + # FIXME: this is a hack so that we can set the vg name automagically + # with autopartitioning to not conflict with existing vgs + self.autoname = 0 + if preexist and preexist_size: self.preexist_size = preexist_size else: |