SWAP Partition and File

Swap Partition

1st create a new partition with swap type ( ID 82 ).

image

Using “partprobe” command update information to kernel without restating server.

image

Check current swap size.

image

Make swap file system using “mkswap” command and to activate this use command “swapon” . For permanent enter information in “/etc/fstab”.

image

After modification

image

Then cross check the size of swap. Now it’s 2109.

image

 

Add Swap File

To add a swap file.

Use “dd” command to create swap file. Here “swapfile” is name of swap file. This command create a file with 65MB size.

image

image