LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Tags used in this thread
Popular LQ Tags , ,

Reply
 
Thread Tools
Old 08-10-2009, 03:42 PM   #1
lolhan
LQ Newbie
 
Registered: Aug 2009
Posts: 1
Thanked: 0
Question Using mdadm with different capacity drives in RAID 5?


[Log in to get rid of this advertisement]
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!
lolhan is offline  
Tag This Post , ,
Reply With Quote
Old 08-22-2009, 09:31 AM   #2
Pearlseattle
Member
 
Registered: Aug 2007
Location: Switzerland
Distribution: Gentoo
Posts: 381
Thanked: 8
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 09:35 AM..
linuxgentoo Pearlseattle is offline     Reply With Quote
Old 10-27-2009, 08:18 AM   #3
MrAngel
LQ Newbie
 
Registered: Oct 2009
Posts: 4
Thanked: 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.
windows_vista MrAngel is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Dell/Intel ICH7 soft-RAID and mdadm raid-level mistake PhilipTheMouse Linux - General 0 03-16-2009 03:44 AM
RAID storage capacity calculation 2007fld Linux - Newbie 1 01-31-2008 11:50 AM
RAID mdadm - Sending E-Mails on RAID Failure? rootking Linux - General 1 12-25-2007 04:59 AM
Why can't I mount this md0 raid? (mdadm and software raid) cruiserparts Linux - Software 34 04-12-2007 12:50 PM
hardware raid 5, online capacity expansion, and parted hondaman Linux - Software 0 07-05-2006 01:00 PM


All times are GMT -5. The time now is 08:05 AM.

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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration