Bug 493575

Summary: Off by one error calculating free extents
Product: [Fedora] Fedora Reporter: Andreas Thienemann <andreas>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: bcl, cochranb, internetbummer, jlaska, pjones, rmaximo, tcallawa, tuju, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-06 17:28:06 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 495965    
Description Flags
anaconda logfile with traceback
program log
fdisk -l output
pvdisplay output
vgdisplay output
fdisk x p output showing sectors instead of cylinders
"parted /dev/sda unit S print free" output
"parted /dev/sda unit S print free" output
lvm pvs output
cryptsetup luksDump /dev/sda4
anacdump.txt none

Description Andreas Thienemann 2009-04-02 06:37:47 EDT
Description of problem:
When doing a default installation of current rawhide on a system without any raid, anaconda fails when creating the lv for the swap partition:

Running... ['lvm', 'lvcreate', '-L', '1952m', '-n', 'lv_swap', '--config', ' devices { filter=["r|fd0|"] } ', 'vg_erika']
  Insufficient free extents (487) in volume group vg_erika: 488 required

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install rawhide via network
2. Click through to the partitioning screen
3. Select defaults, klick next.
anaconda.log and program.log are attached.
Comment 1 Andreas Thienemann 2009-04-02 06:40:31 EDT
Created attachment 337767 [details]
anaconda logfile with traceback
Comment 2 Andreas Thienemann 2009-04-02 06:41:33 EDT
Created attachment 337768 [details]
program log
Comment 3 Andreas Thienemann 2009-04-02 06:47:19 EDT
Created attachment 337769 [details]
fdisk -l output
Comment 4 Andreas Thienemann 2009-04-02 06:48:03 EDT
Created attachment 337770 [details]
pvdisplay output
Comment 5 Andreas Thienemann 2009-04-02 06:49:20 EDT
Created attachment 337772 [details]
vgdisplay output
Comment 6 Andreas Thienemann 2009-04-02 07:01:46 EDT
regarding the fdisk output, a bit of clarification might be useful:

[query(hansg)] So your wiping the disk? Iow selecting automatic partitioning use entire disk, or ?
[query(ixs)] nope
[query(ixs)] default partitioning says replace existing linux partitions.
[query(ixs)] as there's no existing linux, it simply uses the freespace and leaves the ntfs partitions alone.
[query(hansg)] Ok, so there are pre-existing ntfs partitions, but I see you included fdisk -l output already, so that should be clear from the bug
[12:54] [query(ixs)] yes. the two linux partitions were created in the empty space at the end of the disk. fdisk as well as {vg,pv}display were taken after the crash.
Comment 7 Andreas Thienemann 2009-04-02 07:03:06 EDT
Created attachment 337774 [details]
fdisk x p output showing sectors instead of cylinders
Comment 8 Andreas Thienemann 2009-04-02 08:09:20 EDT
Created attachment 337790 [details]
"parted /dev/sda unit S print free" output 

"parted /dev/sda unit S print free" output before partitioning with anaconda
Comment 9 Andreas Thienemann 2009-04-02 08:11:13 EDT
Created attachment 337791 [details]
"parted /dev/sda unit S print free" output 

"parted /dev/sda unit S print free" output after partitioning with anaconda
Comment 10 Andreas Thienemann 2009-04-02 08:15:08 EDT
Created attachment 337792 [details]
lvm pvs output

lvm pvs --units k --nosuffix --nameprefixes --rows --unquoted --noheadings                     --opv_name,pv_uuid,pv_size,vg_name,vg_uuid,pv_pe_count,pv_pe_alloc_count,pe_start
output after partitioning by anaconda
Comment 11 Chris Lumens 2009-04-06 13:32:32 EDT
*** Bug 492354 has been marked as a duplicate of this bug. ***
Comment 12 Bob Cochran 2009-04-07 18:23:01 EDT
Are there any workarounds for this bug and/or 493523 which was closed as a duplicate of this bug? I don't think I can install the beta without a fix for this. Is the recent announcement that some beta iso's have been reissued related to either of these? Thanks, Bob
Comment 13 Andreas Thienemann 2009-04-07 19:55:12 EDT
A simple workaround is to select the "Review partition layout" and then reduce the size of the offending partition (should be the last logical volume) a bit.

Usually the extend size is 4MB, so if say your swap partition is planned to be 1024MB, simply change the size to 1020MB and you should be good.
Comment 14 Bob Cochran 2009-04-09 16:15:59 EDT
The workaround in Comment #13 worked for me. Thanks!
Comment 15 Frank Murphy 2009-04-11 03:29:18 EDT
(In reply to comment #14)
> The workaround in Comment #13 worked for me. Thanks!  

worked for me as per #13
Comment 16 Chris Lumens 2009-04-13 10:19:45 EDT
*** Bug 495268 has been marked as a duplicate of this bug. ***
Comment 17 Andreas Thienemann 2009-04-14 10:00:26 EDT
Following a hunch from dlehman:

This error only manifests when selecting encryption.
Running unencrypted, the partitioning suceeds.
Comment 18 Andreas Thienemann 2009-04-14 11:45:50 EDT
Created attachment 339517 [details]
cryptsetup luksDump /dev/sda4
Comment 19 Andreas Thienemann 2009-04-14 16:52:33 EDT
Created attachment 339578 [details]
Comment 20 David Lehman 2009-04-15 13:00:41 EDT
This will be fixed in anaconda-
Comment 21 Chris Lumens 2009-04-15 16:09:59 EDT
*** Bug 495785 has been marked as a duplicate of this bug. ***
Comment 22 eric@christensenplace.us 2009-04-19 11:10:13 EDT
comment #13 worked for me.