io - 当我在一个 LV 下有多个磁盘时,lvm 的性能如何

标签 io disk hard-drive raid lvm

我在一个VG下有三个磁盘和三个PV(基于三个磁盘),然后我在VG上创建了一个LV并将LV挂载到文件夹/bigdisk。即将三个硬盘合并到一个文件夹/bigdisk。我的问题是,当我向/bigdisk写入数据时,数据是否会同时 strip 化到三个磁盘?即三个磁盘是否会同时服务于输入操作以获得更好的 I/O 性能,就像 raid0 一样?

最佳答案

默认情况下,lvcreate创建一个不会跨越 PV 的线性 LV;它只是将 PV 连接在一起。但是,您可以在使用 --stripes 创建 LV 时配置 strip 化。和 --stripesize选项。来自 man lvcreate的页面:

-i, --stripes Stripes

Gives the number of stripes. This is equal to the number of physical volumes to scatter the logical volume.

-I, --stripesize StripeSize

Gives the number of kilobytes for the granularity of the stripes. StripeSize must be 2^n (n = 2 to 9) for metadata in LVM1 format. For metadata in LVM2 format, the stripe size may be a larger power of 2 but must not exceed the physical extent size.

vgcreate 创建的 VG 的默认物理范围大小是 4 MiB,因此在默认配置下, strip 大小可以设置在 4 KiB 和 4 MiB 之间。
strip 化由内核的 device mapper 处理.您可以使用 dmsetup 检查低级配置.

关于io - 当我在一个 LV 下有多个磁盘时,lvm 的性能如何,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32211400/

相关文章:

windows - 监视硬盘驱动器上创建的新文件

C++简单IO元音计数程序

java - ObjectInputStream(socket.getInputStream());不起作用

node.js - 套接字.io 1.0 : configure close timeout

c# - 解析 Quickbook IIF 格式文件

c - FAT BPB 和小端反转

C : write() fails while writing to a RAW disk after specific size limit reached

java - MySQL数据查找?

java - 创建一个随机磁盘文件输入长度的数组

java - 将文件写入随机不连续的硬盘位置