Let's say you had existing LVM configured. You also had only 2 partitions - root and swap, and now you ran out of space. You will need to extend your root partition.
Process:
Manually add physical drive to the system. Let it register.
List existing drives.
fdisk -l
Create partition with the size equal to the physical hard disk size. Let's say we added 8GB drive, then we will need to format and create and format 8GB partition using fdisk utility. Keep in mind that you will need 8e - Linux LVM partition.
fdisk /dev/hdb
Once formated, then we need to create Physical Volume out of it.
pvcreate /dev/hdb
Verify creating of the physical volume
[root@rhel5 ~]# pvdisplay
--- Physical volume ---
PV Name /dev/hdb
VG Name VolGroup00
PV Size 8.00 GB / not usable 32.00 MB
Allocatable yes (but full)
PE Size (KByte) 32768
Total PE 255
Free PE 0
Allocated PE 255
PV UUID 2AsLK9-wAU1-bsHd-1eEZ-NqwU-Mzcf-QtAb3U
Now let's add our drive to the existing VolGroup00.
vgextend VolGroup00 /dev/hdb
Verify:
[root@rhel5 ~]# vgdisplay
Extend LogVol00 by 8 GB
lvextend -L+8G /dev/VolGroup00/LogVol00
Resize filesystem
resize2fs /dev/VolGroup00/LogVol00
Check disk space
df -ah
We have 9 guests and no members online