Very short version:
- echo 1 > /sys/class/scsi_disk/2\:0\:0\:0/device/rescan
- Resize disk in vmware
- fdisk /dev/sda2
- p, d, 2, n, p, 2 , 258, t, 2, 8e, w
- reboot/rescan
- pvresize /dev/sda2
- lvextend -l +100%FREE /dev/mapper/VG-lv_data
- df -h && echo “Be happy”
Using parted:
- resize disk, reboot
- parted, p (should give larger disk,ย remember partition start for lvm part)
- u s (set units to sectors)
- rm 2
- mkpart, primary, ext2, start sectors same as before, end a fewย sectors less thatn disk size
- p, verify start is still correct
- toggle 2 lvm
- u gb, p ( see a larger lvm part)
- reboot for partition table change, this will also tell you if you did resizing correctly ;) . Just hope it comes back haha.
- pvresize /dev/sda2
- vgdisplay | grep Free
In short:ย extend+reboot; parted;u s;p;rm 2; mkpart; primary; enter; START; END; toggle 2 lvm; reboot; pvresize /dev/sda2; vgdisplay|grep Free
Then making new lv’s:
- lvcreate -n lv_tmp VG
- mkfs.ext4 /dev/mapper/VG-lv_tmp
- echo ‘/dev/mapper/VG-lv_tmp /tmp ext4 defaults 1 2’ >> /etc/fstab
- mount -a
- reboot maybe
- Transfer stuff ( yum clean all ; find /var/tmp/yum* -delete )