Tuesday, March 31, 2015

how to create swap partition in linux step by step.

http://www.linuxserverworldadmin.blogspot.in/2015/03/what-is-swap-space-in-linux.html

Step 1 ) Create the required partition 
[root@client1 ~]# fdisk -l

[root@client1 ~]# fdisk /dev/hda
:p
:n
:t {  to change the partition ID} :82 { for swap partition }
:w { save & exit }
[root@client1 ~]#
[root@client1 ~]# partprobe /dev/hda

[root@client1 ~]# fdisk ±l
Step 2 ) Make the partition as swap 
[root@client1 ~]# mkswap /dev/hda9
To see the status 
[root@client1 ~]# swapon  -s
To on the swap partition
[root@client1 ~]# swapon /dev/hda9
Again  see the status 
[root@client1 ~]# swapon -s
To put Off the swap partition 
[root@client1 ~]# swapoff  /dev/hda9
[root@client1 ~]# swapon  -s 

No comments:

Post a Comment