[lug] growing swap size

D. Stimits stimits at idcomm.com
Sat Jun 16 17:58:25 MDT 2001


> Malcolm C Carlson wrote:
> 
> Is it possible to double the swap partition after is has already been
> created?  I want to add another 128mb of ram but get a kernel panic
> because my swap doesn't match up.  I suspect that I didn't make it big
> enought to begin with.  Any suggestions?

It sounds like you are using 2.4.x series kernels...they demand more
swap. On the kernel devel list, there is a lot of talk about the
subject. Basically you are told in the 2.4.x kernels you almost *must*
have twice as much swap as ram, and 3x isn't a bad idea.

You can add multiple swap partitions as one choice. There is no reason
you can't have 4 or 5 partitions without altering the first. If that
fails, you can alter a swap partition if it is not being used at the
time; then you will have to destroy either the partition before it or
after it...it isn't a dynamic thing you where you can alter it in place
without hurting anything. There are some tools that I think are supposed
to work this way, like parted, but I haven't used them, and I don't
think they work for swap partitions (not positive, check out parted to
be sure, some info at the bottom of this email). If it is an emergency
or temporary thing, you can create a swap file (good for instance if you
want to turn off the real swap partition while resizing things, or if
you just can't afford to destroy partitions). The basic idea there is to
create a file with dd, then use mkswap and swapon with that file instead
of a partition.

D. Stimits, stimits at idcomm.com

The parted info I have, possibly out of date:

   RPMs Built and Announced at about Tue Feb 20 08:39:24 2001.

   parted-1.4.9-1.src.rpm                                578327
   parted-1.4.9-1rh62.i386.rpm                           281252
   parted-boot-1.4.9-1rh62.i386.rpm                      243353
   parted-devel-1.4.9-1rh62.i386.rpm                     139791

   Main archive is located at ftp://ftp.falsehope.com/pub/parted
   Mirror locations and build machine information listed below.

   RPMs are built with rpm version 3.0.5.
   Required programs listed are either updates or are not in the default
   RedHat 6.2 installation.

Name: parted                       Relocations: (not relocateable)
Version: 1.4.9                             Vendor: Andrew Clausen
<clausen at gnu.org>
Release: 1                             Build Date: Tue 20 Feb 2001
08:38:12 AM CST
Install date: Tue 20 Feb 2001 08:38:48 AM CST      Build Host:
hellstone.falsehope.com
Group: Applications/System           Source RPM: parted-1.4.9-1.src.rpm
Size: 776980                           License: GPL
Distribution: FalseHope RPMs
Packager: Ryan Weaver <ryanw at infohwy.com>
URL: http://www.gnu.org/software/parted
Summary: flexible partitioning tool
Description:
GNU Parted is a program that allows you to create, destroy,
resize, move and copy hard disk partitions. This is useful for
creating space for new operating systems, reorganising disk
usage, and copying data to new hard disks.



More information about the LUG mailing list