Adding more swap space

There are two main ways to add more swap space to your current one : creating a new swap partition or creating a new swap file

The first method
Supposing you still have some remaining space on your SCSI hard drive,

->Create your partition with fdisk

->Format it : mkswap /dev/sda1

->Activate the new swap partition  : swapon /dev/sda1

The second method

->Create a new file with the command dd :

dd if=/dev/zero of=/path_of_your_new_swap_file bs=1M count=100
We have just created a 100Mo file

->Then, format this file : mkswap /path_of_your_new_swap_file

->Activate the new swap file : swapon /path_of_your_new_swap_file

The total amount of available swap space can be checked with the two following commands :

swapon -s
free -m


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.