How to increase the swap space by expanding LVM parition

Here's the quick guide on how you can expand the size of your LVM (file format) swap partition in a Linux command line environment.
 

1. Check your swap space

#swapon --show


2. Turn off your swap before performing the lvm resize
#swapoff -va

3. Now, Resize your LVM partition by 8GB for example (ensure you have enough unused drive space in your lvm file system)

#lvm lvresize /dev/centos/swap -L +8GiB

4.Initialize swap space

#mkswap /dev/centos/swap

5. Re-enable swap space

#swapon -va

Now your swap space should have been increased by additional 8GB.



  • 0 Пользователи нашли это полезным
Помог ли вам данный ответ?

Связанные статьи

Connecting to your VPS via VNC

This knowledge base article will explain how you can connect to your VNC enabled Linux VPS....

How to set reverse DNS (rDNS)

At the moment you need to open a Helpdesk ticket and provide your IP and PTR record you want set,...

My SSH shows "-bash-*". How to change?

When a Xen VPS is delivered and you login for the first time you might see something similar to...

Installing OpenVPN on OpenVZ VPS (CentOS)

You must enable tun/tap and or PPP directly from inside VPS Manager under "settings" tab. then...

How to add website via webmin

This is a great tutorial how you can add new domain/website using webmin....