diff options
author | Jonathan Brassow <jbrassow@redhat.com> | 2011-08-02 07:32:06 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 07:32:06 -0400 |
commit | c0a2fa1ef1057a1e9450d6f055f1cde2ad4f85a2 (patch) | |
tree | e854f60aea4d5ed24644ee32d6bf97e8cf7e2101 /Documentation/device-mapper/dm-raid.txt | |
parent | 759dea204cce9f1fc2a5d00ea25211299fc7a4a0 (diff) |
dm raid: improve table parameters documentation
Add more information about some dm-raid table parameters and clarify how
parameters are printed when 'dmsetup table' is issued.
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'Documentation/device-mapper/dm-raid.txt')
-rw-r--r-- | Documentation/device-mapper/dm-raid.txt | 124 |
1 files changed, 78 insertions, 46 deletions
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index 33b6b7071ac8..4f9dd3cecc11 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -1,49 +1,75 @@ | |||
1 | Device-mapper RAID (dm-raid) is a bridge from DM to MD. It | 1 | dm-raid |
2 | provides a way to use device-mapper interfaces to access the MD RAID | 2 | ------- |
3 | drivers. | ||
4 | 3 | ||
5 | As with all device-mapper targets, the nominal public interfaces are the | 4 | The device-mapper RAID (dm-raid) target provides a bridge from DM to MD. |
6 | constructor (CTR) tables and the status outputs (both STATUSTYPE_INFO | 5 | It allows the MD RAID drivers to be accessed using a device-mapper |
7 | and STATUSTYPE_TABLE). The CTR table looks like the following: | 6 | interface. |
8 | 7 | ||
9 | 1: <s> <l> raid \ | 8 | The target is named "raid" and it accepts the following parameters: |
10 | 2: <raid_type> <#raid_params> <raid_params> \ | 9 | |
11 | 3: <#raid_devs> <meta_dev1> <dev1> .. <meta_devN> <devN> | 10 | <raid_type> <#raid_params> <raid_params> \ |
12 | 11 | <#raid_devs> <metadata_dev0> <dev0> [.. <metadata_devN> <devN>] | |
13 | Line 1 contains the standard first three arguments to any device-mapper | 12 | |
14 | target - the start, length, and target type fields. The target type in | 13 | <raid_type>: |
15 | this case is "raid". | 14 | raid4 RAID4 dedicated parity disk |
16 | 15 | raid5_la RAID5 left asymmetric | |
17 | Line 2 contains the arguments that define the particular raid | 16 | - rotating parity 0 with data continuation |
18 | type/personality/level, the required arguments for that raid type, and | 17 | raid5_ra RAID5 right asymmetric |
19 | any optional arguments. Possible raid types include: raid4, raid5_la, | 18 | - rotating parity N with data continuation |
20 | raid5_ls, raid5_rs, raid6_zr, raid6_nr, and raid6_nc. (raid1 is | 19 | raid5_ls RAID5 left symmetric |
21 | planned for the future.) The list of required and optional parameters | 20 | - rotating parity 0 with data restart |
22 | is the same for all the current raid types. The required parameters are | 21 | raid5_rs RAID5 right symmetric |
23 | positional, while the optional parameters are given as key/value pairs. | 22 | - rotating parity N with data restart |
24 | The possible parameters are as follows: | 23 | raid6_zr RAID6 zero restart |
25 | <chunk_size> Chunk size in sectors. | 24 | - rotating parity zero (left-to-right) with data restart |
26 | [[no]sync] Force/Prevent RAID initialization | 25 | raid6_nr RAID6 N restart |
27 | [rebuild <idx>] Rebuild the drive indicated by the index | 26 | - rotating parity N (right-to-left) with data restart |
28 | [daemon_sleep <ms>] Time between bitmap daemon work to clear bits | 27 | raid6_nc RAID6 N continue |
29 | [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization | 28 | - rotating parity N (right-to-left) with data continuation |
30 | [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization | 29 | |
31 | [max_write_behind <sectors>] See '-write-behind=' (man mdadm) | 30 | Refererence: Chapter 4 of |
32 | [stripe_cache <sectors>] Stripe cache size for higher RAIDs | 31 | http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf |
33 | 32 | ||
34 | Line 3 contains the list of devices that compose the array in | 33 | <#raid_params>: The number of parameters that follow. |
35 | metadata/data device pairs. If the metadata is stored separately, a '-' | 34 | |
36 | is given for the metadata device position. If a drive has failed or is | 35 | <raid_params> consists of |
37 | missing at creation time, a '-' can be given for both the metadata and | 36 | Mandatory parameters: |
38 | data drives for a given position. | 37 | <chunk_size>: Chunk size in sectors. This parameter is often known as |
39 | 38 | "stripe size". It is the only mandatory parameter and | |
40 | NB. Currently all metadata devices must be specified as '-'. | 39 | is placed first. |
41 | 40 | ||
42 | Examples: | 41 | followed by optional parameters (in any order): |
42 | [sync|nosync] Force or prevent RAID initialization. | ||
43 | |||
44 | [rebuild <idx>] Rebuild drive number idx (first drive is 0). | ||
45 | |||
46 | [daemon_sleep <ms>] | ||
47 | Interval between runs of the bitmap daemon that | ||
48 | clear bits. A longer interval means less bitmap I/O but | ||
49 | resyncing after a failure is likely to take longer. | ||
50 | |||
51 | [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization | ||
52 | [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization | ||
53 | [max_write_behind <sectors>] See '-write-behind=' (man mdadm) | ||
54 | [stripe_cache <sectors>] Stripe cache size (higher RAIDs only) | ||
55 | |||
56 | <#raid_devs>: The number of devices composing the array. | ||
57 | Each device consists of two entries. The first is the device | ||
58 | containing the metadata (if any); the second is the one containing the | ||
59 | data. Currently, separate metadata devices are not supported and '-' | ||
60 | is required in place of the metadata device. | ||
61 | |||
62 | If a drive has failed or is missing at creation time, a '-' can be | ||
63 | given for both the metadata and data drives for a given position. | ||
64 | |||
65 | |||
66 | Example tables | ||
67 | -------------- | ||
43 | # RAID4 - 4 data drives, 1 parity | 68 | # RAID4 - 4 data drives, 1 parity |
44 | # No metadata devices specified to hold superblock/bitmap info | 69 | # No metadata devices specified to hold superblock/bitmap info |
45 | # Chunk size of 1MiB | 70 | # Chunk size of 1MiB |
46 | # (Lines separated for easy reading) | 71 | # (Lines separated for easy reading) |
72 | |||
47 | 0 1960893648 raid \ | 73 | 0 1960893648 raid \ |
48 | raid4 1 2048 \ | 74 | raid4 1 2048 \ |
49 | 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 | 75 | 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 |
@@ -51,20 +77,26 @@ Examples: | |||
51 | # RAID4 - 4 data drives, 1 parity (no metadata devices) | 77 | # RAID4 - 4 data drives, 1 parity (no metadata devices) |
52 | # Chunk size of 1MiB, force RAID initialization, | 78 | # Chunk size of 1MiB, force RAID initialization, |
53 | # min recovery rate at 20 kiB/sec/disk | 79 | # min recovery rate at 20 kiB/sec/disk |
80 | |||
54 | 0 1960893648 raid \ | 81 | 0 1960893648 raid \ |
55 | raid4 4 2048 min_recovery_rate 20 sync\ | 82 | raid4 4 2048 min_recovery_rate 20 sync\ |
56 | 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 | 83 | 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81 |
57 | 84 | ||
58 | Performing a 'dmsetup table' should display the CTR table used to | 85 | 'dmsetup table' displays the table used to construct the mapping. |
59 | construct the mapping (with possible reordering of optional | 86 | The optional parameters will always be printed in the order listed |
60 | parameters). | 87 | above with "sync" or "nosync" always output ahead of the other |
88 | arguments, regardless of the order used when originally loading the table. | ||
61 | 89 | ||
62 | Performing a 'dmsetup status' will yield information on the state and | 90 | 'dmsetup status' yields information on the state and health of the |
63 | health of the array. The output is as follows: | 91 | array. |
92 | The output is as follows: | ||
64 | 1: <s> <l> raid \ | 93 | 1: <s> <l> raid \ |
65 | 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> | 94 | 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> |
66 | 95 | ||
67 | Line 1 is standard DM output. Line 2 is best shown by example: | 96 | Line 1 is the standard output produced by device-mapper. |
97 | Line 2 is produced by the raid target, and best explained by example: | ||
68 | 0 1960893648 raid raid4 5 AAAAA 2/490221568 | 98 | 0 1960893648 raid raid4 5 AAAAA 2/490221568 |
69 | Here we can see the RAID type is raid4, there are 5 devices - all of | 99 | Here we can see the RAID type is raid4, there are 5 devices - all of |
70 | which are 'A'live, and the array is 2/490221568 complete with recovery. | 100 | which are 'A'live, and the array is 2/490221568 complete with recovery. |
101 | Faulty or missing devices are marked 'D'. Devices that are out-of-sync | ||
102 | are marked 'a'. | ||