What is centos lvm

青灯夜游
Release: 2022-01-28 17:10:34
Original
3661 people have browsed it

In centos, the full name of lvm is "Logical Volume Manager", which means "logical volume management" in Chinese. It is a mechanism for managing disk partitions in the Linux environment. Its original intention was to solve the problem of hard disk devices. It is not easy to modify the partition size permissions after the partition is created.

What is centos lvm

The operating environment of this article: CentOS 7 system, DELL G3 computer

What is LVM

LVM is the abbreviation of Logical Volume Manager, which is a mechanism for managing disk partitions in the Linux environment.

The original intention of its creation is to solve the problem that hard disk devices cannot easily modify the partition size permissions after creating a partition. LVM technology adds a logical layer between the hard disk partition and the file system. It provides an abstract Volume groups can combine multiple hard disks into cans. In this way, users do not have to worry about the underlying architecture layout of the physical hard disk device, and can easily dynamically adjust the hard disk partition. In short, when one of our partitions is not enough in production, in addition to cleaning up historical data, we need to adjust the storage location of the current data. Otherwise, once the partition is full, it will not work, and LVM technology can solve the problem. After migrating the original data (the original partition must be in LVM format), you can add a hard disk at will, and then dynamically add space to the LVM partition. Of course, you can also reduce the space. The point is that the original data will not be affected in any way.

Why use LVM

If you directly use the fdisk partition to mount, as time goes by, the amount of data will become larger and larger, and the hard disk space will become smaller and smaller. If you want to expand the capacity, you must mount a new hard disk and then migrate the data. This will inevitably lead to the cessation of front-end business and does not meet the needs of the enterprise. Therefore, the perfect solution should be to freely adjust the size of the file system without any downtime. Adjustments can facilitate file systems spanning different disks and partitions. The logical volume management (LVM, Logical Volume Manager) mechanism provided by Linux is a perfect solution.

LVM logical volume management abstractly encapsulates the underlying physical hard disk and presents it to the upper-layer system in the form of a logical volume. The size of the logical volume can be dynamically adjusted without losing existing data. The newly added hard disk will not change the existing upper logical volume, which greatly improves the flexibility of disk management.

Several LVM terms:

Physical storage media (The physical media): This refers to the system’s storage device: hard disk, such as: /dev/hda, /dev /sda, etc., are the lowest-level storage units of the storage system.

                                                                                                                                        Physical volume (physical volume): A physical volume refers to a hard disk partition or a device (such as RAID) that logically has the same function as a disk partition. It is the basic storage logical block of LVM, but it is not the same as the basic physical storage. Media (such as partitions, disks, etc.) comparison, but contains management parameters related to LVM.

           Volume Group: LVM volume group is similar to a physical hard disk in a non-LVM system, and is composed of physical volumes. One or more "LVM partitions" (logical volumes) can be created on a volume group, which consists of one or more physical volumes.

                Logical volume (logical volume): The logical volume of LVM is similar to the hard disk partition in the non-LVM system. A file system (such as /home or /usr, etc.) can be established on the logical volume.

​​​​PE (physical extent): Each physical volume is divided into basic units called PE (Physical Extents). The PE with a unique number is the smallest unit that can be addressed by LVM. The size of the PE is configurable and defaults to 4MB.

LE (logical extent): Logical volumes are also divided into addressable basic units called LE (Logical Extents). In the same volume group, the size of LE and PE are the same and correspond one to one.

A hard disk (physical storage medium) is formatted into a physical volume (Physical Volume), which is divided into several PE (PHYSICAL Ex ') with a default size of 4m, and then creates the volume group on the basis of PV (Volume Group), you can add one or more PVs to VG. VG is like a space pool. How many PVs are there, how much capacity does VG have? Finally, a logical volume is created based on VG, a logical volume Just several PEs, then format the LV and then mount it (treat the LV as a partition)

Recommendation: "centos usage tutorial"

The above is the detailed content of What is centos lvm. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template