The structure of a Logical Volume Manager (LVM) disk environment is illustrated by Figure 1, below. Logical Volume Management enables the combining of multiple individual hard drives and/or disk partitions into a single volume group. That volume group can then be subdivided into logical volumes or used as a single large volume. Regular file systems, such as EXT3 or EXT4, can then be created on a logical volume.
In Figure 1, two complete physical hard drives and one partition from a third hard drive have been combined into a single volume group. Two logical volumes have been created from the space in the volume group, and a filesystem, such as an EXT3 filesystem has been created on each of the two logical volumes.
The steps required to do this are fairly simple but, in my experience, are done infrequently so it is somewhat difficult to remember the syntax of the commands required.
- Create a physical volume of a complete hard drive or a partition on a hard drive.
- Create a volume group consisting of one or more physical volumes.
- Create one or more logical volumes from the space in a volume group.
- Create a filesystem on the logical volume.
- Add appropriate entries to /etc/fstab for mounting the filesystem.
- Mount the filesystem.
Each of these specific steps will be discussed in more detail on the following pages.