summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCole Robinson <crobinso@redhat.com>2013-03-13 14:29:22 (GMT)
committerCole Robinson <crobinso@redhat.com>2013-03-13 14:29:22 (GMT)
commit507640ea85023ccdd7f49f522b5637e44f207030 (patch)
tree02c1e8c6df526aa40c50ff922a77befd97238848
parent46a3d2c57f62ff96b2cb81733505182fd1f57cce (diff)
downloadvirt-manager-507640ea85023ccdd7f49f522b5637e44f207030.zip
virt-manager-507640ea85023ccdd7f49f522b5637e44f207030.tar.gz
virt-manager-507640ea85023ccdd7f49f522b5637e44f207030.tar.xz
createvol: Don't default to sparse LVM
Sparse LVM volumes don't autogrow, which makes them not as useful for virt-manager target users. Don't do it by default
-rw-r--r--src/virtManager/createvol.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/virtManager/createvol.py b/src/virtManager/createvol.py
index d86a213..4925ba3 100644
--- a/src/virtManager/createvol.py
+++ b/src/virtManager/createvol.py
@@ -135,9 +135,14 @@ class vmmCreateVolume(vmmGObjectUI):
else:
self.widget("vol-format").set_sensitive(False)
+ alloc = DEFAULT_ALLOC
+ if self.parent_pool.get_type() == "logical":
+ # Sparse LVM volumes don't auto grow, so alloc=0 is useless
+ alloc = DEFAULT_CAP
+
self.widget("vol-allocation").set_range(0,
int(self.parent_pool.get_available() / 1024 / 1024))
- self.widget("vol-allocation").set_value(DEFAULT_ALLOC)
+ self.widget("vol-allocation").set_value(alloc)
self.widget("vol-capacity").set_range(1,
int(self.parent_pool.get_available() / 1024 / 1024))
self.widget("vol-capacity").set_value(DEFAULT_CAP)