diff options
Diffstat (limited to 'Documentation/device-mapper')
-rw-r--r-- | Documentation/device-mapper/dm-raid.txt | 84 |
1 files changed, 67 insertions, 17 deletions
diff --git a/Documentation/device-mapper/dm-raid.txt b/Documentation/device-mapper/dm-raid.txt index b428556197c9..e9192283e5a5 100644 --- a/Documentation/device-mapper/dm-raid.txt +++ b/Documentation/device-mapper/dm-raid.txt | |||
@@ -1,10 +1,13 @@ | |||
1 | dm-raid | 1 | dm-raid |
2 | ------- | 2 | ======= |
3 | 3 | ||
4 | The device-mapper RAID (dm-raid) target provides a bridge from DM to MD. | 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 | 5 | It allows the MD RAID drivers to be accessed using a device-mapper |
6 | interface. | 6 | interface. |
7 | 7 | ||
8 | |||
9 | Mapping Table Interface | ||
10 | ----------------------- | ||
8 | The target is named "raid" and it accepts the following parameters: | 11 | The target is named "raid" and it accepts the following parameters: |
9 | 12 | ||
10 | <raid_type> <#raid_params> <raid_params> \ | 13 | <raid_type> <#raid_params> <raid_params> \ |
@@ -47,7 +50,7 @@ The target is named "raid" and it accepts the following parameters: | |||
47 | followed by optional parameters (in any order): | 50 | followed by optional parameters (in any order): |
48 | [sync|nosync] Force or prevent RAID initialization. | 51 | [sync|nosync] Force or prevent RAID initialization. |
49 | 52 | ||
50 | [rebuild <idx>] Rebuild drive number idx (first drive is 0). | 53 | [rebuild <idx>] Rebuild drive number 'idx' (first drive is 0). |
51 | 54 | ||
52 | [daemon_sleep <ms>] | 55 | [daemon_sleep <ms>] |
53 | Interval between runs of the bitmap daemon that | 56 | Interval between runs of the bitmap daemon that |
@@ -56,9 +59,9 @@ The target is named "raid" and it accepts the following parameters: | |||
56 | 59 | ||
57 | [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization | 60 | [min_recovery_rate <kB/sec/disk>] Throttle RAID initialization |
58 | [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization | 61 | [max_recovery_rate <kB/sec/disk>] Throttle RAID initialization |
59 | [write_mostly <idx>] Drive index is write-mostly | 62 | [write_mostly <idx>] Mark drive index 'idx' write-mostly. |
60 | [max_write_behind <sectors>] See '-write-behind=' (man mdadm) | 63 | [max_write_behind <sectors>] See '--write-behind=' (man mdadm) |
61 | [stripe_cache <sectors>] Stripe cache size (higher RAIDs only) | 64 | [stripe_cache <sectors>] Stripe cache size (RAID 4/5/6 only) |
62 | [region_size <sectors>] | 65 | [region_size <sectors>] |
63 | The region_size multiplied by the number of regions is the | 66 | The region_size multiplied by the number of regions is the |
64 | logical size of the array. The bitmap records the device | 67 | logical size of the array. The bitmap records the device |
@@ -122,7 +125,7 @@ The target is named "raid" and it accepts the following parameters: | |||
122 | given for both the metadata and data drives for a given position. | 125 | given for both the metadata and data drives for a given position. |
123 | 126 | ||
124 | 127 | ||
125 | Example tables | 128 | Example Tables |
126 | -------------- | 129 | -------------- |
127 | # RAID4 - 4 data drives, 1 parity (no metadata devices) | 130 | # RAID4 - 4 data drives, 1 parity (no metadata devices) |
128 | # No metadata devices specified to hold superblock/bitmap info | 131 | # No metadata devices specified to hold superblock/bitmap info |
@@ -141,26 +144,70 @@ Example tables | |||
141 | raid4 4 2048 sync min_recovery_rate 20 \ | 144 | raid4 4 2048 sync min_recovery_rate 20 \ |
142 | 5 8:17 8:18 8:33 8:34 8:49 8:50 8:65 8:66 8:81 8:82 | 145 | 5 8:17 8:18 8:33 8:34 8:49 8:50 8:65 8:66 8:81 8:82 |
143 | 146 | ||
147 | |||
148 | Status Output | ||
149 | ------------- | ||
144 | 'dmsetup table' displays the table used to construct the mapping. | 150 | 'dmsetup table' displays the table used to construct the mapping. |
145 | The optional parameters are always printed in the order listed | 151 | The optional parameters are always printed in the order listed |
146 | above with "sync" or "nosync" always output ahead of the other | 152 | above with "sync" or "nosync" always output ahead of the other |
147 | arguments, regardless of the order used when originally loading the table. | 153 | arguments, regardless of the order used when originally loading the table. |
148 | Arguments that can be repeated are ordered by value. | 154 | Arguments that can be repeated are ordered by value. |
149 | 155 | ||
150 | 'dmsetup status' yields information on the state and health of the | 156 | |
151 | array. | 157 | 'dmsetup status' yields information on the state and health of the array. |
152 | The output is as follows: | 158 | The output is as follows (normally a single line, but expanded here for |
159 | clarity): | ||
153 | 1: <s> <l> raid \ | 160 | 1: <s> <l> raid \ |
154 | 2: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> | 161 | 2: <raid_type> <#devices> <health_chars> \ |
162 | 3: <sync_ratio> <sync_action> <mismatch_cnt> | ||
155 | 163 | ||
156 | Line 1 is the standard output produced by device-mapper. | 164 | Line 1 is the standard output produced by device-mapper. |
157 | Line 2 is produced by the raid target, and best explained by example: | 165 | Line 2 & 3 are produced by the raid target and are best explained by example: |
158 | 0 1960893648 raid raid4 5 AAAAA 2/490221568 | 166 | 0 1960893648 raid raid4 5 AAAAA 2/490221568 init 0 |
159 | Here we can see the RAID type is raid4, there are 5 devices - all of | 167 | Here we can see the RAID type is raid4, there are 5 devices - all of |
160 | which are 'A'live, and the array is 2/490221568 complete with recovery. | 168 | which are 'A'live, and the array is 2/490221568 complete with its initial |
161 | Faulty or missing devices are marked 'D'. Devices that are out-of-sync | 169 | recovery. Here is a fuller description of the individual fields: |
162 | are marked 'a'. | 170 | <raid_type> Same as the <raid_type> used to create the array. |
163 | 171 | <health_chars> One char for each device, indicating: 'A' = alive and | |
172 | in-sync, 'a' = alive but not in-sync, 'D' = dead/failed. | ||
173 | <sync_ratio> The ratio indicating how much of the array has undergone | ||
174 | the process described by 'sync_action'. If the | ||
175 | 'sync_action' is "check" or "repair", then the process | ||
176 | of "resync" or "recover" can be considered complete. | ||
177 | <sync_action> One of the following possible states: | ||
178 | idle - No synchronization action is being performed. | ||
179 | frozen - The current action has been halted. | ||
180 | resync - Array is undergoing its initial synchronization | ||
181 | or is resynchronizing after an unclean shutdown | ||
182 | (possibly aided by a bitmap). | ||
183 | recover - A device in the array is being rebuilt or | ||
184 | replaced. | ||
185 | check - A user-initiated full check of the array is | ||
186 | being performed. All blocks are read and | ||
187 | checked for consistency. The number of | ||
188 | discrepancies found are recorded in | ||
189 | <mismatch_cnt>. No changes are made to the | ||
190 | array by this action. | ||
191 | repair - The same as "check", but discrepancies are | ||
192 | corrected. | ||
193 | reshape - The array is undergoing a reshape. | ||
194 | <mismatch_cnt> The number of discrepancies found between mirror copies | ||
195 | in RAID1/10 or wrong parity values found in RAID4/5/6. | ||
196 | This value is valid only after a "check" of the array | ||
197 | is performed. A healthy array has a 'mismatch_cnt' of 0. | ||
198 | |||
199 | Message Interface | ||
200 | ----------------- | ||
201 | The dm-raid target will accept certain actions through the 'message' interface. | ||
202 | ('man dmsetup' for more information on the message interface.) These actions | ||
203 | include: | ||
204 | "idle" - Halt the current sync action. | ||
205 | "frozen" - Freeze the current sync action. | ||
206 | "resync" - Initiate/continue a resync. | ||
207 | "recover"- Initiate/continue a recover process. | ||
208 | "check" - Initiate a check (i.e. a "scrub") of the array. | ||
209 | "repair" - Initiate a repair of the array. | ||
210 | "reshape"- Currently unsupported (-EINVAL). | ||
164 | 211 | ||
165 | Version History | 212 | Version History |
166 | --------------- | 213 | --------------- |
@@ -171,4 +218,7 @@ Version History | |||
171 | 1.3.1 Allow device replacement/rebuild for RAID 10 | 218 | 1.3.1 Allow device replacement/rebuild for RAID 10 |
172 | 1.3.2 Fix/improve redundancy checking for RAID10 | 219 | 1.3.2 Fix/improve redundancy checking for RAID10 |
173 | 1.4.0 Non-functional change. Removes arg from mapping function. | 220 | 1.4.0 Non-functional change. Removes arg from mapping function. |
174 | 1.4.1 Add RAID10 "far" and "offset" algorithm support. | 221 | 1.4.1 RAID10 fix redundancy validation checks (commit 55ebbb5). |
222 | 1.4.2 Add RAID10 "far" and "offset" algorithm support. | ||
223 | 1.5.0 Add message interface to allow manipulation of the sync_action. | ||
224 | New status (STATUSTYPE_INFO) fields: sync_action and mismatch_cnt. | ||