software raid 1 in ubuntu questions

modulus

Limp Gawd
Joined
Sep 20, 2010
Messages
360
I'm setting up a small file server and want to get a basic raid 1 setup going. In the past I've always used hardware raid, never software raid before. I'm not sure what features will still exist with the software setup. In the current setup I have going, I would like to pursue software raid instead of hardware for a couple reasons. One reason is it is a small form factor build without a lot of airflow and all my hardware raid controllers always put off a ton of heat. Given the fact that the system right now runs very cool, I'd like to keep it that way. I guess my main question is that what happens when one drive fails in the software raid 1 in ubuntu?

Will everything still work and be accessible because of the mirror? Is the failed drive immediately recognized as failed? What is involved in replacing the failed drive? Can I just physically replace it and will the system rebuild the mirror on the new drive?

It seems pretty easy to find documentation on how to setup raid in ubuntu, less easy to find documentation on how it actually works. Thanks for your help.
 
Will everything still work and be accessible because of the mirror?
Yes

Is the failed drive immediately recognized as failed?
Pretty much.

What is involved in replacing the failed drive?

mdadm /dev/md0 --remove /dev/faileddisk
mdadm /dev/md0 --add /dev/newdisk

Assuming your raid 1 array is /dev/md0

Can I just physically replace it and will the system rebuild the mirror on the new drive?
No you have to tell mdadm to use the new drive.
 
I agree with you about mdadm lacking good beginner documentation for usage. It is powerful software, but not really geared to beginners.

One thing to add is that you can set up mdadm to run a daemon to monitor your RAID(s) and email you if a drive fails. You can read the man page or search the web for more information, but basically you need to specify an email address in mdadm.conf, and then issue a command like:

#mdadm --monitor --scan --daemonise --test --syslog
 
Back
Top