I had the occasion to need some extra filespace on the LVM’d root partition of a RHEL(or CentOS) vm. This is how to do it:
# fdisk -l
(Just to see that the new disk is available – in this case /dev/sdb)
# fdisk /dev/sdb
(create a new partition here)
# mkfs.ext3 /dev/sdb1
# vgs
(list the volume groups here)
# pvcreate /dev/sdb1
(add new physical volume)
# vgextend VolGroup00 /dev/sdb1
(extend my default volume group from the vgs command)
# vgs
(check to see pv and vg has another volume now)
# lvextend /dev/VolGroup00/LogVol00 /dev/sdb1
(extend my / volume by the entire size of /dev/sdb1)
# resize2fs /dev/VolGroup00/LogVol00
(resize filesystem to match vol size increase)
(requires a 2.6 kernel to resize while fs running)
I would just create an additional partition /dev/sda3 with the free space. This partition can be added to the PVS: pvcreate /dev/sda3 vgextend VolGroup00 /dev/sda3 lvextend -L20G /dev/VolGroup00/diskname resize2fs /dev/VolGroup00/diskname 20G Depends of course on how your volume group is named. See the man pages for details.