/[smeserver]/cdrom.image/sme9/updates/storage/devices.py
ViewVC logotype

Diff of /cdrom.image/sme9/updates/storage/devices.py

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

Revision 1.1 by charliebrady, Tue Jul 30 21:01:52 2013 UTC Revision 1.4 by wellsi, Tue Dec 3 04:23:48 2013 UTC
# Line 1879  class LVMVolumeGroupDevice(DMDevice): Line 1879  class LVMVolumeGroupDevice(DMDevice):
1879    
1880          # TODO: validate peSize if given          # TODO: validate peSize if given
1881          if not self.peSize:          if not self.peSize:
1882              self.peSize = 4.0   # MB              self.peSize = 32.0   # MB
1883    
1884          if not self.exists:          if not self.exists:
1885              self.pvCount = len(self.parents)              self.pvCount = len(self.parents)
# Line 2249  class LVMVolumeGroupDevice(DMDevice): Line 2249  class LVMVolumeGroupDevice(DMDevice):
2249          used = sum(lv.vgSpaceUsed for lv in self.lvs) + self.snapshotSpace          used = sum(lv.vgSpaceUsed for lv in self.lvs) + self.snapshotSpace
2250          used += self.reservedSpace          used += self.reservedSpace
2251          free = self.size - used          free = self.size - used
2252    
2253            pad = self.peSize * 2 * len(self.pvs)
2254            if free >= pad:
2255                free -= pad
2256    
2257          log.debug("vg %s has %dMB free" % (self.name, free))          log.debug("vg %s has %dMB free" % (self.name, free))
2258          return free          return free
2259    
# Line 3139  class MDRaidArrayDevice(StorageDevice): Line 3144  class MDRaidArrayDevice(StorageDevice):
3144    
3145              disks = [disk.path for disk in self.devices]              disks = [disk.path for disk in self.devices]
3146              spares = len(self.devices) - self.memberDevices              spares = len(self.devices) - self.memberDevices
3147    
3148                # allow creation of degraded arrays
3149                if len(disks) == 1:
3150                    disks.append("missing")
3151    
3152              mdraid.mdcreate(self.path,              mdraid.mdcreate(self.path,
3153                              self.level,                              self.level,
3154                              disks,                              disks,


Legend:
Removed lines/characters  
Changed lines/characters
  Added lines/characters

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed