LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   using md to boot (http://www.linuxquestions.org/questions/linux-general-1/using-md-to-boot-647100/)

emrecio 06-04-2008 11:36 PM

using md to boot
 
Is it possible to do a software raid mirror:
Code:

/dev/md/0 == /dev/sda1 -> /dev/sdb1 == /boot
/dev/md/1 == /dev/sda2 -> /dev/sdb2 == /
/dev/md/2 == /dev/sda3 -> /dev/sdb3 == /home
/dev/sda4 == (1/2) swap
/dev/sdb4 == (1/2) swap

. And boot off of the software raid?
Basically I want to do a full software raid mirrored system, so that I don't have to worry about *any* failure. And as soon as smartd tells me I am having problems, I can swap out the drive with a new drive.
. When I swap it out with the new drive, am I going to need to partition the drive first?
. It won't be hot-swapable, so is it legit to boot off the good drive with the new one is in there?

TB0ne 06-05-2008 03:47 PM

I don't know if that's possible or not, but I do know that I'd only ever go with hardware RAID, unless I had no choice. Software RAID (performance wise), is not too good. A good RAID5 controller (SATA), is less than $500, and will get you the online-spare you're wanting, as well as being easy to set up, Linux wise. When you do your install, it'll see one disk...the array you set up in the controller BIOS. Install to there...everything else is invisible to Linux.

emrecio 06-05-2008 03:57 PM

500?!
 
I agree that it's simpler to set up. I have done that at work with the servers we have here (HP SMART Array). But that's the point, this is just my personal system, and I really don't want to spend the $$. I don't do much that's disk intensive, or cpu intensive. Heck, I was on a 1.5GHz Duron w/ 512mb until last year.

TB0ne 06-06-2008 08:17 AM

Well, a SATA controller from Newegg that does hardware RAID1 can be had for less than $100. I know what you mean about your personal vs. office systems, though, but software RAID is agonizingly slow by comparison. I've never done what you're attempting, though, so I don't know how much pain you'll have to go through to get it going.

archtoad6 06-09-2008 07:40 AM

Real h/w RAID 1 for <$100, may we have a link please? TIA.

stefan_nicolau 06-13-2008 08:10 PM

a) It is possible to boot from software raid. You might not even need a /boot partition.
b) I would recommend avoiding hardware raid. Even real hardware raid cards may give you worse performance than software raid. Cheap raid controllers offload all the processing to the drivers. Linux drivers for these cards are notoriously buggy (look at all the dozens of raid threads in the forums here). I don't see why people claim hardware raid gives such great performance. I get 110mb/s from an ide software raid array, which is twice the speed of the individual drives. In addition, if anything happens to the hardware raid controller, your data might become inaccessible. (end of rant)
c) Yes, you can replace a drives. You will need to partition it first, I think, then tell mdadm to rebuild the array using the new drive.
d) If you want to really protect your system, you should put swap on a raid mirrored partition too. If a disk goes down with swap on it, the system will crash.


All times are GMT -5. The time now is 10:44 AM.