redhat-list-increasing_swap_space

This is part of The Pile, a partial archive of some open source mailing lists and newsgroups.



To: redhat-list@redhat.com
From: Rick Warner <rwarner@inviosoftware.com>
Subject: Re: Help --need to increase swap partition on RH9
Date: 24 Jul 2003 13:51:09 -0700

On Thu, 2003-07-24 at 13:32, James D. Parra wrote:
> Hello,
> 
> How can I increase the swap size on production system? We added more RAM and
> I need to increase the swap space.
> 

Unless you left space adjacent to the swap partition on the disk, you 
cannot increase its size, unless you use something like Partition Magic
to adjust sizes of the partitions on the disk.

But there are two options depending on your
partitioning scheme and/or free space on other partitions:

1)  Add another swap partition if there is un-partitioned space 
2)  Add a swap file on an existing partition.

man mkswap

will give you the details.

===

To: redhat-list@redhat.com
From: Javier Gostling <jgd@samwan.homeip.net>
Subject: Re: Help --need to increase swap partition on RH9
Date: Thu, 24 Jul 2003 16:51:19 -0400

On Thu, Jul 24, 2003 at 01:32:25PM -0700, James D. Parra wrote:
> Hello,
> 
> How can I increase the swap size on production system? We added more RAM and
> I need to increase the swap space.

Most likely, you don't need to increase swap space. The 2:1 swap/rap ratio is
just a thumb rule, and need not be followed strictly. Now if you really want to
increase swap space, the easiest path is to just add a second swap partition.
Linux will spread swap usage among all active swap areas.

===

To: redhat-list@redhat.com
From: "Leonard den Ottolander" <leonardjo@hetnet.nl>
Subject: Re: Help --need to increase swap partition on RH9
Date: Thu, 24 Jul 2003 23:05:27 +0200

Hi James,

> How can I increase the swap size on production system? We added more RAM
> and I need to increase the swap space.

 You could run parted and resize the partition that way. You will need 
to reboot/reinit the machine in that case. Another option is to create 
a swapfile on a partition that has enough space left. In the case you 
use /home for this the procedure would be:

# dd if=/dev/zero of=/home/swapfile bs=1k count=Xk
# mkswap -f /home/swapfile
# swapon /home/swapfile

 Dont forget to add /home/swapfile to /etc/fstab. Using /home might not 
be the best option from a security standpoint, but it is probably the 
partition with the most free space left...

===


the rest of The Pile (a partial mailing list archive)

doom@kzsu.stanford.edu