<div class="gmail_quote">On Tue, Jun 16, 2009 at 11:54 AM, James Booth <span dir="ltr">&lt;<a href="mailto:james@booths.net.nz">james@booths.net.nz</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">









<div bgcolor="white" link="blue" vlink="purple" lang="EN-NZ">

<div>

<p><span style="font-size: 10pt; color: blue;">I’m starting to lean towards RAID1 or RAID10. There is one
thing that I am not clear on with RAID1, maybe someone can help me here.</span></p>

<p><span style="font-size: 10pt; color: blue;"> </span></p>

<p><span style="font-size: 10pt; color: blue;">I understand the RAID is created out of partitions, as opposed to
physical drives. Does this mean I can divide 3 x HDD’s into 6 equal
partitions, and then set up a RAID-1 solution that mirrors each partition on
another partition that resides on a separate physical drive? ie I don’t need
an even number of disks for a mirrored system? If so, how does adding in more disks
work? </span></p></div></div></blockquote><div>You can build mdraid volumes out of partitions or whole drives. So yes, you can split each drive into two partitions and then setup 3 RAID1 volumes from pairs of partitions on different drives. When adding more disks you can degrade some of the arrays and use the resulting spare space to create a bigger array with the new drive. Eg, you&#39;ll start with the following (drives are 500GB, labeled A, B, C, partitions are 250GB):<br>
Array 1: A1 B2<br>Array 2: B1 C2<br>Array 3: C1 A2<br><br>Say you get a new 500GB drive, &#39;D&#39;. If you&#39;re willing to stick to 250GB arrays (rather than reconfiguring to 500GB arrays) you can add the new drive while ensuring that you always have two copies of everything. Partition the new drive into two 250GB partitions. Then add partition D2 to array 3 (so array 3 has 3 copies of the data). Once the array has sync&#39;d you have:<br>
Array 3: C1 A2 D2<br><br>Now remove partition A2 from array 3. Finally set up a new array using D1 and A2. So you end up with:<br>Array 1: A1 B2<br>Array 2: B1 C2<br>Array 3: C1 D2<br>Array 4: D1 A2 (empty)<br><br>If you&#39;re not worried about maintaining two copies of everything during the process you can do this: create a new array out of the new drive D. Set it up with a missing copy. Remove C from arrays 2 and 3. Set up another array with drive C and a missing copy. At this point you have:<br>
Array 1: A1 B2<br>Array 2: B1 -<br>Array 3: - A2<br>Array 4: D - (500GB)<br>Array 5: C - (500GB)<br>Copy everything from arrays 1, 2, and 3 to arrays 4 and 5 however you like. Then delete arrays 1, 2, and 3 and add drives A and B to arrays 4 and 5. Once they sync you&#39;ll have:<br>
Array 4: D A<br>Array 5: C B<br><br>Expanding a (mdraid) RAID10 is not so easy but I recommend it if you&#39;re not likely to expand often as the performance can be much better. You can set it up so that a single filesystem is striped across the 3 or 4 drives without needing LVM on top.<br>
<br>Cheers,<br>Steve<br><br></div></div>