storage/lvm: fix importing different-sized volume from another pool
Fixes QubesOS/qubes-issues#3257
This commit is contained in:
parent
f3455b5d99
commit
439d9b87ff
@ -358,6 +358,8 @@ class ThinVolume(qubes.storage.Volume):
|
||||
cmd = ['clone', str(src_volume), str(self)]
|
||||
qubes_lvm(cmd, self.log)
|
||||
else:
|
||||
if src_volume.size != self.size:
|
||||
self.resize(src_volume.size)
|
||||
src_path = src_volume.export()
|
||||
cmd = ['dd', 'if=' + src_path, 'of=/dev/' + self.vid,
|
||||
'conv=sparse']
|
||||
|
Loading…
Reference in New Issue
Block a user