Show Table of Contents
4.4.2. 建立等量卷冊
針對於大量的連續讀取和寫入,建立等量的邏輯卷冊可改善資料 I/O 的效率。欲取得更多有關等量卷冊的相關資訊,請參閱〈節 2.3.2, “等量邏輯卷冊”〉。
當您建立等量邏輯卷冊時,您可透過
lvcreate 指令的 -i 引數來指定磁條的數量。這可決定邏輯卷冊需要被分散至多少實體卷冊上。磁條的數量不可大於卷冊群組中的實體卷冊數量(除非使用了 --alloc anywhere 引數)。
若構成等量邏輯卷冊的基本實體裝置的大小不同的話,等量卷冊的最大大小便會取決於最小的基本裝置。比方說,在一個 two-legged 的磁條中,最大大小將會等於較小裝置大小的兩倍。在一個 three-legged 的磁條中,最大大小則等於最小裝置大小的三倍。
下列指令將會在兩個實體卷冊上建立等量邏輯卷冊,並且磁條為 64KB。邏輯卷冊大小為 50 GB、名為
gfslv,並由卷冊群組 vg0 中所分割出。
# lvcreate -L 50G -i2 -I64 -n gfslv vg0
和線性卷冊相同,您可指定您將會使用於磁條的實體卷冊扇區。下列指令將會在兩個實體卷冊上,建立一個大小為 100 扇區的等量卷冊,名為
stripelv,並且位於卷冊群組 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

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.