storage/lvm: don't crash when resizing to the same size
This applies to qvm-template-postprocess, which at the beginning try to resize root volume to appropriate size. It makes more sense to silently succeed here, instead of forcing every client-side utility to check if the volume have already desired size.
This commit is contained in:
parent
ede266ca3d
commit
b8d45c214d
@ -395,6 +395,9 @@ class ThinVolume(qubes.storage.Volume):
|
||||
' are doing, use `lvresize` on %s manually.' %
|
||||
(self.name, self.vid))
|
||||
|
||||
if size == self.size:
|
||||
return
|
||||
|
||||
cmd = ['extend', self.vid, str(size)]
|
||||
qubes_lvm(cmd, self.log)
|
||||
if self.is_dirty():
|
||||
|
Loading…
Reference in New Issue
Block a user