This is done with the vgextend utility, and is easy as pie. You first need
to create a physical volume. This is done with the pvcreate
utility. With this tool, you convert any block device into a physical
volume.
After that is done, vgextend does the rest:
# pvcreate /dev/sda1
pvcreate -- physical volume "/dev/sda1" successfully created
# vgextend webgroup /dev/sda1
vgextend -- INFO: maximum logical volume size is 255.99 Gigabyte
vgextend -- doing automatic backup of volume group "webgroup"
vgextend -- volume group "webgroup" successfully extended
Please note that in order to do this, your Volume Group needs to be
active. You can make it by executing 'vgchange -a y webgroup'.
If you want to do this manually, there are a couple of ways to do this.
ext2 off-line with ext2resize
By off-line, we mean that you have to unmount the file-system to make
these changes. The file-system and it's data will be unavailable while
doing this. Note this means you must use other boot media if extending
the size of the root or other important partitions.
The ext2resize tool is available on the GNU ftp size, but most distributions
carry it as a package. The syntax is very straightforward:
# ext2resize /dev/HOWTO/small 40000
Where 40000 is the number of blocks the filesystem should have after growing
or shrinking.