aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2011-08-02 07:32:06 -0400
committerAlasdair G Kergon <agk@redhat.com>2011-08-02 07:32:06 -0400
commitc0a2fa1ef1057a1e9450d6f055f1cde2ad4f85a2 (patch)
treee854f60aea4d5ed24644ee32d6bf97e8cf7e2101 /Documentation
parent759dea204cce9f1fc2a5d00ea25211299fc7a4a0 (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')
-rw-r--r--Documentation/device-mapper/dm-raid.txt124
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 @@
1Device-mapper RAID (dm-raid) is a bridge from DM to MD. It 1dm-raid
2provides a way to use device-mapper interfaces to access the MD RAID 2-------
3drivers.
4 3
5As with all device-mapper targets, the nominal public interfaces are the 4The device-mapper RAID (dm-raid) target provides a bridge from DM to MD.
6constructor (CTR) tables and the status outputs (both STATUSTYPE_INFO 5It allows the MD RAID drivers to be accessed using a device-mapper
7and STATUSTYPE_TABLE). The CTR table looks like the following: 6interface.
8 7
91: <s> <l> raid \ 8The target is named "raid" and it accepts the following parameters:
102: <raid_type> <#raid_params> <raid_params> \ 9
113: <#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>]
13Line 1 contains the standard first three arguments to any device-mapper 12
14target - the start, length, and target type fields. The target type in 13<raid_type>:
15this case is "raid". 14 raid4 RAID4 dedicated parity disk
16 15 raid5_la RAID5 left asymmetric
17Line 2 contains the arguments that define the particular raid 16 - rotating parity 0 with data continuation
18type/personality/level, the required arguments for that raid type, and 17 raid5_ra RAID5 right asymmetric
19any optional arguments. Possible raid types include: raid4, raid5_la, 18 - rotating parity N with data continuation
20raid5_ls, raid5_rs, raid6_zr, raid6_nr, and raid6_nc. (raid1 is 19 raid5_ls RAID5 left symmetric
21planned for the future.) The list of required and optional parameters 20 - rotating parity 0 with data restart
22is the same for all the current raid types. The required parameters are 21 raid5_rs RAID5 right symmetric
23positional, while the optional parameters are given as key/value pairs. 22 - rotating parity N with data restart
24The 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
34Line 3 contains the list of devices that compose the array in 33<#raid_params>: The number of parameters that follow.
35metadata/data device pairs. If the metadata is stored separately, a '-' 34
36is given for the metadata device position. If a drive has failed or is 35<raid_params> consists of
37missing at creation time, a '-' can be given for both the metadata and 36 Mandatory parameters:
38data 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
40NB. Currently all metadata devices must be specified as '-'. 39 is placed first.
41 40
42Examples: 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
66Example 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
470 1960893648 raid \ 730 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
540 1960893648 raid \ 810 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
58Performing a 'dmsetup table' should display the CTR table used to 85'dmsetup table' displays the table used to construct the mapping.
59construct the mapping (with possible reordering of optional 86The optional parameters will always be printed in the order listed
60parameters). 87above with "sync" or "nosync" always output ahead of the other
88arguments, regardless of the order used when originally loading the table.
61 89
62Performing a 'dmsetup status' will yield information on the state and 90'dmsetup status' yields information on the state and health of the
63health of the array. The output is as follows: 91array.
92The output is as follows:
641: <s> <l> raid \ 931: <s> <l> raid \
652: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> 942: <raid_type> <#devices> <1 health char for each dev> <resync_ratio>
66 95
67Line 1 is standard DM output. Line 2 is best shown by example: 96Line 1 is the standard output produced by device-mapper.
97Line 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
69Here we can see the RAID type is raid4, there are 5 devices - all of 99Here we can see the RAID type is raid4, there are 5 devices - all of
70which are 'A'live, and the array is 2/490221568 complete with recovery. 100which are 'A'live, and the array is 2/490221568 complete with recovery.
101Faulty or missing devices are marked 'D'. Devices that are out-of-sync
102are marked 'a'.