--- storage/devices.py | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/storage/devices.py b/storage/devices.py index 49ad902..89595d7 100644 --- a/storage/devices.py +++ b/storage/devices.py @@ -1426,10 +1426,11 @@ class LUKSDevice(DMCryptDevice): @property def size(self): - size = super(LUKSDevice, self).size - if not size: - # break off 2KB for the LUKS header - size = float(self.slave.size) - (2.0 / 1024) + if not self.exists or not self.partedDevice: + # the LUKS header takes up 4040 512-byte sectors w/ a 512-bit key + size = float(self.slave.size) - ((4040 * 2.0) / 1024) + else: + size = self.partedDevice.getSize() return size def create(self, intf=None): -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list