Bug 240554

Summary: lvcreate failed for swap volume in installer
Product: Red Hat Enterprise Linux 5 Reporter: Jason Edgecombe <jedgecombe>
Component: anacondaAssignee: David Lehman <dlehman>
Status: CLOSED INSUFFICIENT_DATA QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: balajisundar, bugzilla, charlieb-fedora-bugzilla, ralph, r.gelobter
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-12-08 16:33:01 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
debug dump from installer
none
DMIdecode dump
none
Kickstart file
none
anaconda-ks.cfg from a successful install
none
installer crash dump
none
broken install lvm {pvdisplay,vgdisplay,lvdisplay
none
successful lvm layout - lvm {pvdisplay,vgdisplay,lvdisplay} none

Description Jason Edgecombe 2007-05-18 13:12:40 UTC
Description of problem:
Error message during kickstart install.
SystemError: lvcreate failed for swap0


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

How reproducible:
every time, but only on one machine.

Steps to Reproduce:
1. Use the attached kickstart file to kickstart.
2. installer will fail with message SystemError: lvcreate failed for swap0

3.
  
Actual results:
SystemError: lvcreate failed for swap0


Expected results:
a finished install

Additional info:
The problem system is a Dell GX280. I have successfully installed 10 other Dell
machines of various models using this kickstart config, including another Dell
GX280.

Comment 1 Jason Edgecombe 2007-05-18 13:12:41 UTC
Created attachment 154996 [details]
debug dump from installer

Comment 2 Jason Edgecombe 2007-05-18 13:13:29 UTC
Created attachment 154997 [details]
DMIdecode dump

Ran dmidecode.

Comment 3 Jason Edgecombe 2007-05-18 13:14:05 UTC
Created attachment 154998 [details]
Kickstart file

My kickstart file with the password deleted.

Comment 4 Jason Edgecombe 2007-05-18 13:17:17 UTC
I did a dd if=/dev/zero of=/dev/sda for 3/4th of the drive and that didn't help.
I finally got around the problem by partitioning manually using hard partitions.


Hard drive info:

  Vendor: ATA       Model: Maxtor 6Y160M0    Rev: YAR5

  Type:   Direct-Access                      ANSI SCSI revision: 05

SCSI device sda: 312500000 512-byte hdwr sectors (160000 MB)

sda: Write Protect is off

sda: Mode Sense: 00 3a 00 00

SCSI device sda: drive cache: write back

SCSI device sda: 312500000 512-byte hdwr sectors (160000 MB)

sda: Write Protect is off

sda: Mode Sense: 00 3a 00 00

SCSI device sda: drive cache: write back

 sda: sda1 sda2 sda3 sda4 < sda5 sda6 sda7 >

sd 0:0:0:0: Attached scsi disk sda



Comment 5 Jason Edgecombe 2007-05-18 13:20:47 UTC
Created attachment 154999 [details]
anaconda-ks.cfg from a successful install

This is the anaconda-ks.cfg file that the installer left after I manually
partitioned the machine using regular partitions. This is on the same machine
that was having problems.

I commented out the partitoning section of my standard kickstart file in order
partition by hand.

Comment 6 Jason Edgecombe 2007-06-05 20:51:33 UTC
Created attachment 156277 [details]
installer crash dump

I got the same/similar error from two brand-new Dell Optiplex 745's. I alsp
fixed them the exaxt same way be using hard partition instead of lvm. I even
copied the partition setup from the previous working fix.

Comment 7 David Lehman 2008-05-12 19:12:26 UTC
What if you partition manually and try to create the same LVM setup you specify
in kickstart? Also, is it possible for you to grab /tmp/part-include from a
failed kickstart attempt?

Comment 8 Jason Edgecombe 2008-05-14 17:23:53 UTC
That particular machine has been disposed of and I no longer have access to it.

I can't grab /tmp/part-include, but it would have been the following (substitute
/dev/sda or /dev/hda for $ROOTDRIVE):
bootloader --location=mbr --driveorder=$ROOTDRIVE
clearpart --all --drives=$ROOTDRIVE --initlabel
part /boot --fstype ext3 --size=300 --ondisk=$ROOTDRIVE
part pv.4 --size=0 --grow --ondisk=$ROOTDRIVE
volgroup VolGroup00 --pesize=32768 pv.4
logvol swap --fstype swap --name=swap0 --vgname=VolGroup00 --size=1024 --grow
--maxsize=2048
logvol / --fstype ext3 --name=root --vgname=VolGroup00 --size=6000 --grow
--maxsize=30720
logvol /var/log --fstype ext3 --name=var-log --vgname=VolGroup00 --size=512
logvol /tmp --fstype ext3 --name=tmp --vgname=VolGroup00 --size=1024 --maxsize=4096
logvol /usr/vice/cache --fstype ext3 --name=usr-vice-cache --vgname=VolGroup00
--size=1024
logvol /home --fstype ext3 --name=home --vgname=VolGroup00 --size=300 --grow

Comment 9 Ryan G 2008-09-05 08:57:54 UTC
When trying to install via kickstart redhat seems to ignore your formatting of the partitions and sets them up in the order it pleases. Because of this it creates a grow partition first leaving no room for other partitions to be created. I've only had this issue when creating the partitions in an LVM and not regular ext3.

The mailing list post http://www.redhat.com/archives/rhelv5-list/2007-April/msg00059.html [^] describes the issue better than I can.

Comment 11 Chris Schanzle 2008-11-06 23:10:04 UTC
I had this error (lvcreate failed for swap) today on a CentOS 5.2 kickstart.  I haven't made changes for months to my kickstart partitioning layout.  I believe it is a roundoff error.  In my case, I used this partitioning:

clearpart --linux
part /boot  --fstype=ext2 --size=132 --asprimary --label=boot
part /boot2 --fstype=ext2 --size=132 --asprimary --label=boot2
part pv.1 --size=1 --grow  
volgroup sys --pesize=16384 pv.1
logvol swap  --fstype=swap --name=swap --vgname=sys --recommended
logvol /local --fstype=ext3  --name=local --vgname=sys --size=1 --grow
logvol /     --fstype=ext3 --name=root --vgname=sys --size=20480


I noticed the root and local lv's were made, but there were insufficient PE's to make a 2GB swap (1.94 GB).  The system has 4GB RAM, doing a 32-bit install, so the default swapsize should be 2GB.  I set pesize since the default use to be very small (2k or 4k).  Removing the --pesize=16384 resulted in a successful partitioning, and I notice it used a pesize of 32768, so obviously the default has been raised.

I can reproduce this and gather more details on request.

fdisk -l

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          17      136521   83  Linux
/dev/sda2              18          34      136552+  83  Linux
/dev/sda3              35       38913   312295567+  8e  Linux LVM


pvdisplay/vgdisplay/lvdisplay will be attached.

Comment 12 Chris Schanzle 2008-11-06 23:11:33 UTC
Created attachment 322794 [details]
broken install lvm {pvdisplay,vgdisplay,lvdisplay

Comment 13 Chris Schanzle 2008-11-06 23:24:14 UTC
Created attachment 322797 [details]
successful lvm layout - lvm {pvdisplay,vgdisplay,lvdisplay}

Comment 14 Charlie Brady 2009-06-12 18:08:53 UTC
FWIW, I am seeing an lvcreate failed for swap problem with a default anaconda partitioning with CentOS 5.3.

System is a an HP DL360 with 700GB RAID5 array, and 2G RAM. Anaconda chosen partitions are:

VG VolGroup00         699808M      VolGroup
LV LogVol00               695776M    ext3            /
LV LogVol01                   4032M     swap
/dev/cciss/c0d0
    cciss/c0d0p1       1      13          101M       ext3       /boot
    cciss/c0d0p2      14   89226    699808<   physical v

When the lvcreate error message shows, I can view /tmp/lvmout, which says:

Insufficient free extents (125) in volume group VolGroup00. 126 required.

lvm lvscan shows:

ACTIVE    /dev/main/root   [679.47 GB] inherit

and lvm  pvscan shows

PV /dev/md2 VG main lvm2 [683.38GB / 3.91 GB free ]
Total: 1 [683.38 GB] / in use: 1 [683.38GB] / in no VG: 0 [0]

Comment 15 Charlie Brady 2009-06-12 19:27:53 UTC
I can confirm that the patch from bug 500431 fixes this problem for me. After the patch, lvm lvscan shows:

ACTIVE    /dev/main/root   [679.44 GB] inherit
ACTIVE    /dev/main/swap   [3.94 GB] inherit

Comment 16 Charlie Brady 2010-12-08 17:08:21 UTC
Why is this closed "INSUFFICIENT DATA"? There is abundant data here, and no sign that anyone from Red Hat has tried to analyse it, or ask for more data.

Moreover, I identified a patch which fixes the problem.

IMO this should be resolved ERRATA:

An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1306.html

Comment 17 David Lehman 2010-12-08 18:01:47 UTC
A couple of notes:

RHEL bugs should be reported through proper support channels, not filed directly in bugzilla.

CentOS bugs should be filed through the appropriate CentOS channels, which do not include Red Hat bugzilla.

Comment 18 Charlie Brady 2010-12-08 18:05:43 UTC
Ah, so you want bug reports filed to /dev/null, except from paying customers. Seems foolish policy to me...