Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

2.3. LVM 逻​​​​​​​辑​​​​​​​卷​​​​​​​

在​​​​​​​ LVM 中​​​​​​​,卷​​​​​​​组​​​​​​​会​​​​​​​被​​​​​​​分​​​​​​​成​​​​​​​逻​​​​​​​辑​​​​​​​卷​​​​​​​。​​​​​​​LVM 逻​​​​​​​辑​​​​​​​卷​​​​​​​有​​​​​​​三​​​​​​​种​​​​​​​类​​​​​​​型​​​​​​​:线​​​​​​​性​​​​​​​卷​​​​​​​、​​​​​​​条​​​​​​​状​​​​​​​卷​​​​​​​和​​​​​​​镜​​​​​​​像​​​​​​​卷​​​​​​​。​​​​​​​这​​​​​​​些​​​​​​​在​​​​​​​以​​​​​​​后​​​​​​​的​​​​​​​内​​​​​​​容​​​​​​​中​​​​​​​都​​​​​​​有​​​​​​​论​​​​​​​述​​​​​​​。​​​​​​​

2.3.1. 线​​​​​​​性​​​​​​​卷​​​​​​​

一​​​​​​​个​​​​​​​线​​​​​​​性​​​​​​​卷​​​​​​​可​​​​​​​将​​​​​​​多​​​​​​​个​​​​​​​物​​​​​​​理​​​​​​​卷​​​​​​​集​​​​​​​合​​​​​​​到​​​​​​​一​​​​​​​个​​​​​​​逻​​​​​​​辑​​​​​​​卷​​​​​​​中​​​​​​​。​​​​​​​例​​​​​​​如​​​​​​​:如​​​​​​​果​​​​​​​您​​​​​​​有​​​​​​​两​​​​​​​个​​​​​​​ 60GB 的​​​​​​​磁​​​​​​​盘​​​​​​​,您​​​​​​​可​​​​​​​以​​​​​​​创​​​​​​​建​​​​​​​一​​​​​​​个​​​​​​​ 120GB 的​​​​​​​逻​​​​​​​辑​​​​​​​卷​​​​​​​。​​​​​​​物​​​​​​​理​​​​​​​存​​​​​​​储​​​​​​​是​​​​​​​连​​​​​​​在​​​​​​​一​​​​​​​起​​​​​​​的​​​​​​​。​​​​​​​
Creating a linear volume assigns a range of physical extents to an area of a logical volume in order. For example, as shown in 图 2.2 “扩​​​​​​​展​​​​​​​映​​​​​​​射​​​​​​​” logical extents 1 to 99 could map to one physical volume and logical extents 100 to 198 could map to a second physical volume. From the point of view of the application, there is one device that is 198 extents in size.

图 2.2. 扩​​​​​​​展​​​​​​​映​​​​​​​射​​​​​​​

The physical volumes that make up a logical volume do not have to be the same size. 图 2.3 “物​​​​​​​理​​​​​​​卷​​​​​​​大​​​​​​​小​​​​​​​不​​​​​​​同​​​​​​​的​​​​​​​线​​​​​​​性​​​​​​​卷​​​​​​​” shows volume group VG1 with a physical extent size of 4MB. This volume group includes 2 physical volumes named PV1 and PV2. The physical volumes are divided into 4MB units, since that is the extent size. In this example, PV1 is 100 extents in size (400MB) and PV2 is 200 extents in size (800MB). You can create a linear volume any size between 1 and 300 extents (4MB to 1200MB). In this example, the linear volume named LV1 is 300 extents in size.

图 2.3. 物​​​​​​​理​​​​​​​卷​​​​​​​大​​​​​​​小​​​​​​​不​​​​​​​同​​​​​​​的​​​​​​​线​​​​​​​性​​​​​​​卷​​​​​​​

You can configure more than one linear logical volume of whatever size you desire from the pool of physical extents. 图 2.4 “多​​​​​​​逻​​​​​​​辑​​​​​​​卷​​​​​​​” shows the same volume group as in 图 2.3 “物​​​​​​​理​​​​​​​卷​​​​​​​大​​​​​​​小​​​​​​​不​​​​​​​同​​​​​​​的​​​​​​​线​​​​​​​性​​​​​​​卷​​​​​​​”, but in this case two logical volumes have been carved out of the volume group: LV1, which is 250 extents in size (1000MB) and LV2 which is 50 extents in size (200MB).

图 2.4. 多​​​​​​​逻​​​​​​​辑​​​​​​​卷​​​​​​​