1 Device-mapper RAID (dm-raid) is a bridge from DM to MD. It
2 provides a way to use device-mapper interfaces to access the MD RAID
5 As with all device-mapper targets, the nominal public interfaces are the
6 constructor (CTR) tables and the status outputs (both STATUSTYPE_INFO
7 and STATUSTYPE_TABLE). The CTR table looks like the following:
10 2: <raid_type> <#raid_params> <raid_params> \
11 3: <#raid_devs> <meta_dev1> <dev1> .. <meta_devN> <devN>
13 Line 1 contains the standard first three arguments to any device-mapper
14 target - the start, length, and target type fields. The target type in
17 Line 2 contains the arguments that define the particular raid
18 type/personality/level, the required arguments for that raid type, and
19 any optional arguments. Possible raid types include: raid4, raid5_la,
20 raid5_ls, raid5_rs, raid6_zr, raid6_nr, and raid6_nc. (raid1 is
21 planned for the future.) The list of required and optional parameters
22 is the same for all the current raid types. The required parameters are
23 positional, while the optional parameters are given as key/value pairs.
24 The possible parameters are as follows:
25 <chunk_size> Chunk size in sectors.
26 [[no]sync] Force/Prevent RAID initialization
27 [rebuild <idx>] Rebuild the drive indicated by the index
28 [daemon_sleep <ms>] Time between bitmap daemon work to clear bits
29 [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization
30 [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization
31 [max_write_behind <sectors>] See '-write-behind=' (man mdadm)
32 [stripe_cache <sectors>] Stripe cache size for higher RAIDs
34 Line 3 contains the list of devices that compose the array in
35 metadata/data device pairs. If the metadata is stored separately, a '-'
36 is given for the metadata device position. If a drive has failed or is
37 missing at creation time, a '-' can be given for both the metadata and
38 data drives for a given position.
40 NB. Currently all metadata devices must be specified as '-'.
43 # RAID4 - 4 data drives, 1 parity
44 # No metadata devices specified to hold superblock/bitmap info
46 # (Lines separated for easy reading)
49 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
51 # RAID4 - 4 data drives, 1 parity (no metadata devices)
52 # Chunk size of 1MiB, force RAID initialization,
53 # min recovery rate at 20 kiB/sec/disk
55 raid4 4 2048 min_recovery_rate 20 sync\
56 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
58 Performing a 'dmsetup table' should display the CTR table used to
59 construct the mapping (with possible reordering of optional
62 Performing a 'dmsetup status' will yield information on the state and
63 health of the array. The output is as follows:
65 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio>
67 Line 1 is standard DM output. Line 2 is best shown by example:
68 0 1960893648 raid raid4 5 AAAAA 2/490221568
69 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.