Bug 462734

Summary: problem with partitioning, swap space doesn't grow over 1G
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Mach <dmach>
Component: anacondaAssignee: Radek Vykydal <rvykydal>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: ddomingo, ddumas, jgranado, rvykydal
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Using swap --grow parameter in a kickstart file without setting --maxsize parameter at the same time makes anaconda impose a restriction on the maximum size of the swap partition. It does not allow it to grow to fill the device. For systems with less than 2GB of physical memory, the imposed limit is twice the amount of physical memory. For systems with more than 2GB, the imposed limit is the size of physical memory plus 2GB.
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-10 17:22:45 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:
Bug Depends On:    
Bug Blocks: 454962, 471148    

Description Daniel Mach 2008-09-18 16:40:11 UTC
Steps to Reproduce:
1. create a 10G logical volume
2. create a xen hvm VM (512MB RAM) on top of this volume
3. create /boot (130M, ext3, force primary)
4. create / (8192M, ext3, force primary)
5. create swap space (fill remaining space, swap, force primary)

this is the partitioning setup from the ks file:
#part /boot --fstype ext3 --size=130 --asprimary
#part / --fstype ext3 --size=8192 --asprimary
#part swap --size=100 --grow --asprimary

Actual results:
swap space occupies only 1G
800M remains free

Expected results:
all free space occupied by swap space

Comment 1 Radek Vykydal 2008-09-19 09:00:09 UTC
Yes, growing swap partitions is a special case in anaconda:
if growing is unlimited (i.e. to maximum allowable size), anaconda
imposes its own limit depending on available RAM.
It seems sane to me, if user wants to fill remaining free space with swap,
he can impose some big enough --maxsize.

Comment 2 Daniel Mach 2008-09-22 14:32:07 UTC
Using maxsize is probably a possible workaround.

Anyway, I'd expect anaconda to fill *all* remaining free space if I want to do that.
Anaconda should display an "are you sure" dialog and ask me if I really want to use more than recommended swap space size instead of doing something unpredictable.

Comment 3 Joel Andres Granados 2008-09-22 14:47:16 UTC
We should leave kickstart alone.  The work around being select --maxsize to tell anaconda "yes, I really mean 12Gigs of swap".  And create a dialog with a warning/suggestion for the gui telling the user "You are going to create a swap partition that is not the suggested size.  do you want to continue or use anacondas default"

Comment 4 Denise Dumas 2008-10-02 15:01:16 UTC
We need to fix the swap documentation in 5.3 and add release note for any odd / unexpected behaviors. Then any necessary code changes in 5.4. 
Added clumens because he has been investigating our inconsistent swap documentation. Chris, can you update this with the definitive relnote?

Comment 5 Chris Lumens 2008-10-22 14:44:55 UTC
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
When using swap --grow in a kickstart file, anaconda imposes a restriction on the maximum size of the swap partition.  It does not allow it to grow to fill the device.  The maximum size is given by the formula provided in section 4.18.4 of the RHEL5 Installation Guide - "Recommended Partitioning Scheme".  The swap guidelines provided in the kickstart documentation are incorrect.

For systems with less than 2GB of physical memory, the imposed limit is twice the amount of physical memory.  For systems with more than 2GB, the imposed limit is the size of physical memory plus 2GB.

Comment 7 Radek Vykydal 2008-11-07 19:33:15 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,3 +1,4 @@
-When using swap --grow in a kickstart file, anaconda imposes a restriction on the maximum size of the swap partition.  It does not allow it to grow to fill the device.  The maximum size is given by the formula provided in section 4.18.4 of the RHEL5 Installation Guide - "Recommended Partitioning Scheme".  The swap guidelines provided in the kickstart documentation are incorrect.
+When using swap --grow in a kickstart file
+without setting --maxsize parameter at the same time, anaconda imposes a restriction on the maximum size of the swap partition.  It does not allow it to grow to fill the device.  The maximum size is given by the formula provided in section 4.18.4 of the RHEL5 Installation Guide - "Recommended Partitioning Scheme".  The swap guidelines provided in the kickstart documentation are incorrect.
 
 For systems with less than 2GB of physical memory, the imposed limit is twice the amount of physical memory.  For systems with more than 2GB, the imposed limit is the size of physical memory plus 2GB.

Comment 9 Ryan Lerch 2008-12-05 00:20:36 UTC
Release note updated. If any revisions are required, please set the 
"requires_release_notes"  flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

Diffed Contents:
@@ -1,4 +1,3 @@
-When using swap --grow in a kickstart file
-without setting --maxsize parameter at the same time, anaconda imposes a restriction on the maximum size of the swap partition.  It does not allow it to grow to fill the device.  The maximum size is given by the formula provided in section 4.18.4 of the RHEL5 Installation Guide - "Recommended Partitioning Scheme".  The swap guidelines provided in the kickstart documentation are incorrect.
+Using swap --grow parameter in a kickstart file without setting --maxsize parameter at the same time makes anaconda impose a restriction on the maximum size of the swap partition.  It does not allow it to grow to fill the device.
 
 For systems with less than 2GB of physical memory, the imposed limit is twice the amount of physical memory.  For systems with more than 2GB, the imposed limit is the size of physical memory plus 2GB.

Comment 11 Denise Dumas 2009-06-30 20:47:13 UTC
Moving to RHEL 5.5 so it doesn't get mistakenly closed by the bot

Comment 12 RHEL Program Management 2010-07-02 01:24:58 UTC
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.

Comment 14 David Cantrell 2010-07-02 15:30:45 UTC
The behavior is documented in the technical note, which should remain for RHEL 5.6 and subsequent releases.  The issue described is as-designed behavior with regard to anaconda enforcing restrictions on the size of swap devices during automatic partitioning.  At this point in time in the RHEL-5 lifecycle, I do not see a good reason to change this behavior.  Documenting what happens in this particular case is sufficient and keeps RHEL-5 releases consistent.  If we want to change the behavior, we should address that in RHEL-6.

Given that we have a technical note that explains what is happening, I set devel_ack to -