Documentation/device-mapper/dm-striped

Chinese translated version of Documentation/filesystems/ecryptfs


If you have any comment or update to the content, please contact the
original document maintainer directly.  However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help.  Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.




Chinese maintainer: 朱司仪  331954465@qq.com
---------------------------------------------------------------------
Documentation/device-mapper/dm-striped的中文翻译




如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。


中文版维护者: 朱司仪  331954465@qq.com
中文版翻译者: 朱司仪  331954465@qq.com
中文版校译者: 朱司仪  331954465@qq.com




以下为正文
---------------------------------------------------------------------
                      =============
                      Documentation/device-mapper/dm-striped
                      =============
=========


Device-Mapper's "striped" target is used to create a striped (i.e. RAID-0)
device across one or more underlying devices. Data is written in "chunks",
with consecutive chunks rotating among the underlying devices. This can
potentially provide improved I/O throughput by utilizing several physical
devices in parallel.




设备映射器的“条纹”的目标是用来创建一个条带(即RAID-0)
跨越一个或多个相关设备装置。数据被写入在“块”,
连续块之间的相关设备旋转。
这可以提供改善利用多个物理I / O吞吐量的并行设备。




Parameters: <num devs> <chunk size> [<dev path> <offset>]+
    <num devs>: Number of underlying devices.
    <chunk size>: Size of each chunk of data. Must be at least as
                  large as the system's PAGE_SIZE.
    <dev path>: Full pathname to the underlying block-device, or a
                "major:minor" device-number.
    <offset>: Starting sector within the device.


参数:<num devs><Chunk SIZE>[<dev path><offset>] +
    <num devs>:底层设备的数量。
    <chunk size>:每个数据块的大小。必须至少为
                  大系统的PAGE_SIZE。
    <dev path>的完整路径名相关的块的移动设备,或
                “主要:次要设备数。
    <offset>:起始扇区内的设备。




One or more underlying devices can be specified. The striped device size must
be a multiple of the chunk size multiplied by the number of underlying devices.




可以指定一个或多个底层设备。条纹设备大小必须是由数量乘以相关设备的块大小的整数倍。




Example scripts
===============


[[
#!/usr/bin/perl -w
# Create a striped device across any number of underlying devices. The device
# will be called "stripe_dev" and have a chunk-size of 128k.


my $chunk_size = 128 * 2;
my $dev_name = "stripe_dev";
my $num_devs = @ARGV;
my @devs = @ARGV;
my ($min_dev_size, $stripe_dev_size, $i);


if (!$num_devs) {
        die("Specify at least one device\n");
}


$min_dev_size = `blockdev --getsize $devs[0]`;
for ($i = 1; $i < $num_devs; $i++) {
        my $this_size = `blockdev --getsize $devs[$i]`;
        $min_dev_size = ($min_dev_size < $this_size) ?
                        $min_dev_size : $this_size;
}


$stripe_dev_size = $min_dev_size * $num_devs;
$stripe_dev_size -= $stripe_dev_size % ($chunk_size * $num_devs);


$table = "0 $stripe_dev_size striped $num_devs $chunk_size";
for ($i = 0; $i < $num_devs; $i++) {
        $table .= " $devs[$i] 0";
}


`echo $table | dmsetup create $dev_name`;
]]
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值