Type of LVM logical volume

Time:2020-3-11

There are many types of logical volumes that can be created in LVM volume groups. The following describes different types of logical volumes

Linear volume

Linear volumes aggregate space from one or more physical volumes into a logical volume. Physical storage is linearly connected. Creating a linear volume sequentially assigns a series of physical extents to the extents of the logical volume. For example, map the logical range 1-99 to a physical volume, and map the logical range 100-198 to a second physical volume. From an application perspective, there is a device size of 198 logical units.

Striped logical volume

When writing data to LVM logical volumes, the file system will transfer the data to the underlying physical volumes, and you can control the way the data is written to the physical volumes by creating striped logical volumes. For a large number of linear reads and writes, this method can improve the IO rate. Striping improves performance by polling schedules to write data to a predetermined number of physical volumes. With striping, IO can be done in parallel, resulting in near linear performance improvements for each physical volume in the stripe in some cases.

Raid logical volume

LVM supports RAID 1 / 4 / 5 / 6 / 10. The raid logical volumes created and managed through LVM utilize the MD kernel driver. RAID1 images can be temporarily split from the array and then merged back into the array. LVM raid volumes support snapshots.

Thin provisioned logical volumes

Logical volumes can be thin provisioned, which allows the creation of logical volumes larger than the available expansion units. With thin provisioning, you can manage the storage pools of free space, known as thin pools, which can be allocated to a specified number of devices only when they are used by applications. Devices bound to thin pools can be created to allocate space for later applications when they actually write to logical volumes. Thin pools can be dynamically expanded as needed to allocate storage space cost effectively.

Snapshot volume

LVM snapshot function provides a function to create a virtual image of a device in a certain state without service interruption. When the original device changes after the snapshot is created, the snapshot function copies the changed data area as before, so that it can rebuild the state of the device.
Because the snapshot only copies the changed data area after the snapshot is created, the snapshot function only needs a small amount of storage space. The file system of snapshot copy is a virtual copy, which is not a real data backup. Snapshots do not replace the backup process. The snapshot size is determined by changes relative to the original volume.
If the snapshot is full, the snapshot becomes unavailable because there is no space to record changes.

Thin provisioned snapshot volumes

Thin provisioned snapshot volumes allow multiple virtual devices to store data on the same block of data volumes, simplifying management and allowing data to be shared between snapshot volumes. All LVM snapshot volumes do not support cross cluster nodes. Thin provisioned snapshot volumes can be used with fewer disks when there are multiple snapshots of an original volume.
Thin provisioned snapshot volumes can be used as logical volumes for other snapshots. Allow recursive snapshots of any depth.

Cache volume

LVM supports the use of high-performance block devices such as SSDs as the write out cache of large capacity and low-performance block devices. Users can create a cache logical volume to improve the performance of existing logical volumes, or create a logical volume composed of small capacity, high-performance and large capacity, low-performance devices.