2.3. LVM 构架总览
For the Red Hat Enterprise Linux 4 release of the Linux operating system, the original LVM1 logical volume manager was replaced by LVM2, which has a more generic kernel framework than LVM1. LVM2 provides the following improvements over LVM1:
- 灵活的容量
- 更有效的元数据存储
- 更好的修复格式
- 新的 ASCII 元数据格式
- 元数据微调
- 元数据冗余副本
LVM2 可向下兼容 LVM1,但不支持 LVM1 的快照和群集。您可以使用
vgconvert 命令将卷组从 LVM1 格式转换成 LVM2 格式。有关转换 LVM 元数据格式的详情请参考 vgconvert(8) man page。
LVM 逻辑卷的基本物理存储单元是块设备,比如分区或者整个磁盘。这个设备是作为 LVM 物理卷(PV)进行初始化的。
要创建一个 LVM 逻辑卷,就要将物理卷合并到卷组(VG)中。这就生成了磁盘空间池,用它可分配 LVM 逻辑卷(LV)。这个过程和将磁盘分区的过程类似。逻辑卷由文件系统和应用程序(比如数据库)使用。
图 2.1 “LVM Logical Volume Components” shows the components of a simple LVM logical volume:
图 2.1. LVM Logical Volume Components
For detailed information on the components of an LVM logical volume, see 第 3 章 LVM 组成.