A Logical Volume manager (LVM) for Linux enables to manage disk space in a very flexible way. It allows to add disk space to a logical volume and its filesystem while such filesystem is mounted and active. It provides the ability to collect multiple physical hard drives and partitions in a single volume group that can be divided into logical volumes.
The volume manager also helps reducing the amount of disk space allocated to a logical volume, but with some requirements: the volume can't be mounted and the size of the filesystem where it is hosted must be reduced first.
In addition, LVM allows to add disk space to a server creating a new group of volumes or adding space to a existing group of volumes expanding a logical volume in that group or creating a new one. To add a new logical volume you should follow these steps:
- Install a new hard drive if necessary.
- Optional: Create a partition on the hard drive.
- Create a physical volume of the full hard drive or a partition on the hard disk.
- Assign the new physical volume to an existing volume group or create a new group of volumes.
- Create a new logical volume from the space of the group of volumes.
- Create a filesystem in the new logical volume.
- Add the appropiate entries to mount the filesystem: to /etc/fstab
- Mount the filesystem.
For further info and tips on LVM read the original article