2.3.2. 条状逻辑卷
当您向 LVM 逻辑卷写入数据时,文件系统在基本物理卷之间部署数据。您可以通过创建条状逻辑卷控制数据向物理卷写入的方法。对于大批量的读取和写入,这样可以提高数据输入/输出的效率。
条带化数据可通过以 round-round 模式向预定数目的物理卷写入数据来提高性能。使用条带模式,I/O 可以平行执行。在有些情况下,这样可以使条带中每个附加的物理卷获得类似线性卷的性能。
以下示例显示数据在三个物理卷之间进行条状分布。在这个图表中:
- 数据的第一条写入 PV1
- 数据的第二条写入 PV2
- 数据的第三条写入 PV3
- 数据的第四条写入 PV1
在条状逻辑卷中,条的大小不能超过扩展的大小。
![在三个 PV 中条状分配数据](https://access.redhat.com/webassets/avalon/d/Red_Hat_Enterprise_Linux-5-Logical_Volume_Manager_Administration-zh-CN/images/3364895cdeb4a5c194db1c1fae0bce10/stripedvol.png)
图 2.5. 在三个 PV 中条状分配数据
Striped logical volumes can be extended by concatenating another set of devices onto the end of the first set. In order extend a striped logical volume, however, there must be enough free space on the underlying physical volumes that make up the volume group to support the stripe. For example, if you have a two-way stripe that uses up an entire volume group, adding a single physical volume to the volume group will not enable you to extend the stripe. Instead, you must add at least two physical volumes to the volume group. For more information on extending a striped volume, see 第 4.4.9 节 “扩展条状卷”.