How would I grow a RAID10 array using mdadm?

Obviously I would need to add 2 drives at a time, or would it have to be 4 drives?

I have a feeling its just a bad idea.

Or would be just wiser to just opt for RAID5?

link|improve this question
Usually, if someone is asking me if they need RAID 10, that means they don't need it. Why not Raid 5 or Raid 6? – surfasb Jul 17 '11 at 14:57
I was hoping for better write performance than RAID5.. But I guess the lack of flexibility rules that out.. – stuartc Jul 17 '11 at 20:49
In general, RAID 5/6 will provide better write performance than RAID 10/01. Because you are distributing writes across all drives versus only half the drives. – surfasb Jul 17 '11 at 21:15
feedback

2 Answers

up vote 1 down vote accepted

Last time I checked, mdadm won't let you --grow raid10. I glanced over mdadm's manpage now and it still says: Currently supported growth options including changing the active size of component devices and changing the number of active devices in RAID levels 1/4/5/6, changing the RAID level between 1, 5, and 6, changing the chunk size and layout for RAID5 and RAID5, as well as adding or removing a write-intent bitmap.

link|improve this answer
Thanks! Appreciated, also another good hint this isn't going to happen quickly either is that I can't find one hardware RAID card that does it either.. RAID5 it is.. – stuartc Jul 17 '11 at 20:42
RAID5 can be painfully slow on some workloads. What do you intend to do? – Stingray Jul 19 '11 at 17:12
Mostly just storing media, but also mounting an NFS share for photo editing, so was hoping for some good write speeds as well as reads. – stuartc Jul 20 '11 at 14:15
feedback

You cannot grow a RAID10-array, this is true. But you can start with two drives (at the cost of no redundancy at this point) and then later, add two more. I have used this method to switch from a RAID5 array with four disc drives to RAID10 with four disc drives.

I degraded RAID5 and removed one disc out of the array. This gave me two discs that were free to use. Then I created a RAID10-array with something along the lines of 'mdadm --create --level 10 /dev/md0 /dev/sda1 missing /dev/sdc1 missing'. This was enough to start the array.

When I had moved the data from the degraded RAID5-array to the RAID10-array, I added two of the RAID5-discs to the RAID10-array and added the extra one as a spare.

It is probably a good idea if someone who is more knowledgable than I can talk about any performance impact this may have had. But the primary reason for my post is to show that it is possible to start off with RAID10 and two drives.

Note: do read the following forum post that asks and answers whether the disk order in mdadm matters.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.