aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:16:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:16:17 -0400
commitf1e9a236e5ddab6c349611ee86f54291916f226c (patch)
treebe3a2ede1b6c09793403f50a02729563b512ab45 /Documentation
parent2e1deaad1e48453cea782854ab87df3f78c121c2 (diff)
parent32f9f570d04461a41bdcd5c1d93b41ebc5ce182a (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.txt84
-rw-r--r--Documentation/md.txt16
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 @@
1dm-raid 1dm-raid
2------- 2=======
3 3
4The device-mapper RAID (dm-raid) target provides a bridge from DM to MD. 4The device-mapper RAID (dm-raid) target provides a bridge from DM to MD.
5It allows the MD RAID drivers to be accessed using a device-mapper 5It allows the MD RAID drivers to be accessed using a device-mapper
6interface. 6interface.
7 7
8
9Mapping Table Interface
10-----------------------
8The target is named "raid" and it accepts the following parameters: 11The 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
125Example tables 128Example 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
148Status Output
149-------------
144'dmsetup table' displays the table used to construct the mapping. 150'dmsetup table' displays the table used to construct the mapping.
145The optional parameters are always printed in the order listed 151The optional parameters are always printed in the order listed
146above with "sync" or "nosync" always output ahead of the other 152above with "sync" or "nosync" always output ahead of the other
147arguments, regardless of the order used when originally loading the table. 153arguments, regardless of the order used when originally loading the table.
148Arguments that can be repeated are ordered by value. 154Arguments that can be repeated are ordered by value.
149 155
150'dmsetup status' yields information on the state and health of the 156
151array. 157'dmsetup status' yields information on the state and health of the array.
152The output is as follows: 158The output is as follows (normally a single line, but expanded here for
159clarity):
1531: <s> <l> raid \ 1601: <s> <l> raid \
1542: <raid_type> <#devices> <1 health char for each dev> <resync_ratio> 1612: <raid_type> <#devices> <health_chars> \
1623: <sync_ratio> <sync_action> <mismatch_cnt>
155 163
156Line 1 is the standard output produced by device-mapper. 164Line 1 is the standard output produced by device-mapper.
157Line 2 is produced by the raid target, and best explained by example: 165Line 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
159Here we can see the RAID type is raid4, there are 5 devices - all of 167Here we can see the RAID type is raid4, there are 5 devices - all of
160which are 'A'live, and the array is 2/490221568 complete with recovery. 168which are 'A'live, and the array is 2/490221568 complete with its initial
161Faulty or missing devices are marked 'D'. Devices that are out-of-sync 169recovery. Here is a fuller description of the individual fields:
162are 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
199Message Interface
200-----------------
201The dm-raid target will accept certain actions through the 'message' interface.
202('man dmsetup' for more information on the message interface.) These actions
203include:
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
165Version History 212Version History
166--------------- 213---------------
@@ -171,4 +218,7 @@ Version History
1711.3.1 Allow device replacement/rebuild for RAID 10 2181.3.1 Allow device replacement/rebuild for RAID 10
1721.3.2 Fix/improve redundancy checking for RAID10 2191.3.2 Fix/improve redundancy checking for RAID10
1731.4.0 Non-functional change. Removes arg from mapping function. 2201.4.0 Non-functional change. Removes arg from mapping function.
1741.4.1 Add RAID10 "far" and "offset" algorithm support. 2211.4.1 RAID10 fix redundancy validation checks (commit 55ebbb5).
2221.4.2 Add RAID10 "far" and "offset" algorithm support.
2231.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.
119The array is started with the RUN_ARRAY ioctl. 119The array is started with the RUN_ARRAY ioctl.
120 120
121Once started, new devices can be added. They should have an 121Once started, new devices can be added. They should have an
122appropriate superblock written to them, and then passed be in with 122appropriate superblock written to them, and then be passed in with
123ADD_NEW_DISK. 123ADD_NEW_DISK.
124 124
125Devices that have failed or are not yet active can be detached from an 125Devices 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
133An array can be 'created' by describing the array (level, chunksize 133An array can be 'created' by describing the array (level, chunksize
134etc) in a SET_ARRAY_INFO ioctl. This must has major_version==0 and 134etc) in a SET_ARRAY_INFO ioctl. This must have major_version==0 and
135raid_disks != 0. 135raid_disks != 0.
136 136
137Then uninitialized devices can be added with ADD_NEW_DISK. The 137Then 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
471An active md device will also contain and entry for each active device 471An active md device will also contain an entry for each active device
472in the array. These are named 472in 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
485Active md devices for levels that support data redundancy (1,4,5,6) 485Active md devices for levels that support data redundancy (1,4,5,6,10)
486also have 486also 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.