From 6b474e39f608d3abb6dce2e91991ac56fdee3171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 12 Feb 2020 21:44:16 +0100 Subject: [PATCH] storage/lvm: update volume.size attribute on resize When volume is resized, underlying LVM is adjusted if exists. For persistent volumes it is enough, as generally the driver prefers underlying LVM size than internal attribute. But volatile volume is removed at vm shutdown, so that value is lost. Fix it by updating Volume.size attribute too, to be updated in qubes.xml later too. Fixes QubesOS/qubes-issues#5645 --- qubes/storage/lvm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index 1cf94536..dff5c3a1 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -665,6 +665,8 @@ class ThinVolume(qubes.storage.Volume): elif self.save_on_stop or not self.snap_on_start: cmd = ['extend', self._vid_current, str(size)] yield from qubes_lvm_coro(cmd, self.log) + + self._size = size yield from reset_cache_coro() @asyncio.coroutine