Monday, February 3, 2014

Resize swap Logical Volume

Check existing swap size:-

# free -m
# cat /proc/swaps


Disable swapping for the logical volume:-

# swapoff -v /dev/vg_001/lv_swap

Resize the LVM2 logical volume as required:-

# lvm lvresize /dev/vg_001/lv_swap -L +2G

Make the LV a swap drive:-

# mkswap /dev/vg_001/lv_swap

Enable the swap:-

# swapon -va

Check the new size of the swap:-

# free -m
# cat /proc/swaps


No comments:

Post a Comment