swap space in a file?

Alan alan at lxorguk.ukuu.org.uk
Thu Dec 14 13:29:36 UTC 2006


On Thu, 14 Dec 2006 7:26:26 -0500
Tom Horsley <tomhorsley at adelphia.net> wrote:

> Are there nice simple foolproof instructions somewhere that would let me add
> more swap space to my system by using an ordinary file as swap (I don't want to
> repartition the disk). Seems like the device mapper voodoo might work for
> this, but my brain is too tiny to figure out how on my own :-).

dd if=/dev/zero of=/swapfile bs=1M count=whatever

[Make a file that size, you don't have to make it with dd, thats just the
quick but arcane command old Unix heads tend to use for it]

mkswap /swapfile  

[Mark it as a swap file and set it up]

Then add /swapfile (or whever you put it) to /etc/fstab

swapon -a




More information about the fedora-list mailing list