2.2. 逻辑卷
Volume management creates a layer of abstraction over physical storage, allowing you to create logical storage volumes. This provides much greater flexibility in a number of ways than using physical storage directly. With a logical volume, you are not restricted to physical disk sizes. In addition, the hardware storage configuration is hidden from the software so it can be resized and moved without stopping applications or unmounting file systems. This can reduce operational costs.
逻辑卷在直接使用物理存储时有以下优势:
- 灵活的容量当使用逻辑卷时,可在多个磁盘间扩展文件系统,因为您可以将磁盘和分区集合成一个逻辑卷。
- 重新设定存储池大小您可以使用检单的软件命令增大或者减小逻辑卷的大小,而无需对所在磁盘设备重新格式化或者重新分区。
- 在线数据重新定位要部署更新、更快或者更有弹性的存储子系统,以便您可以在系统活跃时移动数据。数据可以在磁盘正在使用时进行重新分配。例如,您可以在删除一个热交换磁盘之前将其清空。
- 方便设备命名逻辑存储卷可在用户定义的组群中进行管理,这些组群可按您的要求进行命名。
- 磁盘条带您可以创建一个可在两个或者更多磁盘间条状分布数据的逻辑卷。这可大幅度提高吞吐量。
- 镜像卷逻辑卷为您提供了一个方便配置数据镜像的方法。
- 卷快照使用逻辑卷,您可以提取设备快照,这样可在持续备份或者在不影响真实数据的情况下测试修改效果。
本文档的以下内容对在 LVM 中实施这些特性进行了论述。