storage/lvm: don't try to resize non-existing lvm volumes
Volume with save_on_stop=False and snap_on_start=False exists only when VM is running and this is already handled under is_dirty() condition. For non-running VMs, skip LVM resize step and only update internal size attribute. Fixes QubesOS/qubes-issues#5645
This commit is contained in:
parent
6b474e39f6
commit
86881afeef
@ -662,7 +662,7 @@ class ThinVolume(qubes.storage.Volume):
|
||||
os.path.exists('/dev/' + self._vid_import):
|
||||
cmd = ['extend', self._vid_import, str(size)]
|
||||
yield from qubes_lvm_coro(cmd, self.log)
|
||||
elif self.save_on_stop or not self.snap_on_start:
|
||||
elif self.save_on_stop and not self.snap_on_start:
|
||||
cmd = ['extend', self._vid_current, str(size)]
|
||||
yield from qubes_lvm_coro(cmd, self.log)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user