取自上海Linux俱乐部FAQ:
Q10:我的SWAP不够了.怎么增加呢?
A10:如果你的硬盘上有空闲的空间,直接拿来用.
假设是/dev/hda?
则mkswape /dev/hda?
swapon /dev/hda?
要自动启动SWAPE,把新的分区加到/etc/fstab中去,照着原来SWAP的写就行了.
用"free"检查你SWAP的大小.
Linux支持最多16个交换分区,每个交换分区最大128M。
 
没有空闲的分区时候,可以用个大文件来建立."man mkswap"
To setup a swap file, it is necessary to create that file
before running mkswap . A sequence of commands similar to
the following is reasonable for this purpose:

# dd if=/dev/zero of=swapfile bs=1024 count=8192
# mkswap swapfile 8192
# sync
# swapon swapfile

Note that a swap file must not contain any holes (so,
using cp(1) to create the file is not acceptable).
在SAG文档讲得很详细,这个文档已经被翻译过来了。
 

本文转自中文Linux论坛