Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

In Debian 6, new installation, what is the recommended way of setting up a software RAID1 array so that the system is bootable from both disks?

I have heard that people that don't know what they are doing may set it up in such a way that the system becomes unbootable if the primary disk fails (!)

I haven't been able to find a simple listing of steps for the latest version of Debian.

share|improve this question
    
I have only seen that fail when people failed to install the boot-loader to both drives. \n \n E.g. after using \n mdadm --create /dev/md0 --level=mirror --raid-devices=2 /dev/sda1 /dev/sdb1 \n and pointing GRUB or LILO to /dev/sda1 \n –  Hennes Jan 5 '13 at 11:56
    
@Hennes where did you buy all the \n? I want some too. –  syneticon-dj Jan 5 '13 at 14:24
    
Newlines gone not quite right. –  Hennes Jan 5 '13 at 14:27
add comment

1 Answer

up vote 2 down vote accepted

I have done this before a year or so back to a few servers. It is a bit of a pain but doable. Its easier if you have hardware raid.

When I did it to a debian box I followed this awesome guide that saved me because there are many steps involved and it is a pain the arse if you get it wrong.

In short, you use mdadm to create your two partitions (md0/md1) (root/swap) do some copying on the guide, edit your boot menu do a few reboots and get the two drives in sync. Once you have them in sync you will be able to pull out each drive, and boot from it. Make sure you test it works though, and re-syncs the drives.

share|improve this answer
    
I was hoping for a more concise answer (the tutorial is quite long), but since your answer is the only one, I will accept it. Thank you! –  W3Coder Jan 14 '13 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.