Extending Swap on an LVM2 Logical Volume
1)Check swap space and its utilization
cat /proc/swaps # free
2) Scan (all disks) for Logical Volumes
lvscan
[root@localhost ~]# lvscan
ACTIVE ‘/dev/VolGroup/lv_root’ [47.44 GiB] inherit
ACTIVE ‘/dev/VolGroup/lv_home’ [46.19 GiB] inherit
ACTIVE ‘/dev/VolGroup/lv_swap’ [5.88 GiB] inherit
3) Disable devices and files for paging and swapping
swapoff -v /dev/VolGroup/lv_swap
4) Resize a logical volume Adding 1 GB
lvm lvresize /dev/VolGroup/lv_swap -L +1G
5) Set up a Linux swap area
mkswap /dev/VolGroup/lv_swap
6) Enable devices and files for paging and swapping
swapon -va
7) Check swap space and its utilization
cat /proc/swaps # free
8) Scan (all disks) for Logical Volumes
lvscan
Recent Comments