[mythtvnz] File System for RAID-5

James Booth james at booths.net.nz
Tue Jun 16 02:54:19 BST 2009


Thanks Steve, that makes things clear.

 

From: mythtvnz-bounces at lists.linuxnut.co.nz
[mailto:mythtvnz-bounces at lists.linuxnut.co.nz] On Behalf Of Steve Hodge
Sent: Tuesday, 16 June 2009 12:30 p.m.
To: MythTV in NZ
Subject: Re: [mythtvnz] File System for RAID-5

 

On Tue, Jun 16, 2009 at 11:54 AM, James Booth <james at booths.net.nz> wrote:

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.

 

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? 

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'll start with the following (drives
are 500GB, labeled A, B, C, partitions are 250GB):
Array 1: A1 B2
Array 2: B1 C2
Array 3: C1 A2

Say you get a new 500GB drive, 'D'. If you'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'd you have:
Array 3: C1 A2 D2

Now remove partition A2 from array 3. Finally set up a new array using D1
and A2. So you end up with:
Array 1: A1 B2
Array 2: B1 C2
Array 3: C1 D2
Array 4: D1 A2 (empty)

If you'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:
Array 1: A1 B2
Array 2: B1 -
Array 3: - A2
Array 4: D - (500GB)
Array 5: C - (500GB)
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'll have:
Array 4: D A
Array 5: C B

Expanding a (mdraid) RAID10 is not so easy but I recommend it if you'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.

Cheers,
Steve

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ourshack.com/pipermail/mythtvnz/attachments/20090616/2c4ffaac/attachment-0001.htm 


More information about the mythtvnz mailing list