To Create Swap Partition


1. Add New Space

– Add the new hard disk and create a partition using fdisk command.

               # fdisk /dev/sdc 

2. Make it swap Partition

– Now making a swap partition on it.

               # mkswap /dev/sdc1 

3. Enable the swap partition

– Enabling the swap partition for usage

               # swapon /dev/sdc1 

4. Make swap permanent

– To make it permanent after server reboot
               # vi /etc/fstab
               —————————
               /dev/sdc1               swap                    swap    defaults        0 0

               ————————— 

5. Verify

– Verify whether the newly created swap area is available/added
               # swapon -s
               OR

               # free -k 

Leave a Reply

Your email address will not be published. Required fields are marked *