Bug 429858

Summary: part swap --recommended --maxsize=8192 does not work
Product: Red Hat Enterprise Linux 5 Reporter: James Lamb <james.lamb>
Component: anacondaAssignee: Martin Sivák <msivak>
Status: CLOSED DUPLICATE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 5.0   
Target Milestone: rc   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-12 14:07:30 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
Change the reccomendation formula none

Description James Lamb 2008-01-23 14:48:05 UTC
Description of problem:

I have created a kickstart configuration based on the Redhat Enterprise 5
installation manuals. In the partition section I have the following lines

clearpart --all
part /boot --fstype ext3 --size=300 --ondisk=sda
part swap --maxsize=8192 --recommended --ondisk=sda
part / --fstype ext3 --size=1 --grow --asprimary --ondisk=sda

When I do --recommended and --maxsize the swap size is never created as per the
documentation. (The minimum size of the automatically-generated swap partition
is no smaller than the amount of RAM in the system and no larger than twice the
amount of RAM in the system.). Unfortunately we currently have systems which
have greater than 32GB of memory and only 75GB hard drives. In this situation we
would like to have the local swap created as a maximum of 8GB that way we do not
use the entire local disk space. After we have provisioned the system we may
choose to put the servers on SAN etc and can allocate swap space accordingly.


Version-Release number of selected component (if applicable):
Redhat Enterprise Server 5

How reproducible:

Add the following lines into a kickstart configuration. 

clearpart --all
part /boot --fstype ext3 --size=300 --ondisk=sda
part swap --maxsize=8192 --recommended --ondisk=sda
part / --fstype ext3 --size=1 --grow --asprimary --ondisk=sda


Steps to Reproduce:

See Above.
  
Actual results:

The swap size appears to always be created as 2GB.

Expected results:

8GB swap size on a system with 32GB of ram.

Additional info:

Comment 1 Joel Andres Granados 2008-06-12 12:03:02 UTC
The documentation states that "--maxsize" will only be taken into account when
"--grow" is present.
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/s1-kickstart2-options.html

This is still an issue with the recommendedSwap function in RHEL5.

Comment 2 Martin Sivák 2008-06-12 12:52:45 UTC
Created attachment 309065 [details]
Change the reccomendation formula

This patch changes the recommendation formula to be consistent with
documentation.

Comment 3 Martin Sivák 2008-06-12 12:54:20 UTC
For the case you need (maximum 8GB of swap) you should probably use:

part swap --maxsize=8192 --grow --ondisk=sda


Comment 4 Joel Andres Granados 2008-06-12 14:07:30 UTC

*** This bug has been marked as a duplicate of 447372 ***