LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-10-2009, 02:42 PM   #1
lolhan
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Question 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!
 
Old 08-22-2009, 08:31 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Switzerland
Distribution: Gentoo
Posts: 710

Rep: Reputation: 80
Hello
It should be quite easy

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

Last edited by Pearlseattle; 08-22-2009 at 08:35 AM.
 
Old 10-27-2009, 07:18 AM   #3
MrAngel
LQ Newbie
 
Registered: Oct 2009
Posts: 8

Rep: Reputation: 0
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.
 
  


Reply

Tags
mdadm, raid5, software


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 35 01-05-2013 03:35 PM
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-14-2009 05:59 PM
RAID storage capacity calculation 2007fld Linux - Newbie 1 01-31-2008 10:50 AM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 03:59 AM
hardware raid 5, online capacity expansion, and parted hondaman Linux - Software 0 07-05-2006 12:00 PM


All times are GMT -5. The time now is 04:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration