LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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 06-01-2010, 01:39 PM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
RAID Configuration For New Home Server


I have a new home server I built this weekend with 4 x 320 GB Seagate Barracuda SATA drives. I am going to load my O.S. this week however I don't have a RAID controller so I would like to utilize 'Software RAID' via 'mdadm' package. My question is since this is a general home server with no specific function rather than hold my data reliabily and resonably fast, how do you guys recommend I configure my partitions for RAID? What level would be best with my 4 drive configuration? RAID5 or RAID10? Should I use a 3 drive RAID and use the 4th as a spare? Please let me know what you recommend as I don't have a lot of expertise with what is not practical or useless when it comes to Mdadm RAID.

Thanks!
 
Old 06-01-2010, 01:59 PM   #2
spikeymike
Spirit Time Clock Maintainer
 
Registered: Dec 2006
Location: Treasure Coast, FL
Distribution: Suse
Posts: 9

Rep: Reputation: 0
Carlos,

Since you have no hardware raid card, you're software raid solution will require you to first boot linux, then the raid array is available.

This means that you'll have 1 drive with your Linux installation, then the other 3 drives (Raid 5) will be your raid array.

Of course, for availability, you could mirror your OS drive and then mirror your 'data' drive.

The very best way, of course, is to use a hardware raid controller, set up a Raid 5 array, using your 4th drive as a hot-spare.

-Mike
 
Old 06-01-2010, 02:19 PM   #3
hunter3740
LQ Newbie
 
Registered: Mar 2010
Location: Pittsburgh
Distribution: Debian 6
Posts: 28

Rep: Reputation: 17
I vote for RAID 5

I am fond of RAID 5, where you get the best of all worlds: *size* and redundancy (and speed). I tend to have my operating systems on RAID 1 and the data on RAID 5 (i.e. you can do this with two physical drives and then buy a third 320 for the data, to have the min 3 needed for RAID 5); but, on a couple setups, I have two partitions on a RAID 5 (i.e. which might be like your situation, you have to pick one RAID setup, which I picked RAID 5).

As far as having spares, my take on it is only if you are afraid you won't be able to find a replacement drive in the future (i.e. same size/rpm/cache specs), but I say it's probably better to swap out all your drives in that case.

As far as having mirrored mirrors (aka RAID 10), that's some crazy overkill unless you are storing priceless home movies of your kids' first step, words, performance, etc.

Just get a cheap external drive (e.g. 1TB USB for $75) and do a backup and if either your RAID setup or the external drive dies, replaced said broken stuff.

The key is that RAID it's only helping your up time, so don't stress over it too much (as you can always get corrupted data). The best thing you can do is BACKUP your stuff (i.e. copy to somewhere else).

Also, spikemike, carlos can use "missing" and --create a degraded raid 5 out of the remaining 3 drives (with one missing slot), then copy his current drive over to the array ("man dd" and "man parted" for clues), then boot to that new (degraded) array (i.e. edit /etc/fstab), then --add the original drive into the degraded array ("man mdadm" of course). A lot of work, but good for up time.

Last edited by hunter3740; 06-01-2010 at 02:37 PM.
 
Old 06-01-2010, 02:52 PM   #4
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Quote:
Originally Posted by spikeymike View Post
Carlos,

Since you have no hardware raid card, you're software raid solution will require you to first boot linux, then the raid array is available.

This means that you'll have 1 drive with your Linux installation, then the other 3 drives (Raid 5) will be your raid array.

Of course, for availability, you could mirror your OS drive and then mirror your 'data' drive.

The very best way, of course, is to use a hardware raid controller, set up a Raid 5 array, using your 4th drive as a hot-spare.

-Mike
Sorry but you can do an entire RAID before you load the OS. I can set my OS on a 4 disk RAID 5 or RAID 10 if I wanted. Was just asking which is best for basic use. I don't think hardware RAID controllers are the best as the controller fails, everything fails. Plus there is no active way to monitor your RAID from the OS.

Thanks for the suggestions. I will just do the following:

/dev/sda1 100 MB - RAID (bootable)
/dev/sda2 2 GB - RAID
/dev/sda3 320 GB - RAID

Do that same schema above for all 4 drives and then create my RAID:

/
Code:
mdadm --create /dev/md0 --level=5 --raid-devices=4 /dev/sda3 /dev/sdb3 /dev/sdc3 /dev/sdd3
/boot
Code:
mdadm --create /dev/md1 --level=1 --raid-devices=4 /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
Swap
Code:
mdadm --create /dev/md2 --level=1 --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2
 
Old 06-02-2010, 08:11 AM   #5
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
Hi Carlos,

Just curious, but why did you make separate RAID partitions for /boot and /swap? And why did you use RAID level 1 for those?
 
Old 06-02-2010, 08:16 AM   #6
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Original Poster
Rep: Reputation: 77
Because /boot is where Grub lives. Grub doesn't support anything greater that RAID1. If you do RAID5 on /boot, Grub will puke unless you're running Grub 2 which I doubt...
 
Old 06-02-2010, 08:19 AM   #7
JD50
Member
 
Registered: Nov 2007
Location: Virginia
Distribution: Fedora, RHEL, CentOS
Posts: 67

Rep: Reputation: 17
Quote:
Originally Posted by carlosinfl View Post
Because /boot is where Grub lives. Grub doesn't support anything greater that RAID1. If you do RAID5 on /boot, Grub will puke unless you're running Grub 2 which I doubt...
Oh ok, that makes sense, thanks.

Why are you using RAID 1 for swap instead of sticking with RAID 5?

Last edited by JD50; 06-02-2010 at 08:26 AM.
 
  


Reply



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
Legality of raid on home of iPhone blogger raid queried Jeebizz Linux - News 0 04-28-2010 11:26 AM
RAID 5 VS RAID 10 for home NAS pwjohnston Linux - Server 2 08-07-2009 10:56 PM
Copying RAID configuration to another system with no RAID?? ojha_riddhish Linux - Server 4 04-10-2009 04:58 AM
SATA RAID card for home server odyssey84 Linux - Server 3 07-27-2008 09:30 PM
Best configuration for home file/web server? The Milkman Linux - Newbie 7 01-19-2005 07:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration