Linux drive resize example

593 vgdisplay

594  fdisk -l

595  fdisk /dev/sda

599  shutdown -r now

600  df -h

601  fdisk -l

602  fdisk /dev/sda

603  fdisk -l

604  pvcreate /dev/sda3

605  vgdisplay

606  vgextend vg_someserver /dev/sda3

607  vgdisplay vg_someserver | grep “Free”

608  lvdisplay

610  lvextend -L+79G /dev/vg_someserver/lv_root

611  df -h

612  lvdisplay

613  df -h /

614  resize2fs /dev/vg_someserver/lv_root

615  df -h

Advertisements

extend Linux swap with LVM

8  swapon -s
9  lvdisplay | more
10  swapoff -v
11  swapoff -v /dev/vg_server010/lv_swap
13  lvm lvresize /dev/vg_server010/lv_swap -L +8G
14  mkswap /dev/vg_server010/lv_swap
15  swapon -va
16  cat /proc/swaps free
17  swapon -s