2.3. Volúmenes lógicos LVM
En LVM, un grupo de volúmenes está dividido en volúmenes lógicos. Hay tres tipos de volúmenes lógicos LVM: volúmenes lineales, volúmenes entrelazados y volúmenes en espejo. Las siguientes secciones describen cada uno de éstos.
2.3.1. Volúmenes lineales
Un volumen lineal añade varios volúmenes físicos en un volumen lógico. Por ejemplo, si tiene dos discos de 60GB, puede crear un volumen lógico de 120GB. El almacenamiento físico es concatenado.
Creating a linear volume assigns a range of physical extents to an area of a logical volume in order. For example, as shown in Figura 2.2, “Mapas de extensiones” 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.
Figura 2.2. Mapas de extensiones
The physical volumes that make up a logical volume do not have to be the same size. Figura 2.3, “Volumen lineal con volúmenes físicos disparejos” 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.
Figura 2.3. Volumen lineal con volúmenes físicos disparejos
You can configure more than one linear logical volume of whatever size you desire from the pool of physical extents. Figura 2.4, “Volúmenes lógicos múltiples” shows the same volume group as in Figura 2.3, “Volumen lineal con volúmenes físicos disparejos”, 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).
Figura 2.4. Volúmenes lógicos múltiples