summaryrefslogtreecommitdiffstats
path: root/fsset.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-10 23:49:09 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-10 23:49:09 +0000
commit0da9d6f2e8572eaf79195554dc830dd7f7513738 (patch)
tree16e7cdfcb55536d97fdaadf18ee8b80131d6f00a /fsset.py
parentd6e87b3651027c73a2bc8877f26cf951b6a8a952 (diff)
downloadanaconda-0da9d6f2e8572eaf79195554dc830dd7f7513738.tar.gz
anaconda-0da9d6f2e8572eaf79195554dc830dd7f7513738.tar.xz
anaconda-0da9d6f2e8572eaf79195554dc830dd7f7513738.zip
pass pesize down and actually use it in vg creation
Diffstat (limited to 'fsset.py')
-rw-r--r--fsset.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/fsset.py b/fsset.py
index ad71eeaaf..19fe5a472 100644
--- a/fsset.py
+++ b/fsset.py
@@ -1505,7 +1505,15 @@ ext2 = fileSystemTypeGet("ext2")
ext2.registerDeviceArgumentFunction(RAIDDevice, RAIDDevice.ext2Args)
class VolumeGroupDevice(Device):
- def __init__(self, name, physvols, existing = 0):
+ def __init__(self, name, physvols, pesize = 4096, existing = 0):
+ """Creates a VolumeGroupDevice.
+
+ name is the name of the volume group
+ physvols is a list of Device objects which are the physical volumes
+ pesize is the size of physical extents in kilobytes
+ existing is whether this vg previously existed.
+ """
+
Device.__init__(self)
self.physicalVolumes = physvols
self.isSetup = existing
@@ -1513,8 +1521,7 @@ class VolumeGroupDevice(Device):
self.device = name
self.isSetup = existing
- # these are attributes we might want to expose. or maybe not
- # self.physicalextentsize = 4 * 1024 * 1024
+ self.physicalextentsize = pesize
def setupDevice (self, chroot, devPrefix='/tmp'):
if not self.isSetup:
@@ -1530,7 +1537,9 @@ class VolumeGroupDevice(Device):
# there be a PhysicalVolumeDevice(PartitionDevice) ?
rc = iutil.execWithRedirect("/usr/sbin/pvcreate",
["pvcreate", "-ff", "-y",
- "-v", node],
+ "-v", "-p",
+ "%sk" %(self.physicalextentsize,),
+ node],
stdout = "/tmp/lvmout",
stderr = "/tmp/lvmout",
searchPath = 1)