Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions library/blivet.py
Original file line number Diff line number Diff line change
Expand Up @@ -1854,17 +1854,16 @@
grow_pv_candidates = [pv for pv in self._device.pvs if pv not in remove_pvs and pv not in add_disks]

for pv in grow_pv_candidates:
if abs(self._device.size - self._device.current_size) < 2 * self._device.pe_size:
continue

pv.format.update_size_info() # set pv to be resizable

if pv.format.resizable:
if not pv.format.resizable:
log.warning("cannot grow/resize PV '%s', format is not resizable", pv.name)
continue

Check warning on line 1861 in library/blivet.py

View check run for this annotation

Codecov / codecov/patch

library/blivet.py#L1859-L1861

Added lines #L1859 - L1861 were not covered by tests

if abs(pv.size - pv.format.size) > 2 * self._device.pe_size:

Check warning on line 1863 in library/blivet.py

View check run for this annotation

Codecov / codecov/patch

library/blivet.py#L1863

Added line #L1863 was not covered by tests
pv.format.grow_to_fill = True
ac = ActionResizeFormat(pv, pv.size)
self._blivet.devicetree.actions.add(ac)
else:
log.warning("cannot grow/resize PV '%s', format is not resizable", pv.name)

if not (add_disks or remove_pvs):
return
Expand Down
Loading