您的位置:首页 > 运维架构 > Linux

linux内核文件翻译-DM-条纹

2013-11-03 14:31 423 查看
Chinese translated version of Documentation/namespaces/resource-control.txt

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: 田雨 479103577@qq.com

---------------------------------------------------------------------

Documentation/namespaces/resource-control.txt 的中文翻译

如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文

交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻

译存在问题,请联系中文版维护者。

中文版维护者: 田雨 479103577@qq.com

中文版翻译者: 田雨 479103577@qq.com

中文版校译者: 田雨 479103577@qq.com

dm-stripe

2 DM-条纹=========

3

4 Device-Mapper's "striped" target is used to create a striped (i.e. RAID-0)

5 device across one or more underlying devices. Data is written in "chunks",

6 with consecutive chunks rotating among the underlying devices. This can

7 potentially provide improved I/O throughput by utilizing several physical

8 devices in parallel.

9 设备映射器的“条纹”的目标是用来创建一个条带(即RAID-0)

设备跨越一个或多个相关设备。数据被写入在“块”,

,连续块之间的相关设备旋转。这可以

可能通过利用多个物理提供了改进的I / O吞吐量

设备并联。

10 Parameters: <num devs> <chunk size> [<dev path> <offset>]+

11 <num devs>: Number of underlying devices.

12 <chunk size>: Size of each chunk of data. Must be at least as

13 large as the system's PAGE_SIZE.

14 <dev path>: Full pathname to the underlying block-device, or a

15 "major:minor" device-number.

16 <offset>: Starting sector within the device.

17 参数:<num devs><Chunk SIZE>[<dev路径><偏移>] +

<Num devs>的相关设备的数量。

<Chunk SIZE>:每个数据块的大小。必须至少为

个大型系统的PAGE_SIZE。

<dev路径>的完整路径名相关的块的移动设备,或

十五“重大:小”设备号码。

<offset>取值范围:起始扇区内的设备。

18 One or more underlying devices can be specified. The striped device size must

19 be a multiple of the chunk size multiplied by the number of underlying devices.

20 可以指定一个或多个底层设备。条纹设备大小必须

是由数量乘以相关设备的块大小的整数倍。

21

22 Example scripts

23 =示例脚本==============

24

25 [[

26 #!/usr/bin/perl -w

27 # Create a striped device across any number of underlying devices. The device

28 # will be called "stripe_dev" and have a chunk-size of 128k.

29 [

26#!的/ usr/ bin中/ perl的-W

27#创建条带化设备在任意数量的基础设备。该装置

28#将被称为“stripe_dev”,有128K的块大小。

30 my $chunk_size = 128 * 2;

31 my $dev_name = "stripe_dev";

32 my $num_devs = @ARGV;

33 my @devs = @ARGV;

34 my ($min_dev_size, $stripe_dev_size, $i);

35

36 if (!$num_devs) {

37 die("Specify at least one device\n");

38 }

39

40 $min_dev_size = `blockdev --getsize $devs[0]`;

41 for ($i = 1; $i < $num_devs; $i++) {

42 my $this_size = `blockdev --getsize $devs[$i]`;

43 $min_dev_size = ($min_dev_size < $this_size) ?

44 $min_dev_size : $this_size;

45 }

46

47 $stripe_dev_size = $min_dev_size * $num_devs;

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

49

50 $table = "0 $stripe_dev_size striped $num_devs $chunk_size";

51 for ($i = 0; $i < $num_devs; $i++) {

52 $table .= " $devs[$i] 0";

53 }

54

55 `echo $table | dmsetup create $dev_name`;

56 ]]

57
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: