Red Hat Bugzilla – Bug 495520
An end-disk partition can't be expand
Last modified: 2010-02-23 13:48:23 EST
The following was filed automatically by anaconda:
anaconda 18.104.22.168 exception report
Traceback (most recent call first):
File "/usr/lib64/python2.6/site-packages/parted/geometry.py", line 50, in __init__
self.__geometry = _ped.Geometry(self.device.getPedDevice(), start, length)
File "/usr/lib/anaconda/storage/devices.py", line 1147, in _computeResize
File "/usr/lib/anaconda/storage/devices.py", line 949, in _setTargetSize
(constraint, geometry) = self._computeResize(self.partedPartition)
File "/usr/lib/anaconda/storage/devices.py", line 420, in <lambda>
lambda s, v: s._setTargetSize(v),
File "/usr/lib/anaconda/storage/deviceaction.py", line 242, in __init__
self.device.targetSize = newsize
File "/usr/lib/anaconda/iw/partition_dialog_gui.py", line 243, in run
File "/usr/lib/anaconda/iw/partition_gui.py", line 1121, in editPartition
actions = parteditor.run()
File "/usr/lib/anaconda/iw/partition_gui.py", line 1082, in editCB
CreateException: La partition ne peut pas être en dehors du disque !
Created attachment 339339 [details]
Attached traceback automatically from anaconda.
In English, the exception is something like "The partition can't be outside of the the disk!". In the same conditions, I was able to repeat it twice.
I have two disk : one for the data and one for the system. During the installation, I choose to create a personalised partitioning. As I have formatted my "/" partition in ext4, I created a little "/boot" partition (200MB), located at the end of the disk . Afterwards, I decided to decrease the size of the "/" in order to increase the "/boot" one. But when I tried to expand the "/boot" partition using the freed space (just next to /boot), anaconda give me this exception.
This will be fixed in pyparted-2.0.12
Scratch that, won't be fixed in pyparted-2.0.12.
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.
More information and reason for this action is here:
After investigating this problem in detail, I've found it's not a pyparted issue but rather a UI issue in anaconda. The exception we get from libparted is correct. Even though you have reduced the size of the first partition, you cannot resize the last partition on the disk to use part of that space because a resize operation only grows the filesystem, it does not move the filesystem. To accomplish what you are trying to do, you would need to move the last partition to start within the free space you just created after resizing the first partition, then resize to expand to the end of the disk.
I have patched anaconda to prevent a resize operation that would violate boundary issues:
diff --git a/iw/partition_ui_helpers_gui.py b/iw/partition_ui_helpers_gui.py
index f5650e9..fe28088 100644
@@ -380,13 +380,17 @@ def createPreExistFSOptionSection(origrequest, maintable,
value = origrequest.size
- reqlower = origrequest.minSize
+ reqlower = 1
requpper = origrequest.maxSize
- lower = reqlower
- lower = 1
- adj = gtk.Adjustment(value = value, lower = lower,
+ reqlower = origrequest.minSize
+ geomsize = origrequest.partedPartition.geometry.getSize(unit="MB")
+ if (requpper != 0) and (requpper > geomsize):
+ requpper = geomsize
+ adj = gtk.Adjustment(value = value, lower = reqlower,
upper = requpper, step_incr = 1)
resizesb = gtk.SpinButton(adj, digits = 0)
*** Bug 506877 has been marked as a duplicate of this bug. ***
Fix will be in anaconda-12.18-1.