qubes/storage: support on-line resize

Call `qubes.ResizeDisk` qrexec service after resizing volume, to adjust
filesystem size there.
This commit is contained in:
Marek Marczykowski-Górecki 2016-08-17 22:44:17 +02:00
parent 6e383c703d
commit 42d6fddcd3
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -309,6 +309,9 @@ class Storage(object):
if isinstance(volume, basestring): if isinstance(volume, basestring):
volume = self.vm.volumes[volume] volume = self.vm.volumes[volume]
self.get_pool(volume).resize(volume, size) self.get_pool(volume).resize(volume, size)
if self.vm.is_running():
self.vm.run_service('qubes.ResizeDisk', input=volume.name,
user='root', wait=True)
def create(self): def create(self):
''' Creates volumes on disk ''' ''' Creates volumes on disk '''