Swap partition sizes WAS Re: How to format big disks

Chris Green (greenc@fnal.gov)
Wed, 02 Dec 1998 10:37:12 -0600 (EST)

Hi again, Stephen.

I've just been reading through your comprehensive note on what you had to
do to get your system working, and I noticed the following lines:

<snip>
> Device Boot Begin Start End Blocks Id System
> /dev/hda1 1 1 33 265041 82 Linux swap
<snip>

If you look at swap usage with `top', or `cat /proc/meminfo', I think
you'll find you only have access to 128M of that swap partition.
Basically, you can have as many swap partitions as you like but you can
only use 128M of each partition. If you want access to the full swap
space, then do the following as root:

/sbin/swapoff -a

Comment out the swap line in /etc/fstab with a leading # on that line.

In fdisk, delete /dev/hda1 and create two new partitions in its place,
from (say) cylinders 1-16 and 17-33. Change the type id of these new
partitions with the `t' command, setting them to `82'.

Write the partition table, exit and reboot (advisable since you've just
edited the partition table of a disk with mounted partitions).

When your system comes back up, initialize each swap partition with:

/sbin/mkswap /dev/hdxx

Put appropriate lines in fstab (use the line you previously commented out
as a template), and then type

/sbin/swapon -a.

Then, check you have access to a reasonable amount of swap space with
`top' or `cat /proc/meminfo'. This space should also now be available to
you for subsequent reboots.

If you have any problem with this, then mail me direct or 'phone me at the
number below and we can sort it out.

Cheers,
Chris.

--
Chris Green. HEP, Purdue University. CDF SVXII project. 
Based at Fermilab. MAIL greenc@fnal.gov; PHONE (630) 840-2308