summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2009-04-29 17:22:32 -1000
committerDavid Cantrell <dcantrell@redhat.com>2009-04-29 17:53:40 -1000
commit45495c9a890794f1b966fc5adbf8579b641b74cd (patch)
tree017bb27812ab68860a36ec876db9769c326e98f0
parentcd226ebd90caf06a079aeaca72b8c23616112ca8 (diff)
downloadanaconda-45495c9a890794f1b966fc5adbf8579b641b74cd.tar.gz
anaconda-45495c9a890794f1b966fc5adbf8579b641b74cd.tar.xz
anaconda-45495c9a890794f1b966fc5adbf8579b641b74cd.zip
Allow existing LVs with filesystems to be resized (#490913)
If you have an existing disk layout and choose custom partitioning and want to resize an existing logical volume and filesystem, targetSize was getting the new size value before an ActionFormatResize() was created for the device, which resulted in a traceback.
-rw-r--r--iw/lvm_dialog_gui.py5
-rw-r--r--storage/deviceaction.py2
2 files changed, 3 insertions, 4 deletions
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index f1c25968b..a24e1ee11 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -729,7 +729,6 @@ class VolumeGroupEditor:
if self.fsoptionsDict.has_key("resizecb") and self.fsoptionsDict["resizecb"].get_active():
targetSize = self.fsoptionsDict["resizesb"].get_value_as_int()
templv.targetSize = targetSize
- format.targetSize = targetSize
templv.format = format
@@ -1071,8 +1070,8 @@ class VolumeGroupEditor:
actions.append(ActionMigrateFormat(origlv))
if lv.format.resizable and \
- lv.format.targetSize != lv.format.currentSize:
- new_size = lv.format.targetSize
+ lv.targetSize != lv.format.currentSize:
+ new_size = lv.targetSize
actions.append(ActionResizeFormat(origlv, new_size))
elif lv.format.type:
log.debug("new format: %s" % lv.format.type)
diff --git a/storage/deviceaction.py b/storage/deviceaction.py
index b462108bb..61e9aa4e2 100644
--- a/storage/deviceaction.py
+++ b/storage/deviceaction.py
@@ -342,7 +342,7 @@ class ActionResizeFormat(DeviceAction):
obj = ACTION_OBJECT_FORMAT
def __init__(self, device, newsize):
- if device.targetSize == newsize:
+ if device.format.targetSize == newsize:
raise ValueError("new size same as old size")
DeviceAction.__init__(self, device)