2

I am new to RAID and I want to setup up a RAID-5 on my Ubuntu 10.04 sysatem. I have the kernel installed on a partition of a 500 GB disk. Then, I have another partition of FAT32 on the other half like so (fdisk -l output):

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       30395   244140032   83  Linux
/dev/sda2           30395       31002     4881409    5  Extended
/dev/sda3           31003       60801   239360467+   b  W95 FAT32
/dev/sda5           30395       31002     4881408   82  Linux swap / Solaris

Due to money restrictions, I can only afford one more 1 TB drive. My thinking is, create 2 or more partitions on this 1 TB drive and then use these as array components for the RAID-5. Will this work? I would have something like this:

/dev/sda3 = partition 1 for RAID
/dev/sdb1 = partition 2 for RAID
/dev/sdb2 = partition 3 for RAID
/dev/sdb3 = partition 4 for RAID

Will this work or do I actually need 3, 4, etc physical hard drives for a proper RAID-5 array?

EDIT - Thanks for all the answers. I really hadn't considered losing multiple partitions on one drive with failure. That makes sense, though... I think I am going to get a 1 TB drive and then just use it as storage and purchase another drive for RAID-5 as soon as I can afford it.

3 Answers 3

4

You can do it; I don't see the point, though.

If you have M partitions on N physical drives, and N < M, that means that at least one drive will have two partitions. RAID-5 protects you against losing one of the partitions; if one of the drives —with at least two partitions used by the RAID-5 volume— fails, you instantly lose the RAID-5 volume.

The only protection that would give you would be against losing some sectors in one of the partitions; given all the levels of protection that automatically happen without you knowing (e.g. faulty sector remapping) and my experience so far, the gains from protecting against such a failure are very little compared to the space (and speed!) you've lost for as long as the RAID-5 volume existed.

1

If you have only two drives, but you are spreading three (or more) volumes worth of parity data across them, when a drive dies then you are going to lose some of the parity data needed to rebuild the volume(s) that were on that drive.

If you want redundancy for your data and have two drives RAID-1 is really the only way to go, but you won't gain any additional storage space from that new drive you are putting in.

0

best case scenario when everything is working you get a slower more complicated version of just creating a full sized partition on the second drive and using it as normal (you'll take a performance hit of having to write multiple times for every write operation, but won't gain any protection from failures if multiple partitions are on the same disk!)

http://en.wikipedia.org/wiki/RAID

I suspect you might want to use a different RAID type, or not use RAID at all

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .