4 The device-mapper RAID (dm-raid) target provides a bridge from DM to MD.
5 It allows the MD RAID drivers to be accessed using a device-mapper
8 The target is named "raid" and it accepts the following parameters:
10 <raid_type> <#raid_params> <raid_params> \
11 <#raid_devs> <metadata_dev0> <dev0> [.. <metadata_devN> <devN>]
14 raid4 RAID4 dedicated parity disk
15 raid5_la RAID5 left asymmetric
16 - rotating parity 0 with data continuation
17 raid5_ra RAID5 right asymmetric
18 - rotating parity N with data continuation
19 raid5_ls RAID5 left symmetric
20 - rotating parity 0 with data restart
21 raid5_rs RAID5 right symmetric
22 - rotating parity N with data restart
23 raid6_zr RAID6 zero restart
24 - rotating parity zero (left-to-right) with data restart
25 raid6_nr RAID6 N restart
26 - rotating parity N (right-to-left) with data restart
27 raid6_nc RAID6 N continue
28 - rotating parity N (right-to-left) with data continuation
30 Refererence: Chapter 4 of
31 http://www.snia.org/sites/default/files/SNIA_DDF_Technical_Position_v2.0.pdf
33 <#raid_params>: The number of parameters that follow.
35 <raid_params> consists of
37 <chunk_size>: Chunk size in sectors. This parameter is often known as
38 "stripe size". It is the only mandatory parameter and
41 followed by optional parameters (in any order):
42 [sync|nosync] Force or prevent RAID initialization.
44 [rebuild <idx>] Rebuild drive number idx (first drive is 0).
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.
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)
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.
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.
68 # RAID4 - 4 data drives, 1 parity
69 # No metadata devices specified to hold superblock/bitmap info
71 # (Lines separated for easy reading)
75 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
77 # RAID4 - 4 data drives, 1 parity (no metadata devices)
78 # Chunk size of 1MiB, force RAID initialization,
79 # min recovery rate at 20 kiB/sec/disk
82 raid4 4 2048 min_recovery_rate 20 sync\
83 5 - 8:17 - 8:33 - 8:49 - 8:65 - 8:81
85 'dmsetup table' displays the table used to construct the mapping.
86 The optional parameters will always be printed in the order listed
87 above with "sync" or "nosync" always output ahead of the other
88 arguments, regardless of the order used when originally loading the table.
90 'dmsetup status' yields information on the state and health of the
92 The output is as follows:
94 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio>
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:
98 0 1960893648 raid raid4 5 AAAAA 2/490221568
99 Here we can see the RAID type is raid4, there are 5 devices - all of
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