Skip to content

Instantly share code, notes, and snippets.

@jyap808
Created January 28, 2014 21:33
Show Gist options
  • Select an option

  • Save jyap808/8676985 to your computer and use it in GitHub Desktop.

Select an option

Save jyap808/8676985 to your computer and use it in GitHub Desktop.
Resize a swap LVM volume
swapoff /dev/vg_foo/lv_swap
lvextend -L+100M /dev/vg_foo/lv_swap
mkswap /dev/vg_foo/lv_swap
swapon /dev/vg_foo/lv_swap

That is: disable swapping on the volume, extend it, re-create the swap area and enable swapping again.

Swap will need to be recreated with mkswap to the new size to be seen.

Modified From: http://oxygene.sk/2009/12/resizing-a-lvm-swap-volume/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment