Expand Linux swap space

Matt Domsch Matt_Domsch at dell.com
Sun Jan 27 20:47:16 CST 2008


On Fri, Jan 25, 2008 at 11:44:45PM -0600, Bertram Moshier wrote:
>    Hello,

>    I have a Red Hat Enterprise 4 system as shipped by Dell on a 390 system
>    with 8GB of RAM.  Presently, the Linux swap space is at 1.9GB (as
>    shipped).  I'd like to resize this to 24 GB (expanding it by about 22 GB).

First, as noted, if you're really 24GB into swap, you don't have
nearly enough RAM. :-)

As for adding swap space, the absolute easiest thing you can do (and
performance-wise it really doesn't matter) is to create new files to
use as swap.

# dd if=/dev/zero of=/swap1 bs=1M count=8k   (for an 8GB swap file)
# mkswap /swap1

and add it to /etc/fstab.  Repeat as needed.

-- 
Matt Domsch
Linux Technology Strategist, Dell Office of the CTO
linux.dell.com & www.dell.com/linux



More information about the Linux-Precision mailing list