Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1169783

Summary: `logvol --useexisting` requires `--size` (using whole disk as PV instead of a partition)
Product: Red Hat Enterprise Linux 7 Reporter: Marian Csontos <mcsontos>
Component: anacondaAssignee: mulhern <amulhern>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: amulhern, jhunt, lmiksik, mbanas, mcsontos, tdabasin, wlehman
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: anaconda-19.31.119-1 Doc Type: Known Issue
Doc Text:
Cause: The installer will error and report that it cannot determine the size of a volume from the information provided in a kickstart file. This is happening during a kickstart install where the user has specified volumes with the --useexisting option. The sizes are not properly initialized in all cases and this error can show up. Consequence: Installation does not proceed. Workaround (if any): Add an appropriate --size parameter to the logvol or part command where the error occurred. The size should closely match the size of the existing volume or volume you are creating. Result: Installation will proceed.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 14:04:56 UTC Type: Bug
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
layout.png
none
installation-destination.png
none
manual-partitioning.png
none
summary-of-changes.png
none
anaconda logs
none
anaconda.log
none
program.log
none
storage.log none

Description Marian Csontos 2014-12-02 12:38:16 UTC
Description of problem:
I have a layout where I am using whole disk as a PV instead of partition to make it easier to access content of the disk directly from outside of a VM.

When installing using ks on that layout installer fails with following on the console:

    storage configuration failed: The following problem occurred on line 54 of the kickstart file:

    Generating updated storage configuration
    Size can not be decided on from kickstart nor obtained from device.

    Not enough space in file systems for the current software selection. An additional 2861.02 MiB is needed.

Seems the root cause is the free space in VG is not correctly calculated when PV is directly on disk.

This is the line 54:

    logvol / --vgname=vg_stacker_eXRq --name=root --useexisting --fstype=ext4

I thought this is an instance of Bug 1132007 but that should be fixed now IIUC.

Adding `--size=6144` (which is size of LV) installation succeeds.

When installing manually UI does not display free space in existing VG correctly.

Version-Release number of selected component (if applicable):
anacnda-19.31.111-1 (RHEL-7.1-20141201.n.0)

How reproducible:
100%

Steps to Reproduce:
1. Prepare 2 image files:
- 1st will be partitioned in ks (vda1 will be used for /boot, vda2 will be used for swap)
- 2nd is not partitioned and contains PV directly on vdb
2. run a VM using those two images
3. run kickstart installation using following snippet for partitions:

    # Partition clearing information
    clearpart --all --initlabel --drives=vda
    # Clear the Master Boot Record
    zerombr
    ignoredisk --only-use=vda,vdb
    # System bootloader configuration
    bootloader --location=mbr --boot-drive=vda --append="console=tty0 console=ttyS1,115200 sysrq_always_enabled"
    # Precisely define partitions:
    part /boot --size=512 --fstype=ext4 --ondisk=vda
    part swap --size=256 --ondisk=vda
    
    logvol / --vgname=vg_stacker_eXRq --name=root --useexisting --fstype=ext4 # this is line 54

Actual results:
Anaconda hangs

Expected results:
Anaconda should work.

Additional info:
See attached logs from manual install and few screenshots.

Comment 1 Marian Csontos 2014-12-02 12:41:40 UTC
Created attachment 963729 [details]
layout.png

Displays 2G free space in the VG used (vg_stacker_2APK)

Comment 2 Marian Csontos 2014-12-02 12:43:00 UTC
Created attachment 963730 [details]
installation-destination.png

vdb here claimed to be 0 B free

Comment 3 Marian Csontos 2014-12-02 12:45:31 UTC
Created attachment 963731 [details]
manual-partitioning.png

anaconda sees the partitions correctly in manual-partitioning but the available space is only 256MB found on /dev/vda

Comment 4 Marian Csontos 2014-12-02 12:46:31 UTC
Created attachment 963732 [details]
summary-of-changes.png

Comment 5 Marian Csontos 2014-12-02 12:47:57 UTC
Flagging as Regression as this was working fine in 7.0 as well as in earlier 7.1 nightlies.

Comment 7 Marian Csontos 2014-12-02 12:52:14 UTC
Created attachment 963733 [details]
anaconda logs

Comment 8 Marian Csontos 2014-12-02 12:52:48 UTC
Created attachment 963734 [details]
anaconda.log

Comment 9 Marian Csontos 2014-12-02 12:53:15 UTC
Created attachment 963735 [details]
program.log

Comment 10 Marian Csontos 2014-12-02 12:53:35 UTC
Created attachment 963736 [details]
storage.log

Comment 14 David Lehman 2015-01-08 16:20:39 UTC
1. Disk selection does not show free space within VGs

 - Not a bug. It has never worked the way you expect, nor will it. The
   disk is completely occupied by the pv, no? Free space within a vg is
   not free disk space.

2. Existing logvol in kickstart needs a size (actual bug with known fix)

 - Legitimate bug with known, trivial fix.

The reason your kickstart install said there was not enough space is an exception was raised while handling the line that defines your root filesystem. Of course there is not enough disk space to install onto if there is no root filesystem. It's unfortunate that no error is displayed indicating explicitly that no root filesystem was defined, even though that could easily be surmised from the other error messages. At any rate, fixing #1 would resolve the bug completely, unless I've missed something.

Comment 15 David Lehman 2015-01-08 16:32:51 UTC
Sorry -- fixing item 2 from comment 14 is what would resolve the bug (not item 1, which is not a bug).

Comment 16 Martin Banas 2015-01-09 08:29:28 UTC
Hi Marian,
would you be able to verify this bug once it's fixed? I followed your steps to reproduce but wasn't able to get the error you describe.

My installation says "Kickstart insufficient", but doesn't fail.

Comment 19 Martin Banas 2015-01-12 06:48:36 UTC
Thanks.

Comment 29 errata-xmlrpc 2015-03-05 14:04:56 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0312.html