D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] adding a 2nd swap partition

 

On Sat, 2005-06-04 at 11:06 +0100, Tony Sumner wrote:
> On Sat, Jun 04, 2005 at 09:57:06AM +0100, Tom Arrow wrote:
> 
> > swapon /swapfile
> 
> What you could do is put this in the file /etc/rc.d/rc.local (that's

This is a pretty round-about way of doing it when all you need to do is
add your extra swap partition / file (partition will give you better
performance) to /etc/fstab.

If you must use a swap file, try something like this:
dd if=/dev/zero of=/my/swap/file bs=1024k count=1024 (to create an empty
1gb file)
mkswap /my/swap/file

To enable this swap file straight away:
swapon /my/swap/file

To have it active after a reboot, add the following to /etc/fstab:
/my/swap/file   swap    swap    defaults        0 0

Alex.



--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe. FAQ: www.dcglug.org.uk/linux_adm/list-faq.html