When you run out of space on a filesystem, things can get very ugly. We already ran out of space in /games, and there is no easy solution that exists for adding more space using standard partitioning. Luckily, Logical Volume Manager (LVM) offers a better alternative for managing filesystems.
Installing the LVM package
Before we start playing with LVM, first, we need to install the lvm2 package:
root@ubuntu-linux:~# apt-get install lvm2
After the installation is complete, you can run the lvm version command to verify the installation is successful:
root@ubuntu-linux:~# lvm version
LVM version: 2.02.176(2) (2017-11-03)
Library version: 1.02.145 (2017-11-03)
Driver version: 4.37.0
Three layers of abstraction
To understand how LVM works, you first need to visualize it. LVM is like a cake that is made up of three layers, as shown in Figure 4.
Figure 4: Visualizing LVM
Physical volumes construct the first (base layer) of the LVM cake. Physical volumes can either be...