[master 1/5] Don't constrain thin lv sizes to vg free space.
dwlehman
installerbot-noreply at redhat.com
Fri Jul 24 21:41:09 UTC 2015
From: David Lehman <dlehman at redhat.com>
This is a followup to a recent change in which I added a call to
the superclass size setter from thinlv's size setter.
---
blivet/devices/lvm.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/blivet/devices/lvm.py b/blivet/devices/lvm.py
index 8624fee..094f216 100644
--- a/blivet/devices/lvm.py
+++ b/blivet/devices/lvm.py
@@ -613,7 +613,9 @@ def _setSize(self, size):
# Don't refuse to set size if we think there's not enough space in the
# VG for an existing LV, since it's existence proves there is enough
# space for it.
- if not self.exists and size > self.vg.freeSpace + self.vgSpaceUsed:
+ if not self.exists and \
+ not isinstance(self, LVMThinLogicalVolumeDevice) and \
+ size > self.vg.freeSpace + self.vgSpaceUsed:
log.error("failed to set size: %s short", size - (self.vg.freeSpace + self.vgSpaceUsed))
raise ValueError("not enough free space in volume group")
--
To view this commit on github, visit https://github.com/rhinstaller/blivet/commit/d7fd2db5e4374dafa80beabcaf009ac26fec8821
More information about the anaconda-patches
mailing list