storage/lvm: add more details to refused volume shrink message

Include old and new size.
This commit is contained in:
Marek Marczykowski-Górecki 2018-02-07 01:45:53 +01:00
parent 4e314c9792
commit e6bb2828f1
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -425,9 +425,9 @@ class ThinVolume(qubes.storage.Volume):
if size < self.size:
raise qubes.storage.StoragePoolException(
'For your own safety, shrinking of %s is'
' disabled. If you really know what you'
' disabled (%d < %d). If you really know what you'
' are doing, use `lvresize` on %s manually.' %
(self.name, self.vid))
(self.name, size, self.size, self.vid))
if size == self.size:
return