diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 20:16:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-04-30 20:16:17 -0400 |
commit | f1e9a236e5ddab6c349611ee86f54291916f226c (patch) | |
tree | be3a2ede1b6c09793403f50a02729563b512ab45 /Documentation | |
parent | 2e1deaad1e48453cea782854ab87df3f78c121c2 (diff) | |
parent | 32f9f570d04461a41bdcd5c1d93b41ebc5ce182a (diff) |
Merge tag 'md-3.10' of git://neil.brown.name/md
Pull md fixes from NeilBrown:
"A mixed bag of little fixes. No real new functionality here. Several
patches are tagged for -stable."
* tag 'md-3.10' of git://neil.brown.name/md:
MD: ignore discard request for hard disks of hybid raid1/raid10 array
md: bad block list should default to disabled.
md: raid1/raid10 md devices leak memory when stopping
DM RAID: Add message/status support for changing sync action
MD: Export 'md_reap_sync_thread' function
md: don't update metadata when stopping a read-only array.
md: Allow devices to be re-added to a read-only array.
md/raid10: Allow skipping recovery when clean arrays are assembled
MD: Fix typos in MD documentation
md/raid5: avoid an extra write when writing to a known-bad-block.
md/raid5: Change or of some order to improve efficiency.
md: use set_bit_le and clear_bit_le
md: HOT_DISK_REMOVE shouldn't make a read-auto device active.
md: use common code for all calls to ->hot_remove_disk()
md: never update metadata when array is read-only.
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/device-mapper/dm-raid.txt | 84 | ||||
-rw-r--r-- | Documentation/md.txt | 16 |
2 files changed, 75 insertions, 25 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. | ||
diff --git a/Documentation/md.txt b/Documentation/md.txt index 993fba37b7d1..e0ddd327632d 100644 --- a/Documentation/md.txt +++ b/Documentation/md.txt | |||
@@ -119,7 +119,7 @@ device to add. | |||
119 | The array is started with the RUN_ARRAY ioctl. | 119 | The array is started with the RUN_ARRAY ioctl. |
120 | 120 | ||
121 | Once started, new devices can be added. They should have an | 121 | Once started, new devices can be added. They should have an |
122 | appropriate superblock written to them, and then passed be in with | 122 | appropriate superblock written to them, and then be passed in with |
123 | ADD_NEW_DISK. | 123 | ADD_NEW_DISK. |
124 | 124 | ||
125 | Devices that have failed or are not yet active can be detached from an | 125 | Devices that have failed or are not yet active can be detached from an |
@@ -131,7 +131,7 @@ Specific Rules that apply to format-0 super block arrays, and | |||
131 | ------------------------------------------------------------- | 131 | ------------------------------------------------------------- |
132 | 132 | ||
133 | An array can be 'created' by describing the array (level, chunksize | 133 | An array can be 'created' by describing the array (level, chunksize |
134 | etc) in a SET_ARRAY_INFO ioctl. This must has major_version==0 and | 134 | etc) in a SET_ARRAY_INFO ioctl. This must have major_version==0 and |
135 | raid_disks != 0. | 135 | raid_disks != 0. |
136 | 136 | ||
137 | Then uninitialized devices can be added with ADD_NEW_DISK. The | 137 | Then uninitialized devices can be added with ADD_NEW_DISK. The |
@@ -426,7 +426,7 @@ Each directory contains: | |||
426 | offset | 426 | offset |
427 | This gives the location in the device (in sectors from the | 427 | This gives the location in the device (in sectors from the |
428 | start) where data from the array will be stored. Any part of | 428 | start) where data from the array will be stored. Any part of |
429 | the device before this offset us not touched, unless it is | 429 | the device before this offset is not touched, unless it is |
430 | used for storing metadata (Formats 1.1 and 1.2). | 430 | used for storing metadata (Formats 1.1 and 1.2). |
431 | 431 | ||
432 | size | 432 | size |
@@ -440,7 +440,7 @@ Each directory contains: | |||
440 | When the device is not 'in_sync', this records the number of | 440 | When the device is not 'in_sync', this records the number of |
441 | sectors from the start of the device which are known to be | 441 | sectors from the start of the device which are known to be |
442 | correct. This is normally zero, but during a recovery | 442 | correct. This is normally zero, but during a recovery |
443 | operation is will steadily increase, and if the recovery is | 443 | operation it will steadily increase, and if the recovery is |
444 | interrupted, restoring this value can cause recovery to | 444 | interrupted, restoring this value can cause recovery to |
445 | avoid repeating the earlier blocks. With v1.x metadata, this | 445 | avoid repeating the earlier blocks. With v1.x metadata, this |
446 | value is saved and restored automatically. | 446 | value is saved and restored automatically. |
@@ -468,7 +468,7 @@ Each directory contains: | |||
468 | 468 | ||
469 | 469 | ||
470 | 470 | ||
471 | An active md device will also contain and entry for each active device | 471 | An active md device will also contain an entry for each active device |
472 | in the array. These are named | 472 | in the array. These are named |
473 | 473 | ||
474 | rdNN | 474 | rdNN |
@@ -482,7 +482,7 @@ will show 'in_sync' on every line. | |||
482 | 482 | ||
483 | 483 | ||
484 | 484 | ||
485 | Active md devices for levels that support data redundancy (1,4,5,6) | 485 | Active md devices for levels that support data redundancy (1,4,5,6,10) |
486 | also have | 486 | also have |
487 | 487 | ||
488 | sync_action | 488 | sync_action |
@@ -494,7 +494,7 @@ also have | |||
494 | failed/missing device | 494 | failed/missing device |
495 | idle - nothing is happening | 495 | idle - nothing is happening |
496 | check - A full check of redundancy was requested and is | 496 | check - A full check of redundancy was requested and is |
497 | happening. This reads all block and checks | 497 | happening. This reads all blocks and checks |
498 | them. A repair may also happen for some raid | 498 | them. A repair may also happen for some raid |
499 | levels. | 499 | levels. |
500 | repair - A full check and repair is happening. This is | 500 | repair - A full check and repair is happening. This is |
@@ -522,7 +522,7 @@ also have | |||
522 | 522 | ||
523 | degraded | 523 | degraded |
524 | This contains a count of the number of devices by which the | 524 | This contains a count of the number of devices by which the |
525 | arrays is degraded. So an optimal array with show '0'. A | 525 | arrays is degraded. So an optimal array will show '0'. A |
526 | single failed/missing drive will show '1', etc. | 526 | single failed/missing drive will show '1', etc. |
527 | This file responds to select/poll, any increase or decrease | 527 | This file responds to select/poll, any increase or decrease |
528 | in the count of missing devices will trigger an event. | 528 | in the count of missing devices will trigger an event. |