Using mdadm with different capacity drives in RAID 5?
Hi all,
I am going to soon setup a RAID 5 configuration for a server with mdadm. However, I am hoping to use the following configuration: 4x1TB SATA 3Gb/s HDD with 2x500GB SATA 3Gb/s HDD in a RAID 5 configuration. If this works as I imagine it, I should be left with about 3.5TB of total space. I am thinking it might be possible to create a striped array with the 2 500GB drives so the system sees 5x1TB HDDs. The reason I want to do this is simple, to achieve the highest capacity while remaining some failure redundancy. I bought the 1TB drives to use in this configuration specifically and the 500GB drives would essentially be unused by me any longer, sitting in the closet or under-appreciated in a workstation somewhere. Impossible? Please lend me your assistance! |
Hello
It should be quite easy :D Let's say you have the following HDDs: ============= sda1: 500GB sdb1: 500GB sdc1: 1TB sdd1: 1TB sde1: 1TB sdf1: 1TB ============= You first create a raid0 using your two 500GB drives: mdadm --create --verbose /dev/md0 --level=0 --raid-devices=2 /dev/sda1 /dev/sdb1 Then you create the raid5 using the four 1TB drives, plus your 1TB raid0: mdadm --create /dev/md1 --level=5 --raid-devices=5 /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 This should give you 4TB capacity. Is this what you would like to do? Greetings Ah - and to assemble it after a reboot you start of course first the raid0 with... mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1 ...and then the raid5 with... mdadm --assemble /dev/md1 /dev/md0 /dev/sdc1 /dev/sdd1 /dev/sde1 /dev/sdf1 |
An alternative solution - which may make things easier if you come to add more drives to the array at a later date - is to split the 1TB disks into 2 partitions, which would give you 10 partitions of 500GB each. Create a raid5 array with 6 members (/dev/sd*1) and another with 4 members (/dev/sd*2). As long as no array contains more than one partition from the same disk, you still have your redundancy.
This seems to be the most common way of using raid5 on disks of different sizes. |
Quote:
|
That was posted 10 years ago - and it specifically covered that issue. Maybe better to let dead threads stay dead.
|
Quote:
You'll have the 6-disk volume with all of the "1" partitions and another 4-disk one with the 2nd partition of the 4 1TB disks. When a disk fails it will never have 2 partitions in the same volume. |
Quote:
|
Quote:
|
Read post #6 - and keep re-reading it until you understand what is being said.
|
Why you configuring hardware RAID instead of software? Any specific reason?
|
All times are GMT -5. The time now is 07:05 AM. |