Logical Volume management or LVM

So you think you know this right? You’ve just read about logical partitions. Yea, sure, but names in Linux are as ambiguous, as lazy developers are to think of them. Which means, they will call everything by the same name. Which means this logical volume is not that logical volume. Nice, isn’t it? OK, there might just be some overlap, let's see…

LVM is one (or even more than one) step ahead of the above idea. In LVM you create logical volumes, almost regardless of the underlying physical infrastructure, or partitions. You can make one disc appear as two, but even make two physical hard drives disc into one logical volume, so from inside Linux, they will appear as one single hard drive (or volume). You can also combine any number of partitions into a single volume, and they do not even have to be next to each other. This is in and of itself quite useful, but there is more.

Some illustration from some website (source: opensource.com)

Partitions can be moved and resized using specific software, but the operation is slow. Besides being time-consuming (it can take hours to move larger partitions), it is also quite dangerous, as there is always a risk of data loss. when you manipulate partitions, there is absolutely no guarantee your data will stay intact. A power-cut in the middle of the operation can be disastrous.

LVM solves this. You can move resize and otherwise manipulate LVM logical volumes on the fly, which means without having to restart your computer, unmount the partition, or fearing data loss. Sweet, isn’t it? Another added benefit is the ability to make snapshots, from which you can recover the system in the event of a crash. Some file systems implement this without LVM (see below) but it is nice to have the ability in a way that is file system agnostic.

The concept of LVM is not a simple one, and to learn everything about it might not interest everyone reading this article. It is a very useful tool and has many benefits, so reading about it before installing Linux can be beneficial, as you could set up your disks using LVM, and run your Linux from it right away. Unfortunately, it is not only very long, but the subject is quite boring too, but if you are still interested, the below two links will have you up to speed in no time flat:

Click here for the LVM bits of the official Debian Wiki. Debian-administration.org also has an excellent, but not-so-beginner-friendly article covering the basics, or the possibly more user-friendly introduction on opensource.com.