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
This commit is contained in:
parent
c332de9653
commit
6b474e39f6
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user