Bug 561278

Summary: ArithmeticError: Could not align to closest sector
Product: Red Hat Enterprise Linux 6 Reporter: Martin Banas <mbanas>
Component: anacondaAssignee: Hans de Goede <hdegoede>
Status: CLOSED CURRENTRELEASE QA Contact: Martin Banas <mbanas>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: mbanas
Target Milestone: beta   
Target Release: ---   
Hardware: ppc64   
OS: Linux   
Whiteboard: anaconda_trace_hash:b811c2d43cc335feb1a11b2ba166b8a8a1ebe220c131e6784ceb94f404477a25
Fixed In Version: anaconda-13.21.9-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-02 20:44:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Attached traceback automatically from anaconda.
none
Attached traceback automatically from anaconda. none

Description Martin Banas 2010-02-03 09:00:50 UTC
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
    doPartitioning(self.storage)
  File "/usr/lib/anaconda/iw/partition_gui.py", line 1298, in deleteCB
    self.refresh(justRedraw=justRedraw)
ArithmeticError: Could not align to closest sector

Comment 1 Martin Banas 2010-02-03 09:00:54 UTC
Created attachment 388482 [details]
Attached traceback automatically from anaconda.

Comment 3 RHEL Program Management 2010-02-03 09:17:01 UTC
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
inclusion.

Comment 4 Martin Banas 2010-02-03 09:26:18 UTC
Created attachment 388484 [details]
Attached traceback automatically from anaconda.

Comment 5 Martin Banas 2010-02-03 09:34:34 UTC
Version of components:
RHEL6.0-20100201.4
anaconda-13.21.8-1.el6

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

Result:
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 10:51:43 UTC
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:
http://people.fedoraproject.org/~jwrdegoede/updates-rh561278.img

Comment 7 Hans de Goede 2010-02-03 11:59:53 UTC
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 14:20:23 UTC
Hello,

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 20:44:00 UTC
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.