]>
Commit | Line | Data |
---|---|---|
56eb10c0 NB |
1 | .TH MD 4 |
2 | .SH NAME | |
3 | md \- Multiple Device driver aka Linux Software Raid | |
4 | .SH SYNOPSIS | |
5 | .BI /dev/md n | |
6 | .br | |
7 | .BI /dev/md/ n | |
8 | .SH DESCRIPTION | |
9 | The | |
10 | .B md | |
11 | driver provides virtual devices that are created from one or more | |
12 | independant underlying devices. This array of devices often contains | |
13 | redundancy, and hence the acronym RAID which stands for a Redundant | |
14 | Array of Independant Devices. | |
15 | .PP | |
16 | .B md | |
17 | support RAID levels 1 (mirroring) 4 (striped array with parity device) and 5 | |
18 | (striped array with distributed parity information. If a single underlying | |
11a3e71d | 19 | device fails while using one of these level, the array will continue |
56eb10c0 NB |
20 | to function. |
21 | .PP | |
22 | .B md | |
23 | also supports a number of pseudo RAID (non-redundant) configuations | |
24 | including RAID0 (striped array), LINEAR (catenated array) and | |
25 | MULTIPATH (a set of different interfaces to the same device). | |
26 | ||
11a3e71d | 27 | .SS MD SUPER BLOCK |
56eb10c0 NB |
28 | With the exception of Legacy Arrays described below, each device that |
29 | is incorportated into an MD array has a | |
30 | .I super block | |
31 | written towards the end of the device. This superblock records | |
32 | information about the structure and state of the array so that the | |
11a3e71d | 33 | array can be reliably re-assembled after a shutdown. |
56eb10c0 NB |
34 | |
35 | The superblock is 4K long and is written into a 64K aligned block that | |
11a3e71d | 36 | starts at least 64K and less than 128K from the end of the device |
56eb10c0 NB |
37 | (i.e. to get the address of the superblock round the size of the |
38 | device down to a multiple of 64K and then subtract 64K). | |
11a3e71d | 39 | The available size of each device is the amount of space before the |
56eb10c0 NB |
40 | super block, so between 64K and 128K is lost when a device in |
41 | incorporated into an MD array. | |
42 | ||
43 | The superblock contains, among other things: | |
44 | .TP | |
45 | LEVEL | |
11a3e71d NB |
46 | The manner in which the devices are arranged into the array |
47 | (linear, raid0, raid1, raid4, raid5, multipath). | |
56eb10c0 NB |
48 | .TP |
49 | UUID | |
50 | a 128 bit Universally Unique Identifier that identifies the array that | |
51 | this device is part of. | |
52 | ||
11a3e71d NB |
53 | .SS LEGACY ARRAYS |
54 | Early versions of the | |
55 | .B md | |
56 | driver only supported Linear and Raid0 configurations and so | |
57 | did not use an MD superblock (as there is not state that needs to be | |
58 | recorded). While it is strongly recommended that all newly created | |
59 | arrays utilise a superblock to help ensure that they are assembled | |
60 | properly, the | |
61 | .B md | |
62 | driver still supports legacy linear and raid0 md arrays that | |
63 | do not have a superblock. | |
64 | ||
56eb10c0 | 65 | .SS LINEAR |
11a3e71d NB |
66 | |
67 | A linear array simply catenates the available space on each | |
68 | drive together to form one large virtual drive. | |
69 | ||
70 | One advantage of this arrangement over the more common RAID0 | |
71 | arrangement is that the array may be reconfigured at a later time with | |
72 | an extra drive and so the array is made bigger without disturbing the | |
73 | data that is on the array. However this cannot be done on a live | |
74 | array. | |
75 | ||
76 | ||
77 | ||
56eb10c0 | 78 | .SS RAID0 |
11a3e71d NB |
79 | |
80 | A RAID0 array (which has zero redundancy) is also known as a | |
81 | striped array. | |
56eb10c0 NB |
82 | .SS RAID1 |
83 | .SS RAID4 | |
84 | .SS RAID5 | |
11a3e71d | 85 | .SS MUTIPATH |
56eb10c0 NB |
86 | .SS REBUILD/RESYNC |
87 | .SH FILES | |
88 | .TP | |
89 | .B /proc/mdstat | |
90 | Contains information about the status of currently running array. | |
91 | .TP | |
92 | .B /proc/sys/dev/raid/speed_limit_min | |
93 | A readable and writable file that reflects the current goal rebuild | |
94 | speed for times when non-rebuild activity is current on an array. | |
95 | The speed is in Kibibytes per second, and is a per-device rate, not a | |
96 | per-array rate (which means that an array with more disc will shuffle | |
97 | more data for a given speed). The default is 100. | |
98 | ||
99 | .TP | |
100 | .B /proc/sys/dev/raid/speed_limit_max | |
101 | A readable and writable file that reflects the current goal rebuild | |
102 | speed for times when no non-rebuild activity is current on an array. | |
103 | The default is 100,000. | |
104 | ||
105 | .SH SEE ALSO | |
106 | .BR mdadm (8), | |
107 | .BR mkraid (8). |