Resizing an LVM swap partition

I tested this on a lightly loaded Ubuntu 8.04 server.

free
swapoff /dev/vg01/lv_swap
lvextend -L+500M /dev/vg01/lv_swap
grep swap /etc/fstab # find the UUID for the existing swap space
# remake the larger swap using the same UUID as before
mkswap -U fc7f369e-c655-4a35-a227-a7c725a2b9bc  /dev/vg01/lv_swap
swapon /dev/vg01/lv_swap
free

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top