LVM Overview
To use an Elastic Volume Service (EVS) disk in Linux, partitions need to be created on this disk. If the partition space becomes insufficient, you can handle the insufficiency in either of the following ways:
- Expand an existing partition (services will be interrupted).
- Create a new partition (services will not be interrupted).
Both ways are not ideal as either services need to be interrupted or new partitions need to be created. In this case, LVM can perfectly handle the space insufficiency.
Basic Principles of LVM
LVM is short for Logical Volume Manager, which is a mechanism used for managing disk partitions in Linux.
The process of managing EVS disks through LVM is as follows:
- Create physical volumes for EVS disks.
- Create a volume group for the physical volumes.
- Create logical volumes in the volume group.
- Create file systems on logical volumes.
When EVS disks are managed using LVM, file systems are distributed on multiple EVS disks and can be easily resized as needed. Therefore, file system spaces will no longer be limited by EVS disk capacities.
For example, you can expand the size of a ext4 file system in either of the following methods:
- Expand the capacity of the logical volume directly if the unallocated space in the volume group is sufficient.
- Expand the capacity of the volume group and then expand the capacity of the logical volume if the unallocated space in a volume group is insufficient.
