Bug 495520 - An end-disk partition can't be expand
Summary: An end-disk partition can't be expand
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 11
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
Assignee: David Cantrell
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: anaconda_trace_hash:477af5daf7979b6f1...
: 506877 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-04-13 16:20 UTC by Martin-Gomez Pablo
Modified: 2010-02-23 18:48 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-02-23 18:48:23 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Attached traceback automatically from anaconda. (129.64 KB, text/plain)
2009-04-13 16:20 UTC, Martin-Gomez Pablo
no flags Details

Description Martin-Gomez Pablo 2009-04-13 16:20:27 UTC
The following was filed automatically by anaconda:
anaconda 11.5.0.38 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
    length=newLen)
  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
    actions.append(ActionResizeDevice(request, size))
  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
    self.editPartition(device)
CreateException: La partition ne peut pas être en dehors du disque !

Comment 1 Martin-Gomez Pablo 2009-04-13 16:20:39 UTC
Created attachment 339339 [details]
Attached traceback automatically from anaconda.

Comment 2 Martin-Gomez Pablo 2009-04-14 10:22:17 UTC
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.

Comment 3 David Cantrell 2009-04-15 02:37:24 UTC
This will be fixed in pyparted-2.0.12

Comment 4 David Cantrell 2009-04-15 03:13:40 UTC
Scratch that, won't be fixed in pyparted-2.0.12.

Comment 5 Bug Zapper 2009-06-09 13:45:45 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 6 David Cantrell 2009-08-25 01:52:44 UTC
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
--- a/iw/partition_ui_helpers_gui.py
+++ b/iw/partition_ui_helpers_gui.py
@@ -380,13 +380,17 @@ def createPreExistFSOptionSection(origrequest, maintable, 
         else:
             value = origrequest.size
 
-        reqlower = origrequest.minSize
+        reqlower = 1
         requpper = origrequest.maxSize
+
         if origfs.exists:
-            lower = reqlower
-        else:
-            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)
         resizesb.set_property('numeric', True)

Comment 7 David Cantrell 2009-08-25 02:46:13 UTC
*** Bug 506877 has been marked as a duplicate of this bug. ***

Comment 8 David Cantrell 2009-08-26 20:14:27 UTC
Fix will be in anaconda-12.18-1.


Note You need to log in before you can comment on or make changes to this bug.