Bug 462734 - problem with partitioning, swap space doesn't grow over 1G
problem with partitioning, swap space doesn't grow over 1G
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: anaconda (Show other bugs)
5.2
All Linux
medium Severity medium
: rc
: ---
Assigned To: Radek Vykydal
: Reopened
Depends On:
Blocks: RHEL5u3_relnotes 471148
  Show dependency treegraph
 
Reported: 2008-09-18 12:40 EDT by Daniel Mach
Modified: 2010-11-10 12:22 EST (History)
4 users (show)

See Also:
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 12:22:45 EST
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 Daniel Mach 2008-09-18 12:40:11 EDT
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 05:00:09 EDT
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 10:32:07 EDT
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 10:47:16 EDT
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 11:01:16 EDT
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 10:44:55 EDT
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 14:33:15 EST
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-04 19:20:36 EST
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 16:47:13 EDT
Moving to RHEL 5.5 so it doesn't get mistakenly closed by the bot
Comment 12 RHEL Product and Program Management 2010-07-01 21:24:58 EDT
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request.
Comment 14 David Cantrell 2010-07-02 11:30:45 EDT
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 -

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