]> git.ipfire.org Git - thirdparty/mdadm.git/blob - md.4
imsm: Remove --dump/--restore implementation
[thirdparty/mdadm.git] / md.4
1 .\" Copyright Neil Brown and others.
2 .\" This program is free software; you can redistribute it and/or modify
3 .\" it under the terms of the GNU General Public License as published by
4 .\" the Free Software Foundation; either version 2 of the License, or
5 .\" (at your option) any later version.
6 .\" See file COPYING in distribution for details.
7 .if n .pl 1000v
8 .TH MD 4
9 .SH NAME
10 md \- Multiple Device driver aka Linux Software RAID
11 .SH SYNOPSIS
12 .BI /dev/md n
13 .br
14 .BI /dev/md/ n
15 .br
16 .BR /dev/md/ name
17 .SH DESCRIPTION
18 The
19 .B md
20 driver provides virtual devices that are created from one or more
21 independent underlying devices. This array of devices often contains
22 redundancy and the devices are often disk drives, hence the acronym RAID
23 which stands for a Redundant Array of Independent Disks.
24 .PP
25 .B md
26 supports RAID levels
27 1 (mirroring),
28 4 (striped array with parity device),
29 5 (striped array with distributed parity information),
30 6 (striped array with distributed dual redundancy information), and
31 10 (striped and mirrored).
32 If some number of underlying devices fails while using one of these
33 levels, the array will continue to function; this number is one for
34 RAID levels 4 and 5, two for RAID level 6, and all but one (N-1) for
35 RAID level 1, and dependent on configuration for level 10.
36 .PP
37 .B md
38 also supports a number of pseudo RAID (non-redundant) configurations
39 including RAID0 (striped array), LINEAR (catenated array),
40 MULTIPATH (a set of different interfaces to the same device),
41 and FAULTY (a layer over a single device into which errors can be injected).
42
43 .SS MD METADATA
44 Each device in an array may have some
45 .I metadata
46 stored in the device. This metadata is sometimes called a
47 .BR superblock .
48 The metadata records information about the structure and state of the array.
49 This allows the array to be reliably re-assembled after a shutdown.
50
51 From Linux kernel version 2.6.10,
52 .B md
53 provides support for two different formats of metadata, and
54 other formats can be added. Prior to this release, only one format is
55 supported.
56
57 The common format \(em known as version 0.90 \(em has
58 a superblock that is 4K long and is written into a 64K aligned block that
59 starts at least 64K and less than 128K from the end of the device
60 (i.e. to get the address of the superblock round the size of the
61 device down to a multiple of 64K and then subtract 64K).
62 The available size of each device is the amount of space before the
63 super block, so between 64K and 128K is lost when a device in
64 incorporated into an MD array.
65 This superblock stores multi-byte fields in a processor-dependent
66 manner, so arrays cannot easily be moved between computers with
67 different processors.
68
69 The new format \(em known as version 1 \(em has a superblock that is
70 normally 1K long, but can be longer. It is normally stored between 8K
71 and 12K from the end of the device, on a 4K boundary, though
72 variations can be stored at the start of the device (version 1.1) or 4K from
73 the start of the device (version 1.2).
74 This metadata format stores multibyte data in a
75 processor-independent format and supports up to hundreds of
76 component devices (version 0.90 only supports 28).
77
78 The metadata contains, among other things:
79 .TP
80 LEVEL
81 The manner in which the devices are arranged into the array
82 (LINEAR, RAID0, RAID1, RAID4, RAID5, RAID10, MULTIPATH).
83 .TP
84 UUID
85 a 128 bit Universally Unique Identifier that identifies the array that
86 contains this device.
87
88 .PP
89 When a version 0.90 array is being reshaped (e.g. adding extra devices
90 to a RAID5), the version number is temporarily set to 0.91. This
91 ensures that if the reshape process is stopped in the middle (e.g. by
92 a system crash) and the machine boots into an older kernel that does
93 not support reshaping, then the array will not be assembled (which
94 would cause data corruption) but will be left untouched until a kernel
95 that can complete the reshape processes is used.
96
97 .SS ARRAYS WITHOUT METADATA
98 While it is usually best to create arrays with superblocks so that
99 they can be assembled reliably, there are some circumstances when an
100 array without superblocks is preferred. These include:
101 .TP
102 LEGACY ARRAYS
103 Early versions of the
104 .B md
105 driver only supported LINEAR and RAID0 configurations and did not use
106 a superblock (which is less critical with these configurations).
107 While such arrays should be rebuilt with superblocks if possible,
108 .B md
109 continues to support them.
110 .TP
111 FAULTY
112 Being a largely transparent layer over a different device, the FAULTY
113 personality doesn't gain anything from having a superblock.
114 .TP
115 MULTIPATH
116 It is often possible to detect devices which are different paths to
117 the same storage directly rather than having a distinctive superblock
118 written to the device and searched for on all paths. In this case,
119 a MULTIPATH array with no superblock makes sense.
120 .TP
121 RAID1
122 In some configurations it might be desired to create a RAID1
123 configuration that does not use a superblock, and to maintain the state of
124 the array elsewhere. While not encouraged for general use, it does
125 have special-purpose uses and is supported.
126
127 .SS ARRAYS WITH EXTERNAL METADATA
128
129 From release 2.6.28, the
130 .I md
131 driver supports arrays with externally managed metadata. That is,
132 the metadata is not managed by the kernel but rather by a user-space
133 program which is external to the kernel. This allows support for a
134 variety of metadata formats without cluttering the kernel with lots of
135 details.
136 .PP
137 .I md
138 is able to communicate with the user-space program through various
139 sysfs attributes so that it can make appropriate changes to the
140 metadata \- for example to mark a device as faulty. When necessary,
141 .I md
142 will wait for the program to acknowledge the event by writing to a
143 sysfs attribute.
144 The manual page for
145 .IR mdmon (8)
146 contains more detail about this interaction.
147
148 .SS CONTAINERS
149 Many metadata formats use a single block of metadata to describe a
150 number of different arrays which all use the same set of devices.
151 In this case it is helpful for the kernel to know about the full set
152 of devices as a whole. This set is known to md as a
153 .IR container .
154 A container is an
155 .I md
156 array with externally managed metadata and with device offset and size
157 so that it just covers the metadata part of the devices. The
158 remainder of each device is available to be incorporated into various
159 arrays.
160
161 .SS LINEAR
162
163 A LINEAR array simply catenates the available space on each
164 drive to form one large virtual drive.
165
166 One advantage of this arrangement over the more common RAID0
167 arrangement is that the array may be reconfigured at a later time with
168 an extra drive, so the array is made bigger without disturbing the
169 data that is on the array. This can even be done on a live
170 array.
171
172 If a chunksize is given with a LINEAR array, the usable space on each
173 device is rounded down to a multiple of this chunksize.
174
175 .SS RAID0
176
177 A RAID0 array (which has zero redundancy) is also known as a
178 striped array.
179 A RAID0 array is configured at creation with a
180 .B "Chunk Size"
181 which must be a power of two (prior to Linux 2.6.31), and at least 4
182 kibibytes.
183
184 The RAID0 driver assigns the first chunk of the array to the first
185 device, the second chunk to the second device, and so on until all
186 drives have been assigned one chunk. This collection of chunks forms a
187 .BR stripe .
188 Further chunks are gathered into stripes in the same way, and are
189 assigned to the remaining space in the drives.
190
191 If devices in the array are not all the same size, then once the
192 smallest device has been exhausted, the RAID0 driver starts
193 collecting chunks into smaller stripes that only span the drives which
194 still have remaining space.
195
196 A bug was introduced in linux 3.14 which changed the layout of blocks in
197 a RAID0 beyond the region that is striped over all devices. This bug
198 does not affect an array with all devices the same size, but can affect
199 other RAID0 arrays.
200
201 Linux 5.4 (and some stable kernels to which the change was backported)
202 will not normally assemble such an array as it cannot know which layout
203 to use. There is a module parameter "raid0.default_layout" which can be
204 set to "1" to force the kernel to use the pre-3.14 layout or to "2" to
205 force it to use the 3.14-and-later layout. when creating a new RAID0
206 array,
207 .I mdadm
208 will record the chosen layout in the metadata in a way that allows newer
209 kernels to assemble the array without needing a module parameter.
210
211 To assemble an old array on a new kernel without using the module parameter,
212 use either the
213 .B "--update=layout-original"
214 option or the
215 .B "--update=layout-alternate"
216 option.
217
218 .SS RAID1
219
220 A RAID1 array is also known as a mirrored set (though mirrors tend to
221 provide reflected images, which RAID1 does not) or a plex.
222
223 Once initialised, each device in a RAID1 array contains exactly the
224 same data. Changes are written to all devices in parallel. Data is
225 read from any one device. The driver attempts to distribute read
226 requests across all devices to maximise performance.
227
228 All devices in a RAID1 array should be the same size. If they are
229 not, then only the amount of space available on the smallest device is
230 used (any extra space on other devices is wasted).
231
232 Note that the read balancing done by the driver does not make the RAID1
233 performance profile be the same as for RAID0; a single stream of
234 sequential input will not be accelerated (e.g. a single dd), but
235 multiple sequential streams or a random workload will use more than one
236 spindle. In theory, having an N-disk RAID1 will allow N sequential
237 threads to read from all disks.
238
239 Individual devices in a RAID1 can be marked as "write-mostly".
240 These drives are excluded from the normal read balancing and will only
241 be read from when there is no other option. This can be useful for
242 devices connected over a slow link.
243
244 .SS RAID4
245
246 A RAID4 array is like a RAID0 array with an extra device for storing
247 parity. This device is the last of the active devices in the
248 array. Unlike RAID0, RAID4 also requires that all stripes span all
249 drives, so extra space on devices that are larger than the smallest is
250 wasted.
251
252 When any block in a RAID4 array is modified, the parity block for that
253 stripe (i.e. the block in the parity device at the same device offset
254 as the stripe) is also modified so that the parity block always
255 contains the "parity" for the whole stripe. I.e. its content is
256 equivalent to the result of performing an exclusive-or operation
257 between all the data blocks in the stripe.
258
259 This allows the array to continue to function if one device fails.
260 The data that was on that device can be calculated as needed from the
261 parity block and the other data blocks.
262
263 .SS RAID5
264
265 RAID5 is very similar to RAID4. The difference is that the parity
266 blocks for each stripe, instead of being on a single device, are
267 distributed across all devices. This allows more parallelism when
268 writing, as two different block updates will quite possibly affect
269 parity blocks on different devices so there is less contention.
270
271 This also allows more parallelism when reading, as read requests are
272 distributed over all the devices in the array instead of all but one.
273
274 .SS RAID6
275
276 RAID6 is similar to RAID5, but can handle the loss of any \fItwo\fP
277 devices without data loss. Accordingly, it requires N+2 drives to
278 store N drives worth of data.
279
280 The performance for RAID6 is slightly lower but comparable to RAID5 in
281 normal mode and single disk failure mode. It is very slow in dual
282 disk failure mode, however.
283
284 .SS RAID10
285
286 RAID10 provides a combination of RAID1 and RAID0, and is sometimes known
287 as RAID1+0. Every datablock is duplicated some number of times, and
288 the resulting collection of datablocks are distributed over multiple
289 drives.
290
291 When configuring a RAID10 array, it is necessary to specify the number
292 of replicas of each data block that are required (this will usually
293 be\ 2) and whether their layout should be "near", "far" or "offset"
294 (with "offset" being available since Linux\ 2.6.18).
295
296 .B About the RAID10 Layout Examples:
297 .br
298 The examples below visualise the chunk distribution on the underlying
299 devices for the respective layout.
300
301 For simplicity it is assumed that the size of the chunks equals the
302 size of the blocks of the underlying devices as well as those of the
303 RAID10 device exported by the kernel (for example \fB/dev/md/\fPname).
304 .br
305 Therefore the chunks\ /\ chunk numbers map directly to the blocks\ /\
306 block addresses of the exported RAID10 device.
307
308 Decimal numbers (0,\ 1, 2,\ ...) are the chunks of the RAID10 and due
309 to the above assumption also the blocks and block addresses of the
310 exported RAID10 device.
311 .br
312 Repeated numbers mean copies of a chunk\ /\ block (obviously on
313 different underlying devices).
314 .br
315 Hexadecimal numbers (0x00,\ 0x01, 0x02,\ ...) are the block addresses
316 of the underlying devices.
317
318 .TP
319 \fB "near" Layout\fP
320 When "near" replicas are chosen, the multiple copies of a given chunk are laid
321 out consecutively ("as close to each other as possible") across the stripes of
322 the array.
323
324 With an even number of devices, they will likely (unless some misalignment is
325 present) lay at the very same offset on the different devices.
326 .br
327 This is as the "classic" RAID1+0; that is two groups of mirrored devices (in the
328 example below the groups Device\ #1\ /\ #2 and Device\ #3\ /\ #4 are each a
329 RAID1) both in turn forming a striped RAID0.
330
331 .ne 10
332 .B Example with 2\ copies per chunk and an even number\ (4) of devices:
333 .TS
334 tab(;);
335 C - - - -
336 C | C | C | C | C |
337 | - | - | - | - | - |
338 | C | C | C | C | C |
339 | C | C | C | C | C |
340 | C | C | C | C | C |
341 | C | C | C | C | C |
342 | C | C | C | C | C |
343 | C | C | C | C | C |
344 | - | - | - | - | - |
345 C C S C S
346 C C S C S
347 C C S S S
348 C C S S S.
349 ;
350 ;Device #1;Device #2;Device #3;Device #4
351 0x00;0;0;1;1
352 0x01;2;2;3;3
353 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
354 :;:;:;:;:
355 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
356 0x80;254;254;255;255
357 ;\\---------v---------/;\\---------v---------/
358 ;RAID1;RAID1
359 ;\\---------------------v---------------------/
360 ;RAID0
361 .TE
362
363 .ne 10
364 .B Example with 2\ copies per chunk and an odd number\ (5) of devices:
365 .TS
366 tab(;);
367 C - - - - -
368 C | C | C | C | C | C |
369 | - | - | - | - | - | - |
370 | C | C | C | C | C | C |
371 | C | C | C | C | C | C |
372 | C | C | C | C | C | C |
373 | C | C | C | C | C | C |
374 | C | C | C | C | C | C |
375 | C | C | C | C | C | C |
376 | - | - | - | - | - | - |
377 C.
378 ;
379 ;Dev #1;Dev #2;Dev #3;Dev #4;Dev #5
380 0x00;0;0;1;1;2
381 0x01;2;3;3;4;4
382 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
383 :;:;:;:;:;:
384 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.
385 0x80;317;318;318;319;319
386 ;
387 .TE
388
389 .TP
390 \fB "far" Layout\fP
391 When "far" replicas are chosen, the multiple copies of a given chunk
392 are laid out quite distant ("as far as reasonably possible") from each
393 other.
394
395 First a complete sequence of all data blocks (that is all the data one
396 sees on the exported RAID10 block device) is striped over the
397 devices. Then another (though "shifted") complete sequence of all data
398 blocks; and so on (in the case of more than 2\ copies per chunk).
399
400 The "shift" needed to prevent placing copies of the same chunks on the
401 same devices is actually a cyclic permutation with offset\ 1 of each
402 of the stripes within a complete sequence of chunks.
403 .br
404 The offset\ 1 is relative to the previous complete sequence of chunks,
405 so in case of more than 2\ copies per chunk one gets the following
406 offsets:
407 .br
408 1.\ complete sequence of chunks: offset\ =\ \ 0
409 .br
410 2.\ complete sequence of chunks: offset\ =\ \ 1
411 .br
412 3.\ complete sequence of chunks: offset\ =\ \ 2
413 .br
414 :
415 .br
416 n.\ complete sequence of chunks: offset\ =\ n-1
417
418 .ne 10
419 .B Example with 2\ copies per chunk and an even number\ (4) of devices:
420 .TS
421 tab(;);
422 C - - - -
423 C | C | C | C | C |
424 | - | - | - | - | - |
425 | C | C | C | C | C | L
426 | C | C | C | C | C | L
427 | C | C | C | C | C | L
428 | C | C | C | C | C | L
429 | C | C | C | C | C | L
430 | C | C | C | C | C | L
431 | C | C | C | C | C | L
432 | C | C | C | C | C | L
433 | C | C | C | C | C | L
434 | C | C | C | C | C | L
435 | C | C | C | C | C | L
436 | C | C | C | C | C | L
437 | - | - | - | - | - |
438 C.
439 ;
440 ;Device #1;Device #2;Device #3;Device #4
441 ;
442 0x00;0;1;2;3;\\
443 0x01;4;5;6;7;> [#]
444 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
445 :;:;:;:;:;:
446 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
447 0x40;252;253;254;255;/
448 0x41;3;0;1;2;\\
449 0x42;7;4;5;6;> [#]~
450 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
451 :;:;:;:;:;:
452 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
453 0x80;255;252;253;254;/
454 ;
455 .TE
456
457 .ne 10
458 .B Example with 2\ copies per chunk and an odd number\ (5) of devices:
459 .TS
460 tab(;);
461 C - - - - -
462 C | C | C | C | C | C |
463 | - | - | - | - | - | - |
464 | C | C | C | C | C | C | L
465 | C | C | C | C | C | C | L
466 | C | C | C | C | C | C | L
467 | C | C | C | C | C | C | L
468 | C | C | C | C | C | C | L
469 | C | C | C | C | C | C | L
470 | C | C | C | C | C | C | L
471 | C | C | C | C | C | C | L
472 | C | C | C | C | C | C | L
473 | C | C | C | C | C | C | L
474 | C | C | C | C | C | C | L
475 | C | C | C | C | C | C | L
476 | - | - | - | - | - | - |
477 C.
478 ;
479 ;Dev #1;Dev #2;Dev #3;Dev #4;Dev #5
480 ;
481 0x00;0;1;2;3;4;\\
482 0x01;5;6;7;8;9;> [#]
483 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
484 :;:;:;:;:;:;:
485 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
486 0x40;315;316;317;318;319;/
487 0x41;4;0;1;2;3;\\
488 0x42;9;5;6;7;8;> [#]~
489 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
490 :;:;:;:;:;:;:
491 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;:
492 0x80;319;315;316;317;318;/
493 ;
494 .TE
495
496 With [#]\ being the complete sequence of chunks and [#]~\ the cyclic permutation
497 with offset\ 1 thereof (in the case of more than 2 copies per chunk there would
498 be ([#]~)~,\ (([#]~)~)~,\ ...).
499
500 The advantage of this layout is that MD can easily spread sequential reads over
501 the devices, making them similar to RAID0 in terms of speed.
502 .br
503 The cost is more seeking for writes, making them substantially slower.
504
505 .TP
506 \fB"offset" Layout\fP
507 When "offset" replicas are chosen, all the copies of a given chunk are
508 striped consecutively ("offset by the stripe length after each other")
509 over the devices.
510
511 Explained in detail, <number of devices> consecutive chunks are
512 striped over the devices, immediately followed by a "shifted" copy of
513 these chunks (and by further such "shifted" copies in the case of more
514 than 2\ copies per chunk).
515 .br
516 This pattern repeats for all further consecutive chunks of the
517 exported RAID10 device (in other words: all further data blocks).
518
519 The "shift" needed to prevent placing copies of the same chunks on the
520 same devices is actually a cyclic permutation with offset\ 1 of each
521 of the striped copies of <number of devices> consecutive chunks.
522 .br
523 The offset\ 1 is relative to the previous striped copy of <number of
524 devices> consecutive chunks, so in case of more than 2\ copies per
525 chunk one gets the following offsets:
526 .br
527 1.\ <number of devices> consecutive chunks: offset\ =\ \ 0
528 .br
529 2.\ <number of devices> consecutive chunks: offset\ =\ \ 1
530 .br
531 3.\ <number of devices> consecutive chunks: offset\ =\ \ 2
532 .br
533 :
534 .br
535 n.\ <number of devices> consecutive chunks: offset\ =\ n-1
536
537 .ne 10
538 .B Example with 2\ copies per chunk and an even number\ (4) of devices:
539 .TS
540 tab(;);
541 C - - - -
542 C | C | C | C | C |
543 | - | - | - | - | - |
544 | C | C | C | C | C | L
545 | C | C | C | C | C | L
546 | C | C | C | C | C | L
547 | C | C | C | C | C | L
548 | C | C | C | C | C | L
549 | C | C | C | C | C | L
550 | C | C | C | C | C | L
551 | C | C | C | C | C | L
552 | C | C | C | C | C | L
553 | - | - | - | - | - |
554 C.
555 ;
556 ;Device #1;Device #2;Device #3;Device #4
557 ;
558 0x00;0;1;2;3;) AA
559 0x01;3;0;1;2;) AA~
560 0x02;4;5;6;7;) AB
561 0x03;7;4;5;6;) AB~
562 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
563 :;:;:;:;:; :
564 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
565 0x79;251;252;253;254;) EX
566 0x80;254;251;252;253;) EX~
567 ;
568 .TE
569
570 .ne 10
571 .B Example with 2\ copies per chunk and an odd number\ (5) of devices:
572 .TS
573 tab(;);
574 C - - - - -
575 C | C | C | C | C | C |
576 | - | - | - | - | - | - |
577 | C | C | C | C | C | C | L
578 | C | C | C | C | C | C | L
579 | C | C | C | C | C | C | L
580 | C | C | C | C | C | C | L
581 | C | C | C | C | C | C | L
582 | C | C | C | C | C | C | L
583 | C | C | C | C | C | C | L
584 | C | C | C | C | C | C | L
585 | C | C | C | C | C | C | L
586 | - | - | - | - | - | - |
587 C.
588 ;
589 ;Dev #1;Dev #2;Dev #3;Dev #4;Dev #5
590 ;
591 0x00;0;1;2;3;4;) AA
592 0x01;4;0;1;2;3;) AA~
593 0x02;5;6;7;8;9;) AB
594 0x03;9;5;6;7;8;) AB~
595 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
596 :;:;:;:;:;:; :
597 \.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;\.\.\.;) \.\.\.
598 0x79;314;315;316;317;318;) EX
599 0x80;318;314;315;316;317;) EX~
600 ;
601 .TE
602
603 With AA,\ AB,\ ..., AZ,\ BA,\ ... being the sets of <number of devices> consecutive
604 chunks and AA~,\ AB~,\ ..., AZ~,\ BA~,\ ... the cyclic permutations with offset\ 1
605 thereof (in the case of more than 2 copies per chunk there would be (AA~)~,\ ...
606 as well as ((AA~)~)~,\ ... and so on).
607
608 This should give similar read characteristics to "far" if a suitably large chunk
609 size is used, but without as much seeking for writes.
610 .PP
611
612
613 It should be noted that the number of devices in a RAID10 array need
614 not be a multiple of the number of replica of each data block; however,
615 there must be at least as many devices as replicas.
616
617 If, for example, an array is created with 5 devices and 2 replicas,
618 then space equivalent to 2.5 of the devices will be available, and
619 every block will be stored on two different devices.
620
621 Finally, it is possible to have an array with both "near" and "far"
622 copies. If an array is configured with 2 near copies and 2 far
623 copies, then there will be a total of 4 copies of each block, each on
624 a different drive. This is an artifact of the implementation and is
625 unlikely to be of real value.
626
627 .SS MULTIPATH
628
629 MULTIPATH is not really a RAID at all as there is only one real device
630 in a MULTIPATH md array. However there are multiple access points
631 (paths) to this device, and one of these paths might fail, so there
632 are some similarities.
633
634 A MULTIPATH array is composed of a number of logically different
635 devices, often fibre channel interfaces, that all refer the the same
636 real device. If one of these interfaces fails (e.g. due to cable
637 problems), the MULTIPATH driver will attempt to redirect requests to
638 another interface.
639
640 The MULTIPATH drive is not receiving any ongoing development and
641 should be considered a legacy driver. The device-mapper based
642 multipath drivers should be preferred for new installations.
643
644 .SS FAULTY
645 The FAULTY md module is provided for testing purposes. A FAULTY array
646 has exactly one component device and is normally assembled without a
647 superblock, so the md array created provides direct access to all of
648 the data in the component device.
649
650 The FAULTY module may be requested to simulate faults to allow testing
651 of other md levels or of filesystems. Faults can be chosen to trigger
652 on read requests or write requests, and can be transient (a subsequent
653 read/write at the address will probably succeed) or persistent
654 (subsequent read/write of the same address will fail). Further, read
655 faults can be "fixable" meaning that they persist until a write
656 request at the same address.
657
658 Fault types can be requested with a period. In this case, the fault
659 will recur repeatedly after the given number of requests of the
660 relevant type. For example if persistent read faults have a period of
661 100, then every 100th read request would generate a fault, and the
662 faulty sector would be recorded so that subsequent reads on that
663 sector would also fail.
664
665 There is a limit to the number of faulty sectors that are remembered.
666 Faults generated after this limit is exhausted are treated as
667 transient.
668
669 The list of faulty sectors can be flushed, and the active list of
670 failure modes can be cleared.
671
672 .SS UNCLEAN SHUTDOWN
673
674 When changes are made to a RAID1, RAID4, RAID5, RAID6, or RAID10 array
675 there is a possibility of inconsistency for short periods of time as
676 each update requires at least two block to be written to different
677 devices, and these writes probably won't happen at exactly the same
678 time. Thus if a system with one of these arrays is shutdown in the
679 middle of a write operation (e.g. due to power failure), the array may
680 not be consistent.
681
682 To handle this situation, the md driver marks an array as "dirty"
683 before writing any data to it, and marks it as "clean" when the array
684 is being disabled, e.g. at shutdown. If the md driver finds an array
685 to be dirty at startup, it proceeds to correct any possibly
686 inconsistency. For RAID1, this involves copying the contents of the
687 first drive onto all other drives. For RAID4, RAID5 and RAID6 this
688 involves recalculating the parity for each stripe and making sure that
689 the parity block has the correct data. For RAID10 it involves copying
690 one of the replicas of each block onto all the others. This process,
691 known as "resynchronising" or "resync" is performed in the background.
692 The array can still be used, though possibly with reduced performance.
693
694 If a RAID4, RAID5 or RAID6 array is degraded (missing at least one
695 drive, two for RAID6) when it is restarted after an unclean shutdown, it cannot
696 recalculate parity, and so it is possible that data might be
697 undetectably corrupted. The 2.4 md driver
698 .B does not
699 alert the operator to this condition. The 2.6 md driver will fail to
700 start an array in this condition without manual intervention, though
701 this behaviour can be overridden by a kernel parameter.
702
703 .SS RECOVERY
704
705 If the md driver detects a write error on a device in a RAID1, RAID4,
706 RAID5, RAID6, or RAID10 array, it immediately disables that device
707 (marking it as faulty) and continues operation on the remaining
708 devices. If there are spare drives, the driver will start recreating
709 on one of the spare drives the data which was on that failed drive,
710 either by copying a working drive in a RAID1 configuration, or by
711 doing calculations with the parity block on RAID4, RAID5 or RAID6, or
712 by finding and copying originals for RAID10.
713
714 In kernels prior to about 2.6.15, a read error would cause the same
715 effect as a write error. In later kernels, a read-error will instead
716 cause md to attempt a recovery by overwriting the bad block. i.e. it
717 will find the correct data from elsewhere, write it over the block
718 that failed, and then try to read it back again. If either the write
719 or the re-read fail, md will treat the error the same way that a write
720 error is treated, and will fail the whole device.
721
722 While this recovery process is happening, the md driver will monitor
723 accesses to the array and will slow down the rate of recovery if other
724 activity is happening, so that normal access to the array will not be
725 unduly affected. When no other activity is happening, the recovery
726 process proceeds at full speed. The actual speed targets for the two
727 different situations can be controlled by the
728 .B speed_limit_min
729 and
730 .B speed_limit_max
731 control files mentioned below.
732
733 .SS SCRUBBING AND MISMATCHES
734
735 As storage devices can develop bad blocks at any time it is valuable
736 to regularly read all blocks on all devices in an array so as to catch
737 such bad blocks early. This process is called
738 .IR scrubbing .
739
740 md arrays can be scrubbed by writing either
741 .I check
742 or
743 .I repair
744 to the file
745 .I md/sync_action
746 in the
747 .I sysfs
748 directory for the device.
749
750 Requesting a scrub will cause
751 .I md
752 to read every block on every device in the array, and check that the
753 data is consistent. For RAID1 and RAID10, this means checking that the copies
754 are identical. For RAID4, RAID5, RAID6 this means checking that the
755 parity block is (or blocks are) correct.
756
757 If a read error is detected during this process, the normal read-error
758 handling causes correct data to be found from other devices and to be
759 written back to the faulty device. In many case this will
760 effectively
761 .I fix
762 the bad block.
763
764 If all blocks read successfully but are found to not be consistent,
765 then this is regarded as a
766 .IR mismatch .
767
768 If
769 .I check
770 was used, then no action is taken to handle the mismatch, it is simply
771 recorded.
772 If
773 .I repair
774 was used, then a mismatch will be repaired in the same way that
775 .I resync
776 repairs arrays. For RAID5/RAID6 new parity blocks are written. For RAID1/RAID10,
777 all but one block are overwritten with the content of that one block.
778
779 A count of mismatches is recorded in the
780 .I sysfs
781 file
782 .IR md/mismatch_cnt .
783 This is set to zero when a
784 scrub starts and is incremented whenever a sector is
785 found that is a mismatch.
786 .I md
787 normally works in units much larger than a single sector and when it
788 finds a mismatch, it does not determine exactly how many actual sectors were
789 affected but simply adds the number of sectors in the IO unit that was
790 used. So a value of 128 could simply mean that a single 64KB check
791 found an error (128 x 512bytes = 64KB).
792
793 If an array is created by
794 .I mdadm
795 with
796 .I \-\-assume\-clean
797 then a subsequent check could be expected to find some mismatches.
798
799 On a truly clean RAID5 or RAID6 array, any mismatches should indicate
800 a hardware problem at some level - software issues should never cause
801 such a mismatch.
802
803 However on RAID1 and RAID10 it is possible for software issues to
804 cause a mismatch to be reported. This does not necessarily mean that
805 the data on the array is corrupted. It could simply be that the
806 system does not care what is stored on that part of the array - it is
807 unused space.
808
809 The most likely cause for an unexpected mismatch on RAID1 or RAID10
810 occurs if a swap partition or swap file is stored on the array.
811
812 When the swap subsystem wants to write a page of memory out, it flags
813 the page as 'clean' in the memory manager and requests the swap device
814 to write it out. It is quite possible that the memory will be
815 changed while the write-out is happening. In that case the 'clean'
816 flag will be found to be clear when the write completes and so the
817 swap subsystem will simply forget that the swapout had been attempted,
818 and will possibly choose a different page to write out.
819
820 If the swap device was on RAID1 (or RAID10), then the data is sent
821 from memory to a device twice (or more depending on the number of
822 devices in the array). Thus it is possible that the memory gets changed
823 between the times it is sent, so different data can be written to
824 the different devices in the array. This will be detected by
825 .I check
826 as a mismatch. However it does not reflect any corruption as the
827 block where this mismatch occurs is being treated by the swap system as
828 being empty, and the data will never be read from that block.
829
830 It is conceivable for a similar situation to occur on non-swap files,
831 though it is less likely.
832
833 Thus the
834 .I mismatch_cnt
835 value can not be interpreted very reliably on RAID1 or RAID10,
836 especially when the device is used for swap.
837
838
839 .SS BITMAP WRITE-INTENT LOGGING
840
841 From Linux 2.6.13,
842 .I md
843 supports a bitmap based write-intent log. If configured, the bitmap
844 is used to record which blocks of the array may be out of sync.
845 Before any write request is honoured, md will make sure that the
846 corresponding bit in the log is set. After a period of time with no
847 writes to an area of the array, the corresponding bit will be cleared.
848
849 This bitmap is used for two optimisations.
850
851 Firstly, after an unclean shutdown, the resync process will consult
852 the bitmap and only resync those blocks that correspond to bits in the
853 bitmap that are set. This can dramatically reduce resync time.
854
855 Secondly, when a drive fails and is removed from the array, md stops
856 clearing bits in the intent log. If that same drive is re-added to
857 the array, md will notice and will only recover the sections of the
858 drive that are covered by bits in the intent log that are set. This
859 can allow a device to be temporarily removed and reinserted without
860 causing an enormous recovery cost.
861
862 The intent log can be stored in a file on a separate device, or it can
863 be stored near the superblocks of an array which has superblocks.
864
865 It is possible to add an intent log to an active array, or remove an
866 intent log if one is present.
867
868 In 2.6.13, intent bitmaps are only supported with RAID1. Other levels
869 with redundancy are supported from 2.6.15.
870
871 .SS BAD BLOCK LIST
872
873 From Linux 3.5 each device in an
874 .I md
875 array can store a list of known-bad-blocks. This list is 4K in size
876 and usually positioned at the end of the space between the superblock
877 and the data.
878
879 When a block cannot be read and cannot be repaired by writing data
880 recovered from other devices, the address of the block is stored in
881 the bad block list. Similarly if an attempt to write a block fails,
882 the address will be recorded as a bad block. If attempting to record
883 the bad block fails, the whole device will be marked faulty.
884
885 Attempting to read from a known bad block will cause a read error.
886 Attempting to write to a known bad block will be ignored if any write
887 errors have been reported by the device. If there have been no write
888 errors then the data will be written to the known bad block and if
889 that succeeds, the address will be removed from the list.
890
891 This allows an array to fail more gracefully - a few blocks on
892 different devices can be faulty without taking the whole array out of
893 action.
894
895 The list is particularly useful when recovering to a spare. If a few blocks
896 cannot be read from the other devices, the bulk of the recovery can
897 complete and those few bad blocks will be recorded in the bad block list.
898
899 .SS RAID456 WRITE JOURNAL
900
901 Due to non-atomicity nature of RAID write operations, interruption of
902 write operations (system crash, etc.) to RAID456 array can lead to
903 inconsistent parity and data loss (so called RAID-5 write hole).
904
905 To plug the write hole, from Linux 4.4 (to be confirmed),
906 .I md
907 supports write ahead journal for RAID456. When the array is created,
908 an additional journal device can be added to the array through
909 .IR write-journal
910 option. The RAID write journal works similar to file system journals.
911 Before writing to the data disks, md persists data AND parity of the
912 stripe to the journal device. After crashes, md searches the journal
913 device for incomplete write operations, and replay them to the data
914 disks.
915
916 When the journal device fails, the RAID array is forced to run in
917 read-only mode.
918
919 .SS WRITE-BEHIND
920
921 From Linux 2.6.14,
922 .I md
923 supports WRITE-BEHIND on RAID1 arrays.
924
925 This allows certain devices in the array to be flagged as
926 .IR write-mostly .
927 MD will only read from such devices if there is no
928 other option.
929
930 If a write-intent bitmap is also provided, write requests to
931 write-mostly devices will be treated as write-behind requests and md
932 will not wait for writes to those requests to complete before
933 reporting the write as complete to the filesystem.
934
935 This allows for a RAID1 with WRITE-BEHIND to be used to mirror data
936 over a slow link to a remote computer (providing the link isn't too
937 slow). The extra latency of the remote link will not slow down normal
938 operations, but the remote system will still have a reasonably
939 up-to-date copy of all data.
940
941 .SS FAILFAST
942
943 From Linux 4.10,
944 .I
945 md
946 supports FAILFAST for RAID1 and RAID10 arrays. This is a flag that
947 can be set on individual drives, though it is usually set on all
948 drives, or no drives.
949
950 When
951 .I md
952 sends an I/O request to a drive that is marked as FAILFAST, and when
953 the array could survive the loss of that drive without losing data,
954 .I md
955 will request that the underlying device does not perform any retries.
956 This means that a failure will be reported to
957 .I md
958 promptly, and it can mark the device as faulty and continue using the
959 other device(s).
960 .I md
961 cannot control the timeout that the underlying devices use to
962 determine failure. Any changes desired to that timeout must be set
963 explictly on the underlying device, separately from using
964 .IR mdadm .
965
966 If a FAILFAST request does fail, and if it is still safe to mark the
967 device as faulty without data loss, that will be done and the array
968 will continue functioning on a reduced number of devices. If it is not
969 possible to safely mark the device as faulty,
970 .I md
971 will retry the request without disabling retries in the underlying
972 device. In any case,
973 .I md
974 will not attempt to repair read errors on a device marked as FAILFAST
975 by writing out the correct. It will just mark the device as faulty.
976
977 FAILFAST is appropriate for storage arrays that have a low probability
978 of true failure, but will sometimes introduce unacceptable delays to
979 I/O requests while performing internal maintenance. The value of
980 setting FAILFAST involves a trade-off. The gain is that the chance of
981 unacceptable delays is substantially reduced. The cost is that the
982 unlikely event of data-loss on one device is slightly more likely to
983 result in data-loss for the array.
984
985 When a device in an array using FAILFAST is marked as faulty, it will
986 usually become usable again in a short while.
987 .I mdadm
988 makes no attempt to detect that possibility. Some separate
989 mechanism, tuned to the specific details of the expected failure modes,
990 needs to be created to monitor devices to see when they return to full
991 functionality, and to then re-add them to the array. In order of
992 this "re-add" functionality to be effective, an array using FAILFAST
993 should always have a write-intent bitmap.
994
995 .SS RESTRIPING
996
997 .IR Restriping ,
998 also known as
999 .IR Reshaping ,
1000 is the processes of re-arranging the data stored in each stripe into a
1001 new layout. This might involve changing the number of devices in the
1002 array (so the stripes are wider), changing the chunk size (so stripes
1003 are deeper or shallower), or changing the arrangement of data and
1004 parity (possibly changing the RAID level, e.g. 1 to 5 or 5 to 6).
1005
1006 As of Linux 2.6.35, md can reshape a RAID4, RAID5, or RAID6 array to
1007 have a different number of devices (more or fewer) and to have a
1008 different layout or chunk size. It can also convert between these
1009 different RAID levels. It can also convert between RAID0 and RAID10,
1010 and between RAID0 and RAID4 or RAID5.
1011 Other possibilities may follow in future kernels.
1012
1013 During any stripe process there is a 'critical section' during which
1014 live data is being overwritten on disk. For the operation of
1015 increasing the number of drives in a RAID5, this critical section
1016 covers the first few stripes (the number being the product of the old
1017 and new number of devices). After this critical section is passed,
1018 data is only written to areas of the array which no longer hold live
1019 data \(em the live data has already been located away.
1020
1021 For a reshape which reduces the number of devices, the 'critical
1022 section' is at the end of the reshape process.
1023
1024 md is not able to ensure data preservation if there is a crash
1025 (e.g. power failure) during the critical section. If md is asked to
1026 start an array which failed during a critical section of restriping,
1027 it will fail to start the array.
1028
1029 To deal with this possibility, a user-space program must
1030 .IP \(bu 4
1031 Disable writes to that section of the array (using the
1032 .B sysfs
1033 interface),
1034 .IP \(bu 4
1035 take a copy of the data somewhere (i.e. make a backup),
1036 .IP \(bu 4
1037 allow the process to continue and invalidate the backup and restore
1038 write access once the critical section is passed, and
1039 .IP \(bu 4
1040 provide for restoring the critical data before restarting the array
1041 after a system crash.
1042 .PP
1043
1044 .B mdadm
1045 versions from 2.4 do this for growing a RAID5 array.
1046
1047 For operations that do not change the size of the array, like simply
1048 increasing chunk size, or converting RAID5 to RAID6 with one extra
1049 device, the entire process is the critical section. In this case, the
1050 restripe will need to progress in stages, as a section is suspended,
1051 backed up, restriped, and released.
1052
1053 .SS SYSFS INTERFACE
1054 Each block device appears as a directory in
1055 .I sysfs
1056 (which is usually mounted at
1057 .BR /sys ).
1058 For MD devices, this directory will contain a subdirectory called
1059 .B md
1060 which contains various files for providing access to information about
1061 the array.
1062
1063 This interface is documented more fully in the file
1064 .B Documentation/md.txt
1065 which is distributed with the kernel sources. That file should be
1066 consulted for full documentation. The following are just a selection
1067 of attribute files that are available.
1068
1069 .TP
1070 .B md/sync_speed_min
1071 This value, if set, overrides the system-wide setting in
1072 .B /proc/sys/dev/raid/speed_limit_min
1073 for this array only.
1074 Writing the value
1075 .B "system"
1076 to this file will cause the system-wide setting to have effect.
1077
1078 .TP
1079 .B md/sync_speed_max
1080 This is the partner of
1081 .B md/sync_speed_min
1082 and overrides
1083 .B /proc/sys/dev/raid/speed_limit_max
1084 described below.
1085
1086 .TP
1087 .B md/sync_action
1088 This can be used to monitor and control the resync/recovery process of
1089 MD.
1090 In particular, writing "check" here will cause the array to read all
1091 data block and check that they are consistent (e.g. parity is correct,
1092 or all mirror replicas are the same). Any discrepancies found are
1093 .B NOT
1094 corrected.
1095
1096 A count of problems found will be stored in
1097 .BR md/mismatch_count .
1098
1099 Alternately, "repair" can be written which will cause the same check
1100 to be performed, but any errors will be corrected.
1101
1102 Finally, "idle" can be written to stop the check/repair process.
1103
1104 .TP
1105 .B md/stripe_cache_size
1106 This is only available on RAID5 and RAID6. It records the size (in
1107 pages per device) of the stripe cache which is used for synchronising
1108 all write operations to the array and all read operations if the array
1109 is degraded. The default is 256. Valid values are 17 to 32768.
1110 Increasing this number can increase performance in some situations, at
1111 some cost in system memory. Note, setting this value too high can
1112 result in an "out of memory" condition for the system.
1113
1114 memory_consumed = system_page_size * nr_disks * stripe_cache_size
1115
1116 .TP
1117 .B md/preread_bypass_threshold
1118 This is only available on RAID5 and RAID6. This variable sets the
1119 number of times MD will service a full-stripe-write before servicing a
1120 stripe that requires some "prereading". For fairness this defaults to
1121 1. Valid values are 0 to stripe_cache_size. Setting this to 0
1122 maximizes sequential-write throughput at the cost of fairness to threads
1123 doing small or random writes.
1124
1125 .TP
1126 .B md/bitmap/backlog
1127 The value stored in the file only has any effect on RAID1 when write-mostly
1128 devices are active, and write requests to those devices are proceed in the
1129 background.
1130
1131 This variable sets a limit on the number of concurrent background writes,
1132 the valid values are 0 to 16383, 0 means that write-behind is not allowed,
1133 while any other number means it can happen. If there are more write requests
1134 than the number, new writes will by synchronous.
1135
1136 .TP
1137 .B md/bitmap/can_clear
1138 This is for externally managed bitmaps, where the kernel writes the bitmap
1139 itself, but metadata describing the bitmap is managed by mdmon or similar.
1140
1141 When the array is degraded, bits mustn't be cleared. When the array becomes
1142 optimal again, bit can be cleared, but first the metadata needs to record
1143 the current event count. So md sets this to 'false' and notifies mdmon,
1144 then mdmon updates the metadata and writes 'true'.
1145
1146 There is no code in mdmon to actually do this, so maybe it doesn't even
1147 work.
1148
1149 .TP
1150 .B md/bitmap/chunksize
1151 The bitmap chunksize can only be changed when no bitmap is active, and
1152 the value should be power of 2 and at least 512.
1153
1154 .TP
1155 .B md/bitmap/location
1156 This indicates where the write-intent bitmap for the array is stored.
1157 It can be "none" or "file" or a signed offset from the array metadata
1158 - measured in sectors. You cannot set a file by writing here - that can
1159 only be done with the SET_BITMAP_FILE ioctl.
1160
1161 Write 'none' to 'bitmap/location' will clear bitmap, and the previous
1162 location value must be write to it to restore bitmap.
1163
1164 .TP
1165 .B md/bitmap/max_backlog_used
1166 This keeps track of the maximum number of concurrent write-behind requests
1167 for an md array, writing any value to this file will clear it.
1168
1169 .TP
1170 .B md/bitmap/metadata
1171 This can be 'internal' or 'clustered' or 'external'. 'internal' is set
1172 by default, which means the metadata for bitmap is stored in the first 256
1173 bytes of the bitmap space. 'clustered' means separate bitmap metadata are
1174 used for each cluster node. 'external' means that bitmap metadata is managed
1175 externally to the kernel.
1176
1177 .TP
1178 .B md/bitmap/space
1179 This shows the space (in sectors) which is available at md/bitmap/location,
1180 and allows the kernel to know when it is safe to resize the bitmap to match
1181 a resized array. It should big enough to contain the total bytes in the bitmap.
1182
1183 For 1.0 metadata, assume we can use up to the superblock if before, else
1184 to 4K beyond superblock. For other metadata versions, assume no change is
1185 possible.
1186
1187 .TP
1188 .B md/bitmap/time_base
1189 This shows the time (in seconds) between disk flushes, and is used to looking
1190 for bits in the bitmap to be cleared.
1191
1192 The default value is 5 seconds, and it should be an unsigned long value.
1193
1194 .SS KERNEL PARAMETERS
1195
1196 The md driver recognised several different kernel parameters.
1197 .TP
1198 .B raid=noautodetect
1199 This will disable the normal detection of md arrays that happens at
1200 boot time. If a drive is partitioned with MS-DOS style partitions,
1201 then if any of the 4 main partitions has a partition type of 0xFD,
1202 then that partition will normally be inspected to see if it is part of
1203 an MD array, and if any full arrays are found, they are started. This
1204 kernel parameter disables this behaviour.
1205
1206 .TP
1207 .B raid=partitionable
1208 .TP
1209 .B raid=part
1210 These are available in 2.6 and later kernels only. They indicate that
1211 autodetected MD arrays should be created as partitionable arrays, with
1212 a different major device number to the original non-partitionable md
1213 arrays. The device number is listed as
1214 .I mdp
1215 in
1216 .IR /proc/devices .
1217
1218 .TP
1219 .B md_mod.start_ro=1
1220 .TP
1221 .B /sys/module/md_mod/parameters/start_ro
1222 This tells md to start all arrays in read-only mode. This is a soft
1223 read-only that will automatically switch to read-write on the first
1224 write request. However until that write request, nothing is written
1225 to any device by md, and in particular, no resync or recovery
1226 operation is started.
1227
1228 .TP
1229 .B md_mod.start_dirty_degraded=1
1230 .TP
1231 .B /sys/module/md_mod/parameters/start_dirty_degraded
1232 As mentioned above, md will not normally start a RAID4, RAID5, or
1233 RAID6 that is both dirty and degraded as this situation can imply
1234 hidden data loss. This can be awkward if the root filesystem is
1235 affected. Using this module parameter allows such arrays to be started
1236 at boot time. It should be understood that there is a real (though
1237 small) risk of data corruption in this situation.
1238
1239 .TP
1240 .BI md= n , dev , dev ,...
1241 .TP
1242 .BI md=d n , dev , dev ,...
1243 This tells the md driver to assemble
1244 .B /dev/md n
1245 from the listed devices. It is only necessary to start the device
1246 holding the root filesystem this way. Other arrays are best started
1247 once the system is booted.
1248
1249 In 2.6 kernels, the
1250 .B d
1251 immediately after the
1252 .B =
1253 indicates that a partitionable device (e.g.
1254 .BR /dev/md/d0 )
1255 should be created rather than the original non-partitionable device.
1256
1257 .TP
1258 .BI md= n , l , c , i , dev...
1259 This tells the md driver to assemble a legacy RAID0 or LINEAR array
1260 without a superblock.
1261 .I n
1262 gives the md device number,
1263 .I l
1264 gives the level, 0 for RAID0 or \-1 for LINEAR,
1265 .I c
1266 gives the chunk size as a base-2 logarithm offset by twelve, so 0
1267 means 4K, 1 means 8K.
1268 .I i
1269 is ignored (legacy support).
1270
1271 .SH FILES
1272 .TP
1273 .B /proc/mdstat
1274 Contains information about the status of currently running array.
1275 .TP
1276 .B /proc/sys/dev/raid/speed_limit_min
1277 A readable and writable file that reflects the current "goal" rebuild
1278 speed for times when non-rebuild activity is current on an array.
1279 The speed is in Kibibytes per second, and is a per-device rate, not a
1280 per-array rate (which means that an array with more disks will shuffle
1281 more data for a given speed). The default is 1000.
1282
1283 .TP
1284 .B /proc/sys/dev/raid/speed_limit_max
1285 A readable and writable file that reflects the current "goal" rebuild
1286 speed for times when no non-rebuild activity is current on an array.
1287 The default is 200,000.
1288
1289 .SH SEE ALSO
1290 .BR mdadm (8),