~qbalazs/installation-guide/lp1030336

« back to all changes in this revision

Viewing changes to it/using-d-i/modules/mdcfg.xml

  • Committer: joeyh
  • Date: 2005-10-07 19:51:38 UTC
  • Revision ID: vcs-imports@canonical.com-20051007195138-c3d57b2617a79a4f
move manual to top-level directory, split out of debian-installer package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!-- retain these comments for translator revision tracking -->
 
2
<!-- original version: 30377 untranslated -->
 
3
 
 
4
 
 
5
   <sect3 id="mdcfg">
 
6
   <title>Configuring Multidisk Device (Software RAID)</title>
 
7
<para>
 
8
 
 
9
If you have more than one harddrive<footnote><para>
 
10
 
 
11
To be honest, you can construct MD device even from partitions
 
12
residing on single physical drive, but that won't bring you anything
 
13
useful.
 
14
 
 
15
</para></footnote> in your computer, you can use
 
16
<command>mdcfg</command> to setup your drives for increased
 
17
performance and/or better reliability of your data. The result is
 
18
called <firstterm>Multidisk Device</firstterm> (or after its most
 
19
famous variant <firstterm>software RAID</firstterm>).
 
20
 
 
21
</para><para>
 
22
 
 
23
MD is basically a bunch of partitions located on different disks and
 
24
combined together to form a <emphasis>logical</emphasis> device. This
 
25
device can then be used like an ordinary partition (i.e. in
 
26
<command>partman</command> you can format it, assign a mountpoint,
 
27
etc.).
 
28
 
 
29
</para><para>
 
30
 
 
31
The benefit you gain depends on a type of a MD device you are
 
32
creating. Currently supported are:
 
33
 
 
34
<variablelist>
 
35
<varlistentry>
 
36
 
 
37
<term>RAID0</term><listitem><para>
 
38
 
 
39
Is mainly aimed at performance.  RAID0 splits all incoming data into
 
40
<firstterm>stripes</firstterm> and distributes them equally over each
 
41
disk in the array. This can increase the speed of read/write
 
42
operations, but when one of the disks fails, you will loose
 
43
<emphasis>everything</emphasis> (part of the information is still on
 
44
the healthy disk(s), the other part <emphasis>was</emphasis> on the
 
45
failed disk).
 
46
 
 
47
</para><para>
 
48
 
 
49
The typical use for RAID0 is a partition for video editing.
 
50
 
 
51
</para></listitem>
 
52
</varlistentry>
 
53
<varlistentry>
 
54
 
 
55
<term>RAID1</term><listitem><para>
 
56
 
 
57
Is suitable for setups where reliability is the first concern.  It
 
58
consists of several (usually two) equally sized partitions where every
 
59
partition contains exactly the same data. This essentially means three
 
60
things.  First, if one of your disks fails, you still have the data
 
61
mirrored on the remaining disks. Second, you can use only a fraction
 
62
of the available capacity (more precisely, it is the size of the
 
63
smallest partition in the RAID). Third, file reads are load balanced among
 
64
the disks, which can improve performance on a server, such as a file
 
65
server, that tends to be loaded with more disk reads than writes.
 
66
 
 
67
</para><para>
 
68
 
 
69
Optionally you can have a spare disk in the array which will take the
 
70
place of the failed disk in the case of failure.
 
71
 
 
72
</para></listitem>
 
73
</varlistentry>
 
74
<varlistentry>
 
75
 
 
76
<term>RAID5</term><listitem><para>
 
77
 
 
78
Is a good compromise between speed, reliability and data redundancy.
 
79
RAID5 splits all incomming data into stripes and distributes them
 
80
equally on all but one disks (similar to RAID0). Unlike RAID0, RAID5
 
81
also computes <firstterm>parity</firstterm> information, which gets
 
82
written on the remaining disk. The parity disk is not static (that
 
83
would be called RAID4), but is changing periodically, so the parity
 
84
information is distributed equally on all disks.  When one of the
 
85
disks fails, the missing part of information can be computed from
 
86
remaining data and its parity. RAID5 must consist of at least three
 
87
active partitions. Optionally you can have a spare disk in the array
 
88
which will take the place of the failed disk in the case of failure.
 
89
 
 
90
</para><para>
 
91
 
 
92
As you can see, RAID5 has similar degree of reliability like RAID1
 
93
while achieving less redundancy. On the other hand it might be a bit
 
94
slower on write operation than RAID0 due to computation of parity
 
95
information.
 
96
 
 
97
</para></listitem>
 
98
</varlistentry>
 
99
</variablelist>
 
100
 
 
101
To sum it up:
 
102
 
 
103
<informaltable>
 
104
<tgroup cols="5">
 
105
<thead>
 
106
<row>
 
107
  <entry>Type</entry>
 
108
  <entry>Minimum Devices</entry>
 
109
  <entry>Spare Device</entry>
 
110
  <entry>Survives disk failure?</entry>
 
111
  <entry>Available Space</entry>
 
112
</row>
 
113
</thead>
 
114
 
 
115
<tbody>
 
116
<row>
 
117
  <entry>RAID0</entry>
 
118
  <entry>2</entry>
 
119
  <entry>no</entry>
 
120
  <entry>no</entry>
 
121
  <entry>Size of the smallest partition multiplied by number of devices in RAID</entry>
 
122
</row>
 
123
 
 
124
<row>
 
125
  <entry>RAID1</entry>
 
126
  <entry>2</entry>
 
127
  <entry>optional</entry>
 
128
  <entry>yes</entry>
 
129
  <entry>Size of the smallest partition in RAID</entry>
 
130
</row>
 
131
 
 
132
<row>
 
133
  <entry>RAID5</entry>
 
134
  <entry>3</entry>
 
135
  <entry>optional</entry>
 
136
  <entry>yes</entry>
 
137
  <entry>
 
138
    Size of the smallest partition multiplied by (number of devices in
 
139
    RAID minus one)
 
140
  </entry>
 
141
</row>
 
142
 
 
143
</tbody></tgroup></informaltable>
 
144
 
 
145
</para><para>
 
146
 
 
147
If you want to know the whole truth about Software RAID, have a look
 
148
at <ulink url="&url-software-raid-howto;">Software RAID HOWTO</ulink>.
 
149
 
 
150
<note arch="powerpc" condition="sarge"><para>
 
151
 
 
152
There is no widely accepted standard to identify partitions containing
 
153
RAID data on Apple Power Macintosh hardware. This means that &d-i;
 
154
currently does not support setting up RAID on this platform.
 
155
 
 
156
</para></note>
 
157
 
 
158
</para><para>
 
159
 
 
160
To create a MD device, you need to have the desired partitions it
 
161
should consist of marked for use in a RAID.  (This is done in
 
162
<command>partman</command> in the <guimenu>Partition
 
163
settings</guimenu> menu where you should select <menuchoice>
 
164
<guimenu>Use as:</guimenu> <guimenuitem>physical volume for
 
165
RAID</guimenuitem> </menuchoice>.)
 
166
 
 
167
</para><warning><para>
 
168
 
 
169
Support for MD is a relatively new addition to the installer.
 
170
You may experience problems for some RAID levels and in combination
 
171
with some bootloaders if you try to use MD for the root
 
172
(<filename>/</filename>) filesystem. For experienced users, it may be
 
173
possible to work around some of these problems by executing some
 
174
configuration or installation steps manually from a shell.
 
175
 
 
176
</para></warning><para>
 
177
 
 
178
Next, you should choose <guimenuitem>Configure software
 
179
RAID</guimenuitem> from the main <command>partman</command> menu.
 
180
On the first screen of <command>mdcfg</command> simply select
 
181
<guimenuitem>Create MD device</guimenuitem>. You will be presented with
 
182
a list of supported types of MD devices, from which you should choose
 
183
one (e.g. RAID1). What follows depends on the type of MD you selected.
 
184
</para>
 
185
 
 
186
<itemizedlist>
 
187
<listitem><para>
 
188
 
 
189
RAID0 is simple &mdash; you will be issued with the list of available
 
190
RAID partitions and your only task is to select the partitions which
 
191
will form the MD.
 
192
 
 
193
</para></listitem>
 
194
<listitem><para>
 
195
 
 
196
RAID1 is a bit more tricky. First, you will be asked to enter the
 
197
number of active devices and the number of spare devices which will
 
198
form the MD. Next, you need to select from the list of available RAID
 
199
partitions those that will be active and then those that will be
 
200
spare. The count of selected partitions must be equal to the number
 
201
provided few seconds ago. Don't worry. If you make a mistake and
 
202
select different number of partitions, the &d-i; won't let you
 
203
continue until you correct the issue.
 
204
 
 
205
</para></listitem>
 
206
<listitem><para>
 
207
 
 
208
RAID5 has similar setup procedure as RAID1 with the exception that you
 
209
need to use at least <emphasis>three</emphasis> active partitions.
 
210
 
 
211
</para></listitem>
 
212
</itemizedlist>
 
213
 
 
214
<para>
 
215
 
 
216
It is perfectly possible to have several types of MD at once. For
 
217
example if you have three 200 GB hard drives dedicated to MD, each
 
218
containing two 100 GB partitions, you can combine first partitions on
 
219
all three disk into the RAID0 (fast 300 GB video editing partition)
 
220
and use the other three partitions (2 active and 1 spare) for RAID1
 
221
(quite reliable 100 GB partition for <filename>/home</filename>).
 
222
 
 
223
</para><para>
 
224
 
 
225
After you setup MD devices to your liking, you can
 
226
<guimenuitem>Finish</guimenuitem> <command>mdcfg</command> to return
 
227
back to the <command>partman</command> to create filesystems on your
 
228
new MD devices and assign them the usual attributes like mountpoints.
 
229
 
 
230
</para>
 
231
   </sect3>