5.4.2. 创建条状卷
For large sequential reads and writes, creating a striped logical volume can improve the efficiency of the data I/O. For general information about striped volumes, see 第 3.3.2 节 “条状逻辑卷”.
当您创建条状逻辑卷时,请使用
lvcreate 命令的 -i 参数指定条带的数目。这取决于逻辑卷要进行条带化的物理卷数目。条带的数目不能超过卷组中物理卷的数目(除非使用 --alloc anywhere 参数)。
如果构成逻辑卷的基本物理设备的大小不同,条状卷的最大容量由最小的基本设备决定。例如,在有两个分支条状卷中,其容量最大为较小设备的两倍。在有三个分支的条状卷中,其容量是最小设备的三倍。
The following command creates a striped logical volume across 2 physical volumes with a stripe of 64kB. The logical volume is 50 gigabytes in size, is named
gfslv, and is carved out of volume group vg0.
lvcreate -L 50G -i2 -I64 -n gfslv vg0
# lvcreate -L 50G -i2 -I64 -n gfslv vg0
As with linear volumes, you can specify the extents of the physical volume that you are using for the stripe. The following command creates a striped volume 100 extents in size that stripes across two physical volumes, is named
stripelv and is in volume group testvg. The stripe will use sectors 0-49 of /dev/sda1 and sectors 50-99 of /dev/sdb1.
lvcreate -l 100 -i2 -nstripelv testvg /dev/sda1:0-49 /dev/sdb1:50-99
# lvcreate -l 100 -i2 -nstripelv testvg /dev/sda1:0-49 /dev/sdb1:50-99
Using default stripesize 64.00 KB
Logical volume "stripelv" created