Server Swapping

Gene Heskett gene.heskett at
Fri Oct 15 05:52:47 UTC 2004

On Friday 15 October 2004 02:23, Mallia Cedric at MITTS wrote:
>I just realised that one of our servers (with 1G of RAM) has no swap
> enabled. Can anyone help as to how I can enable swap without
> reformatting or reinstalling ?

If the swap partition is actually defined someplace, then adding it 
to /etc/fstab and doing an /sbin/swapon as root should get it going.

However, if the partition scheme you setup doesn't include a swap 
partition, then it may be best to get another small drive and shut it 
down long enough to install it as /dev/hdc or /dev/hdd, keeping it 
off the same cable the main drive is on.  Then fdisk it to setup 
enough of it as swap, some as /var and the rest as a backup storage 
area like I did.  Put it in the /etc/fstab, and do the swapon.  
Another 2 to 3GB should be enough, and as its on a seperate drive, it 
will be faster than thrashing the main drive.

Since drives don't come that small anymore, I moved /var to it too so 
logging wouldn't go down when the darned thing went read-only on the 
main drive when it got busy (& it hasn't since, with -rc4), and then 
used the last 180GB of it as a virtual tape setup for amanda.  Thats 
what I did with a new 200GB a month ago, and its working right well.  
You'll have to rig a copy of /var to the new drive while its mounted 
to some temporary /mnt/xxx location, fix etc/fstab for the new /var 
location and reboot to make the /var switch effective.

Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
99.27% setiathome rank, not too shabby for a WV hillbilly attorneys please note, additions to this message
by Gene Heskett are:
Copyright 2004 by Maurice Eugene Heskett, all rights reserved.

More information about the users mailing list