From: Vojtech Trefny vtrefny@redhat.com
StorageDevice.readCurrentSize method implementation checks the size of devices in /sys where the size of LVM snapshots is incorrect (it reports the size of the LV instead of the actual size of the snapshot).
Signed-off-by: Vojtech Trefny vtrefny@redhat.com --- blivet/devices/lvm.py | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py index d7526e4..cbd4da1 100644 --- a/blivet/devices/lvm.py +++ b/blivet/devices/lvm.py @@ -966,6 +966,11 @@ def dependsOn(self, dep): return (self.origin == dep or super(LVMSnapShotBase, self).dependsOn(dep))
+ def readCurrentSize(self): + # override StorageDevice.readCurrentSize because /sys reports wrong size + # for snapshots + return self._size + class LVMThinPoolDevice(LVMLogicalVolumeDevice): """ An LVM Thin Pool """ _type = "lvmthinpool"