Bug 436144 - LVM and kickstarts - vgchange -ay fails when swap is not part of lvm
LVM and kickstarts - vgchange -ay fails when swap is not part of lvm
Status: CLOSED INSUFFICIENT_DATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
5.1
All Linux
low Severity low
: rc
: ---
Assigned To: Anaconda Maintenance Team
Release Test Team
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-03-05 11:39 EST by Michael Gale
Modified: 2011-07-27 13:20 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-27 13:20:31 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Michael Gale 2008-03-05 11:39:37 EST
Description of problem:
When doing an install via kickstart of RHEL 5 i386 or x86_64 and using LVM. The
volume group can not be made active unless the SWAP partition is also part of
the logvol setup. 

Since the volumegroup is not active the mount device
"/dev/volumegroup/logcialvolume" doest not exist so anaconda fails when trying
to format it.

Version-Release number of selected component (if applicable):
RHEL 5
Kernel 2.6.18-53.el5


How reproducible:
The following partition info can be used to reproduce the problem:
zerombr
clearpart --all --initlabel
part /boot --fstype ext3 --size=100 --asprimary
part swap --size=1000
part pv.os --size=8000
volgroup os_volgroup01 pv.os
logvol / --fstype ext3 --name=os_root --vgname=os_volgroup01 --size=1024 --grow

FOR COMPARISON THE FOLLOWING WILL WORK:
zerombr
clearpart --all --initlabel
part /boot --fstype ext3 --size=100 --asprimary
part pv.os --size=8000
volgroup os_volgroup01 pv.os
logvol / --fstype ext3 --name=os_root --vgname=os_volgroup01 --size=1024 --grow
logvol swap --fstype swap --name=os_swap --vgname=os_volgroup01 --recommended

Steps to Reproduce:
1. Start the install and use a kickstart file
2. Make sure the above partition layout is used in the kickstart file
3. The install will fail
  
Actual results:
Anaconda will report "An error occurred trying to format
<volumegroup>/<logicalvolume>. This problem is serious and the install cannnont
continue"


Additional info:
From a shell (ALT F2) after it has failed:
1. cat /tmp/lvmout shows 0 logical volume are active
2. lvm lvdisplay shows the volume group status as "NOT AVAILABLE"
3. Doing a 'lvm vgchange -ay' makes the volume group active and an lvm lvdisplay
will show the status of available now.

The mount device is now available and can be formatted.

Google returned the following:
http://alfa2linux.blogspot.com/2008/01/centos-51-kickstart-lvm-problems.html

Michael Gale
michael.gale@pason.com
Comment 1 Tom Lanyon 2009-06-03 08:52:51 EDT
I can reproduce this on 5.3 x86_64 when using a fixed size swap partition.

Using the following in a kickstart fails:

part /boot --fstype ext3 --size=100 --ondisk=xvda
part swap --fstype swap --size=2000 --ondisk=xvda
part pv.1 --size=1 --grow --ondisk=xvda
volgroup vg --pesize=32768 pv.1
logvol / --fstype ext3 --name=root --vgname=vg --size=1 --grow


Either changing the swap partition size to 'recommended' or making it a logical volume allow this to install correctly. ie:

part swap --fstype swap --recommended --ondisk=xvda
  -or-
logvol swap --fstype swap --name=swap --vgname=vg --size=2000
Comment 2 Radek Vykydal 2009-06-03 09:33:34 EDT
(In reply to comment #1)
I am not able reproduce with your ks, could you attach /tmp/anaconda.log /tmp/lvmout and /tmp/syslog files if possible?
Comment 3 Chris Lumens 2009-06-10 15:42:20 EDT
Even better - could you please test this with F11 and let us know if it's still broken for you?  We've put a major storage rewrite into the latest version of anaconda and since this is destined to one day be RHEL6, it'll be good to know now whether we still need to work on this problem.  Thanks.

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