Make swap partition



1. First, create an empty file which will serve as a swap file by issuing the following command:
dd if=/dev/zero of=/swap bs=1024 count=1048576
where /swap is the desired name of the swap file, and count=1048576 sets the size to 1024 MB swap (for 512 MB use 524288 respectively).


2. Set up a Linux swap area with:
mkswap /swap
Old versions of mkswap needed the size of the swap file/partition, but with newer ones it’s better not to specify it at all since a small typo can erase the whole disk.


3. It’s wise to set the permissions as follows:
chmod 0600 /swap


4. The last thing – add the new swap file to /etc/fstab:
/swap swap swap defaults,noatime 0 0
This way it will be loaded automatically on boot.


5. To enable the new swap space immediately, issue:
swapon -a


By : blog.snapshotit.com



Related Posts:



Responses

0 Respones to "Make swap partition"

Post a Comment

»Thank you for reading this article
If you have questions or comments, please leave a comment
»You can click on the Subscribe by email to subscribe comments of this post
»You can register directly link pictures, mp3, video on the comment form.
»You may use some HTML tags such
»Please post comments polite and typing accented Vietnamese if possible
»Thank the good faith comment

 

Categories

Recent Comments

Total Pageviews

Return to top of page ©Web Server Tips Tricks 2010 | Develop by Mr.PhanQuan .Powered by Blogger . All rights reserved.