How to Extend Swap space on LVM Disk Linux

How to Extend Swap space on LVM Disk Linux

 Applies to:

            Oracle Database 12.2

            Oracle Linux 7

Description:

            Want to extend Swap space on LVM disk. Assumes that space is available in the volume group on which the current swap partition is located as logical volume.

Solution:

            To extend the amount of swap space in a LVM environment follow the below steps.

To verify the swap space exists and is a logical volume issue the following command:

           

To view the swap volume using fdisk command:

[root@ora12c ~]# fdisk -l

We see that current swap space is 7.88GB and we want to extend 2GB to this swap volume.

Stop or terminate all program/services which are using swap space and then stop existing swap volume using swapoff command.

[root@ora12c ~]# swapoff -a

Now increase the size of current swap space logical volume by 2GB using following command:

You can see that size has been increased by 2GB successfully.

Now to make the volume as a swap partition issue the following command:

Now turn on swap space as:

[root@ora12c ~]# swapon -a

You can also check and verify swap space by free and lsblk command:

 

 

Your comments especially which will help us to improve the functionality and make the post user friendly, will be greatly appreciated J

You are requested to follow my Blog.

Comments

Popular posts from this blog

How to Rebuild/Recreate Concurrent Manager

FRM-92101: Forms Server Not Starting Up

REP-0501 ORA-01017 unable to connect to the specified database