Logical Volume Manager
The course is part of this learning path
The Logical Volume Manager introduces extra layers of abstraction between the disks or storage devices presented to a Linux system and the file systems placed on them. This course explores the service and its components. This course is part of the Linux Administration Bootcamp learning path, designed to get you up and running with Linux.
- Understand what the LVM is and how it works
- Create and remove physical volumes (PVs), volume groups (VGs), and logical volumes (LVs)
- Extend volume groups and extend and mirror logical volumes
- Migrate Data from one storage device to another
- Anyone with basic knowledge of Linux who wants to learn more
- Professionals who want to learn more about Linux to enhance their career prospects
This is an intermediate-level course so some knowledge of Linux is expected. If you're just starting out, then try our Linux Fundamentals course first.
As I said at the beginning of this lesson. The logical volume manager introduces extra layers of abstraction between the storage devices and the file systems placed on those storage devices. The first layer of abstraction are physical volumes. These are storage devices that are used by LVM. The name is a bit of a legacy name though. To be clear, these storage devices do not have to be physical. They just have to be made available to the Linux operating system. In other words, as long as Linux sees the device as a block storage device it can be used as a physical volume, also known as a PV, physical hard drives, iSCSI devices, SanDisks, and so on can be PVs. You can allocate an entire storage device as a PV or you can partition a storage device and use just that one partition as a PV.
The next layer of abstraction is the volume group. A volume group is made up of one or more physical volumes. You can think of a volume group as a pool of storage. If you want to increase the size of the pool you simply add more PVs. Keep in mind that you can have different types of storage in the same volume group if you want. For example, you could have some PVs that are backed by hard disks and other PVs that are backed by SanDisks. We'll talk about how this can come in handy when performing data migrations later in this lesson.
The next layer of abstraction is the logical volume layer. Logical volumes are created from a volume group, file systems are then created on top of those logical volumes. Without LVM, you would create a file system on a disc partition but with LVM you create a file system on a logical volume. As long as there is free space in the volume group logical volumes can be extended. You can also shrink logical volumes to reclaim unused space if you want. But typically in practice you'll find yourself extending logical volumes.
Jason is the founder of the Linux Training Academy as well as the author of "Linux for Beginners" and "Command Line Kung Fu." He has over 20 years of professional Linux experience, having worked for industry leaders such as Hewlett-Packard, Xerox, UPS, FireEye, and Amazon.com. Nothing gives him more satisfaction than knowing he has helped thousands of IT professionals level up their careers through his many books and courses.