-- Joel Andres Granados Brno, Czech Republic, Red Hat.
diff --git a/storage/devicelibs/lvm.py b/storage/devicelibs/lvm.py index afb7256..ed1118c 100644 --- a/storage/devicelibs/lvm.py +++ b/storage/devicelibs/lvm.py @@ -110,7 +110,7 @@ def clampSize(size, pesize, roundup=None): def pvcreate(device): rc = iutil.execWithRedirect("lvm", - ["pvcreate", device], + ["pvcreate", "-ff", device], stdout = "/dev/tty5", stderr = "/dev/tty5", searchPath=1) diff --git a/storage/devices.py b/storage/devices.py index c7ef89e..ecbec2e 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -596,7 +596,7 @@ class DiskDevice(StorageDevice): self.partedDisk = parted.Disk(device=self.partedDevice) except: # It is perfectly fine to have a device with no label. - self.partedDisk = None + self.partedDisk = parted.freshDisk(self.partedDevice, parted.diskType["msdos"]) self.probe() diff --git a/storage/partitioning.py b/storage/partitioning.py index a8ffc68..893d311 100644 --- a/storage/partitioning.py +++ b/storage/partitioning.py @@ -864,7 +864,7 @@ def growLVM(storage): # This first loop is to calculate percentage-based growth # amounts. These are based on total free space. - for lv in lvs: + for lv in vg.lvs: if not lv.req_grow or not lv.req_percent: continue @@ -883,7 +883,7 @@ def growLVM(storage): # This second loop is to calculate non-percentage-based growth # amounts. These are based on free space remaining after # calculating percentage-based growth amounts. - for lv in lvs: + for lv in vg.lvs: if not lv.req_grow or lv.req_percent: continue @@ -902,10 +902,12 @@ def growLVM(storage): continue # now grow the lvs by the amounts we've calculated above - for lv in lvs: + for lv in vg.lvs: if lv.name not in grow_amounts.keys(): continue - lv.size = new_size + #lv.size = new_size + # FIXME: Is this the correct way of setting the size? + lv._setSize(new_size) # now there shouldn't be any free space left, but if there is we # should allocate it to one of the LVs
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list