Managing SWAP Partitions – RHEL 6.x – CentOS 6.x

Updated on February 11, 2019
1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Managing SWAP Partitions If the system needs more memory resources and the RAM is full, inactive pages in memory are moved to the swap space.

Swap space is a portion of a hard disk drive (HDD) that is used for virtual memory. It can be whole disk partition or just a file inside an existing partition or a combination of swap partitions and swap files.

We will see how to manage SWAP Partitions on RHEL 6.x or CentOS 6.x in following video tutorial.

How to Manage SWAP Partitions on RHEL 6 and CentOS 6

1. Show current SWAP allocation
free -m
swapon -s

2. Create additional SWAP space from new partition

Related Article  Installing Red Hat Enterprise Linux 6.4 (RHEL 6.4) in VMware Workstation 9.0.2

Reboot is required at this step

3. Make swap
mkswap /dev/sdb2


4. Update /etc/fstab
UUID=8bced662-e967-4861-9bac-6df8957b3eb5 swap swap defaults 0 0

5. Re-reads /etc/fstab for swap
swapon -a

6. Show swap usage summary by device
swapon -s
free -m

Hope you found it informative and useful. Any questions or comments are welcomed.