[mythtv-users] An LVM'd drive died! What do I do...

Jan Ophey ophey at ram.rwth-aachen.de
Thu Oct 27 08:04:09 EDT 2005


David Bennett wrote:

>
>(And on another note, is a 2 disk raid even worth it? If one of the
>hard drives develops an error, will that not corrupt its partner?)
>
>What does everyone think? Help me develop the poor mans backup...
>(not only do I keep my Video files on the LVM (which I can afford to
>lose), but I also keep my main cpu backup there. That would be
>upsetting...)
>
>
So here we go.
I'll try to explain the different RAID-Levels and their advantages and 
disadvantages:

RAID 0 (Zero)

You need 2-n Disks.
Data is getting split up on writing, putting part A on drive 1, part B 
on Drive 2 , part C on drive 3 (or it starts with drive 1 again, if your 
number of Drives has been reached. This is also known as "Striping" or 
"Stripeset" for People coming from Windows.

A 2-drive Example:
1   2
A   B
C   D
E   F
etc.

With 3 Drives:
1   2   3
A   B   C
D   E   F


Advantages:
Fast! Because every drive hast to fetch/write only half of the data you 
theoretically should get double performance.
You can use the full Space on your drives.
Disadvantages:
If 1 drive crashes ALL of your Data is gone.


RAID 1 (One)

You need 2 Disks.
Data is mirrored on both drives.

Example:
Drives:
1   2
A   A
B   B
C   C
etc...

Advantages:
Faster on reading, because one half of the requested data is read from 
drive 1 , the other part from drive 2
Full HDD-crash redundancy. If 1 Disk goes out for lunch the other has a 
exact copy of all data. You can replace the defective disk and the 
RAID-array will rebuild and continue operation as normal.
Disadvantages:
You can only use half of your Disks-capacity, because everything is 
mirrored.


RAID 5 (Five)
You need 3-n Disks.
Data is striped over n-1 Disks. The left space of 1 disk is used for 
parity/recover information. (For loadbalancing/speed the parity is 
spread over all drives)

Example (3 Drives) (p is parity information)

1   2   3
A   B   p
C   p   D
p   E   F
G   H   p
etc.


Example (4 drives):

1   2   3   4
A   B   C   p
D   E   p   F
G   p   H   I
p   J   K   L

etc.

Advantages:
As you can see: The more drives, the less (percentual) loss of space. I 
have 4*200GB RAID5 (800GB, 600GB useable, 25% loss for my video-storage. 
With 3 drives it would be 33% with 5 only 20%.
Fast reading. Same as RAID0. Chunks were fetched synchronously from the 
different drives.Slightly enlarged write performance. The host CPU has 
to calculate the parity data for each block written. (IIRC this is done 
via orthogonal vectors)
You have maximum space AND the security, that no data is lost if only 
ONE drive fails, as in 1st case: all data is completely on the remaining 
drives, or 2nd case: some parts are lost, but can be reconstructed on 
the fly using the parity information.
Disadvantages:
Most onboard-Controllers/external Controllers do not support this mode. 
You have to use Linux Software-Raid,wich is not really much slower than 
hardware RAID, but pulls some CPU-Power on writing.

There is the option of using RAID6 with is same as raid 5 with 2 chunks 
of parity, making it resistant against failure of 2 drives at once.


My personal favourite is RAID5.
Better speed, best cost/use relation.

Then you have the option of creating a LVM on the RAID Device wich 
allows you to use all the nice features of LVM and being safe from 
HDD-Failures.

So... that's my small RAID GUIDE.
If there are any questions...
hmm... I hope I can answer them.. ;)


hth,
Jan



More information about the mythtv-users mailing list