diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-10-16 23:38:19 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-10-16 23:38:19 +0000 |
commit | 86e86f87a2bd23851019d21a982925776da2409b (patch) | |
tree | b21c8266a1ecb1406556adfe8f5acc76bd50f74b /fsset.py | |
parent | 04a378fbc46ece5c4f87c07b06f02f4ec34f1cd2 (diff) | |
download | anaconda-86e86f87a2bd23851019d21a982925776da2409b.tar.gz anaconda-86e86f87a2bd23851019d21a982925776da2409b.tar.xz anaconda-86e86f87a2bd23851019d21a982925776da2409b.zip |
read the chunk size of preexisting raid devices and reuse it (#101518)
Diffstat (limited to 'fsset.py')
-rw-r--r-- | fsset.py | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -1664,7 +1664,8 @@ class RAIDDevice(Device): # members is a list of Device based instances that will be # a part of this raid device - def __init__(self, level, members, minor=-1, spares=0, existing=0): + def __init__(self, level, members, minor=-1, spares=0, existing=0, + chunksize = 64): Device.__init__(self) self.level = level self.members = members @@ -1672,6 +1673,7 @@ class RAIDDevice(Device): self.numDisks = len(members) - spares self.isSetup = existing self.doLabel = None + self.chunksize = chunksize if len(members) < spares: raise RuntimeError, ("you requiested more spare devices " @@ -1715,7 +1717,7 @@ class RAIDDevice(Device): self.device,) entry = entry + "raid-level %d\n" % (self.level,) entry = entry + "nr-raid-disks %d\n" % (self.numDisks,) - entry = entry + "chunk-size 64k\n" + entry = entry + "chunk-size %d\n" %(self.chunksize,) entry = entry + "persistent-superblock 1\n" entry = entry + "nr-spare-disks %d\n" % (self.spares,) i = 0 |