Linux Administration Bootcamp
Installing and Connecting to a Linux System
Intermediate Linux Skills
Linux Boot Process and System Logging
Disk Management in Linux
LVM - The Logical Volume Manager
User Management in Linux
Networking With Linux
Shell Scripting with Linux
Command Line Kung Fu
In this course, you will learn how to install a Linux system and connect to it, whether that be on Mac or Windows.
LVM stands for Logical Volume Manager. The Logical Volume Manager introduces extra layers of abstraction between the discs or storage devices presented to a Linux system and the file systems placed on those discs or storage devices. Before we get into those layers of abstraction and how to use them, let's talk about why you would want to use LVM in the first place. By the way I'm going to be teaching from slides for the next minute or two so that you understand the concepts behind LVM, and then I'm going to open up a terminal and start demonstrating exactly how to use LVM.
One benefit of using LVM is that you can create file systems that extend across multiple storage devices. With LVM, you can aggregate multiple storage devices into a single logical volume. LVM allows you to expand or shrink file systems in real time, while the data remains online and fully accessible. Without LVM, you would have to re-format and re-partition the underlying storage devices. Of course, you would have to take the file system offline to perform that work. With LVM, you eliminate that problem.
LVM also allows you to easily migrate data from one storage device to another while that data is online. For example, if you want to deploy newer, faster or more resilient storage, you can just move your existing data from the current storage devices to the new ones while your system is still active. Instead of using abstract disc numbers, you can use human readable device names of your choosing. Instead of wondering what data is on /dev/sdb, you can name your data with a descriptive name. With LVM, you can stripe data across two or more disks. This can dramatically increase throughput by allowing your system to read data in parallel.
If you want to increase fault tolerance and reliability, use LVM to mirror your data so that you always have more than one copy of your data. Using LVM mirroring prevents single points of failure. And if one storage device fails your data can be accessed to via another storage device. You can then fix or replace the failed storage device to restore your mirror all without downtime. LVM gives you the ability to create point in time snapshots of your file systems. This can be perfect for when you need consistent backups. For example, you could pause rights to a database, take a snapshot of the logical volume where that database data resides, then resume rights to that database. That way you ensure your data is in a known good state when you perform the backup of that snapshot.