Merge remote-tracking branch 'origin/pr/320'

* origin/pr/320:
  storage/lvm: don't try to resize non-existing lvm volumes
  storage/lvm: update volume.size attribute on resize
This commit is contained in:
Marek Marczykowski-Górecki 2020-03-09 18:34:49 +01:00
commit 135eda0582
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -662,9 +662,11 @@ 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)
self._size = size
yield from reset_cache_coro()
@asyncio.coroutine