Bug 561278 - ArithmeticError: Could not align to closest sector
ArithmeticError: Could not align to closest sector
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
ppc64 Linux
medium Severity medium
: beta
: ---
Assigned To: Hans de Goede
Martin Banas
Depends On:
  Show dependency treegraph
Reported: 2010-02-03 04:00 EST by Martin Banas
Modified: 2010-07-02 16:44 EDT (History)
1 user (show)

See Also:
Fixed In Version: anaconda-13.21.9-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2010-07-02 16:44:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Attached traceback automatically from anaconda. (218.56 KB, text/plain)
2010-02-03 04:00 EST, Martin Banas
no flags Details
Attached traceback automatically from anaconda. (184.54 KB, text/plain)
2010-02-03 04:26 EST, Martin Banas
no flags Details

  None (edit)
Description Martin Banas 2010-02-03 04:00:50 EST
The following was filed automatically by anaconda:
anaconda 13.21.8 exception report
Traceback (most recent call first):
  File "/usr/lib64/python2.6/site-packages/parted/alignment.py", line 102, in alignNearest
    return self.__alignment.align_nearest(geom.getPedGeometry(), sector)
  File "/usr/lib64/python2.6/site-packages/parted/decorators.py", line 30, in localeC
    ret = fn(*args, **kwds)
  File "<string>", line 2, in alignNearest
  File "/usr/lib/anaconda/storage/partitioning.py", line 728, in getFreeRegions
    f.start = disk.format.alignment.alignNearest(f, f.start)
  File "/usr/lib/anaconda/storage/partitioning.py", line 794, in doPartitioning
    free = getFreeRegions(disks)
  File "/usr/lib/anaconda/iw/partition_gui.py", line 1583, in refresh
  File "/usr/lib/anaconda/iw/partition_gui.py", line 1298, in deleteCB
ArithmeticError: Could not align to closest sector
Comment 1 Martin Banas 2010-02-03 04:00:54 EST
Created attachment 388482 [details]
Attached traceback automatically from anaconda.
Comment 3 RHEL Product and Program Management 2010-02-03 04:17:01 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
Comment 4 Martin Banas 2010-02-03 04:26:18 EST
Created attachment 388484 [details]
Attached traceback automatically from anaconda.
Comment 5 Martin Banas 2010-02-03 04:34:34 EST
Version of components:

Steps to Reproduce:
1. prepare the testing environment by installing RHEL6.0-20100201.4 using default autopartitioning (LVM)

2. Start the installation of RHEL6.0-20100201.4 again, select any installation method and proceed to stage2.
3. In graphical installation, proceed to partitioning dialog.
4. Click on "Create custom layout".
5. Delete lv_root, lv_home and lv_swap, after that try to delete LVM PV

Anaconda crashes with traceback

Expected result: 
the installation should continue, user should be able to delete LVM PV from previous installation
Comment 6 Hans de Goede 2010-02-03 05:51:43 EST
I can reproduce this. The problem is that we create a partition layout like this:

partition startsector endsector
/boot     2048        1026047
PV        1026048     xxxxxxxxxx

Then when the PV gets deleted, we call getFreeRegions() (which is fine), but
parted gives us a free region with a geometry starting at sector 63 and ending
at sector 2047, which we then try to align to our 2048 grain, which fails for the starting sector. When we fail to align, this means that the free region is to small to create an aligned partition in there, and we should just skip it.

Here is an updates.img fixing this:
Comment 7 Hans de Goede 2010-02-03 06:59:53 EST
The fix for this will be in the next anaconda build: anaconda-13.21.9-1, putting in modified.
Comment 9 Martin Banas 2010-02-04 09:20:23 EST

Working correctly on newest build RHEL6.0-20100203.3 with anaconda-13.21.9-1.

Closing this bug as VERIFIED.
Comment 10 releng-rhel@redhat.com 2010-07-02 16:44:00 EDT
Red Hat Enterprise Linux Beta 2 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

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