From 86881afeef6457bcb26c7ded52b866573c68334d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 12 Feb 2020 21:57:34 +0100 Subject: [PATCH] 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 --- qubes/storage/lvm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index dff5c3a1..b2050399 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -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)