Bug 503681 - kickstart loses existing LVM config
Summary: kickstart loses existing LVM config
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda   
(Show other bugs)
Version: rawhide
Hardware: All Linux
Target Milestone: ---
Assignee: Radek Vykydal
QA Contact: Fedora Extras Quality Assurance
Whiteboard: https://fedoraproject.org/wiki/Common...
Keywords: CommonBugs, Reopened
: 504913 505575 508455 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2009-06-02 07:13 UTC by Allen Kistler
Modified: 2010-11-28 15:44 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-07-21 23:08:48 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
ks to reuse existing lvm vg (497 bytes, text/plain)
2009-06-02 07:13 UTC, Allen Kistler
no flags Details
i386 Preview anaconda.log (ks works) (31.16 KB, text/plain)
2009-06-02 07:14 UTC, Allen Kistler
no flags Details
i386 Preview program.log (ks works) (4.30 KB, text/plain)
2009-06-02 07:15 UTC, Allen Kistler
no flags Details
i386 Preview storage.log (ks works) (45.33 KB, text/plain)
2009-06-02 07:16 UTC, Allen Kistler
no flags Details
i386 Preview syslog (ks works) (24.73 KB, text/plain)
2009-06-02 07:16 UTC, Allen Kistler
no flags Details
i386 RC2 anaconda.log (ks doesn't work) (11.08 KB, text/plain)
2009-06-02 07:17 UTC, Allen Kistler
no flags Details
i386 RC2 program.log (ks doesn't work) (813 bytes, text/plain)
2009-06-02 07:18 UTC, Allen Kistler
no flags Details
i386 RC2 storage.log (ks doesn't work) (17.18 KB, text/plain)
2009-06-02 07:18 UTC, Allen Kistler
no flags Details
i386 RC2 syslog (ks doesn't work) (23.81 KB, text/plain)
2009-06-02 07:19 UTC, Allen Kistler
no flags Details

Description Allen Kistler 2009-06-02 07:13:57 UTC
Created attachment 346197 [details]
ks to reuse existing lvm vg

Description of problem:
Kickstart installations from the F11-rc2 DVD which attempt to reuse existing LVM volume groups (volgroup --useexisting) will fail with an error that the VG name is not recognized.  Anaconda cannot reuse LVM PV partitions in any existing volume groups.  Semi-automatic kickstart installations with manual layout also exhibit the issue.  This bug did not exist with the F11-preview DVD.

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

How reproducible:

Steps to Reproduce:
1. create a ks.cfg which reuses existing volume groups
2. install with the kickstart
Actual results:
The following error was found while parsing your kickstart configuration
The following problem occurred on line 17 of the kickstart file
No preexisting VG with the name "vg0" was found

Expected results:
Successful installation

Additional info:
The same kickstart works fine with F11-preview.
This is yet another regression from Preview to RC2.

Before F11 installation, the disk is laid out as follows:

sda1 /boot
sda2 swap
sda3 lvm pv of volume group vg0

Volume group vg0 contains
f9 - the F9 /
free space to become the F11 /

Comment 1 Allen Kistler 2009-06-02 07:14:52 UTC
Created attachment 346198 [details]
i386 Preview anaconda.log (ks works)

Comment 2 Allen Kistler 2009-06-02 07:15:27 UTC
Created attachment 346199 [details]
i386 Preview program.log (ks works)

Comment 3 Allen Kistler 2009-06-02 07:16:02 UTC
Created attachment 346200 [details]
i386 Preview storage.log (ks works)

Comment 4 Allen Kistler 2009-06-02 07:16:42 UTC
Created attachment 346201 [details]
i386 Preview syslog (ks works)

Comment 5 Allen Kistler 2009-06-02 07:17:17 UTC
Created attachment 346202 [details]
i386 RC2 anaconda.log (ks doesn't work)

Comment 6 Allen Kistler 2009-06-02 07:18:19 UTC
Created attachment 346203 [details]
i386 RC2 program.log (ks doesn't work)

Comment 7 Allen Kistler 2009-06-02 07:18:52 UTC
Created attachment 346204 [details]
i386 RC2 storage.log (ks doesn't work)

Comment 8 Allen Kistler 2009-06-02 07:19:25 UTC
Created attachment 346205 [details]
i386 RC2 syslog (ks doesn't work)

Comment 9 Radek Vykydal 2009-06-02 13:08:50 UTC
I looked into it and it seems we are not setting DeviceTree.clearPartType correctly somewhere (it is set to default CLEARPART_TYPE_LINUX, while it should be CLEARPART_TYPE_NONE), so the existing vg device is not added to devicetree during storage initialization because it it doesn't pass this check:(storage.devicetree.py:1529)

        if shouldClear(device, self.clearPartType, self.clearPartDisks,
            # if this is a partition that will be cleared by clearpart,
            # don't bother with format-specific processing

The clearPartType setting became hard to follow in the code through the storage rewrite, and as Chris did some changes of it recently, I think he'll know better where/how to change it (if I am right).

Comment 10 Radek Vykydal 2009-06-03 10:30:21 UTC
I posted a patch for review. It makes attached ks work for me. You can try this updates file for version .58 of anaconda containing the patch:

Comment 11 Allen Kistler 2009-06-03 21:42:57 UTC
Re: Comment 10

Confirmed.  The patch works for me.  I actually tried it with two ks files, the one included and the one I'll actually use when I install real systems.

You can set this bug to MODIFIED, too.

Thanks for the effort.

*** ???
Will this fix be on the GA media (if you know)?  If so, I'll update the wiki page with that info now and remove to the bug from the wiki once I confirm the media have (or at least the i386 medium has) the fix.
*** ???

Thanks again.  Now on to try out the RAID bug...

Comment 12 Radek Vykydal 2009-06-05 07:20:56 UTC
Should be fixed in next build of anaconda for rawhide.
Unfortunately it is too late for F11.

Comment 13 Bug Zapper 2009-06-09 16:57:43 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:

Comment 14 Radek Vykydal 2009-06-10 10:29:57 UTC
*** Bug 504913 has been marked as a duplicate of this bug. ***

Comment 15 Allen Kistler 2009-06-10 17:21:00 UTC
Re: Comment 36

Moving from F11 back to rawhide.  It only makes sense there.

Comment 16 Allen Kistler 2009-06-10 17:22:31 UTC
Re: Comment 15

Oops.  Cut & Paste.  I meant Re: Comment 13, not Re: Comment 36 (which doesn't exist yet here).

Comment 17 Thomas J. Baker 2009-06-17 12:59:14 UTC
*** Bug 505575 has been marked as a duplicate of this bug. ***

Comment 18 Allen Kistler 2009-06-25 20:27:13 UTC
According to koji, there have been no builds for anaconda since 2 June.
Therefore this bug cannot be fixed yet.
Am I missing something?

Comment 19 Paolo Bonzini 2009-06-27 17:10:29 UTC
*** Bug 508455 has been marked as a duplicate of this bug. ***

Comment 20 Patrick 2009-07-07 12:21:14 UTC
I do experience the same problem.
Does the bug fix ?

Comment 21 Allen Kistler 2009-07-07 20:52:57 UTC
(In reply to comment #20)
> I do experience the same problem.
> Does the bug fix ?  

For F11, there's not a genuine bug fix.  You have a few options.  I would recommend, in the order listed:

1. Don't use kickstart.
2. Try the anaconda update from Comment 10, although it's older than the
   version of anaconda on the GA media, so there's no guarantee it doesn't
   regress other bug fixes that made it on to the GA media.  If the update is
   still available by the time anyone reads this comment, this option is the
   closest thing to a bug fix for F11 until ...
3. Wait for a respin, which will probably have an updated anaconda.

For Rawhide, I'm downloading today's boot.iso now.  Today's boot.iso/install.img should include yesterday's anaconda build (12.1), so I'm hopeful.

Comment 22 Allen Kistler 2009-07-08 04:55:58 UTC
Unable to verify fix in anaconda-12.0 due to Bug 509572
Unable to verify fix in anaconda-12.1 due to Bug 510172

Comment 23 Radek Vykydal 2009-07-20 12:27:28 UTC
Putting to modified, fix has been pushed into anaconda 12.0.

Comment 24 Allen Kistler 2009-07-21 23:08:48 UTC
I was able to verify the fix in anaconda-12.3 with today's (21 July 2009) boot.iso.


Comment 25 Andrew 2010-11-28 15:44:48 UTC
It looks like I hit this bug in Fedora 14 again. Here is my partitioning from the kickstart config file:

# Use all existing partition schema and reformat all but /home
clearpart --none
partition /boot                                                --usepart=sda1
partition pv.6fZc4L-gojR-fTgc-Twhq-LcaN-XYc8-yeomBJ            --usepart=sda2
volgroup  vg_prhost2 pv.6fZc4L-gojR-fTgc-Twhq-LcaN-XYc8-yeomBJ --useexisting
logvol    /        --vgname=vg_prhost2 --name=lv_root --useexisting
logvol    /home    --vgname=vg_prhost2 --name=lv_home --useexisting --noformat
logvol    swap     --vgname=vg_prhost2 --name=lv_swap --useexisting

[root@prhost2 ag]# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda2
  VG Name               vg_prhost2
  PV Size               465.27 GiB / not usable 23.00 MiB
  Allocatable           yes (but full)
  PE Size               32.00 MiB
  Total PE              14888
  Free PE               0
  Allocated PE          14888
  PV UUID               Jlexvs-KWlQ-dhR9-vdNr-yUrK-QbAg-2wjcPg
[root@prhost2 ag]# vgdisplay
  --- Volume group ---
  VG Name               vg_prhost2
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                3
  Open LV               3
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               465.25 GiB
  PE Size               32.00 MiB
  Total PE              14888
  Alloc PE / Size       14888 / 465.25 GiB
  Free  PE / Size       0 / 0   
  VG UUID               UU4f01-PIEA-VvSL-7bxb-Mm3k-DVVc-gnQ97J

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