How to Extend Swap on an LVM2 Logical Volume (CentOS 5)

Extending Swap on an LVM2 Logical Volume

To extend an LVM2 swap logical volume (assuming /dev/VolGroup00/LogVol01 is the volume you want to extend):

  1. Disable swapping for the associated logical volume:

    # swapoff -v /dev/VolGroup00/LogVol01
  2. Resize the LVM2 logical volume by 256 MB:

    # lvm lvresize /dev/VolGroup00/LogVol01 -L +256M
  3. Format the new swap space:

    # mkswap /dev/VolGroup00/LogVol01
  4. Enable the extended logical volume:

    # swapon -va
  5. Test that the logical volume has been extended properly:

    # cat /proc/swaps # free
  • 9 Users Found This Useful
Was this answer helpful?

Related Articles

How do i disable IPV6 on Cent OS

disable ipv6 on centos then you can do this :-Log in via ssh and type this :-service ipv6tables...

4gb seg fixup,how to solve (CentOS)

Xen DomU: 4gb seg fixup, process A common error on a Xen DomU (as well as Dom0) in...

How can I add more CentOS repositories?

How can I add more CentOS repositories? It is possible to add more repositories that are...

How can I find the Cent OS version?

To check which release your are running you can type this into the console (bash / shell) via SSH...

How can i show my cpu info (linux)?

How can i show my cpu info? Log in to your server via SSH then typ;e the following command...