From 439d9b87ff02f9a2f3aa77ad7e96d65cb24b1406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Sun, 5 Nov 2017 18:02:13 +0100 Subject: [PATCH] storage/lvm: fix importing different-sized volume from another pool Fixes QubesOS/qubes-issues#3257 --- qubes/storage/lvm.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qubes/storage/lvm.py b/qubes/storage/lvm.py index 8563416e..59d3ea2a 100644 --- a/qubes/storage/lvm.py +++ b/qubes/storage/lvm.py @@ -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']