Logical volume management on Linux is a different way of using available disks (block devices), allowing for more flexible allocation of space on filesystems stored on one or more disks by grouping disks into volume groups, then creating logical volumes within those volume groups without boundaries. Filesystems are created on the logical volumes which may use a portion of a disks full capacity, or the capacity of more than one disk. The only limit is the total space in the volume group which is determined by the sum of the total physical space of all the physical block storage devices in the volume group.
You can add more devices to an existing volume group and even take them away (be careful!). Volume groups, Logical Volumes in them, and the Filesystems on them can also be extended, resized or removed as necessary.
Scan for block devices that can be used for Logical Volume Management
Display current physical volumes and their LVM Status
Use block device /dev/hdb for LVM
This command also takes multiple devicenames in one go, separated by spaces.
Create a volume group consisting of the physical volumes
vgcreate VolGroup01 /dev/hdb
Extend an existing volume group onto the block device just added
vgextend VolGroup00 /dev/hdb
Read the man page on vgextend for all available options.
Create a logical volume within the volume group
lvcreate -L +25G /dev/VolGroup01/LogVol00
Extend existing logical volume into the new unused space in the volume group
lvextend -L +25G /dev/VolGroup00/LogVol00
Expand the filesystem into the new free space in the logical volume.
Verify the new size using df
Display volume group information
Display physical volume information
Display logical volume information
Un-mount the filesystem
Check and Fix errors on the filesystem
e2fsck -f /dev/VolGroup01/LogVol00
Resize a logical volume
lvresize -L new-size /dev/VolGroup01/LogVol00
Resize a filesystem
e.g. 1500M or 44G