summaryrefslogtreecommitdiffstats
path: root/pyanaconda/platform.py
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2011-02-03 05:04:42 -1000
committerDavid Cantrell <dcantrell@redhat.com>2011-02-03 05:08:23 -1000
commite4624fc02661e0ae9d637863947279f464f5f399 (patch)
tree7c5af528b29c0a89bfa5d3a7ecf042bcc842377d /pyanaconda/platform.py
parent7c77b88f409e9646181ee456fbea89fa1c351f76 (diff)
downloadanaconda-e4624fc02661e0ae9d637863947279f464f5f399.tar.gz
anaconda-e4624fc02661e0ae9d637863947279f464f5f399.tar.xz
anaconda-e4624fc02661e0ae9d637863947279f464f5f399.zip
Make singlePV a more useful boolean, clean up _getSinglePV()
Followup again to the "/boot on LVM" commits for s390x. The feature request itself is odd, but it's close to a morbid curiosity now as to whether or not it'll actually work. The main limitation with /boot on LVM on s390x is that the logical volume must be tied to a single physical volume in the volume group. Combined with the sorting change commit, the patch does the following: 1) Makes singlePV a boolean attribute on the PartSpec and LVMLogicalVolumeDevice objects. 2) Key on the singlePV attribute rather than the mountpoint so the support for logical volumes on a single PV is a little more generic. 3) Modify _getSinglePV() to read the output of the vgs(8) command and find a PV with enough free space on it for the logical volume we are creating. Once we find one, return it. If we don't find one, raise an ugly exception and explain things to the user. Now, the big gap here is what happens if there are no physical volumes of at least 500MB, since we are limiting this singlePV stuff to /boot on s390x? The answer is the user can get the exception described in #3 and do manual partitioning. I personally have never seen a DASD under 2GB, but I'm sure it's possible. I don't really care. I've fulfilled the morbid curiosity of this request and know it works. Related: rhbz#618376
Diffstat (limited to 'pyanaconda/platform.py')
-rw-r--r--pyanaconda/platform.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pyanaconda/platform.py b/pyanaconda/platform.py
index f5ca502db..ee0077736 100644
--- a/pyanaconda/platform.py
+++ b/pyanaconda/platform.py
@@ -488,7 +488,8 @@ class S390(Platform):
def setDefaultPartitioning(self):
"""Return the default platform-specific partitioning information."""
return [PartSpec(mountpoint="/boot", fstype=self.defaultBootFSType, size=500,
- weight=self.weight(mountpoint="/boot"), asVol=True)]
+ weight=self.weight(mountpoint="/boot"), asVol=True,
+ singlePV=True)]
def weight(self, fstype=None, mountpoint=None):
if mountpoint and mountpoint == "/boot":