Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 576976

Summary: --onpart does not remove existing format first
Product: [Fedora] Fedora Reporter: Bill Nottingham <notting>
Component: anacondaAssignee: Chris Lumens <clumens>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 13CC: awilliam, dcantrell, jonathan, rvokal, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: anaconda_trace_hash:0836e5f7c09b27090f2a66cc99cb9179010295a7705dfde98a0854072b5f0487
Fixed In Version: anaconda-13.38-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 578937 (view as bug list) Environment:
Last Closed: 2010-05-06 21:33:54 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:
Bug Depends On:    
Bug Blocks: 507681    
Attachments:
Description Flags
Attached traceback automatically from anaconda. none

Description Bill Nottingham 2010-03-25 19:05:39 UTC
The following was filed automatically by anaconda:
anaconda 13.35 exception report
Traceback (most recent call first):
  File "/usr/lib/anaconda/storage/devices.py", line 2039, in size
    size += max(0, self.align(pv.size - pv.format.peStart))
  File "/usr/lib/anaconda/storage/devices.py", line 2057, in freeSpace
    size = self.size
  File "/usr/lib/anaconda/storage/partitioning.py", line 1533, in growLVM
    total_free = vg.freeSpace
  File "/usr/lib/anaconda/storage/partitioning.py", line 220, in doAutoPartition
    growLVM(anaconda.storage)
  File "/usr/lib/anaconda/dispatch.py", line 205, in moveStep
    rc = stepFunc(self.anaconda)
  File "/usr/lib/anaconda/dispatch.py", line 126, in gotoNext
    self.moveStep()
  File "/usr/lib/anaconda/text.py", line 659, in run
    anaconda.dispatch.gotoNext()
  File "/usr/bin/anaconda", line 1187, in <module>
    anaconda.intf.run(anaconda)
AttributeError: 'Ext4FS' object has no attribute 'peStart'

Comment 1 Bill Nottingham 2010-03-25 19:05:43 UTC
Created attachment 402649 [details]
Attached traceback automatically from anaconda.

Comment 2 Bill Nottingham 2010-03-25 19:06:20 UTC
This happened when attempting to replace a lvm formatted system with:

part / --onpart=sda2 --fstype=ext4
part /boot --onpart=sda1 --fstype=ext4

Comment 3 Bill Nottingham 2010-03-25 19:14:25 UTC
ks is:

install
url --url=http://download.fedora.devel.redhat.com/pub/fedora/linux/development/13/x86_64/os/
lang en_US.UTF-8
keyboard us
network --device eth0 --bootproto dhcp
firewall --service=ssh
authconfig --enableshadow --passalgo=sha512 --enablefingerprint
selinux --enforcing
timezone --utc America/New_York
bootloader --location=mbr --driveorder=sda --append="rhgb quiet"
repo --name=updates-testing --mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-testing-f$releasever&arch=$basearch

#clearpart --all
part / --onpart=sda2 --fstype=ext4
part /boot --onpart=sda1 --fstype=ext4

%packages --ignoremissing
ConsoleKit-devel
<a bunch of other stuff>

Comment 4 David Lehman 2010-03-25 19:20:32 UTC
We aren't scheduling format destroy actions for the preexisting formats when handling onpart. We need to be doing a recursive destroy starting with those formats, eg: lvmpv->lvmvg->lvmlv(s)

Comment 5 Adam Williamson 2010-05-03 18:31:18 UTC
Bill, this should be fixed in current builds (inc. TC1), as per the 'fixed in' field. Can you please test and confirm? Thanks.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 6 Adam Williamson 2010-05-04 23:16:07 UTC
Ping?

Comment 7 Bill Nottingham 2010-05-05 15:37:57 UTC
I have not had time to test this.

Comment 8 Adam Williamson 2010-05-06 13:48:26 UTC
So, to test this correctly, all you need to do is do a kickstart install using --onpart to ask the installer to convert a partition currently occupied by an LVM into a raw ext4 partition, right?



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 9 Bill Nottingham 2010-05-06 16:15:16 UTC
Correct.

Comment 10 Adam Williamson 2010-05-06 16:30:17 UTC
okay, I should be able to test this later today.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 11 Adam Williamson 2010-05-06 20:19:25 UTC
Tested this with 0505 boot.iso. Seems to work. I first did an install with default partitioning - so a swap partition and an LVM with / and /boot. Then I replaced it with this ks: http://www.happyassassin.net/extras/test.ks . It uses the original /boot partition as swap, and replaces the LVM with an ext4 / partition. It got happily through partitioning stage and started installing packages, whereupon I stopped it because I don't have all night. :)

Comment 12 Jesse Keating 2010-05-06 21:33:54 UTC
Closing this since the update is already pushed to stable.